diff options
Diffstat (limited to 'test/CodeGenObjC/block-var-layout.m')
-rw-r--r-- | test/CodeGenObjC/block-var-layout.m | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/CodeGenObjC/block-var-layout.m b/test/CodeGenObjC/block-var-layout.m index 71b14da..ab95231 100644 --- a/test/CodeGenObjC/block-var-layout.m +++ b/test/CodeGenObjC/block-var-layout.m @@ -1,5 +1,6 @@ -// RUN: %clang_cc1 -fblocks -fobjc-gc -triple x86_64-apple-darwin -fobjc-runtime=macosx-fragile-10.5 -O0 -emit-llvm %s -o %t-64.s -// RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s +// RUN: %clang_cc1 -fblocks -fobjc-gc -triple x86_64-apple-darwin -fobjc-runtime=macosx-fragile-10.5 -O0 -print-ivar-layout -emit-llvm -o /dev/null %s > %t-64.layout +// RUN: FileCheck -check-prefix LP64 --input-file=%t-64.layout %s +// rdar://12752901 struct S { int i1; @@ -46,8 +47,7 @@ void f() { // Test 1 // byref int, short, char, char, char, id, id, strong void*, byref id -// 01 35 10 00 -// CHECK-LP64: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global [4 x i8] c"\015\10\00" +// CHECK-LP64: block variable layout for block: 0x01, 0x35, 0x10, 0x00 void (^b)() = ^{ byref_int = sh + ch+ch1+ch2 ; x(bar); @@ -60,7 +60,7 @@ void f() { // Test 2 // byref int, short, char, char, char, id, id, strong void*, byref void*, byref id // 01 36 10 00 -// CHECK-LP64: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global [4 x i8] c"\016\10\00" +// CHECK-LP64: block variable layout for block: 0x01, 0x36, 0x10, 0x00 void (^c)() = ^{ byref_int = sh + ch+ch1+ch2 ; x(bar); @@ -76,7 +76,7 @@ void f() { // byref int, short, char, char, char, id, id, byref void*, int, double, byref id // 01 34 11 30 00 // FIXME: we'd get a better format here if we sorted by scannability, not just alignment -// CHECK-LP64: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global [5 x i8] c"\014\11 \00" +// CHECK-LP64: block variable layout for block: 0x01, 0x35, 0x30, 0x00 void (^d)() = ^{ byref_int = sh + ch+ch1+ch2 ; x(bar); @@ -91,7 +91,7 @@ void f() { // Test 4 // struct S (int, id, int, id, int, id) // 01 41 11 11 00 -// CHECK-LP64: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global [5 x i8] c"\01A\11\11\00" +// CHECK-LP64: block variable layout for block: 0x01, 0x41, 0x11, 0x11, 0x00 struct S s2; void (^e)() = ^{ x(s2.o1); @@ -129,7 +129,7 @@ void Test5() { // struct s2 (int, id, int, id, int, id?), union u2 (id?) // 01 41 11 12 00 -// CHECK-LP64: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global [5 x i8] c"\01A\11\12\00" +// CHECK-LP64: block variable layout for block: 0x01, 0x41, 0x11, 0x12, 0x00 void (^c)() = ^{ x(s2.ui.o1); x(u2.o1); @@ -146,7 +146,7 @@ void notifyBlock(id dependentBlock) { // id, id, void(^)() // 01 33 00 -// CHECK-LP64: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global [3 x i8] c"\013\00" +// CHECK-LP64: block variable layout for block: 0x01, 0x33, 0x00 void (^wrapperBlock)() = ^() { CFRelease(singleObservationToken); CFRelease(singleObservationToken); @@ -159,7 +159,7 @@ void notifyBlock(id dependentBlock) { void test_empty_block() { // 01 00 -// CHECK-LP64: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global [2 x i8] c"\01\00" +// CHECK-LP64: block variable layout for block: 0x01, 0x00 void (^wrapperBlock)() = ^() { }; wrapperBlock(); |