Skip to content

Commit 7fc772b

Browse files
[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
1 parent b54cd3f commit 7fc772b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
#include <cassert>
9494
#include <iterator>
9595
#include <limits>
96+
#include <optional>
9697
#include <utility>
9798
#include <vector>
9899

@@ -547,8 +548,8 @@ class LoopConstrainer {
547548
// space of the main loop.
548549

549550
struct SubRanges {
550-
Optional<const SCEV *> LowLimit;
551-
Optional<const SCEV *> HighLimit;
551+
std::optional<const SCEV *> LowLimit;
552+
std::optional<const SCEV *> HighLimit;
552553
};
553554

554555
// Compute a safe set of limits for the main loop to run in -- effectively the

0 commit comments

Comments
 (0)