diff options
author | Reid Kleckner <rnk@google.com> | 2017-06-30 16:12:14 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2017-06-30 16:12:14 +0000 |
commit | 75ec5aa40177caeb6531afab8c0757183dddc101 (patch) | |
tree | 13353608e1d06179f60599cd0fa1229ec2953395 /test/CodeGenCXX | |
parent | 813f275eefb9ba53f20d56badfde964016f16341 (diff) |
[MS] Test that deleting destructor thunks are not exported
The MSVC linker emits the LNK4102 warning if they are.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306836 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX')
-rw-r--r-- | test/CodeGenCXX/dllexport-dtor-thunks.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGenCXX/dllexport-dtor-thunks.cpp b/test/CodeGenCXX/dllexport-dtor-thunks.cpp new file mode 100644 index 0000000000..52f9901620 --- /dev/null +++ b/test/CodeGenCXX/dllexport-dtor-thunks.cpp @@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -mconstructor-aliases -fms-extensions %s -emit-llvm -o - -triple x86_64-windows-msvc | FileCheck %s + +struct __declspec(dllexport) A { virtual ~A(); }; +struct __declspec(dllexport) B { virtual ~B(); }; +struct __declspec(dllexport) C : A, B { virtual ~C(); }; +C::~C() {} + +// This thunk should *not* be dllexport. +// CHECK: define linkonce_odr i8* @"\01??_EC@@W7EAAPEAXI@Z" +// CHECK: define dllexport void @"\01??1C@@UEAA@XZ" |