1 // RUN: %clang_cc1 -triple armv7-apple-darwin10 -emit-llvm -fblocks -fobjc-arc -o - %s | FileCheck %s
2 // RUN: %clang_cc1 -triple arm64-apple-ios -emit-llvm -fblocks -fobjc-arc -o - %s | FileCheck %s
4 // use an autorelease marker on ARM64.
7 extern id test0_helper(void);
8 // CHECK: [[T0:%.*]] = call [[CC:(arm_aapcscc )?]]ptr @test0_helper()
9 // CHECK-NEXT: ret ptr [[T0]]
10 return test0_helper();
14 extern id test1_helper(void);
15 // CHECK: [[T0:%.*]] = call [[CC]]ptr @test1_helper()
16 // CHECK-NEXT: call void asm sideeffect "mov\09{{fp, fp|r7, r7}}\09\09// marker for objc_retainAutoreleaseReturnValue"
17 // CHECK-NEXT: [[T1:%.*]] = call [[CC]]ptr @llvm.objc.retainAutoreleasedReturnValue(ptr [[T0]])
18 // CHECK-NEXT: store ptr [[T1]],
19 // CHECK-NEXT: call [[CC]]void @llvm.objc.storeStrong(
20 // CHECK-NEXT: ret void
21 id x = test1_helper();
26 extern A *test2_helper(void);
27 // CHECK: [[T0:%.*]] = call [[CC]]ptr @test2_helper()
28 // CHECK-NEXT: ret ptr [[T0]]
29 return test2_helper();
33 extern A *test3_helper(void);
34 // CHECK: [[T0:%.*]] = call [[CC]]ptr @test3_helper()
35 // CHECK-NEXT: ret ptr [[T0]]
36 return test3_helper();