[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:
Kazu Hirata 2022-11-25 12:26:10 -08:00
parent e6319cdcb9
commit 7c88445a3c
1 changed files with 2 additions and 1 deletions

View File

@ -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())