[LLVMdev] RFC: Exception Handling Rewrite

John McCall rjmccall at apple.com
Fri Aug 5 12:25:53 PDT 2011


On Aug 5, 2011, at 10:57 AM, Peter Lawrence wrote:
> second, do you agree that if one exception-spec says to unexpected()

> if anything other than 'A' is thrown, and another exception-spec says
> to unexpected() if anything other than 'B' is thrown, that these cannot
> be merged --> by that I mean they cannot have the same landingpad <-- ?

I think you aren't understanding what merging means.  Nobody's talking
about taking two invokes that lead to landing pads with different
semantics and making them share the same landing pad;  obviously
that cannot be done.  But you can certainly inline a function that has an
exception-specification into a function with a different
exception-specification:  you just have to preserve that the inner
exception-specification applies before any filters or handlers in the
outer function.  The existing C++ personalities are quite capable of
handling that.

John.



More information about the llvm-dev mailing list