[flang-commits] [flang] 7f773ce - [flang] Use std::nullopt instead of None (NFC)
Kazu Hirata via flang-commits
flang-commits at lists.llvm.org
Sun Dec 4 14:40:20 PST 2022
Author: Kazu Hirata
Date: 2022-12-04T14:40:10-08:00
New Revision: 7f773ce6fc98a31b3466be02c020439414c2da24
URL: https://github.com/llvm/llvm-project/commit/7f773ce6fc98a31b3466be02c020439414c2da24
DIFF: https://github.com/llvm/llvm-project/commit/7f773ce6fc98a31b3466be02c020439414c2da24.diff
LOG: [flang] Use std::nullopt instead of None (NFC)
I've verified that every single instance of std::nullopt 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
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 c0ea063e3c89..a6b84ee9efcb 100644
--- a/flang/include/flang/Optimizer/Dialect/FIROps.td
+++ b/flang/include/flang/Optimizer/Dialect/FIROps.td
@@ -1903,8 +1903,8 @@ def fir_SliceOp : fir_Op<"slice", [NoMemoryEffect, AttrSizedOperandSegments]> {
let builders = [
OpBuilder<(ins "mlir::ValueRange":$triples,
- CArg<"mlir::ValueRange", "llvm::None">:$fields,
- CArg<"mlir::ValueRange", "llvm::None">:$substr)>
+ CArg<"mlir::ValueRange", "std::nullopt">:$fields,
+ CArg<"mlir::ValueRange", "std::nullopt">:$substr)>
];
let hasVerifier = 1;
More information about the flang-commits
mailing list