[AsmParser] Use std::optional in LanaiAsmParser.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:
parent
9d7faffa10
commit
704b4f3533
|
@ -35,6 +35,7 @@
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
|
@ -693,7 +694,7 @@ std::unique_ptr<LanaiOperand>
|
||||||
LanaiAsmParser::parseRegister(bool RestoreOnFailure) {
|
LanaiAsmParser::parseRegister(bool RestoreOnFailure) {
|
||||||
SMLoc Start = Parser.getTok().getLoc();
|
SMLoc Start = Parser.getTok().getLoc();
|
||||||
SMLoc End = SMLoc::getFromPointer(Parser.getTok().getLoc().getPointer() - 1);
|
SMLoc End = SMLoc::getFromPointer(Parser.getTok().getLoc().getPointer() - 1);
|
||||||
Optional<AsmToken> PercentTok;
|
std::optional<AsmToken> PercentTok;
|
||||||
|
|
||||||
unsigned RegNum;
|
unsigned RegNum;
|
||||||
// Eat the '%'.
|
// Eat the '%'.
|
||||||
|
|
Loading…
Reference in New Issue