]> granicus.if.org Git - clang/commit
When emitting the destructor for a class with a vtable, if we can determine
authorAnders Carlsson <andersca@mac.com>
Sat, 14 May 2011 23:26:09 +0000 (23:26 +0000)
committerAnders Carlsson <andersca@mac.com>
Sat, 14 May 2011 23:26:09 +0000 (23:26 +0000)
commitffb945ffb5d29b80fd93649c3572b6d87abce3fc
treeb2f9cf40b3b751972661f2b3763cbabc636c7fb0
parenta83c17c28f4a570e18678f6031834487534f120d
When emitting the destructor for a class with a vtable, if we can determine
that the destructor body is trivial and that all member variables also have either
trivial destructors or trivial destructor bodies, we don't need to initialize the
vtable pointers since no virtual member functions will be called on the destructor.

Fixes PR9181.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131368 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Decl.h
lib/AST/Decl.cpp
lib/CodeGen/CGCXX.cpp
lib/CodeGen/CGClass.cpp
test/CodeGenCXX/mangle-subst-std.cpp
test/CodeGenCXX/skip-vtable-pointer-initialization.cpp [new file with mode: 0644]