minix/external/bsd/llvm/dist/clang/test/CodeGen/blocks-seq.c
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

16 lines
575 B
C

// 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* [[Vi]], i32 0, i32 1
// CHECK: load %struct.__block_byref_i** [[V7]]
// CHECK: call i32 (...)* @rhs()
// CHECK: [[V11:%.+]] = getelementptr inbounds %struct.__block_byref_i* [[Vi]], i32 0, i32 1
// CHECK: load %struct.__block_byref_i** [[V11]]
int rhs();
void foo() {
__block int i;
i = rhs();
i += rhs();
}