aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp2
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 1d5d10a..b5f1851 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -551,7 +551,7 @@ public:
return makeArrayRef(getTrailingObjects<unsigned>(), NumOperands);
}
- Optional<unsigned> getInRangeIndex() const {
+ std::optional<unsigned> getInRangeIndex() const {
assert(Opcode == Instruction::GetElementPtr);
if (Extra == (unsigned)-1)
return std::nullopt;
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())