[Mlir-commits] [mlir] [mlir] Use {} instead of std::nullopt (NFC) (PR #146949)

Jakub Kuderski llvmlistbot at llvm.org
Thu Jul 3 13:06:47 PDT 2025


================
@@ -120,7 +120,7 @@ class MLIRGenImpl {
     // Arguments type are uniformly unranked tensors.
     llvm::SmallVector<mlir::Type, 4> argTypes(proto.getArgs().size(),
                                               getType(VarType{}));
-    auto funcType = builder.getFunctionType(argTypes, std::nullopt);
+    auto funcType = builder.getFunctionType(argTypes, {});
----------------
kuhar wrote:

I realize this is not worse what we had before, but would be nice to add a comment with the argument name, since `{}` could be anything.
Also in the other instances below.

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


More information about the Mlir-commits mailing list