diff options
Diffstat (limited to 'test/CodeGenObjC/local-static-block.m')
-rw-r--r-- | test/CodeGenObjC/local-static-block.m | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGenObjC/local-static-block.m b/test/CodeGenObjC/local-static-block.m index 73c670f5c925..67ede63fc0a2 100644 --- a/test/CodeGenObjC/local-static-block.m +++ b/test/CodeGenObjC/local-static-block.m @@ -46,6 +46,17 @@ void FUNC() } } +void FUNC2() { + static void (^const block1)(int) = ^(int a){ + if (a--) + block1(a); + }; +} + +// CHECK-LABEL-LP64: define void @FUNC2( +// CHECK: define internal void @_block_invoke{{.*}}( +// CHECK: call void %{{.*}}(i8* bitcast ({ i8**, i32, i32, i8*, %struct.__block_descriptor* }* @__block_literal_global{{.*}} to i8*), i32 %{{.*}}) + void FUNC1() { static NSArray *(^ArrayRecurs)(NSArray *addresses, unsigned long level) = ^(NSArray *addresses, unsigned long level) { |