Add a testcase where we replace a destructor with an alias.

This is a reduced testcase from a cast to Function failing during bootstrap.

llvm-svn: 194430
This commit is contained in:
Rafael Espindola 2013-11-11 22:55:13 +00:00
parent 38a0cb5201
commit 50e1f0095f
1 changed files with 16 additions and 0 deletions

View File

@ -103,3 +103,19 @@ namespace test7 {
template class A<int>;
B::~B() {}
}
namespace test8 {
// Test that we replace ~zed with ~bar which is an alias to ~foo.
// CHECK-DAG: call i32 @__cxa_atexit({{.*}}@_ZN5test83barD2Ev
// CHECK-DAG: @_ZN5test83barD2Ev = alias {{.*}} @_ZN5test83fooD2Ev
struct foo {
~foo();
};
foo::~foo() {}
struct bar : public foo {
~bar();
};
bar::~bar() {}
struct zed : public bar {};
zed foo;
}