[PATCH] D18196: [CodeGen] Emit lifetime.end intrinsic after destructor call in landing pad

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 16 09:44:52 PDT 2016


rnk added a comment.

In http://reviews.llvm.org/D18196#375997, @rjmccall wrote:

> You should talk to Reid or someone else involved in MSVC-style EH support to ensure that they generate a reasonable code pattern for this.


I patched this in and verified it works. Clang makes a separate funclet for the lifetime end, which is suboptimal, but LLVM knows how to simplify it down to one. The stack coloring optimization in the backend doesn't fire yet, though. =/

Can you add a simple test for this? Make something similar to test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp but with optimizations enabled.


http://reviews.llvm.org/D18196





More information about the cfe-commits mailing list