xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/dllexport-alias.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple x86_64-windows-gnu -mconstructor-aliases %s -S -emit-llvm -o - | FileCheck %s
2*0a6a1f1dSLionel Sambuc 
3*0a6a1f1dSLionel Sambuc // This test assumes that the C1 constructor will be aliased to the C2
4*0a6a1f1dSLionel Sambuc // constructor, and the D1 destructor to the D2. It then checks that the aliases
5*0a6a1f1dSLionel Sambuc // are dllexport'ed.
6*0a6a1f1dSLionel Sambuc 
7*0a6a1f1dSLionel Sambuc class __declspec(dllexport) A {
8*0a6a1f1dSLionel Sambuc public:
9*0a6a1f1dSLionel Sambuc     A();
10*0a6a1f1dSLionel Sambuc     ~A();
11*0a6a1f1dSLionel Sambuc };
12*0a6a1f1dSLionel Sambuc 
A()13*0a6a1f1dSLionel Sambuc A::A() {}
14*0a6a1f1dSLionel Sambuc 
~A()15*0a6a1f1dSLionel Sambuc A::~A() {}
16*0a6a1f1dSLionel Sambuc 
17*0a6a1f1dSLionel Sambuc // CHECK: @_ZN1AC1Ev = dllexport alias void (%class.A*)* @_ZN1AC2Ev
18*0a6a1f1dSLionel Sambuc // CHECK: @_ZN1AD1Ev = dllexport alias void (%class.A*)* @_ZN1AD2Ev
19