================ @@ -287,32 +287,43 @@ def CIR_BoolType : def CIR_FuncType : CIR_Type<"Func", "func"> { let summary = "CIR function type"; let description = [{ - The `!cir.func` is a function type. It consists of a single return type, a - list of parameter types and can optionally be variadic. + The `!cir.func` is a function type. It consists of an optional return type, + a list of parameter types and can optionally be variadic. Example: ```mlir - !cir.func<!bool ()> - !cir.func<!s32i (!s8i, !s8i)> - !cir.func<!s32i (!s32i, ...)> + !cir.func<()> + !cir.func<() -> bool> + !cir.func<(!s8i, !s8i)> + !cir.func<(!s8i, !s8i) -> !s32i> + !cir.func<(!s32i, ...) -> !s32i> ``` }]; let parameters = (ins ArrayRefParameter<"mlir::Type">:$inputs, - "mlir::Type":$returnType, "bool":$varArg); + "mlir::Type":$optionalReturnType, "bool":$varArg); + // Use a custom parser to handle the argument types and optional return ---------------- erichkeane wrote:
```suggestion // Use a custom parser to handle the argument types and optional return. ``` https://github.com/llvm/llvm-project/pull/128787 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits