[llvm] 2db77d2 - [Scalar] Use std::optional in InductiveRangeCheckElimination.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 10 08:29:40 PST 2022
Author: Kazu Hirata
Date: 2022-12-10T08:29:35-08:00
New Revision: 2db77d2d39964484a7ebbda4bde238f4f25eee86
URL: https://github.com/llvm/llvm-project/commit/2db77d2d39964484a7ebbda4bde238f4f25eee86
DIFF: https://github.com/llvm/llvm-project/commit/2db77d2d39964484a7ebbda4bde238f4f25eee86.diff
LOG: [Scalar] Use std::optional in InductiveRangeCheckElimination.cpp (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:
llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp b/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
index cf94818704bd6..e7ffbc33abef8 100644
--- a/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
@@ -236,7 +236,7 @@ class InductiveRangeCheckElimination {
LoopInfo &LI;
using GetBFIFunc =
- llvm::Optional<llvm::function_ref<llvm::BlockFrequencyInfo &()> >;
+ std::optional<llvm::function_ref<llvm::BlockFrequencyInfo &()>>;
GetBFIFunc GetBFI;
// Returns true if it is profitable to do a transform basing on estimation of
More information about the llvm-commits
mailing list