aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenObjC/arc-blocks.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenObjC/arc-blocks.m')
-rw-r--r--test/CodeGenObjC/arc-blocks.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGenObjC/arc-blocks.m b/test/CodeGenObjC/arc-blocks.m
index 06acf01ce0..1092a8712d 100644
--- a/test/CodeGenObjC/arc-blocks.m
+++ b/test/CodeGenObjC/arc-blocks.m
@@ -521,3 +521,14 @@ void test15_helper(void (^block)(void), int x);
void test15(int a) {
test15_helper(^{ (void) a; }, ({ a; }));
}
+
+// rdar://11016025
+void test16() {
+ void (^BLKVAR)(void) = ^{ BLKVAR(); };
+
+ // CHECK: define void @test16(
+ // CHECK: [[BLKVAR:%.*]] = alloca void ()*, align 8
+ // CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
+ // CHECK-NEXT: [[SLOTREL:%.*]] = getelementptr inbounds [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
+ // CHECK-NEXT: store void ()* null, void ()** [[BLKVAR]], align 8
+}