From f960b935ccf61f93915c4a3275f553d709322cdc Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 25 Nov 2022 11:33:19 -0800 Subject: [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 --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 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 198fe33..0b6c509 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -80,6 +80,7 @@ #include #include #include +#include #include #include #include @@ -593,7 +594,7 @@ class BitcodeReader : public BitcodeReaderBase, public GVMaterializer { /// ValueList must be destroyed before Alloc. BumpPtrAllocator Alloc; BitcodeReaderValueList ValueList; - Optional MDLoader; + std::optional MDLoader; std::vector ComdatList; DenseSet ImplicitComdatObjects; SmallVector InstructionList; @@ -3205,7 +3206,7 @@ Error BitcodeReader::parseConstants() { PointeeType = getTypeByID(Record[OpNum++]); bool InBounds = false; - Optional InRangeIndex; + std::optional InRangeIndex; if (BitCode == bitc::CST_CODE_CE_GEP_WITH_INRANGE_INDEX) { uint64_t Op = Record[OpNum++]; InBounds = Op & 1; -- cgit v1.1