[LLVMdev] RFC: Exception Handling Proposal Revised

Renato Golin rengolin at systemcall.org
Wed Dec 1 01:12:45 PST 2010


On 1 December 2010 07:04, Bill Wendling <wendling at apple.com> wrote:
> The unwind edge from an invoke instruction jumps to a landing pad. That landing pad contains code which performs optional cleanups, and then determines which catch handler to call (if any).  If no catch handlers are applicable, the exception resumes propagation either to the next enclosing region or out of the function.

Hi Bill,

Looking good already! ;)


> ch.int:

shouldn't the catch handlers have "landingpad" attributes?

> ;; C's d'tor
> c.dtor:

and the cleanups?


> yikes:
>  call void @_ZSt9terminatev() noreturn nounwind
>  unreachable

and yikes?

Can we standardize "yikes" as the official terminate handler name? :D


> Well? What do you think? Pretty cool, eh? :-)

Yup. I think it's much more clear than the current scheme, at least
for C++ Itanium ABI (AFAICS).

Can anyone try an Ada (or any other language) example to see if it
makes sense for them, too?

cheers,
--renato




More information about the llvm-dev mailing list