summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/dllexport.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-08-23 23:00:29 +0000
committerHans Wennborg <hans@hanshq.net>2014-08-23 23:00:29 +0000
commitffb55639e785d518bd06a4cb68cf163d820d31d6 (patch)
tree64dcdd7ab5e85c3e37a32529ecfa51aa928510a6 /clang/test/CodeGenCXX/dllexport.cpp
parent13044d1cc509cfff90ff37532353b16c676b50ca (diff)
downloadbcm5719-llvm-ffb55639e785d518bd06a4cb68cf163d820d31d6.tar.gz
bcm5719-llvm-ffb55639e785d518bd06a4cb68cf163d820d31d6.zip
Add another test for DLL attribute inheritance to partial specializations
llvm-svn: 216337
Diffstat (limited to 'clang/test/CodeGenCXX/dllexport.cpp')
-rw-r--r--clang/test/CodeGenCXX/dllexport.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/dllexport.cpp b/clang/test/CodeGenCXX/dllexport.cpp
index f2e0c3b2519..c46401239d5 100644
--- a/clang/test/CodeGenCXX/dllexport.cpp
+++ b/clang/test/CodeGenCXX/dllexport.cpp
@@ -593,6 +593,14 @@ USEMEMFUNC(PartiallySpecializedExportedClassTemplate<void*>, f);
// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?f@?$PartiallySpecializedExportedClassTemplate@PAX@@QAEXXZ"
// G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN41PartiallySpecializedExportedClassTemplateIPvE1fEv
+// MS ignores DLL attributes on partial specializations; inheritance still works though.
+template <typename T> struct __declspec(dllexport) PartiallySpecializedExportedClassTemplate2 {};
+template <typename T> struct __declspec(dllimport) PartiallySpecializedExportedClassTemplate2<T*> { void f() {} };
+USEMEMFUNC(PartiallySpecializedExportedClassTemplate2<void*>, f);
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?f@?$PartiallySpecializedExportedClassTemplate2@PAX@@QAEXXZ"
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN42PartiallySpecializedExportedClassTemplate2IPvE1fEv
+
+
//===----------------------------------------------------------------------===//
// Classes with template base classes
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud