diff options
author | Shoaib Meenai <smeenai@fb.com> | 2017-06-30 00:07:54 +0000 |
---|---|---|
committer | Shoaib Meenai <smeenai@fb.com> | 2017-06-30 00:07:54 +0000 |
commit | a2222fa1d27163ab1b0a8885d53ae1b69def7afc (patch) | |
tree | 3ad3e9f5afa768563fd5719f6b4d38d4298011c8 /clang/test/CodeGenCXX/windows-itanium-dllexport.cpp | |
parent | 53b2cb77cc1dd071b0c98afee3c4cc20ca1eef22 (diff) | |
download | bcm5719-llvm-a2222fa1d27163ab1b0a8885d53ae1b69def7afc.tar.gz bcm5719-llvm-a2222fa1d27163ab1b0a8885d53ae1b69def7afc.zip |
[CodeGen] Propagate dllexport to thunks
Under Windows Itanium, we need to export virtual and non-virtual thunks
if the functions being thunked are exported. These thunks would
previously inherit their dllexport attribute from the declaration, but
r298330 changed declarations to not have dllexport attributes. We
therefore need to add the dllexport attribute to the definition
ourselves now.
Differential Revision: https://reviews.llvm.org/D34850
llvm-svn: 306770
Diffstat (limited to 'clang/test/CodeGenCXX/windows-itanium-dllexport.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/windows-itanium-dllexport.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/windows-itanium-dllexport.cpp b/clang/test/CodeGenCXX/windows-itanium-dllexport.cpp index ff780c77782..ffb8f610f5c 100644 --- a/clang/test/CodeGenCXX/windows-itanium-dllexport.cpp +++ b/clang/test/CodeGenCXX/windows-itanium-dllexport.cpp @@ -53,3 +53,12 @@ USEMEMFUNC(outer<char>::inner, f) // CHECK: declare dllimport {{.*}} @_ZN5outerIcE1fEv // CHECK: define {{.*}} @_ZN5outerIcE5inner1fEv + +struct base { + virtual ~base(); +}; +struct __declspec(dllexport) derived : public virtual base { + virtual ~derived() {} +}; + +// CHECK: define {{.*}} dllexport {{.*}} @_ZTv0_n12_N7derivedD0Ev |