summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC/mrr-captured-block-var-inlined-layout.m
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-01-17 00:25:06 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-01-17 00:25:06 +0000
commitc8892055671d1e9ba23aac53f7cafae83acbf0a5 (patch)
tree0de7af2c7ab39fb42df20d8e3a56bdca580b5f16 /clang/test/CodeGenObjC/mrr-captured-block-var-inlined-layout.m
parente9fe5308ca418329637fb24a5172d0666484af20 (diff)
downloadbcm5719-llvm-c8892055671d1e9ba23aac53f7cafae83acbf0a5.tar.gz
bcm5719-llvm-c8892055671d1e9ba23aac53f7cafae83acbf0a5.zip
objC block layout: Patch reorders block layout to
produce more inline layout metadata. // rdar://12752901 llvm-svn: 172683
Diffstat (limited to 'clang/test/CodeGenObjC/mrr-captured-block-var-inlined-layout.m')
-rw-r--r--clang/test/CodeGenObjC/mrr-captured-block-var-inlined-layout.m32
1 files changed, 15 insertions, 17 deletions
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 0be45533258..bb3a20bb291 100644
--- a/clang/test/CodeGenObjC/mrr-captured-block-var-inlined-layout.m
+++ b/clang/test/CodeGenObjC/mrr-captured-block-var-inlined-layout.m
@@ -1,5 +1,8 @@
-// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin -O0 -emit-llvm %s -o - | FileCheck %s
-// RUN: %clang_cc1 -fblocks -triple i386-apple-darwin -O0 -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-i386 %s
+// RUN: %clang_cc1 -fblocks -fobjc-runtime-has-weak -triple x86_64-apple-darwin -O0 -print-ivar-layout -emit-llvm -o /dev/null %s > %t-64.layout
+// RUN: FileCheck --input-file=%t-64.layout %s
+// RUN: %clang_cc1 -fblocks -fobjc-runtime-has-weak -triple i386-apple-darwin -O0 -print-ivar-layout -emit-llvm -o /dev/null %s > %t-32.layout
+// RUN: FileCheck -check-prefix=CHECK-i386 --input-file=%t-32.layout %s
+// rdar://12184410
// rdar://12184410
void x(id y) {}
@@ -17,17 +20,15 @@ void f() {
__block id bl_var1;
// block variable layout: BL_STRONG:1, BL_OPERATOR:0
-// Inline instruction for block variable layout: 0x0100
-// CHECK: internal constant{{.*}}i64 256
-// CHECK-i386: internal constant{{.*}}i32 256
+// CHECK: Inline instruction for block variable layout: 0x0100
+// CHECK-i386: Inline instruction for block variable layout: 0x0100
void (^b)() = ^{
x(bar);
};
// block variable layout: BL_STRONG:2, BL_BYREF:1, BL_OPERATOR:0
-// Inline instruction for block variable layout: 0x0210
-// CHECK: internal constant{{.*}}i64 528
-// CHECK-i386: internal constant{{.*}}i32 528
+// CHECK: Inline instruction for block variable layout: 0x0210
+// CHECK-i386: Inline instruction for block variable layout: 0x0210
void (^c)() = ^{
x(bar);
x(baz);
@@ -35,9 +36,8 @@ void f() {
};
// block variable layout: BL_STRONG:2, BL_BYREF:3, BL_OPERATOR:0
-// Inline instruction for block variable layout: 0x0230
-// CHECK: internal constant{{.*}}i64 560
-// CHECK-i386: internal constant{{.*}}i32 560
+// CHECK: Inline instruction for block variable layout: 0x0230
+// CHECK-i386: Inline instruction for block variable layout: 0x0230
void (^d)() = ^{
x(bar);
x(baz);
@@ -47,9 +47,8 @@ void f() {
};
// block variable layout: BL_STRONG:2, BL_BYREF:3, BL_OPERATOR:0
-// Inline instruction for block variable layout: 0x0230
-// CHECK: internal constant{{.*}}i64 560
-// CHECK-i386: internal constant{{.*}}i32 560
+// CHECK: Inline instruction for block variable layout: 0x0230
+// CHECK-i386: Inline instruction for block variable layout: 0x0230
id (^e)() = ^{
x(bar);
x(baz);
@@ -59,9 +58,8 @@ void f() {
return wid;
};
-// Inline instruction for block variable layout: 0x020
-// CHECK: internal constant{{.*}}i64 32
-// CHECK-i386: internal constant{{.*}}i32 32
+// CHECK: Inline instruction for block variable layout: 0x020
+// CHECK-i386: Inline instruction for block variable layout: 0x020
void (^ii)() = ^{
byref_int = 1;
byref_bab = 0;
OpenPOWER on IntegriCloud