[llvm] [Inline][WinEH] Fix try scopes leaking to caller on inline (PR #164170)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 24 17:25:22 PDT 2025


efriedma-quic wrote:

I don't think messing with the numbering algorithm helps.  Fundamentally, the issue here is that after inlining, we can't tell where the scope ends: we don't explicitly end the scope, and the ret instruction goes away, so there's no marker for the end of the region.

The simplest way to handle this is in the frontend, I think, explicitly closing the region before we "ret".

There are other issues with unreachable code, like, we don't enforce nesting like we do catchpad/cleanuppad regions.  But I don't think those are relevant for this specific testcase.

https://github.com/llvm/llvm-project/pull/164170


More information about the llvm-commits mailing list