Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / dllexport-dtor-thunks.cpp
blob68ab2cff1c0523737d6fbe39de3391e743aa62c3
1 // RUN: %clang_cc1 -mconstructor-aliases -fms-extensions %s -emit-llvm -o - -triple x86_64-windows-msvc | FileCheck %s
3 namespace test1 {
4 struct A { ~A(); };
5 struct __declspec(dllexport) B : virtual A { };
6 // CHECK: define weak_odr dso_local dllexport void @"??1B@test1@@QEAA@XZ"
7 // CHECK: define weak_odr dso_local dllexport void @"??_DB@test1@@QEAAXXZ"
10 struct __declspec(dllexport) A { virtual ~A(); };
11 struct __declspec(dllexport) B { virtual ~B(); };
12 struct __declspec(dllexport) C : A, B { virtual ~C(); };
13 C::~C() {}
15 // CHECK: define dso_local dllexport void @"??1C@@UEAA@XZ"
16 // This thunk should *not* be dllexport.
17 // CHECK: define linkonce_odr dso_local noundef ptr @"??_EC@@W7EAAPEAXI@Z"