[MinGW] Do dllexport inline methods in template instantiation
authorMartin Storsjo <martin@martin.st>
Fri, 26 Apr 2019 19:31:46 +0000 (19:31 +0000)
committerMartin Storsjo <martin@martin.st>
Fri, 26 Apr 2019 19:31:46 +0000 (19:31 +0000)
commit9534e9dbe44c130acefb48bd87b3e7d78db72def
tree6ccd0a5974df2b80354be69b21c51850b92af23d
parentda93dec330507c5f5ff20115a4d571979ed31393
[MinGW] Do dllexport inline methods in template instantiation

Normally, in MinGW mode, inline methods aren't dllexported.

However, in the case of a dllimported template instantiation,
the inline methods aren't instantiated locally, but referenced
from the instantiation. Therefore, those methods also need to
be dllexported, in the case of an instantiation.

GCC suffers from the same issue, reported at [1], but the issue
is still unresolved there.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89088

Differential Revision: https://reviews.llvm.org/D61176

llvm-svn: 359343
clang/lib/Sema/SemaDeclCXX.cpp
clang/test/CodeGenCXX/mingw-template-dllexport.cpp