Fariborz Jahanian | d295b82 | 2011-09-02 21:33:44 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -emit-llvm -o - -fblocks -triple x86_64-apple-darwin10 | FileCheck %s |
| 2 | // rdar://10033986 |
| 3 | |
| 4 | typedef void (^BLOCK)(void); |
| 5 | int main () |
| 6 | { |
| 7 | _Complex double c; |
| 8 | BLOCK b = ^() { |
| 9 | _Complex double z; |
| 10 | z = z + c; |
| 11 | }; |
| 12 | b(); |
| 13 | } |
| 14 | |
| 15 | // CHECK: define internal void @__main_block_invoke_0 |
| 16 | // CHECK: [[C1:%.*]] = alloca { double, double }, align 8 |
Fariborz Jahanian | 0f2c1ce | 2011-09-02 21:47:51 +0000 | [diff] [blame] | 17 | // CHECK: [[RP:%.*]] = getelementptr inbounds { double, double }* [[C1]], i32 0, i32 0 |
| 18 | // CHECK-NEXT: [[R:%.*]] = load double* [[RP]] |
| 19 | // CHECK-NEXT: [[IP:%.*]] = getelementptr inbounds { double, double }* [[C1]], i32 0, i32 1 |
| 20 | // CHECK-NEXT: [[I:%.*]] = load double* [[IP]] |