[Reland][Runtimes] Merge 'compile_commands.json' files from runtimes build (#116303)
[llvm-project.git] / clang / test / CodeGenCXX / microsoft-abi-structors-alias.cpp
blob923ae3829c6b6c26f140d857c2b8df36f397b9e4
1 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -fno-rtti -mconstructor-aliases -O1 -disable-llvm-passes | FileCheck %s
3 namespace test1 {
4 template <typename T> class A {
5 ~A() {}
6 };
7 template class A<char>;
8 // CHECK-DAG: define weak_odr dso_local x86_thiscallcc void @"??1?$A@D@test1@@AAE@XZ"
11 namespace test2 {
12 struct A {
13 virtual ~A();
15 struct B : A {
16 B();
17 virtual ~B();
20 A::~A() {}
21 B::~B() {}
22 void foo() {
23 B b;
25 // CHECK-DAG: @"??1B@test2@@UAE@XZ" = dso_local unnamed_addr alias void (ptr), ptr @"??1A@test2@@UAE@XZ"
28 namespace test3 {
29 struct A { virtual ~A(); };
30 A::~A() {}
32 // CHECK-DAG: define dso_local x86_thiscallcc void @"??1A@test3@@UAE@XZ"(
33 namespace test3 {
34 template <typename T>
35 struct B : A {
36 virtual ~B() { }
38 template struct B<int>;
40 // This has to be weak, and emitting weak aliases is fragile, so we don't do the
41 // aliasing.
42 // CHECK-DAG: define weak_odr dso_local x86_thiscallcc void @"??1?$B@H@test3@@UAE@XZ"(