10 #ifndef LLVM_MC_MCPARSER_MCASMPARSEREXTENSION_H
11 #define LLVM_MC_MCPARSER_MCASMPARSEREXTENSION_H
33 template<
typename T,
bool (T::*Handler)(StringRef, SMLoc)>
37 T *Obj =
static_cast<T*
>(Target);
38 return (Obj->*Handler)(Directive, DirectiveLoc);
virtual bool Warning(SMLoc L, const Twine &Msg, ArrayRef< SMRange > Ranges=None)=0
SourceMgr & getSourceManager()
virtual void Initialize(MCAsmParser &Parser)
Initialize the extension for parsing using the given Parser. The extension should use the AsmParser i...
virtual const AsmToken & Lex()=0
virtual SourceMgr & getSourceManager()=0
bool TokError(const Twine &Msg, ArrayRef< SMRange > Ranges=None)
Report an error at the current lexer location.
AsmToken - Target independent representation for an assembler token.
const AsmToken & getTok()
getTok - Get the current AsmToken from the stream.
const AsmToken & getTok()
virtual MCContext & getContext()=0
bool Warning(SMLoc L, const Twine &Msg)
bool TokError(const Twine &Msg)
virtual MCAsmLexer & getLexer()=0
MCStreamer & getStreamer()
static bool HandleDirective(MCAsmParserExtension *Target, StringRef Directive, SMLoc DirectiveLoc)
MCAsmParser & getParser()
virtual bool Error(SMLoc L, const Twine &Msg, ArrayRef< SMRange > Ranges=None)=0
bool Error(SMLoc L, const Twine &Msg)
bool BracketExpressionsSupported
virtual MCStreamer & getStreamer()=0
getStreamer - Return the output streamer for the assembler.
bool HasBracketExpressions() const
#define LLVM_DELETED_FUNCTION
virtual ~MCAsmParserExtension()
Generic interface for extending the MCAsmParser, which is implemented by target and object file assem...
Represents a location in source code.