9#ifndef LLVM_MC_MCPARSER_MCASMPARSEREXTENSION_H
10#define LLVM_MC_MCPARSER_MCASMPARSEREXTENSION_H
32 template<
typename T,
bool (T::*Handler)(StringRef, SMLoc)>
37 return (Obj->*Handler)(
Directive, DirectiveLoc);
89 const Twine &Msg =
"unexpected token") {
95 return getParser().parseMany(parseOne, hasComma);
104 bool maybeParseUniqueID(int64_t &
UniqueID);
115 return getParser().addErrorSuffix(Suffix);
ConstantRange Range(APInt(BitWidth, Low), APInt(BitWidth, High))
Target independent representation for an assembler token.
SourceMgr & getSourceManager()
const MCAsmParser & getParser() const
bool parseOptionalToken(AsmToken::TokenKind T)
static bool HandleDirective(MCAsmParserExtension *Target, StringRef Directive, SMLoc DirectiveLoc)
virtual ~MCAsmParserExtension()
bool addErrorSuffix(const Twine &Suffix)
const AsmToken & getTok()
MCAsmParserExtension & operator=(const MCAsmParserExtension &)=delete
bool parseMany(function_ref< bool()> parseOne, bool hasComma=true)
bool parseToken(AsmToken::TokenKind T, const Twine &Msg="unexpected token")
MCAsmParserExtension(const MCAsmParserExtension &)=delete
bool Warning(SMLoc L, const Twine &Msg)
virtual void Initialize(MCAsmParser &Parser)
Initialize the extension for parsing using the given Parser.
bool HasBracketExpressions() const
bool TokError(const Twine &Msg)
bool check(bool P, const Twine &Msg)
void Note(SMLoc L, const Twine &Msg)
bool Error(SMLoc L, const Twine &Msg, SMRange Range=SMRange())
bool check(bool P, SMLoc Loc, const Twine &Msg)
bool BracketExpressionsSupported
MCStreamer & getStreamer()
MCAsmParser & getParser()
const AsmLexer & getLexer() const
Generic assembler parser interface, for use by target specific assembly parsers.
Context object for machine code objects.
Streaming machine code generation interface.
Represents a location in source code.
Represents a range in source code.
This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling.
StringRef - Represent a constant reference to a string, i.e.
Target - Wrapper for Target specific information.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
An efficient, type-erasing, non-owning reference to a callable.
This is an optimization pass for GlobalISel generic memory operations.