2010-12-01 07:07:14 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fblocks -emit-llvm -o - %s | FileCheck %s
|
|
|
|
// pr8707
|
|
|
|
|
2012-06-27 00:06:38 +08:00
|
|
|
// CHECK: @block_block_invoke.test = internal global i32
|
2010-12-01 07:07:14 +08:00
|
|
|
int (^block)(void) = ^ {
|
|
|
|
static int test=0;
|
|
|
|
return test;
|
|
|
|
};
|
2012-06-27 00:06:38 +08:00
|
|
|
// CHECK: @block1_block_invoke_2.test = internal global i32
|
2010-12-01 07:07:14 +08:00
|
|
|
void (^block1)(void) = ^ {
|
|
|
|
static int test = 2;
|
|
|
|
return;
|
|
|
|
};
|
2012-06-27 00:06:38 +08:00
|
|
|
// CHECK: @block2_block_invoke_3.test = internal global i32
|
2010-12-01 07:07:14 +08:00
|
|
|
int (^block2)(void) = ^ {
|
|
|
|
static int test = 5;
|
|
|
|
return test;
|
|
|
|
};
|
|
|
|
|