r216337 - Add another test for DLL attribute inheritance to partial specializations

Hans Wennborg hans at hanshq.net
Sat Aug 23 16:00:29 PDT 2014


Author: hans
Date: Sat Aug 23 18:00:29 2014
New Revision: 216337

URL: http://llvm.org/viewvc/llvm-project?rev=216337&view=rev
Log:
Add another test for DLL attribute inheritance to partial specializations

Modified:
    cfe/trunk/test/CodeGenCXX/dllexport.cpp

Modified: cfe/trunk/test/CodeGenCXX/dllexport.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/dllexport.cpp?rev=216337&r1=216336&r2=216337&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/dllexport.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/dllexport.cpp Sat Aug 23 18:00:29 2014
@@ -593,6 +593,14 @@ USEMEMFUNC(PartiallySpecializedExportedC
 // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?f@?$PartiallySpecializedExportedClassTemplate at 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 at PAX@@QAEXXZ"
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN42PartiallySpecializedExportedClassTemplate2IPvE1fEv
+
+
 //===----------------------------------------------------------------------===//
 // Classes with template base classes
 //===----------------------------------------------------------------------===//





More information about the cfe-commits mailing list