Skip to content

Commit

Permalink
[MS] Test that deleting destructor thunks are not exported
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rnk committed Jun 30, 2017
1 parent 813f275 commit 75ec5aa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/CodeGenCXX/dllexport-dtor-thunks.cpp
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 75ec5aa

Please sign in to comment.