[flang-commits] [flang] b989c76 - [flang][NFC] switch ValueRange(nullopt) to ValueRange{} after #146011 (#146043)
via flang-commits
flang-commits at lists.llvm.org
Fri Jun 27 03:49:37 PDT 2025
Author: jeanPerier
Date: 2025-06-27T12:49:34+02:00
New Revision: b989c76f3974b94126a2503242c4db12d1d08a0c
URL: https://github.com/llvm/llvm-project/commit/b989c76f3974b94126a2503242c4db12d1d08a0c
DIFF: https://github.com/llvm/llvm-project/commit/b989c76f3974b94126a2503242c4db12d1d08a0c.diff
LOG: [flang][NFC] switch ValueRange(nullopt) to ValueRange{} after #146011 (#146043)
Clean-up some std::nullopt usages in FIR ops builder that triggers a
deprecated warning after #146011.
Added:
Modified:
flang/include/flang/Optimizer/Dialect/FIROps.td
Removed:
################################################################################
diff --git a/flang/include/flang/Optimizer/Dialect/FIROps.td b/flang/include/flang/Optimizer/Dialect/FIROps.td
index 8ac847dd7dd0a..b96c0360316ad 100644
--- a/flang/include/flang/Optimizer/Dialect/FIROps.td
+++ b/flang/include/flang/Optimizer/Dialect/FIROps.td
@@ -2057,8 +2057,8 @@ def fir_SliceOp : fir_Op<"slice", [NoMemoryEffect, AttrSizedOperandSegments]> {
let builders = [
OpBuilder<(ins "mlir::ValueRange":$triples,
- CArg<"mlir::ValueRange", "std::nullopt">:$fields,
- CArg<"mlir::ValueRange", "std::nullopt">:$substr)>
+ CArg<"mlir::ValueRange", "{}">:$fields,
+ CArg<"mlir::ValueRange", "{}">:$substr)>
];
let hasVerifier = 1;
@@ -2253,8 +2253,8 @@ def fir_DoLoopOp : region_Op<"do_loop", [AttrSizedOperandSegments,
OpBuilder<(ins "mlir::Value":$lowerBound, "mlir::Value":$upperBound,
"mlir::Value":$step, CArg<"bool", "false">:$unordered,
CArg<"bool", "false">:$finalCountValue,
- CArg<"mlir::ValueRange", "std::nullopt">:$iterArgs,
- CArg<"mlir::ValueRange", "std::nullopt">:$reduceOperands,
+ CArg<"mlir::ValueRange", "{}">:$iterArgs,
+ CArg<"mlir::ValueRange", "{}">:$reduceOperands,
CArg<"llvm::ArrayRef<mlir::Attribute>", "{}">:$reduceAttrs,
CArg<"llvm::ArrayRef<mlir::NamedAttribute>", "{}">:$attributes)>
];
@@ -2441,7 +2441,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", "std::nullopt">:$iterArgs,
+ CArg<"mlir::ValueRange", "{}">:$iterArgs,
CArg<"llvm::ArrayRef<mlir::NamedAttribute>", "{}">:$attributes)>
];
More information about the flang-commits
mailing list