]> granicus.if.org Git - clang/commit
[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)
commit2061b0cab0002c264af632bf5e6ba5306c589c94
tree39b135b72de6f181022a76f7304745f3d6dec348
parent7331c3301af9628719664c9a4feea576df3994a9
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359343 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDeclCXX.cpp
test/CodeGenCXX/mingw-template-dllexport.cpp