aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2019-04-26 19:31:46 +0000
committerMartin Storsjo <martin@martin.st>2019-04-26 19:31:46 +0000
commit2061b0cab0002c264af632bf5e6ba5306c589c94 (patch)
tree39b135b72de6f181022a76f7304745f3d6dec348 /test/CodeGenCXX
parent7331c3301af9628719664c9a4feea576df3994a9 (diff)
[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
Diffstat (limited to 'test/CodeGenCXX')
-rw-r--r--test/CodeGenCXX/mingw-template-dllexport.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/CodeGenCXX/mingw-template-dllexport.cpp b/test/CodeGenCXX/mingw-template-dllexport.cpp
index 9e8f9b1bcc..408a3fd0a7 100644
--- a/test/CodeGenCXX/mingw-template-dllexport.cpp
+++ b/test/CodeGenCXX/mingw-template-dllexport.cpp
@@ -7,11 +7,9 @@
template <class T>
class c {
- void f();
+ void f() {}
};
-template <class T> void c<T>::f() {}
-
template class __declspec(dllexport) c<int>;
// CHECK: define {{.*}} dllexport {{.*}} @_ZN1cIiE1fEv