[PATCH] D18953: [ms][dll] #26935 Defining a dllimport function should cause it to be exported
Andrew V. Tischenko via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 26 08:22:20 PDT 2016
avt77 added a comment.
It seems the latest MSVC changed the support of several features covering in this patch: more investigations needed.
================
Comment at: test/SemaCXX/dllimport.cpp:179
@@ -140,1 +178,3 @@
+template <typename T>
+int ExternVarTmplDeclInit = 1;
----------------
rnk wrote:
> Can you check with MSVC 2015 update 2 actually does with definitions of dllimport variable templates? I bet it doesn't export them.
They don't support variable templates at all:
error C2399: variable templates are not supported in this release
================
Comment at: test/SemaCXX/dllimport.cpp:1137
@@ -1017,1 +1136,3 @@
+template <typename T>
+void ImportClassTmplMembers<T>::normalDef() {}
#ifdef GNU
----------------
rnk wrote:
> I'm pretty sure MSVC considers all free function templates to be 'inline', i.e. they put them in comdats. I doubt MSVC exports these. Can you verify what it does?
They prohibit such a definition in the latest MSVC:
error C2491: 'ImportClassTmplMembers<T>::normalDef': definition of dllimport function not allowed
The same error I see for other definitions as well
http://reviews.llvm.org/D18953
More information about the cfe-commits
mailing list