[clang] [CIR] Introduce cir.construct_catch_param (PR #195283)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri May 1 09:13:54 PDT 2026


================
@@ -7704,6 +7704,57 @@ def CIR_InitCatchParamOp : CIR_Op<"init_catch_param"> {
   let hasLLVMLowering = false;
 }
 
+//===----------------------------------------------------------------------===//
+// EH Operations: ConstructCatchParamOp
+//===----------------------------------------------------------------------===//
+
+def CIR_ConstructCatchParamOp : CIR_Op<"construct_catch_param", [
+    DeclareOpInterfaceMethods<SymbolUserOpInterface>
+  ]> {
+  let summary = "Construct a catch parameter from the in-flight exception";
+  let description = [{
+    `cir.construct_catch_param` abstractly represents the target-specific work
+    that must be performed before `cir.begin_catch` to bind the in-flight
+    exception object to the local alloca used for the catch parameter.
+
+    For example, for non-pointer, non-reference catch parameters whose type has
----------------
erichkeane wrote:

```suggestion
    For example: for non-pointer, non-reference catch parameters whose type has
```

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


More information about the cfe-commits mailing list