summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-11-04 18:19:40 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-11-04 18:19:40 +0000
commit2c96d30dd88b49d26d18415ddf6ae6e74d33884c (patch)
tree4a9f6c8d92d4f2459645f7e84f414884294a82a2 /clang/test/CodeGenObjC
parent38ea9cd7218a91ed383e28d80361319ad3d06234 (diff)
downloadbcm5719-llvm-2c96d30dd88b49d26d18415ddf6ae6e74d33884c.tar.gz
bcm5719-llvm-2c96d30dd88b49d26d18415ddf6ae6e74d33884c.zip
Fixes liftime of captured block variables in mrr mode, per John's feedback, as
well as couple of tests which were not being excercised because of TYPOs. llvm-svn: 167374
Diffstat (limited to 'clang/test/CodeGenObjC')
-rw-r--r--clang/test/CodeGenObjC/arc-captured-block-var-inlined-layout.m20
-rw-r--r--clang/test/CodeGenObjC/mrr-captured-block-var-inlined-layout.m20
2 files changed, 20 insertions, 20 deletions
diff --git a/clang/test/CodeGenObjC/arc-captured-block-var-inlined-layout.m b/clang/test/CodeGenObjC/arc-captured-block-var-inlined-layout.m
index a5400c5bf20..ad81e54c9ca 100644
--- a/clang/test/CodeGenObjC/arc-captured-block-var-inlined-layout.m
+++ b/clang/test/CodeGenObjC/arc-captured-block-var-inlined-layout.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fblocks -fobjc-arc -fobjc-runtime-has-weak -triple x86_64-apple-darwin -O0 -emit-llvm %s -o %t-64.s
+// RUN: %clang_cc1 -fblocks -fobjc-arc -fobjc-runtime-has-weak -triple x86_64-apple-darwin -O0 -emit-llvm %s -o - | FileCheck %s
// rdar://12184410
void x(id y) {}
@@ -15,13 +15,13 @@ void f() {
__block id bl_var1;
// Inline instruction for block variable layout: 0x0100
-// CKECK-LP64: i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), i64 256 }
+// CHECK: i8* getelementptr inbounds ([6 x i8]* {{@.*}}, i32 0, i32 0), i64 256 }
void (^b)() = ^{
x(bar);
};
// Inline instruction for block variable layout: 0x0210
-// CKECK-LP64: i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), i64 528 }
+// CHECK: i8* getelementptr inbounds ([6 x i8]* {{@.*}}, i32 0, i32 0), i64 528 }
void (^c)() = ^{
x(bar);
x(baz);
@@ -29,7 +29,7 @@ void f() {
};
// Inline instruction for block variable layout: 0x0230
-// CKECK-LP64: i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), i64 560 }
+// CHECK: i8* getelementptr inbounds ([6 x i8]* {{@.*}}, i32 0, i32 0), i64 560 }
void (^d)() = ^{
x(bar);
x(baz);
@@ -39,7 +39,7 @@ void f() {
};
// Inline instruction for block variable layout: 0x0231
-// CKECK-LP64: i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), i64 561 }
+// CHECK: i8* getelementptr inbounds ([6 x i8]* {{@.*}}, i32 0, i32 0), i64 561 }
__weak id wid;
id (^e)() = ^{
x(bar);
@@ -51,7 +51,7 @@ void f() {
};
// Inline instruction for block variable layout: 0x0235
-// CKECK-LP64: i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), i64 565 }
+// CHECK: i8* getelementptr inbounds ([6 x i8]* {{@.*}}, i32 0, i32 0), i64 565 }
__weak id wid1, wid2, wid3, wid4;
id (^f)() = ^{
x(bar);
@@ -67,7 +67,7 @@ void f() {
};
// Inline instruction for block variable layout: 0x035
-// CKECK-LP64: i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), i64 53 }
+// CHECK: i8* getelementptr inbounds ([6 x i8]* {{@.*}}, i32 0, i32 0), i64 53 }
id (^g)() = ^{
byref_int = 1;
bl_var1 = 0;
@@ -80,20 +80,20 @@ void f() {
};
// Inline instruction for block variable layout: 0x01
-// CKECK-LP64: i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), i64 1 }
+// CHECK: i8* getelementptr inbounds ([6 x i8]* {{@.*}}, i32 0, i32 0), i64 1 }
id (^h)() = ^{
return wid;
};
// Inline instruction for block variable layout: 0x020
-// CKECK-LP64: i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), i64 32 }
+// CHECK: i8* getelementptr inbounds ([6 x i8]* {{@.*}}, i32 0, i32 0), i64 32 }
void (^ii)() = ^{
byref_int = 1;
byref_bab = 0;
};
// Inline instruction for block variable layout: 0x0102
-// CKECK-LP64: i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), i64 258 }
+// CHECK: i8* getelementptr inbounds ([6 x i8]* {{@.*}}, i32 0, i32 0), i64 258 }
void (^jj)() = ^{
x(bar);
x(wid1);
diff --git a/clang/test/CodeGenObjC/mrr-captured-block-var-inlined-layout.m b/clang/test/CodeGenObjC/mrr-captured-block-var-inlined-layout.m
index c715caa3108..a0f2ba01b0a 100644
--- a/clang/test/CodeGenObjC/mrr-captured-block-var-inlined-layout.m
+++ b/clang/test/CodeGenObjC/mrr-captured-block-var-inlined-layout.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin -O0 -emit-llvm %s -o %t-64.s
+// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin -O0 -emit-llvm %s -o - | FileCheck %s
// rdar://12184410
void x(id y) {}
@@ -15,22 +15,22 @@ void f() {
__block id byref_bab = (id)0;
__block id bl_var1;
-// Inline instruction for block variable layout: 0x0100
-// CKECK-LP64: i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), i64 256 }
+// block variable layout: BL_UNRETAINED:1, BL_OPERATOR:0
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global [2 x i8] c"`\00"
void (^b)() = ^{
x(bar);
};
-// Inline instruction for block variable layout: 0x0210
-// CKECK-LP64: i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), i64 528 }
+// block variable layout: BL_UNRETAINED:2, BL_BYREF:1, BL_OPERATOR:0
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global [3 x i8] c"a@\00"
void (^c)() = ^{
x(bar);
x(baz);
byref_int = 1;
};
-// Inline instruction for block variable layout: 0x0230
-// CKECK-LP64: i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), i64 560 }
+// block variable layout: BL_UNRETAINED:2, BL_BYREF:3, BL_OPERATOR:0
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global [3 x i8] c"aB\00
void (^d)() = ^{
x(bar);
x(baz);
@@ -39,8 +39,8 @@ void f() {
byref_bab = 0;
};
-// Inline instruction for block variable layout: 0x0230
-// CKECK-LP64: i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), i64 560 }
+// block variable layout: BL_UNRETAINED:2, BL_BYREF:3, BL_OPERATOR:0
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global [3 x i8] c"aB\00"
id (^e)() = ^{
x(bar);
x(baz);
@@ -51,7 +51,7 @@ void f() {
};
// Inline instruction for block variable layout: 0x020
-// CKECK-LP64: i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0), i64 32 }
+// CHECK: i8* getelementptr inbounds ([6 x i8]* {{@.*}}, i32 0, i32 0), i64 32 }
void (^ii)() = ^{
byref_int = 1;
byref_bab = 0;
OpenPOWER on IntegriCloud