summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/microsoft-abi-structors-alias.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-02-03 18:54:51 +0000
committerReid Kleckner <reid@kleckner.net>2014-02-03 18:54:51 +0000
commit0090140bef3e2c22de03f42c515f6de061103801 (patch)
tree4ccfb924bbf132a44e259a2079125cc260dad4ba /test/CodeGenCXX/microsoft-abi-structors-alias.cpp
parent44ed544a49236a21aea1737a52456ed9b2b32a88 (diff)
[ms-cxxabi] Fix cast when structor replacement is an alias
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200711 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/microsoft-abi-structors-alias.cpp')
-rw-r--r--test/CodeGenCXX/microsoft-abi-structors-alias.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/test/CodeGenCXX/microsoft-abi-structors-alias.cpp b/test/CodeGenCXX/microsoft-abi-structors-alias.cpp
index 9301163d54..f977556aa5 100644
--- a/test/CodeGenCXX/microsoft-abi-structors-alias.cpp
+++ b/test/CodeGenCXX/microsoft-abi-structors-alias.cpp
@@ -1,9 +1,26 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -fno-rtti -mconstructor-aliases | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -fno-rtti -mconstructor-aliases -O1 -disable-llvm-optzns | FileCheck %s
namespace test1 {
template <typename T> class A {
~A() {}
};
template class A<char>;
-// CHECK: define weak_odr x86_thiscallcc void @"\01??1?$A@D@test1@@AAE@XZ"
+// CHECK-DAG: define weak_odr x86_thiscallcc void @"\01??1?$A@D@test1@@AAE@XZ"
+}
+
+namespace test2 {
+struct A {
+ virtual ~A();
+};
+struct B : A {
+ B();
+ virtual ~B();
+};
+
+A::~A() {}
+B::~B() {}
+void foo() {
+ B b;
+}
+// CHECK-DAG: @"\01??1B@test2@@UAE@XZ" = alias bitcast (void (%"struct.test2::A"*)* @"\01??1A@test2@@UAE@XZ" to void (%"struct.test2::B"*)*)
}