Fariborz Jahanian | faa5bfc | 2010-11-30 23:07:14 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fblocks -emit-llvm -o - %s | FileCheck %s |
| 2 | // pr8707 |
| 3 | |
Fariborz Jahanian | 4904bf4 | 2012-06-26 16:06:38 +0000 | [diff] [blame] | 4 | // CHECK: @block_block_invoke.test = internal global i32 |
Fariborz Jahanian | faa5bfc | 2010-11-30 23:07:14 +0000 | [diff] [blame] | 5 | int (^block)(void) = ^ { |
| 6 | static int test=0; |
| 7 | return test; |
| 8 | }; |
Fariborz Jahanian | 4904bf4 | 2012-06-26 16:06:38 +0000 | [diff] [blame] | 9 | // CHECK: @block1_block_invoke_2.test = internal global i32 |
Fariborz Jahanian | faa5bfc | 2010-11-30 23:07:14 +0000 | [diff] [blame] | 10 | void (^block1)(void) = ^ { |
| 11 | static int test = 2; |
| 12 | return; |
| 13 | }; |
Fariborz Jahanian | 4904bf4 | 2012-06-26 16:06:38 +0000 | [diff] [blame] | 14 | // CHECK: @block2_block_invoke_3.test = internal global i32 |
Fariborz Jahanian | faa5bfc | 2010-11-30 23:07:14 +0000 | [diff] [blame] | 15 | int (^block2)(void) = ^ { |
| 16 | static int test = 5; |
| 17 | return test; |
| 18 | }; |
| 19 | |