aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyIndVar.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyIndVar.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
index 9f0ad99..a7fe065 100644
--- a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
@@ -1035,12 +1035,13 @@ class WidenIV {
// context.
DenseMap<DefUserPair, ConstantRange> PostIncRangeInfos;
- Optional<ConstantRange> getPostIncRangeInfo(Value *Def,
- Instruction *UseI) {
+ std::optional<ConstantRange> getPostIncRangeInfo(Value *Def,
+ Instruction *UseI) {
DefUserPair Key(Def, UseI);
auto It = PostIncRangeInfos.find(Key);
- return It == PostIncRangeInfos.end() ? Optional<ConstantRange>(std::nullopt)
- : Optional<ConstantRange>(It->second);
+ return It == PostIncRangeInfos.end()
+ ? std::optional<ConstantRange>(std::nullopt)
+ : std::optional<ConstantRange>(It->second);
}
void calculatePostIncRanges(PHINode *OrigPhi);