Files
clang-p2996/clang/test/CodeGenCXX/dllexport-alias.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

19 lines
558 B
C++

// RUN: %clang_cc1 -triple x86_64-windows-gnu -mconstructor-aliases %s -S -emit-llvm -o - | FileCheck %s
// This test assumes that the C1 constructor will be aliased to the C2
// constructor, and the D1 destructor to the D2. It then checks that the aliases
// are dllexport'ed.
class __declspec(dllexport) A {
public:
A();
~A();
};
A::A() {}
A::~A() {}
// CHECK: @_ZN1AC1Ev = dso_local dllexport alias void (%class.A*), void (%class.A*)* @_ZN1AC2Ev
// CHECK: @_ZN1AD1Ev = dso_local dllexport alias void (%class.A*), void (%class.A*)* @_ZN1AD2Ev