summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/dllexport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/dllexport.cpp')
-rw-r--r--clang/test/CodeGenCXX/dllexport.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/clang/test/CodeGenCXX/dllexport.cpp b/clang/test/CodeGenCXX/dllexport.cpp
index 7cef7c2d127..6232f2c747e 100644
--- a/clang/test/CodeGenCXX/dllexport.cpp
+++ b/clang/test/CodeGenCXX/dllexport.cpp
@@ -844,11 +844,6 @@ struct __declspec(dllexport) B {
// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??_FB@pr26490@@QAEXXZ"
}
-// dllexport trumps dllexport on an explicit instantiation.
-template <typename T> struct ExplicitInstantiationTwoAttributes { void f() {} };
-template struct __declspec(dllexport) __declspec(dllimport) ExplicitInstantiationTwoAttributes<int>;
-// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?f@?$ExplicitInstantiationTwoAttributes@H@@QAEXXZ"
-
//===----------------------------------------------------------------------===//
// Classes with template base classes
@@ -963,6 +958,14 @@ template struct ExplicitInstantiationDeclTemplateBase<int>;
// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?func@?$ExplicitInstantiationDeclTemplateBase@H@@QAEXXZ"
// G32-DAG: define weak_odr x86_thiscallcc void @_ZN37ExplicitInstantiationDeclTemplateBaseIiE4funcEv
+template <typename T> struct ExplicitInstantiationDeclTemplateBase2 { void func() {} };
+extern template struct ExplicitInstantiationDeclTemplateBase2<int>;
+struct __declspec(dllexport) DerivedFromExplicitInstantiationDeclTemplateBase2 : public ExplicitInstantiationDeclTemplateBase2<int> {};
+template struct __declspec(dllimport) ExplicitInstantiationDeclTemplateBase2<int>;
+USEMEMFUNC(ExplicitInstantiationDeclTemplateBase2<int>, func)
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?func@?$ExplicitInstantiationDeclTemplateBase2@H@@QAEXXZ"
+// G32-DAG: define weak_odr x86_thiscallcc void @_ZN38ExplicitInstantiationDeclTemplateBase2IiE4funcEv
+
// PR26076
struct LayerSelectionBound;
template <typename> struct Selection {};
OpenPOWER on IntegriCloud