• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fblocks -fobjc-arc -o - %s | FileCheck %s
2
3@interface Test0
4- (id) self;
5@end
6void test0(Test0 *val) {
7  Test0 *x = [val self];
8
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 @objc_storeStrong(
16// CHECK-NEXT: load [[TEST0]]*, [[TEST0]]** [[VAL]],
17// CHECK-NEXT: load
18// CHECK-NEXT: bitcast
19// CHECK-NEXT: [[T0:%.*]] = call i8* bitcast (
20// CHECK-NEXT: [[T1:%.*]] = call i8* @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 @objc_storeStrong(i8** [[T0]], i8* null)
25// CHECK-NEXT: [[T0:%.*]] = bitcast [[TEST0]]** [[VAL]] to i8**
26// CHECK-NEXT: call void @objc_storeStrong(i8** [[T0]], i8* null)
27// CHECK-NEXT: ret void
28}
29