diff options
Diffstat (limited to 'test/CodeGenObjC/arc-arm.m')
-rw-r--r-- | test/CodeGenObjC/arc-arm.m | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/test/CodeGenObjC/arc-arm.m b/test/CodeGenObjC/arc-arm.m index 23da3be2a5dd..2ab8cb6ef562 100644 --- a/test/CodeGenObjC/arc-arm.m +++ b/test/CodeGenObjC/arc-arm.m @@ -13,8 +13,24 @@ void test1(void) { // CHECK-NEXT: call void asm sideeffect "mov\09r7, r7 // CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]]) // CHECK-NEXT: store i8* [[T1]], - // CHECK-NEXT: load - // CHECK-NEXT: call void @objc_release + // CHECK-NEXT: call void @objc_storeStrong( // CHECK-NEXT: ret void id x = test1_helper(); } + +// rdar://problem/12133032 +@class A; +A *test2(void) { + extern A *test2_helper(void); + // CHECK: [[T0:%.*]] = call arm_aapcscc [[A:%.*]]* @test2_helper() + // CHECK-NEXT: ret [[A]]* [[T0]] + return test2_helper(); +} + +id test3(void) { + extern A *test3_helper(void); + // CHECK: [[T0:%.*]] = call arm_aapcscc [[A:%.*]]* @test3_helper() + // CHECK-NEXT: [[T1:%.*]] = bitcast [[A]]* [[T0]] to i8* + // CHECK-NEXT: ret i8* [[T1]] + return test3_helper(); +} |