aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCXX.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-11-14 04:19:37 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-11-14 04:19:37 +0000
commitea9a20834cf9311fdf758cfbd73b8daa8e655f15 (patch)
tree514dc451dfd1c3053eff0ce5376acf6774f02ef1 /lib/CodeGen/CGCXX.cpp
parent49e2b8e2e5d096851b5135ea5aed222e8aa95bde (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 'lib/CodeGen/CGCXX.cpp')
-rw-r--r--lib/CodeGen/CGCXX.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index bcb0b5c5c3..a8261a5585 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/lib/CodeGen/CGCXX.cpp
@@ -752,6 +752,8 @@ const char *CodeGenModule::getMangledCXXCtorName(const CXXConstructorDecl *D,
}
void CodeGenModule::EmitCXXDestructors(const CXXDestructorDecl *D) {
+ if (D->isVirtual())
+ EmitCXXDestructor(D, Dtor_Deleting);
EmitCXXDestructor(D, Dtor_Complete);
EmitCXXDestructor(D, Dtor_Base);
}