summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/dllexport-alias.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/dllexport-alias.cpp')
-rw-r--r--test/CodeGenCXX/dllexport-alias.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGenCXX/dllexport-alias.cpp b/test/CodeGenCXX/dllexport-alias.cpp
new file mode 100644
index 0000000..479595d
--- /dev/null
+++ b/test/CodeGenCXX/dllexport-alias.cpp
@@ -0,0 +1,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
OpenPOWER on IntegriCloud