[clang] [CIR] Call std::terminate when __cxa_end_catch throws during unwinding (PR #245085)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 23 11:54:57 PST 2026


================
@@ -642,11 +652,22 @@ mlir::LogicalResult ItaniumEHLowering::lowerEhInitiate(
              llvm::make_early_inc_range(op.getCatchToken().getUses())) {
           if (auto endOp =
                   mlir::dyn_cast<cir::EndCatchOp>(tokenUsers.getOwner())) {
+            bool onUnwindPath = unwindEndCatches.contains(endOp);
----------------
andykaylor wrote:

What is this doing? Literally, it is checking to see if the last `FuncOp` that we handled in `lowerFunc` contains the `EndCathOp` we're currently processing, but it's not obvious here what that means.

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


More information about the cfe-commits mailing list