21 : TargetParser(nullptr), ShowParsedOperands(0), HadError(
false),
28 assert(!TargetParser &&
"Target parser is already initialized!");
57 if (
getTok().getKind() != T)
87 return Error(Loc, Msg);
141 dbgs() <<
" " << *
this;
void toVector(SmallVectorImpl< char > &Out) const
Append the concatenated string into the given SmallString or SmallVector.
Represents a range in source code.
bool addErrorSuffix(const Twine &Suffix)
TokenKind getKind() const
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds...
virtual void Initialize(MCAsmParser &Parser)
Initialize the extension for parsing using the given Parser.
MCTargetAsmParser - Generic interface to target specific assembly parsers.
virtual const AsmToken & Lex()=0
Get the next AsmToken in the stream, possibly handling file inclusion first.
virtual void dump() const
dump - Print to the debug stream.
const AsmToken & getTok() const
Get the current (last) lexed token.
bool parseIntToken(int64_t &V, const Twine &ErrMsg)
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Base class for the full range of assembler expressions which are needed for parsing.
Target independent representation for an assembler token.
virtual bool parseExpression(const MCExpr *&Res, SMLoc &EndLoc)=0
Parse an arbitrary expression.
bool parseMany(std::function< bool()> parseOne, bool hasComma=true)
Function Alias Analysis false
int64_t getIntVal() const
const AsmToken & getTok() const
Get the current AsmToken from the stream.
bool parseToken(AsmToken::TokenKind T, const Twine &Msg="unexpected token")
virtual ~MCAsmParser()
Flag tracking whether any errors have been encountered.
virtual MCAsmLexer & getLexer()=0
bool parseTokenLoc(SMLoc &Loc)
bool Error(SMLoc L, const Twine &Msg, SMRange Range=None)
Return an error at the location L, with the message Msg.
virtual StringRef parseStringToEndOfStatement()=0
Parse up to the end of statement and return the contents from the current token until the end of the ...
void UnLex(AsmToken const &Token)
SmallVector< MCPendingError, 1 > PendingErrors
const AsmToken & Lex()
Consume the next token from the input stream and return it.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
bool check(bool P, const llvm::Twine &Msg)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool TokError(const Twine &Msg, SMRange Range=None)
Report an error at the current lexer location.
bool parseEOL(const Twine &ErrMsg)
void setTargetParser(MCTargetAsmParser &P)
bool parseOptionalToken(AsmToken::TokenKind T)
Attempt to parse and consume token, returning true on success.
print Print MemDeps of function
StringRef - Represent a constant reference to a string, i.e.
Represents a location in source code.