forked from OSchip/llvm-project
[MCParser] Use std::optional in WasmAsmParser.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
e6319cdcb9
commit
7c88445a3c
|
@ -26,6 +26,7 @@
|
|||
#include "llvm/MC/MCStreamer.h"
|
||||
#include "llvm/MC/MCSymbolWasm.h"
|
||||
#include "llvm/Support/Casting.h"
|
||||
#include <optional>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -152,7 +153,7 @@ public:
|
|||
if (Lexer->isNot(AsmToken::String))
|
||||
return error("expected string in directive, instead got: ", Lexer->getTok());
|
||||
|
||||
auto Kind = StringSwitch<Optional<SectionKind>>(Name)
|
||||
auto Kind = StringSwitch<std::optional<SectionKind>>(Name)
|
||||
.StartsWith(".data", SectionKind::getData())
|
||||
.StartsWith(".tdata", SectionKind::getThreadData())
|
||||
.StartsWith(".tbss", SectionKind::getThreadBSS())
|
||||
|
|
Loading…
Reference in New Issue