[cfe-commits] r131368 - in /cfe/trunk: 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

Anders Carlsson andersca at mac.com
Sat May 14 18:55:36 PDT 2011


On May 14, 2011, at 5:35 PM, Sean Hunt wrote:

> On 11-05-14 04:26 PM, Anders Carlsson wrote:
>> Author: andersca
>> Date: Sat May 14 18:26:09 2011
>> New Revision: 131368
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=131368&view=rev
>> Log:
>> 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.
> 
> This breaks the following code:

Whoops, good catch :) Disabled the optimization in r131372. I'll take another look at it tomorrow.

- Anders




More information about the cfe-commits mailing list