1 | // RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s |
2 | // CHECK: [[Vi:%.+]] = alloca %struct.__block_byref_i, align 8 |
3 | // CHECK: call i32 (...) @rhs() |
4 | // CHECK: [[V7:%.+]] = getelementptr inbounds %struct.__block_byref_i, %struct.__block_byref_i* [[Vi]], i32 0, i32 1 |
5 | // CHECK: load %struct.__block_byref_i*, %struct.__block_byref_i** [[V7]] |
6 | // CHECK: call i32 (...) @rhs() |
7 | // CHECK: [[V11:%.+]] = getelementptr inbounds %struct.__block_byref_i, %struct.__block_byref_i* [[Vi]], i32 0, i32 1 |
8 | // CHECK: load %struct.__block_byref_i*, %struct.__block_byref_i** [[V11]] |
9 | |
10 | int rhs(); |
11 | |
12 | void foo() { |
13 | __block int i; |
14 | ^{ (void)i; }; |
15 | i = rhs(); |
16 | i += rhs(); |
17 | } |
18 | |