diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2012-06-26 16:06:38 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-06-26 16:06:38 +0000 |
| commit | 6362803cfed99bc008b12b488d2c2a682df0cc2d (patch) | |
| tree | f476f5ae436635f48d58742bdf2d66f0311b3488 /clang/test/CodeGenObjC | |
| parent | 41960467142142e8b2eef91436b1345a372e5d14 (diff) | |
| download | bcm5719-llvm-6362803cfed99bc008b12b488d2c2a682df0cc2d.tar.gz bcm5719-llvm-6362803cfed99bc008b12b488d2c2a682df0cc2d.zip | |
block literal irgen: several improvements on naming block
literal helper functions. All helper functions (global
and locals) use block_invoke as their prefix. Local literal
helper names are prefixed by their enclosing mangled function
names. Blocks in non-local initializers (e.g. a global variable
or a C++11 field) are prefixed by their mangled variable name.
The descriminator number added to end of the name starts off
with blank (for first block) and _<N> (for the N+2-th block).
llvm-svn: 159206
Diffstat (limited to 'clang/test/CodeGenObjC')
| -rw-r--r-- | clang/test/CodeGenObjC/arc-blocks.m | 6 | ||||
| -rw-r--r-- | clang/test/CodeGenObjC/blocks-2.m | 2 | ||||
| -rw-r--r-- | clang/test/CodeGenObjC/blocks.m | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/CodeGenObjC/arc-blocks.m b/clang/test/CodeGenObjC/arc-blocks.m index 1092a8712d8..2326bce2be2 100644 --- a/clang/test/CodeGenObjC/arc-blocks.m +++ b/clang/test/CodeGenObjC/arc-blocks.m @@ -124,7 +124,7 @@ void test4(void) { // CHECK-NEXT: [[T1:%.*]] = load i8** [[T0]] // CHECK-NEXT: call void @objc_release(i8* [[T1]]) - // CHECK: define internal void @__test4_block_invoke_ + // CHECK: define internal void @__test4_block_invoke // CHECK: [[SLOT:%.*]] = getelementptr inbounds {{.*}}, i32 0, i32 6 // CHECK-NEXT: [[T0:%.*]] = load i8** [[SLOT]], align 8 // CHECK-NEXT: store i8* null, i8** [[SLOT]], @@ -200,7 +200,7 @@ void test6(void) { // CHECK: [[T0:%.*]] = getelementptr inbounds [[BYREF_T]]* {{%.*}}, i32 0, i32 6 // CHECK-NEXT: call void @objc_destroyWeak(i8** [[T0]]) - // CHECK: define internal void @__test6_block_invoke_ + // CHECK: define internal void @__test6_block_invoke // CHECK: [[SLOT:%.*]] = getelementptr inbounds {{.*}}, i32 0, i32 6 // CHECK-NEXT: call i8* @objc_storeWeak(i8** [[SLOT]], i8* null) // CHECK-NEXT: ret void @@ -238,7 +238,7 @@ void test7(void) { // CHECK-NEXT: call void @objc_destroyWeak(i8** [[VAR]]) // CHECK-NEXT: ret void - // CHECK: define internal void @__test7_block_invoke_ + // CHECK: define internal void @__test7_block_invoke // CHECK: [[SLOT:%.*]] = getelementptr inbounds [[BLOCK_T]]* {{%.*}}, i32 0, i32 5 // CHECK-NEXT: [[T0:%.*]] = call i8* @objc_loadWeak(i8** [[SLOT]]) // CHECK-NEXT: call void @test7_consume(i8* [[T0]]) diff --git a/clang/test/CodeGenObjC/blocks-2.m b/clang/test/CodeGenObjC/blocks-2.m index 8345f7ce78e..b04fa008b27 100644 --- a/clang/test/CodeGenObjC/blocks-2.m +++ b/clang/test/CodeGenObjC/blocks-2.m @@ -4,7 +4,7 @@ // CHECK: define i8* @{{.*}}test0 -// CHECK: define internal void @__test0_block_invoke_0( +// CHECK: define internal void @{{.*}}_block_invoke( // CHECK: call i8* @objc_assign_strongCast( // CHECK-NEXT: ret void id test0(id x) { diff --git a/clang/test/CodeGenObjC/blocks.m b/clang/test/CodeGenObjC/blocks.m index 490f4a0af2c..6c85da9f895 100644 --- a/clang/test/CodeGenObjC/blocks.m +++ b/clang/test/CodeGenObjC/blocks.m @@ -18,7 +18,7 @@ void foo(T *P) { -(void) im0; @end -// CHECK: define internal i32 @"__8-[A im0]_block_invoke_0"( +// CHECK: define internal i32 @"__8-[A im0]_block_invoke"( @implementation A -(void) im0 { (void) ^{ return 1; }(); @@ -91,7 +91,7 @@ void test2(Test2 *x) { // rdar://problem/9124263 // In the test above, check that the use in the invocation function // doesn't require a read barrier. -// CHECK: define internal void @__test2_block_invoke_ +// CHECK: define internal void @__test2_block_invoke // CHECK: [[BLOCK:%.*]] = bitcast i8* {{%.*}} to [[BLOCK_T]]* // CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5 // CHECK-NEXT: [[T1:%.*]] = load i8** [[T0]] |

