[flang] Use std::nullopt instead of None (NFC)

I've verified that every change in this patch affects generated files
and would reduce the number of warnings if None were deprecated.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
This commit is contained in:
Kazu Hirata 2022-12-04 13:52:47 -08:00
parent 5521097190
commit 8d6589cba7
1 changed files with 2 additions and 2 deletions

View File

@ -2090,7 +2090,7 @@ def fir_DoLoopOp : region_Op<"do_loop",
OpBuilder<(ins "mlir::Value":$lowerBound, "mlir::Value":$upperBound,
"mlir::Value":$step, CArg<"bool", "false">:$unordered,
CArg<"bool", "false">:$finalCountValue,
CArg<"mlir::ValueRange", "llvm::None">:$iterArgs,
CArg<"mlir::ValueRange", "std::nullopt">:$iterArgs,
CArg<"llvm::ArrayRef<mlir::NamedAttribute>", "{}">:$attributes)>
];
@ -2234,7 +2234,7 @@ def fir_IterWhileOp : region_Op<"iterate_while",
OpBuilder<(ins "mlir::Value":$lowerBound, "mlir::Value":$upperBound,
"mlir::Value":$step, "mlir::Value":$iterate,
CArg<"bool", "false">:$finalCountValue,
CArg<"mlir::ValueRange", "llvm::None">:$iterArgs,
CArg<"mlir::ValueRange", "std::nullopt">:$iterArgs,
CArg<"llvm::ArrayRef<mlir::NamedAttribute>", "{}">:$attributes)>
];