aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenObjC/block-byref-variable-layout.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenObjC/block-byref-variable-layout.m')
-rw-r--r--test/CodeGenObjC/block-byref-variable-layout.m9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGenObjC/block-byref-variable-layout.m b/test/CodeGenObjC/block-byref-variable-layout.m
index 1e8bcbc11b..6030661af4 100644
--- a/test/CodeGenObjC/block-byref-variable-layout.m
+++ b/test/CodeGenObjC/block-byref-variable-layout.m
@@ -1,5 +1,14 @@
// RUN: %clang_cc1 -fblocks -fobjc-arc -fobjc-runtime-has-weak -triple x86_64-apple-darwin -O0 -emit-llvm %s -o - | FileCheck %s
+// rdar://12759433
+@class NSString;
+
+void Test12759433() {
+ __block __unsafe_unretained NSString *uuByref = (__bridge NSString *)(void*)0x102030405060708;
+ void (^block)() = ^{ uuByref = 0; };
+ block();
+}
+// CHECK: %struct.__block_byref_uuByref = type { i8*, %struct.__block_byref_uuByref*, i32, i32, [[ZERO:%.*]]* }
int main() {
__block __weak id wid;
__block long XXX;