Go to the documentation of this file.
9 #ifndef LLVM_MC_MCPARSER_MCASMPARSEREXTENSION_H
10 #define LLVM_MC_MCPARSER_MCASMPARSEREXTENSION_H
31 template<
typename T,
bool (T::*Handler)(StringRef, SMLoc)>
36 return (Obj->*Handler)(
Directive, DirectiveLoc);
88 const Twine &
Msg =
"unexpected token") {
122 #endif // LLVM_MC_MCPARSER_MCASMPARSEREXTENSION_H
Generic assembler parser interface, for use by target specific assembly parsers.
virtual SourceMgr & getSourceManager()=0
bool Error(SMLoc L, const Twine &Msg, SMRange Range=None)
Return an error at the location L, with the message Msg.
MCAsmParserExtension & operator=(const MCAsmParserExtension &)=delete
virtual MCStreamer & getStreamer()=0
Return the output streamer for the assembler.
This is an optimization pass for GlobalISel generic memory operations.
bool Error(SMLoc L, const Twine &Msg, SMRange Range=SMRange())
bool HasBracketExpressions() const
void Note(SMLoc L, const Twine &Msg)
Generic assembler lexer interface, for use by target specific assembly lexers.
bool ParseDirectiveCGProfile(StringRef, SMLoc)
ParseDirectiveCGProfile ::= .cg_profile identifier, identifier, <number>
Context object for machine code objects.
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
Target - Wrapper for Target specific information.
bool addErrorSuffix(const Twine &Suffix)
virtual ~MCAsmParserExtension()
bool parseToken(AsmToken::TokenKind T, const Twine &Msg="unexpected token")
bool parseOptionalToken(AsmToken::TokenKind T)
Attempt to parse and consume token, returning true on success.
bool parseOptionalToken(AsmToken::TokenKind T)
Target independent representation for an assembler token.
virtual const AsmToken & Lex()=0
Get the next AsmToken in the stream, possibly handling file inclusion first.
Streaming machine code generation interface.
MCStreamer & getStreamer()
Represents a location in source code.
bool check(bool P, const Twine &Msg)
bool TokError(const Twine &Msg)
virtual MCContext & getContext()=0
virtual void Note(SMLoc L, const Twine &Msg, SMRange Range=None)=0
Emit a note at the location L, with the message Msg.
An efficient, type-erasing, non-owning reference to a callable.
const MCAsmParser & getParser() const
bool check(bool P, SMLoc Loc, const Twine &Msg)
bool addErrorSuffix(const Twine &Suffix)
bool parseMany(function_ref< bool()> parseOne, bool hasComma=true)
virtual void Initialize(MCAsmParser &Parser)
Initialize the extension for parsing using the given Parser.
bool check(bool P, const Twine &Msg)
StringRef - Represent a constant reference to a string, i.e.
bool parseMany(function_ref< bool()> parseOne, bool hasComma=true)
const AsmToken & getTok() const
Get the current AsmToken from the stream.
Generic interface for extending the MCAsmParser, which is implemented by target and object file assem...
This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling.
const CustomOperand< const MCSubtargetInfo & > Msg[]
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
bool TokError(const Twine &Msg, SMRange Range=None)
Report an error at the current lexer location.
const AsmToken & getTok()
const MCAsmLexer & getLexer() const
virtual MCAsmLexer & getLexer()=0
Represents a range in source code.
bool BracketExpressionsSupported
virtual bool Warning(SMLoc L, const Twine &Msg, SMRange Range=None)=0
Emit a warning at the location L, with the message Msg.
SourceMgr & getSourceManager()
bool Warning(SMLoc L, const Twine &Msg)
MCAsmParser & getParser()
bool parseToken(AsmToken::TokenKind T, const Twine &Msg="unexpected token")
static bool HandleDirective(MCAsmParserExtension *Target, StringRef Directive, SMLoc DirectiveLoc)