[Reader] Use std::optional in BitcodeReader.cpp (NFC)
This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
This commit is contained in:
@@ -80,6 +80,7 @@
|
||||
#include <deque>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <system_error>
|
||||
@@ -593,7 +594,7 @@ class BitcodeReader : public BitcodeReaderBase, public GVMaterializer {
|
||||
/// ValueList must be destroyed before Alloc.
|
||||
BumpPtrAllocator Alloc;
|
||||
BitcodeReaderValueList ValueList;
|
||||
Optional<MetadataLoader> MDLoader;
|
||||
std::optional<MetadataLoader> MDLoader;
|
||||
std::vector<Comdat *> ComdatList;
|
||||
DenseSet<GlobalObject *> ImplicitComdatObjects;
|
||||
SmallVector<Instruction *, 64> InstructionList;
|
||||
@@ -3205,7 +3206,7 @@ Error BitcodeReader::parseConstants() {
|
||||
PointeeType = getTypeByID(Record[OpNum++]);
|
||||
|
||||
bool InBounds = false;
|
||||
Optional<unsigned> InRangeIndex;
|
||||
std::optional<unsigned> InRangeIndex;
|
||||
if (BitCode == bitc::CST_CODE_CE_GEP_WITH_INRANGE_INDEX) {
|
||||
uint64_t Op = Record[OpNum++];
|
||||
InBounds = Op & 1;
|
||||
|
||||
Reference in New Issue
Block a user