[flang-commits] [flang] 279166f - [flang] Use std::nullopt instead of llvm::None (NFC)
Kazu Hirata via flang-commits
flang-commits at lists.llvm.org
Wed Dec 7 20:11:07 PST 2022
Author: Kazu Hirata
Date: 2022-12-07T20:10:57-08:00
New Revision: 279166f0a79d686196c89ffbc3f26f8cbb24ba2a
URL: https://github.com/llvm/llvm-project/commit/279166f0a79d686196c89ffbc3f26f8cbb24ba2a
DIFF: https://github.com/llvm/llvm-project/commit/279166f0a79d686196c89ffbc3f26f8cbb24ba2a.diff
LOG: [flang] Use std::nullopt instead of llvm::None (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/lib/Optimizer/Builder/HLFIRTools.cpp
Removed:
################################################################################
diff --git a/flang/lib/Optimizer/Builder/HLFIRTools.cpp b/flang/lib/Optimizer/Builder/HLFIRTools.cpp
index 76fc053b50378..f8db67093cb32 100644
--- a/flang/lib/Optimizer/Builder/HLFIRTools.cpp
+++ b/flang/lib/Optimizer/Builder/HLFIRTools.cpp
@@ -76,7 +76,7 @@ hlfir::translateToExtendedValue(mlir::Location loc, fir::FirOpBuilder &builder,
if (entity.isVariable()) {
if (entity.isScalar() && !entity.hasLengthParameters() &&
!hlfir::isBoxAddressOrValueType(entity.getType()))
- return {fir::ExtendedValue{entity.getBase()}, llvm::None};
+ return {fir::ExtendedValue{entity.getBase()}, std::nullopt};
TODO(loc, "HLFIR variable to fir::ExtendedValue without a "
"FortranVariableOpInterface");
}
More information about the flang-commits
mailing list