2013-01-22 09:51:48 +08:00
|
|
|
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
|
|
|
|
// CHECK: [[Vi:%.+]] = alloca %struct.__block_byref_i, align 8
|
2015-04-17 07:25:00 +08:00
|
|
|
// CHECK: call i32 (...) @rhs()
|
2015-02-28 03:18:17 +08:00
|
|
|
// CHECK: [[V7:%.+]] = getelementptr inbounds %struct.__block_byref_i, %struct.__block_byref_i* [[Vi]], i32 0, i32 1
|
2015-02-28 05:19:58 +08:00
|
|
|
// CHECK: load %struct.__block_byref_i*, %struct.__block_byref_i** [[V7]]
|
2015-04-17 07:25:00 +08:00
|
|
|
// CHECK: call i32 (...) @rhs()
|
2015-02-28 03:18:17 +08:00
|
|
|
// CHECK: [[V11:%.+]] = getelementptr inbounds %struct.__block_byref_i, %struct.__block_byref_i* [[Vi]], i32 0, i32 1
|
2015-02-28 05:19:58 +08:00
|
|
|
// CHECK: load %struct.__block_byref_i*, %struct.__block_byref_i** [[V11]]
|
2009-05-22 05:05:15 +08:00
|
|
|
|
|
|
|
int rhs();
|
|
|
|
|
|
|
|
void foo() {
|
|
|
|
__block int i;
|
2018-10-02 05:51:28 +08:00
|
|
|
^{ (void)i; };
|
2009-05-22 05:05:15 +08:00
|
|
|
i = rhs();
|
2009-05-23 03:07:20 +08:00
|
|
|
i += rhs();
|
2009-05-22 05:05:15 +08:00
|
|
|
}
|