1 // RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s 2 3 struct X { 4 X(); 5 X(const X&); 6 X(const char*); 7 ~X(); 8 }; 9 10 struct Y { 11 int i; 12 X x; 13 }; 14 15 // CHECK: define i32 @_Z1fv() 16 int f() { 17 // CHECK: [[LVALUE:%[a-z0-9.]+]] = alloca 18 // CHECK-NEXT: [[I:%[a-z0-9]+]] = getelementptr inbounds {{.*}}* [[LVALUE]], i32 0, i32 0 19 // CHECK-NEXT: store i32 17, i32* [[I]] 20 // CHECK-NEXT: [[X:%[a-z0-9]+]] = getelementptr inbounds {{.*}} [[LVALUE]], i32 0, i32 1 21 // CHECK-NEXT: call void @_ZN1XC1EPKc({{.*}}[[X]] 22 // CHECK-NEXT: [[I:%[a-z0-9]+]] = getelementptr inbounds {{.*}} [[LVALUE]], i32 0, i32 0 23 // CHECK-NEXT: [[RESULT:%[a-z0-9]+]] = load i32* 24 // CHECK-NEXT: call void @_ZN1YD1Ev 25 // CHECK-NEXT: ret i32 [[RESULT]] 26 return ((Y){17, "seventeen"}).i; 27 } 28