diff options
Diffstat (limited to 'test/CodeGenCXX/windows-implicit-dllexport-template-specialization.cpp')
-rw-r--r-- | test/CodeGenCXX/windows-implicit-dllexport-template-specialization.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGenCXX/windows-implicit-dllexport-template-specialization.cpp b/test/CodeGenCXX/windows-implicit-dllexport-template-specialization.cpp new file mode 100644 index 0000000000000..c2f2a0773e907 --- /dev/null +++ b/test/CodeGenCXX/windows-implicit-dllexport-template-specialization.cpp @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++11 -triple i686-windows -fdeclspec -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-MS +// RUN: %clang_cc1 -std=c++11 -triple i686-windows-itanium -fdeclspec -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-IA + +template <typename> +struct s {}; + +template <typename T_> +class t : s<T_> {}; + +extern template class t<char>; +template class __declspec(dllexport) t<char>; + +// CHECK-MS: dllexport {{.*}} @"\01??4?$t@D@@QAEAAV0@ABV0@@Z" +// CHECK-MS: dllexport {{.*}} @"\01??4?$s@D@@QAEAAU0@ABU0@@Z" + +// CHECK-IA: dllexport {{.*}} @_ZN1tIcEaSERKS0_ +// CHECK-IA: dllexport {{.*}} @_ZN1sIcEaSERKS0_ + |