1// RUN: %clang_cc1 -triple armv7-apple-darwin10 -emit-llvm -fblocks -fobjc-arc -o - %s | FileCheck %s 2 3id test0(void) { 4 extern id test0_helper(void); 5 // CHECK: [[T0:%.*]] = call arm_aapcscc i8* @test0_helper() 6 // CHECK-NEXT: ret i8* [[T0]] 7 return test0_helper(); 8} 9 10void test1(void) { 11 extern id test1_helper(void); 12 // CHECK: [[T0:%.*]] = call arm_aapcscc i8* @test1_helper() 13 // CHECK-NEXT: call void asm sideeffect "mov\09r7, r7 14 // CHECK-NEXT: [[T1:%.*]] = call arm_aapcscc i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]]) 15 // CHECK-NEXT: store i8* [[T1]], 16 // CHECK-NEXT: call arm_aapcscc void @objc_storeStrong( 17 // CHECK-NEXT: ret void 18 id x = test1_helper(); 19} 20 21// rdar://problem/12133032 22@class A; 23A *test2(void) { 24 extern A *test2_helper(void); 25 // CHECK: [[T0:%.*]] = call arm_aapcscc [[A:%.*]]* @test2_helper() 26 // CHECK-NEXT: ret [[A]]* [[T0]] 27 return test2_helper(); 28} 29 30id test3(void) { 31 extern A *test3_helper(void); 32 // CHECK: [[T0:%.*]] = call arm_aapcscc [[A:%.*]]* @test3_helper() 33 // CHECK-NEXT: [[T1:%.*]] = bitcast [[A]]* [[T0]] to i8* 34 // CHECK-NEXT: ret i8* [[T1]] 35 return test3_helper(); 36} 37