diff options
author | Fangrui Song <i@maskray.me> | 2022-06-29 21:55:02 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-06-29 21:55:02 -0700 |
commit | 67854f9ed0cd512f59736730f4c05de25501ae54 (patch) | |
tree | db89a91a3530a09bc4f6fcda9e9195986149a64a /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | a3ec54c660755f9aae5eeb10e662e79f98437670 (diff) | |
download | llvm-67854f9ed0cd512f59736730f4c05de25501ae54.zip llvm-67854f9ed0cd512f59736730f4c05de25501ae54.tar.gz llvm-67854f9ed0cd512f59736730f4c05de25501ae54.tar.bz2 |
Use value_or instead of getValueOr. NFC
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 9 |
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#] |