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

via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 7 04:40:35 PST 2025


================
@@ -1675,6 +1701,8 @@ void CodeGenFunction::EmitSEHTryStmt(const SEHTryStmt &S) {
       EmitRuntimeCallOrInvoke(getSehTryBeginFn(CGM));
       if (SEHTryEpilogueStack.size() == 1) // outermost only
         TryBB = Builder.GetInsertBlock();
+      if (!SehTryEndInvokeDest)
+        SehTryEndInvokeDest = getInvokeDest();
----------------
MuellerMP wrote:

Update: My current solution is now to just create the unwind destination basicblock early fo the TerminateTryScope instances which i can cache with `setCachedEHDispatchBlock`.

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


More information about the llvm-commits mailing list