[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:55 PST 2026
================
@@ -57,11 +57,10 @@ S::S() try : S(1) {
// LLVM: [[CLEANUP_LPAD]]:
// LLVM: landingpad { ptr, i32 }
// LLVM: cleanup
-// LLVMCIR: call void @__cxa_end_catch()
-// OGCG: invoke void @__cxa_end_catch()
-// LLVM: resume { ptr, i32 }
-// LLVM: [[UNREACHABLE_DEST]]:
-// LLVM: unreachable
+// LLVM: invoke void @__cxa_end_catch()
+// LLVM-DAG: resume { ptr, i32 }
----------------
andykaylor wrote:
Why does this need `DAG`? Is CIR putting the resume in a different block? The checks here would allow something like this:
```
%unreachable_block:
resume { ptr, i32 }
unreachable
```
And I think that would be wrong.
https://github.com/llvm/llvm-project/pull/245085
More information about the cfe-commits
mailing list