brintos

brintos / llvm-project-archived public Read only

0
0
Text · 752 B · 5cddc92 Raw
30 lines · cpp
1// RUN: %clang_cc1 -std=c++11 %s -emit-llvm -o - -triple i686-linux-gnu | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ITANIUM2// RUN: %clang_cc1 -std=c++11 %s -emit-llvm -o - -triple i686-windows   | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-MS3 4extern "C" {5int f();6int g();7}8 9struct A {10  A(int, int);11};12 13 14void foo() {15  A a{f(), g()};16}17// CHECK-ITANIUM-LABEL: define{{.*}} void @_Z3foov18// CHECK-MS-LABEL: define dso_local void @"?foo@@YAXXZ"19// CHECK: call i32 @f()20// CHECK: call i32 @g()21 22struct B : A {23  B();24};25B::B() : A{f(), g()} {}26// CHECK-ITANIUM-LABEL: define{{.*}} void @_ZN1BC2Ev27// CHECK-MS-LABEL: define dso_local x86_thiscallcc noundef ptr @"??0B@@QAE@XZ"28// CHECK: call i32 @f()29// CHECK: call i32 @g()30