diff options
author | Fangrui Song <i@maskray.me> | 2022-12-12 08:29:05 +0000 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-12-12 08:29:05 +0000 |
commit | c178ed33bd82151f21abc3c0015c671b33556999 (patch) | |
tree | 49ff57aa48c95a6edf0c97e1084a998205f4faf4 /llvm/lib/Transforms/Utils/SimplifyIndVar.cpp | |
parent | a73455ac8e9bd02f843916c12c261cfd9ccb06a9 (diff) | |
download | llvm-c178ed33bd82151f21abc3c0015c671b33556999.zip llvm-c178ed33bd82151f21abc3c0015c671b33556999.tar.gz llvm-c178ed33bd82151f21abc3c0015c671b33556999.tar.bz2 |
Transforms/Utils: llvm::Optional => std::optional
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyIndVar.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyIndVar.cpp | 9 |
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); |