aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-12-05 04:13:11 +0000
committerFangrui Song <i@maskray.me>2022-12-05 04:13:11 +0000
commit89fae41ef142892d8d6c20ead28465a34e12172b (patch)
tree95d80b9764e5d1d25bf8485a8426e6a409930b50 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent768cae4a5ab3a564b25ed36c379423f71b42d9d0 (diff)
downloadllvm-89fae41ef142892d8d6c20ead28465a34e12172b.zip
llvm-89fae41ef142892d8d6c20ead28465a34e12172b.tar.gz
llvm-89fae41ef142892d8d6c20ead28465a34e12172b.tar.bz2
[IR] llvm::Optional => std::optional
Many llvm/IR/* files have been migrated by other contributors. This migrates most remaining files.
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index ff64435..12358bb 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -2657,7 +2657,7 @@ void ModuleBitcodeWriter::writeConstants(unsigned FirstVal, unsigned LastVal,
Code = bitc::CST_CODE_CE_GEP;
const auto *GO = cast<GEPOperator>(C);
Record.push_back(VE.getTypeID(GO->getSourceElementType()));
- if (Optional<unsigned> Idx = GO->getInRangeIndex()) {
+ if (std::optional<unsigned> Idx = GO->getInRangeIndex()) {
Code = bitc::CST_CODE_CE_GEP_WITH_INRANGE_INDEX;
Record.push_back((*Idx << 1) | GO->isInBounds());
} else if (GO->isInBounds())