Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / initializer-list-ctor-order.cpp
blob5cddc92b6e50a1c7c7011520472e8663426de7c0
1 // RUN: %clang_cc1 -std=c++11 %s -emit-llvm -o - -triple i686-linux-gnu | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ITANIUM
2 // RUN: %clang_cc1 -std=c++11 %s -emit-llvm -o - -triple i686-windows | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-MS
4 extern "C" {
5 int f();
6 int g();
9 struct A {
10 A(int, int);
14 void foo() {
15 A a{f(), g()};
17 // CHECK-ITANIUM-LABEL: define{{.*}} void @_Z3foov
18 // CHECK-MS-LABEL: define dso_local void @"?foo@@YAXXZ"
19 // CHECK: call i32 @f()
20 // CHECK: call i32 @g()
22 struct B : A {
23 B();
25 B::B() : A{f(), g()} {}
26 // CHECK-ITANIUM-LABEL: define{{.*}} void @_ZN1BC2Ev
27 // CHECK-MS-LABEL: define dso_local x86_thiscallcc noundef ptr @"??0B@@QAE@XZ"
28 // CHECK: call i32 @f()
29 // CHECK: call i32 @g()