forked from OSchip/llvm-project
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:
parent
38a0cb5201
commit
50e1f0095f
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue