From 67854f9ed0cd512f59736730f4c05de25501ae54 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 29 Jun 2022 21:55:02 -0700 Subject: Use value_or instead of getValueOr. NFC --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') 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#] -- cgit v1.1