summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/microsoft-abi-structors.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2017-02-14 00:54:11 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2017-02-14 00:54:11 +0000
commitcc8bc8ac38a541be2e25eefeaa7692b29879ecf3 (patch)
tree0b7f716febbf627bcac88392f7de8c5cbcbffc43 /test/CodeGenCXX/microsoft-abi-structors.cpp
parent5b38d7133e9cd36796e369aaa8f58b51dfe972d1 (diff)
[MS ABI] Correctly mangling vbase destructors
They are a little bit of a special case in the mangling. They are always mangled without taking into account their virtual-ness of the destructor. They are also mangled to return void, unlike the actual destructor. This fixes PR31931. Differential Revision: https://reviews.llvm.org/D29912 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295010 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/microsoft-abi-structors.cpp')
-rw-r--r--test/CodeGenCXX/microsoft-abi-structors.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/CodeGenCXX/microsoft-abi-structors.cpp b/test/CodeGenCXX/microsoft-abi-structors.cpp
index 6397eeb731..4de6c33466 100644
--- a/test/CodeGenCXX/microsoft-abi-structors.cpp
+++ b/test/CodeGenCXX/microsoft-abi-structors.cpp
@@ -207,7 +207,7 @@ F::~F() {
void foo() {
F f;
}
-// DTORS3-LABEL: define linkonce_odr x86_thiscallcc void @"\01??_DF@test2@@UAE@XZ"({{.*}} {{.*}} comdat
+// DTORS3-LABEL: define linkonce_odr x86_thiscallcc void @"\01??_DF@test2@@QAEXXZ"({{.*}} {{.*}} comdat
// Do an adjustment from C* to F*.
// DTORS3: getelementptr i8, i8* %{{.*}}, i32 20
// DTORS3: bitcast i8* %{{.*}} to %"struct.test2::F"*
@@ -361,12 +361,12 @@ struct D : B, C { ~D(); };
void call_vbase_complete(D *d) {
d->~D();
// CHECK: define void @"\01?call_vbase_complete@dtors@@YAXPAUD@1@@Z"
-// CHECK: call x86_thiscallcc void @"\01??_DD@dtors@@QAE@XZ"(%"struct.dtors::D"* %{{[^,]+}})
+// CHECK: call x86_thiscallcc void @"\01??_DD@dtors@@QAEXXZ"(%"struct.dtors::D"* %{{[^,]+}})
// CHECK: ret
}
// The complete dtor should call the base dtors for D and the vbase A (once).
-// CHECK: define linkonce_odr x86_thiscallcc void @"\01??_DD@dtors@@QAE@XZ"({{.*}}) {{.*}} comdat
+// CHECK: define linkonce_odr x86_thiscallcc void @"\01??_DD@dtors@@QAEXXZ"({{.*}}) {{.*}} comdat
// CHECK-NOT: call
// CHECK: call x86_thiscallcc void @"\01??1D@dtors@@QAE@XZ"
// CHECK-NOT: call
@@ -377,7 +377,7 @@ void call_vbase_complete(D *d) {
void destroy_d_complete() {
D d;
// CHECK: define void @"\01?destroy_d_complete@dtors@@YAXXZ"
-// CHECK: call x86_thiscallcc void @"\01??_DD@dtors@@QAE@XZ"(%"struct.dtors::D"* %{{[^,]+}})
+// CHECK: call x86_thiscallcc void @"\01??_DD@dtors@@QAEXXZ"(%"struct.dtors::D"* %{{[^,]+}})
// CHECK: ret
}
@@ -387,7 +387,7 @@ void destroy_d_complete() {
void call_nv_deleting_dtor(D *d) {
delete d;
// CHECK: define void @"\01?call_nv_deleting_dtor@dtors@@YAXPAUD@1@@Z"
-// CHECK: call x86_thiscallcc void @"\01??_DD@dtors@@QAE@XZ"(%"struct.dtors::D"* %{{[^,]+}})
+// CHECK: call x86_thiscallcc void @"\01??_DD@dtors@@QAEXXZ"(%"struct.dtors::D"* %{{[^,]+}})
// CHECK: call void @"\01??3@YAXPAX@Z"
// CHECK: ret
}