1 // RUN: %clang_cc1 -x objective-c++ -std=c++11 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
3 // CHECK: [[NAME:@.*]] = private unnamed_addr constant [9 x i8] c"position\00"
4 // CHECK: [[SEL:@.*]] = internal externally_initialized global ptr [[NAME]]
9 @property(nonatomic) int position;
13 void *operator new(__SIZE_TYPE__, int);
18 void *operator new(__SIZE_TYPE__, T);
25 // CHECK: [[I:%.+]] = alloca ptr
29 // This is so we can find the next line more easily.
30 // CHECK: store double
33 // CHECK: [[I1:%.+]] = load ptr, ptr [[I]]
34 // CHECK-NEXT: [[SEL1:%.+]] = load ptr, ptr [[SEL]]
35 // CHECK-NEXT: [[POS1:%.+]] = call {{.*}} i32 @objc_msgSend(ptr {{.*}} [[I1]], ptr {{.*}} [[SEL1]])
36 // CHECK-NEXT: call {{.*}} ptr @_ZN1SnwEmi(i64 {{.*}} 1, i32 {{.*}} [[POS1]])
39 // CHECK: [[I2:%.+]] = load ptr, ptr [[I]]
40 // CHECK-NEXT: [[SEL2:%.+]] = load ptr, ptr [[SEL]]
41 // CHECK-NEXT: [[POS2:%.+]] = call {{.*}} i32 @objc_msgSend(ptr {{.*}} [[I2]], ptr {{.*}} [[SEL2]])
42 // CHECK-NEXT: [[DBL:%.+]] = sitofp i32 [[POS2]] to double
43 // CHECK-NEXT: call {{.*}} ptr @_ZN2TSIdEnwEmd(i64 {{.*}} 1, double {{.*}} [[DBL]])
44 new (i.position) TS<double>;