summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/windows-itanium-dllexport.cpp
diff options
context:
space:
mode:
authorShoaib Meenai <smeenai@fb.com>2016-11-09 23:52:20 +0000
committerShoaib Meenai <smeenai@fb.com>2016-11-09 23:52:20 +0000
commitab3f96cb21ed0bb5697bb5f92f3630d89e1e97de (patch)
tree3312c629848ae12bb5b7458709bd6b33df0aed06 /clang/test/CodeGenCXX/windows-itanium-dllexport.cpp
parent0d4778f841c91985ec5e230949d6827bdc868fa7 (diff)
downloadbcm5719-llvm-ab3f96cb21ed0bb5697bb5f92f3630d89e1e97de.tar.gz
bcm5719-llvm-ab3f96cb21ed0bb5697bb5f92f3630d89e1e97de.zip
[Sema] Use MS ABI behavior for dllexport in Itanium
Similar to r284288, make the Itanium ABI follow MS ABI dllexport semantics in the case of an explicit instantiation declaration followed by a dllexport explicit instantiation definition. Differential Revision: https://reviews.llvm.org/D26471 llvm-svn: 286419
Diffstat (limited to 'clang/test/CodeGenCXX/windows-itanium-dllexport.cpp')
-rw-r--r--clang/test/CodeGenCXX/windows-itanium-dllexport.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/windows-itanium-dllexport.cpp b/clang/test/CodeGenCXX/windows-itanium-dllexport.cpp
index 934c6a29618..2b9b783e03e 100644
--- a/clang/test/CodeGenCXX/windows-itanium-dllexport.cpp
+++ b/clang/test/CodeGenCXX/windows-itanium-dllexport.cpp
@@ -7,3 +7,19 @@ struct __declspec(dllexport) s {
// CHECK: define {{.*}} dllexport {{.*}} @_ZN1saSERKS_
// CHECK: define {{.*}} dllexport {{.*}} @_ZN1s1fEv
+template <class T>
+class c {
+ void f() {}
+};
+
+template class __declspec(dllexport) c<int>;
+
+// CHECK: define {{.*}} dllexport {{.*}} @_ZN1cIiEaSERKS0_
+// CHECK: define {{.*}} dllexport {{.*}} @_ZN1cIiE1fEv
+
+extern template class c<char>;
+template class __declspec(dllexport) c<char>;
+
+// CHECK: define {{.*}} dllexport {{.*}} @_ZN1cIcEaSERKS0_
+// CHECK: define {{.*}} dllexport {{.*}} @_ZN1cIcE1fEv
+
OpenPOWER on IntegriCloud