summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/dllexport.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-02-09 02:51:17 +0000
committerReid Kleckner <rnk@google.com>2016-02-09 02:51:17 +0000
commita008c6111a423c931de82e1f4a5994d007388829 (patch)
tree0c32f77f601e08b25fbb00c0ead46b361a853577 /test/CodeGenCXX/dllexport.cpp
parentb918381550b222062588eae414018a7641953097 (diff)
Avoid forcing emission of delayed dllexported classes on template instantiation
Fixes PR26490 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260194 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/dllexport.cpp')
-rw-r--r--test/CodeGenCXX/dllexport.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGenCXX/dllexport.cpp b/test/CodeGenCXX/dllexport.cpp
index 1412ad866b..04007e8212 100644
--- a/test/CodeGenCXX/dllexport.cpp
+++ b/test/CodeGenCXX/dllexport.cpp
@@ -777,6 +777,17 @@ struct __declspec(dllexport) Baz {
// M32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable(1) %"struct.InClassInits::Baz"* @"\01??4Baz@InClassInits@@QAEAAU01@ABU01@@Z"
}
+// We had an issue where instantiating A would force emission of B's delayed
+// exported methods.
+namespace pr26490 {
+template <typename T> struct A { };
+struct __declspec(dllexport) B {
+ B(int = 0) {}
+ A<int> m_fn1() {}
+};
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??_FB@pr26490@@QAEXXZ"
+}
+
//===----------------------------------------------------------------------===//
// Classes with template base classes