[clang] [CIR] Add is_implicit to ReturnOp (PR #174832)

Jasmine Tang via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 19 09:16:21 PST 2026


================
@@ -714,10 +714,12 @@ def CIR_ReturnOp : CIR_Op<"return", [
 
   // The return operation takes an optional input operand to return. This
   // value must match the return type of the enclosing function.
-  let arguments = (ins Variadic<CIR_AnyType>:$input);
+  let arguments = (ins Variadic<CIR_AnyType>:$input, UnitProp:$is_implicit);
----------------
badumbatish wrote:

hi Hendrik, the `is_implicit` attribute here concerns itself with the `emitImplicitReturn` implementation. Since both paths in the function (void and non-void) can potentially occur, the `is_implicit` can be set for both cases. 


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


More information about the cfe-commits mailing list