[clang] [CIR] Upstream Exception ThrowOp with subexpr (PR #161818)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 6 11:50:12 PDT 2025
================
@@ -4166,6 +4166,40 @@ def CIR_ThrowOp : CIR_Op<"throw"> {
let hasVerifier = 1;
}
+//===----------------------------------------------------------------------===//
+// AllocExceptionOp
+//===----------------------------------------------------------------------===//
+
+def CIR_AllocExceptionOp : CIR_Op<"alloc.exception"> {
+ let summary = "Allocates an exception according to Itanium ABI";
+ let description = [{
+ Implements a slightly higher level __cxa_allocate_exception:
+
+ `void *__cxa_allocate_exception(size_t thrown_size);`
+
+ If operation fails, program terminates, not throw.
----------------
andykaylor wrote:
```suggestion
If the operation fails, the program terminates rather than throw.
```
https://github.com/llvm/llvm-project/pull/161818
More information about the cfe-commits
mailing list