[clang] [CIR] Upstream TryCallOp (PR #165303)

Amr Hesham via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 24 09:39:04 PST 2025


================
@@ -2707,6 +2707,98 @@ def CIR_CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> {
   ];
 }
 
+def CIR_TryCallOp : CIR_CallOpBase<"try_call",[
----------------
AmrDeveloper wrote:

- For the second point we need at least CatchParamOp to be merged
- For the first case i already see "reference to an undefined block" error, for example

```
cir.if %1 {
   %3 = cir.try_call @division(%a, %b) ^continue, ^landing_pad : (!s32i, !s32i) -> !s32i
} else {
  ^continue:
    cir.br ^landing_pad
  ^landing_pad:
    cir.return
}
```

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


More information about the cfe-commits mailing list