[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:
Kazu Hirata 2022-11-25 22:52:18 -08:00
parent 9d7faffa10
commit 704b4f3533
1 changed files with 2 additions and 1 deletions

View File

@ -35,6 +35,7 @@
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>
using namespace llvm;
@ -693,7 +694,7 @@ std::unique_ptr<LanaiOperand>
LanaiAsmParser::parseRegister(bool RestoreOnFailure) {
SMLoc Start = Parser.getTok().getLoc();
SMLoc End = SMLoc::getFromPointer(Parser.getTok().getLoc().getPointer() - 1);
Optional<AsmToken> PercentTok;
std::optional<AsmToken> PercentTok;
unsigned RegNum;
// Eat the '%'.