Ping.
On Fri, Jun 28, 2013 at 7:02 PM, Reid Kleckner <[email protected]> wrote: > Hi rjmccall, > > Based on Peter Collingbourne's destructor patches. > > Prior to this change, clang was considering ?1 to be the complete > destructor and the base destructor, which was wrong. This lead to > crashes in TUs with non-inline dtors where both complete and base dtors > would be emitted and mangle to the same symbol. > > Furthermore, TUs with non-inline dtors don't emit a complete destructor. > They are emitted as inline thunks in TUs that need them, and they always > delegate to the base dtors of the derived class and its virtual bases. > This change uses the DeferredDecls machinery to emit them. There are > comments in EmitDestructorBody() that suggest this won't work when the > body of the dtor is a try block, but this is how cl.exe does things. > > Finally, for classes that don't use virtual inheritance, MSVC always > calls the base destructor (?1) directly. This is a useful code size > optimization that avoids emitting lots of extra thunks or aliases. > Implementing it also means our existing tests continue to pass, and is > consistent with MSVC's output. > > We could probably do the same for Itanium without breaking anything. > There is an existing -mconstructor-aliases that makes the complete dtor > a linker alias, but it is off by default. > > http://llvm-reviews.chandlerc.com/D1066 > > Files: > include/clang/Basic/TargetCXXABI.h > lib/AST/MicrosoftMangle.cpp > lib/CodeGen/CGCXX.cpp > lib/CodeGen/CGClass.cpp > lib/CodeGen/CGExprCXX.cpp > lib/CodeGen/CodeGenModule.cpp > lib/CodeGen/CodeGenModule.h > test/CodeGenCXX/microsoft-abi-structors.cpp >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
