1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fblocks -fobjc-arc -o - %s | FileCheck %s
6 void test0(Test0 *val) {
9 // CHECK-LABEL: define{{.*}} void @test0(
10 // CHECK: [[VAL:%.*]] = alloca [[TEST0:%.*]]*
11 // CHECK-NEXT: [[X:%.*]] = alloca [[TEST0]]*
12 // CHECK-NEXT: store [[TEST0]]* null
13 // CHECK-NEXT: bitcast
14 // CHECK-NEXT: bitcast
15 // CHECK-NEXT: call void @llvm.objc.storeStrong(
16 // CHECK-NEXT: load [[TEST0]]*, [[TEST0]]** [[VAL]],
17 // CHECK-NEXT: bitcast
19 // CHECK-NEXT: [[T0:%.*]] = call i8* bitcast (
20 // CHECK-NEXT: [[T1:%.*]] = notail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* [[T0]])
21 // CHECK-NEXT: [[T2:%.*]] = bitcast i8* [[T1]] to [[TEST0]]*
22 // CHECK-NEXT: store [[TEST0]]* [[T2]], [[TEST0]]** [[X]]
23 // CHECK-NEXT: [[T0:%.*]] = bitcast [[TEST0]]** [[X]] to i8**
24 // CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[T0]], i8* null)
25 // CHECK-NEXT: [[T0:%.*]] = bitcast [[TEST0]]** [[VAL]] to i8**
26 // CHECK-NEXT: call void @llvm.objc.storeStrong(i8** [[T0]], i8* null)
27 // CHECK-NEXT: ret void