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/Local.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/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index af75fe1..90e48f2 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -3030,9 +3030,9 @@ struct BitPart { /// /// Because we pass around references into \c BPS, we must use a container that /// does not invalidate internal references (std::map instead of DenseMap). -static const Optional<BitPart> & +static const std::optional<BitPart> & collectBitParts(Value *V, bool MatchBSwaps, bool MatchBitReversals, - std::map<Value *, Optional<BitPart>> &BPS, int Depth, + std::map<Value *, std::optional<BitPart>> &BPS, int Depth, bool &FoundRoot) { auto I = BPS.find(V); if (I != BPS.end()) @@ -3282,7 +3282,7 @@ bool llvm::recognizeBSwapOrBitReverseIdiom( // Try to find all the pieces corresponding to the bswap. bool FoundRoot = false; - std::map<Value *, Optional<BitPart>> BPS; + std::map<Value *, std::optional<BitPart>> BPS; const auto &Res = collectBitParts(I, MatchBSwaps, MatchBitReversals, BPS, 0, FoundRoot); if (!Res) |