[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:43:20 PST 2025


================
@@ -0,0 +1,170 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
+; RUN: llc < %s | FileCheck %s
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-pc-windows-pc"
+
+ at p = dso_local global ptr null, align 8
+
+define dso_local noundef i32 @main(i32 noundef %argc, ptr noundef readnone captures(none) %argv) local_unnamed_addr personality ptr @__C_specific_handler {
----------------
MuellerMP wrote:

I updated this test and added the c code for it.
It does not test the termination of multiple scopes at once anymore. 
Instead it now tests the bugfix in the seh state numbering: the added `State >= 0` condition in WinEHPrepare.

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


More information about the llvm-commits mailing list