summaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/blocks-seq.c
blob: b3e672976cab6f55c69b6012b3826d3dd039dc2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
// CHECK: [[Vi:%.+]] = alloca %struct.__block_byref_i, align 8
// CHECK: call i32 (...) @rhs()
// CHECK: [[V7:%.+]] = getelementptr inbounds %struct.__block_byref_i, %struct.__block_byref_i* [[Vi]], i32 0, i32 1
// CHECK: load %struct.__block_byref_i*, %struct.__block_byref_i** [[V7]]
// CHECK: call i32 (...) @rhs()
// CHECK: [[V11:%.+]] = getelementptr inbounds %struct.__block_byref_i, %struct.__block_byref_i* [[Vi]], i32 0, i32 1
// CHECK: load %struct.__block_byref_i*, %struct.__block_byref_i** [[V11]]

int rhs();

void foo() {
  __block int i;
  i = rhs();
  i += rhs();
}