Files
clang-p2996/clang/test/CodeGenCXX/initializer-list-ctor-order.cpp
Rafael Espindola 922f2aa9b2 Bring r325915 back.
The tests that failed on a windows host have been fixed.

Original message:

Start setting dso_local for COFF.

With this there are still some GVs where we don't set dso_local
because setGVProperties is never called. I intend to fix that in
followup commits. This is just the bare minimum to teach
shouldAssumeDSOLocal what it should do for COFF.

llvm-svn: 325940
2018-02-23 19:30:48 +00:00

30 lines
745 B
C++

// RUN: %clang_cc1 -std=c++11 %s -emit-llvm -o - -triple i686-linux-gnu | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ITANIUM
// RUN: %clang_cc1 -std=c++11 %s -emit-llvm -o - -triple i686-windows | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-MS
extern "C" {
int f();
int g();
}
struct A {
A(int, int);
};
void foo() {
A a{f(), g()};
}
// CHECK-ITANIUM-LABEL: define void @_Z3foov
// CHECK-MS-LABEL: define dso_local void @"\01?foo@@YAXXZ"
// CHECK: call i32 @f()
// CHECK: call i32 @g()
struct B : A {
B();
};
B::B() : A{f(), g()} {}
// CHECK-ITANIUM-LABEL: define void @_ZN1BC2Ev
// CHECK-MS-LABEL: define dso_local x86_thiscallcc %struct.B* @"\01??0B@@QAE@XZ"
// CHECK: call i32 @f()
// CHECK: call i32 @g()