diff options
author | Hans Wennborg <hans@hanshq.net> | 2015-06-09 00:39:09 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2015-06-09 00:39:09 +0000 |
commit | fce87cae44aa89aa92d0fdb107ba1d88d5d9b3ca (patch) | |
tree | 566afe5697e3f3457ffc6363d352e60f428ee49d /clang/test/CodeGenCXX/dllimport.cpp | |
parent | c0875507becfe14ad83acd50cceb66d1de641d1c (diff) | |
download | bcm5719-llvm-fce87cae44aa89aa92d0fdb107ba1d88d5d9b3ca.tar.gz bcm5719-llvm-fce87cae44aa89aa92d0fdb107ba1d88d5d9b3ca.zip |
Enable DLL attribute propagation on explicit instantiation definitions (PR23770)
This is a follow-up to r225570 which enabled adding DLL attributes when a
class template goes from explicit instantiation declaration to explicit
instantiation definition.
llvm-svn: 239375
Diffstat (limited to 'clang/test/CodeGenCXX/dllimport.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/dllimport.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/dllimport.cpp b/clang/test/CodeGenCXX/dllimport.cpp index 9e3813e5e1b..0f15ff0291b 100644 --- a/clang/test/CodeGenCXX/dllimport.cpp +++ b/clang/test/CodeGenCXX/dllimport.cpp @@ -741,6 +741,12 @@ USEMEMFUNC(ExplicitInstantiationDeclExportedDefImportedTemplate<int>, f); // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?f@?$ExplicitInstantiationDeclExportedDefImportedTemplate@H@@QAEXXZ" // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc %struct.ExplicitInstantiationDeclExportedDefImportedTemplate* @"\01??0?$ExplicitInstantiationDeclExportedDefImportedTemplate@H@@QAE@XZ" +template <typename T> struct PR23770BaseTemplate { void f() {} }; +template <typename T> struct PR23770DerivedTemplate : PR23770BaseTemplate<int> {}; +extern template struct PR23770DerivedTemplate<int>; +template struct __declspec(dllimport) PR23770DerivedTemplate<int>; +USEMEMFUNC(PR23770BaseTemplate<int>, f); +// M32-DAG: declare dllimport x86_thiscallcc void @"\01?f@?$PR23770BaseTemplate@H@@QAEXXZ" //===----------------------------------------------------------------------===// // Classes with template base classes |