r194430 - Add a testcase where we replace a destructor with an alias.
Rafael Espindola
rafael.espindola at gmail.com
Mon Nov 11 14:55:14 PST 2013
Author: rafael
Date: Mon Nov 11 16:55:13 2013
New Revision: 194430
URL: http://llvm.org/viewvc/llvm-project?rev=194430&view=rev
Log:
Add a testcase where we replace a destructor with an alias.
This is a reduced testcase from a cast to Function failing during bootstrap.
Modified:
cfe/trunk/test/CodeGenCXX/ctor-dtor-alias.cpp
Modified: cfe/trunk/test/CodeGenCXX/ctor-dtor-alias.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/ctor-dtor-alias.cpp?rev=194430&r1=194429&r2=194430&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/ctor-dtor-alias.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/ctor-dtor-alias.cpp Mon Nov 11 16:55:13 2013
@@ -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;
+}
More information about the cfe-commits
mailing list