diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-11-14 04:19:37 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-11-14 04:19:37 +0000 |
commit | ea9a20834cf9311fdf758cfbd73b8daa8e655f15 (patch) | |
tree | 514dc451dfd1c3053eff0ce5376acf6774f02ef1 /test/CodeGenCXX/virt-dtor-gen.cpp | |
parent | 49e2b8e2e5d096851b5135ea5aed222e8aa95bde (diff) |
PR5483: Generate missing form of destructor when it is virtual. (Someone
more familiar with this stuff should double-check that there isn't some more
general rule; this is purely from inspecting g++ output.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88755 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/virt-dtor-gen.cpp')
-rw-r--r-- | test/CodeGenCXX/virt-dtor-gen.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGenCXX/virt-dtor-gen.cpp b/test/CodeGenCXX/virt-dtor-gen.cpp new file mode 100644 index 0000000000..470c1a43c5 --- /dev/null +++ b/test/CodeGenCXX/virt-dtor-gen.cpp @@ -0,0 +1,10 @@ +// clang-cc -o - -emit-llvm %s | FileCheck %s +// PR5483 + +// Make sure we generate all three forms of the destructor when it is virtual. +class Foo { + virtual ~Foo(); +}; +Foo::~Foo() {} + +// CHECK: define void @_ZN3FooD0Ev |