summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/dllexport-alias.cpp
blob: 479595d057510b6f1ed554e894866a20d7cc3964 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// 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 = dllexport alias void (%class.A*)* @_ZN1AC2Ev
// CHECK: @_ZN1AD1Ev = dllexport alias void (%class.A*)* @_ZN1AD2Ev