Use value_or instead of getValueOr. NFC

This commit is contained in:
Fangrui Song
2022-06-29 21:55:02 -07:00
parent a3ec54c660
commit 67854f9ed0
9 changed files with 15 additions and 17 deletions

View File

@@ -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#]