aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 5e5ca96..93b07fc 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -3144,11 +3144,10 @@ Error BitcodeReader::parseConstants() {
return error("Explicit gep operator type does not match pointee type "
"of pointer operand");
- V = BitcodeConstant::create(
- Alloc, CurTy,
- {Instruction::GetElementPtr, InBounds, InRangeIndex.getValueOr(-1),
- PointeeType},
- Elts);
+ V = BitcodeConstant::create(Alloc, CurTy,
+ {Instruction::GetElementPtr, InBounds,
+ InRangeIndex.value_or(-1), PointeeType},
+ Elts);
break;
}
case bitc::CST_CODE_CE_SELECT: { // CE_SELECT: [opval#, opval#, opval#]