[PATCH] D36914: Implement CFG construction for __try / __except / __leave.

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 21 10:12:03 PDT 2017


On Mon, Aug 21, 2017 at 12:41 PM, Reid Kleckner via Phabricator via
cfe-commits <cfe-commits at lists.llvm.org> wrote:

> rnk added a comment.
>
> > Don't add any EH edges to the CFG for SEH. In practice,
> BuildOpts.AddEHEdges is always false in practice from what I can tell, and
> with SEH every single stmt would have to get an EH edge.
>
> Since we can't mix C++ EH and SEH, do you think it would be better to
> reuse the TryTerminatedBlock chain so that we get edges from every call to
> the __except? That's the approximation of SEH that we actually support in
> LLVM anyway.
>

Oh, that's a good idea. It'd mean that a CXXThrow would lead to a __try
block, but I suppose that's a feature, not a bug?


> ================
> Comment at: lib/Analysis/CFG.cpp:2570
> +  // All __leaves should go to the code following the __try
> +  // (FIXME: or if the __try // has a __finally, to the __finally.)
> +  SaveAndRestore<JumpTarget> save_break(SEHLeaveJumpTarget);
> ----------------
> Looks like a `//` got re-wrapped in the comment
>
>
> ================
> Comment at: test/Sema/warn-unreachable-ms.c:23
> +  } __except(1) {  // Filter expression should not be marked as
> unreachable.
> +    // Emtpy __except body.
> +  }
> ----------------
> typo empty
>
>
> https://reviews.llvm.org/D36914
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170821/dc67ab35/attachment.html>


More information about the cfe-commits mailing list