[PATCH] D47988: [CodeGen] Emit MSVC funclet IR for Obj-C exceptions

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 18 17:06:42 PDT 2018


rjmccall added a comment.

In https://reviews.llvm.org/D47988#1135929, @rnk wrote:

> In https://reviews.llvm.org/D47988#1135533, @rjmccall wrote:
>
> > In general, it's unfortunate that this has to leave so many C++-runtime-specific tendrils in the ObjC code.  Unlike the EH type patch, though, I'm not sure I can see a great alternative here, especially because of the semantic restrictions required by outlining.
>
>
> It's technically possible to lift those restrictions by returning an i32 from the outlined function and switching on it. Right? The question is, is it worth it? The catch funclet would effectively store the i32 to the stack frame, then "catchret" via the runtime, and then we'd switch out to the jump target.


I don't think it's important.  Uses of control flow out of `@finally` are rare, and we could probably forbid it entirely without significant loss.


Repository:
  rC Clang

https://reviews.llvm.org/D47988





More information about the cfe-commits mailing list