1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -std=c++1z -fobjc-arc -o - %s | FileCheck %s 2 3struct S0 { 4 ~S0(); 5 id f; 6}; 7 8struct S1 { 9 S1(); 10 ~S1(); 11 S1(S0); 12 id f; 13}; 14 15@interface C 16@property S1 f; 17@end 18@implementation C 19@end 20 21// CHECK-LABEL: define{{.*}} void @_Z5test0P1C( 22// CHECK: %{{.*}} = alloca ptr 23// CHECK: %[[AGG_TMP:.*]] = alloca %[[STRUCT_S1:.*]], align 24// CHECK: %[[AGG_TMP_1:.*]] = alloca %[[STRUCT_S0:.*]], align 25// CHECK: call void @_ZN2S0C1Ev(ptr {{[^,]*}} %[[AGG_TMP_1]]) 26// CHECK: call void @_ZN2S1C1E2S0(ptr {{[^,]*}} %[[AGG_TMP]], ptr noundef %[[AGG_TMP_1]]) 27// CHECK: call void @objc_msgSend(ptr noundef %{{.*}}, ptr noundef %{{.*}}, ptr noundef %[[AGG_TMP]]) 28 29void test0(C *c) { 30 c.f = S0(); 31} 32 33// CHECK: define{{.*}} void @_Z5test1P1C( 34// CHECK: %{{.*}} = alloca ptr 35// CHECK: %[[TEMP_LVALUE:.*]] = alloca %[[STRUCT_S1:.*]], align 36// CHECK: call void @_ZN2S1C1Ev(ptr {{[^,]*}} %[[TEMP_LVALUE]]) 37// CHECK: call void @objc_msgSend(ptr noundef %{{.*}}, ptr noundef %{{.*}}, ptr noundef %[[TEMP_LVALUE]]) 38 39void test1(C *c) { 40 c.f = S1(); 41} 42