blob: 8b4210ed19018e270f38dcc0e95e086699bfebd3 [file] [log] [blame]
Fariborz Jahanianfaa5bfc2010-11-30 23:07:14 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fblocks -emit-llvm -o - %s | FileCheck %s
2// pr8707
3
Fariborz Jahanian4904bf42012-06-26 16:06:38 +00004// CHECK: @block_block_invoke.test = internal global i32
Fariborz Jahanianfaa5bfc2010-11-30 23:07:14 +00005int (^block)(void) = ^ {
6 static int test=0;
7 return test;
8};
Fariborz Jahanian4904bf42012-06-26 16:06:38 +00009// CHECK: @block1_block_invoke_2.test = internal global i32
Fariborz Jahanianfaa5bfc2010-11-30 23:07:14 +000010void (^block1)(void) = ^ {
11 static int test = 2;
12 return;
13};
Fariborz Jahanian4904bf42012-06-26 16:06:38 +000014// CHECK: @block2_block_invoke_3.test = internal global i32
Fariborz Jahanianfaa5bfc2010-11-30 23:07:14 +000015int (^block2)(void) = ^ {
16 static int test = 5;
17 return test;
18};
19