diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-11-11 22:55:13 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-11-11 22:55:13 +0000 |
| commit | 50e1f0095f93e4a836b6f92703ade0d1706164e1 (patch) | |
| tree | 6ca194ec3656edac43e58e085e0428d1e2a8a5c3 /clang/test/CodeGenCXX/ctor-dtor-alias.cpp | |
| parent | 38a0cb52011bda5f5ca390d7b6eb033345a38b0e (diff) | |
| download | bcm5719-llvm-50e1f0095f93e4a836b6f92703ade0d1706164e1.tar.gz bcm5719-llvm-50e1f0095f93e4a836b6f92703ade0d1706164e1.zip | |
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
Diffstat (limited to 'clang/test/CodeGenCXX/ctor-dtor-alias.cpp')
| -rw-r--r-- | clang/test/CodeGenCXX/ctor-dtor-alias.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/ctor-dtor-alias.cpp b/clang/test/CodeGenCXX/ctor-dtor-alias.cpp index 1ab66a04d0d..ef56564d3dd 100644 --- a/clang/test/CodeGenCXX/ctor-dtor-alias.cpp +++ b/clang/test/CodeGenCXX/ctor-dtor-alias.cpp @@ -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; +} |

