[flang-commits] [flang] c15a925 - [flang] Use std::optional instead of None in comments (NFC)
Kazu Hirata via flang-commits
flang-commits at lists.llvm.org
Sat Dec 10 17:00:27 PST 2022
Author: Kazu Hirata
Date: 2022-12-10T17:00:21-08:00
New Revision: c15a925ada41d80203735b8828f045215910aca4
URL: https://github.com/llvm/llvm-project/commit/c15a925ada41d80203735b8828f045215910aca4
DIFF: https://github.com/llvm/llvm-project/commit/c15a925ada41d80203735b8828f045215910aca4.diff
LOG: [flang] Use std::optional instead of None in comments (NFC)
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/Lower/IterationSpace.h
flang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp
Removed:
################################################################################
diff --git a/flang/include/flang/Lower/IterationSpace.h b/flang/include/flang/Lower/IterationSpace.h
index 1bd83097ab204..ce134f104a93d 100644
--- a/flang/include/flang/Lower/IterationSpace.h
+++ b/flang/include/flang/Lower/IterationSpace.h
@@ -443,7 +443,7 @@ class ExplicitIterSpace {
return loadBindings.lookup(base);
}
- /// `load` must be a LHS array_load. Returns `llvm::None` on error.
+ /// `load` must be a LHS array_load. Returns `std::nullopt` on error.
llvm::Optional<size_t> findArgPosition(fir::ArrayLoadOp load);
bool isLHS(fir::ArrayLoadOp load) {
diff --git a/flang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp b/flang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp
index cc38d9e4b5ea7..b1c1f6ac71d5a 100644
--- a/flang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp
+++ b/flang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp
@@ -505,7 +505,7 @@ static unsigned getDimCount(mlir::Value val) {
/// Given the call operation's box argument \p val, discover
/// the element type of the underlying array object.
-/// \returns the element type or llvm::None if the type cannot
+/// \returns the element type or std::nullopt if the type cannot
/// be reliably found.
/// We expect that the argument is a result of fir.convert
/// with the destination type of !fir.box<none>.
More information about the flang-commits
mailing list