blob: 8db9e606b1a06162f3f500732398142811c97541 [file] [log] [blame]
NAKAMURA Takumi9627bb62013-01-22 01:51:48 +00001// 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* [[Vi]], i32 0, i32 1
5// CHECK: load %struct.__block_byref_i** [[V7]]
6// CHECK: call i32 (...)* @rhs()
7// CHECK: [[V11:%.+]] = getelementptr inbounds %struct.__block_byref_i* [[Vi]], i32 0, i32 1
8// CHECK: load %struct.__block_byref_i** [[V11]]
Mike Stump99459b62009-05-21 21:05:15 +00009
10int rhs();
11
12void foo() {
13 __block int i;
14 i = rhs();
Mike Stumpcc0442f2009-05-22 19:07:20 +000015 i += rhs();
Mike Stump99459b62009-05-21 21:05:15 +000016}