LLVM API Documentation
#include <MCAsmParser.h>
Public Types | |
| typedef bool(* | DirectiveHandler )(MCAsmParserExtension *, StringRef, SMLoc) |
| typedef std::pair < MCAsmParserExtension *, DirectiveHandler > | ExtensionDirectiveHandler |
Public Member Functions | |
| virtual | ~MCAsmParser () |
| virtual void | addDirectiveHandler (StringRef Directive, ExtensionDirectiveHandler Handler)=0 |
| virtual SourceMgr & | getSourceManager ()=0 |
| virtual MCAsmLexer & | getLexer ()=0 |
| virtual MCContext & | getContext ()=0 |
| virtual MCStreamer & | getStreamer ()=0 |
| getStreamer - Return the output streamer for the assembler. | |
| MCTargetAsmParser & | getTargetParser () const |
| void | setTargetParser (MCTargetAsmParser &P) |
| virtual unsigned | getAssemblerDialect () |
| virtual void | setAssemblerDialect (unsigned i) |
| bool | getShowParsedOperands () const |
| void | setShowParsedOperands (bool Value) |
| virtual bool | Run (bool NoInitialTextSection, bool NoFinalize=false)=0 |
| Run - Run the parser on the input source buffer. | |
| virtual void | setParsingInlineAsm (bool V)=0 |
| virtual bool | isParsingInlineAsm ()=0 |
| virtual bool | parseMSInlineAsm (void *AsmLoc, std::string &AsmString, unsigned &NumOutputs, unsigned &NumInputs, SmallVectorImpl< std::pair< void *, bool > > &OpDecls, SmallVectorImpl< std::string > &Constraints, SmallVectorImpl< std::string > &Clobbers, const MCInstrInfo *MII, const MCInstPrinter *IP, MCAsmParserSemaCallback &SI)=0 |
| parseMSInlineAsm - Parse ms-style inline assembly. | |
| virtual void | Note (SMLoc L, const Twine &Msg, ArrayRef< SMRange > Ranges=None)=0 |
Note - Emit a note at the location L, with the message Msg. | |
| virtual bool | Warning (SMLoc L, const Twine &Msg, ArrayRef< SMRange > Ranges=None)=0 |
| virtual bool | Error (SMLoc L, const Twine &Msg, ArrayRef< SMRange > Ranges=None)=0 |
| virtual const AsmToken & | Lex ()=0 |
| const AsmToken & | getTok () |
| getTok - Get the current AsmToken from the stream. | |
| bool | TokError (const Twine &Msg, ArrayRef< SMRange > Ranges=None) |
| Report an error at the current lexer location. | |
| virtual bool | parseIdentifier (StringRef &Res)=0 |
| virtual StringRef | parseStringToEndOfStatement ()=0 |
| Parse up to the end of statement and return the contents from the current token until the end of the statement; the current token on exit will be either the EndOfStatement or EOF. | |
| virtual bool | parseEscapedString (std::string &Data)=0 |
| virtual void | eatToEndOfStatement ()=0 |
| virtual bool | parseExpression (const MCExpr *&Res, SMLoc &EndLoc)=0 |
| bool | parseExpression (const MCExpr *&Res) |
| virtual bool | parsePrimaryExpr (const MCExpr *&Res, SMLoc &EndLoc)=0 |
| virtual bool | parseParenExpression (const MCExpr *&Res, SMLoc &EndLoc)=0 |
| virtual bool | parseAbsoluteExpression (int64_t &Res)=0 |
| virtual void | checkForValidSection ()=0 |
Protected Member Functions | |
| MCAsmParser () | |
MCAsmParser - Generic assembler parser interface, for use by target specific assembly parsers.
Definition at line 62 of file MCAsmParser.h.
| typedef bool(* llvm::MCAsmParser::DirectiveHandler)(MCAsmParserExtension *, StringRef, SMLoc) |
Definition at line 64 of file MCAsmParser.h.
| typedef std::pair<MCAsmParserExtension*, DirectiveHandler> llvm::MCAsmParser::ExtensionDirectiveHandler |
Definition at line 66 of file MCAsmParser.h.
| MCAsmParser::MCAsmParser | ( | ) | [protected] |
Definition at line 20 of file MCAsmParser.cpp.
| MCAsmParser::~MCAsmParser | ( | ) | [virtual] |
Definition at line 23 of file MCAsmParser.cpp.
| virtual void llvm::MCAsmParser::addDirectiveHandler | ( | StringRef | Directive, |
| ExtensionDirectiveHandler | Handler | ||
| ) | [pure virtual] |
| virtual void llvm::MCAsmParser::checkForValidSection | ( | ) | [pure virtual] |
checkForValidSection - Ensure that we have a valid section set in the streamer. Otherwise, report an error and switch to .text.
| virtual void llvm::MCAsmParser::eatToEndOfStatement | ( | ) | [pure virtual] |
eatToEndOfStatement - Skip to the end of the current statement, for error recovery.
| virtual bool llvm::MCAsmParser::Error | ( | SMLoc | L, |
| const Twine & | Msg, | ||
| ArrayRef< SMRange > | Ranges = None |
||
| ) | [pure virtual] |
Error - Emit an error at the location L, with the message Msg.
Referenced by llvm::MCAsmParserExtension::Error(), and TokError().
| virtual unsigned llvm::MCAsmParser::getAssemblerDialect | ( | ) | [inline, virtual] |
Definition at line 97 of file MCAsmParser.h.
| virtual MCContext& llvm::MCAsmParser::getContext | ( | ) | [pure virtual] |
Referenced by llvm::MCAsmParserExtension::getContext().
| virtual MCAsmLexer& llvm::MCAsmParser::getLexer | ( | ) | [pure virtual] |
Referenced by llvm::MCAsmParserExtension::getLexer(), getTok(), and TokError().
| bool llvm::MCAsmParser::getShowParsedOperands | ( | ) | const [inline] |
Definition at line 100 of file MCAsmParser.h.
| virtual SourceMgr& llvm::MCAsmParser::getSourceManager | ( | ) | [pure virtual] |
Referenced by llvm::MCAsmParserExtension::getSourceManager().
| virtual MCStreamer& llvm::MCAsmParser::getStreamer | ( | ) | [pure virtual] |
getStreamer - Return the output streamer for the assembler.
Referenced by llvm::MCAsmParserExtension::getStreamer().
| MCTargetAsmParser& llvm::MCAsmParser::getTargetParser | ( | ) | const [inline] |
Definition at line 94 of file MCAsmParser.h.
| const AsmToken & MCAsmParser::getTok | ( | ) |
getTok - Get the current AsmToken from the stream.
Definition at line 32 of file MCAsmParser.cpp.
References getLexer(), and llvm::MCAsmLexer::getTok().
Referenced by llvm::MCAsmParserExtension::getTok().
| virtual bool llvm::MCAsmParser::isParsingInlineAsm | ( | ) | [pure virtual] |
| virtual const AsmToken& llvm::MCAsmParser::Lex | ( | ) | [pure virtual] |
Lex - Get the next AsmToken in the stream, possibly handling file inclusion first.
Referenced by llvm::MCAsmParserExtension::Lex().
| virtual void llvm::MCAsmParser::Note | ( | SMLoc | L, |
| const Twine & | Msg, | ||
| ArrayRef< SMRange > | Ranges = None |
||
| ) | [pure virtual] |
Note - Emit a note at the location L, with the message Msg.
| virtual bool llvm::MCAsmParser::parseAbsoluteExpression | ( | int64_t & | Res | ) | [pure virtual] |
parseAbsoluteExpression - Parse an expression which must evaluate to an absolute value.
| Res | - The value of the absolute expression. The result is undefined on error. |
| virtual bool llvm::MCAsmParser::parseEscapedString | ( | std::string & | Data | ) | [pure virtual] |
parseEscapedString - Parse the current token as a string which may include escaped characters and return the string contents.
| virtual bool llvm::MCAsmParser::parseExpression | ( | const MCExpr *& | Res, |
| SMLoc & | EndLoc | ||
| ) | [pure virtual] |
parseExpression - Parse an arbitrary expression.
| Res | - The value of the expression. The result is undefined on error. |
Referenced by parseExpression().
| bool MCAsmParser::parseExpression | ( | const MCExpr *& | Res | ) |
Definition at line 41 of file MCAsmParser.cpp.
References parseExpression().
| virtual bool llvm::MCAsmParser::parseIdentifier | ( | StringRef & | Res | ) | [pure virtual] |
parseIdentifier - Parse an identifier or string (as a quoted identifier) and set Res to the identifier contents.
| virtual bool llvm::MCAsmParser::parseMSInlineAsm | ( | void * | AsmLoc, |
| std::string & | AsmString, | ||
| unsigned & | NumOutputs, | ||
| unsigned & | NumInputs, | ||
| SmallVectorImpl< std::pair< void *, bool > > & | OpDecls, | ||
| SmallVectorImpl< std::string > & | Constraints, | ||
| SmallVectorImpl< std::string > & | Clobbers, | ||
| const MCInstrInfo * | MII, | ||
| const MCInstPrinter * | IP, | ||
| MCAsmParserSemaCallback & | SI | ||
| ) | [pure virtual] |
parseMSInlineAsm - Parse ms-style inline assembly.
| virtual bool llvm::MCAsmParser::parseParenExpression | ( | const MCExpr *& | Res, |
| SMLoc & | EndLoc | ||
| ) | [pure virtual] |
parseParenExpression - Parse an arbitrary expression, assuming that an initial '(' has already been consumed.
| Res | - The value of the expression. The result is undefined on error. |
| virtual bool llvm::MCAsmParser::parsePrimaryExpr | ( | const MCExpr *& | Res, |
| SMLoc & | EndLoc | ||
| ) | [pure virtual] |
parsePrimaryExpr - Parse a primary expression.
| Res | - The value of the expression. The result is undefined on error. |
| virtual StringRef llvm::MCAsmParser::parseStringToEndOfStatement | ( | ) | [pure virtual] |
Parse up to the end of statement and return the contents from the current token until the end of the statement; the current token on exit will be either the EndOfStatement or EOF.
| virtual bool llvm::MCAsmParser::Run | ( | bool | NoInitialTextSection, |
| bool | NoFinalize = false |
||
| ) | [pure virtual] |
Run - Run the parser on the input source buffer.
| virtual void llvm::MCAsmParser::setAssemblerDialect | ( | unsigned | i | ) | [inline, virtual] |
Definition at line 98 of file MCAsmParser.h.
| virtual void llvm::MCAsmParser::setParsingInlineAsm | ( | bool | V | ) | [pure virtual] |
| void llvm::MCAsmParser::setShowParsedOperands | ( | bool | Value | ) | [inline] |
Definition at line 101 of file MCAsmParser.h.
| void MCAsmParser::setTargetParser | ( | MCTargetAsmParser & | P | ) |
Definition at line 26 of file MCAsmParser.cpp.
References llvm::MCAsmParserExtension::Initialize().
Report an error at the current lexer location.
Definition at line 36 of file MCAsmParser.cpp.
References Error(), and getLexer().
Referenced by llvm::MCAsmParserExtension::TokError().
| virtual bool llvm::MCAsmParser::Warning | ( | SMLoc | L, |
| const Twine & | Msg, | ||
| ArrayRef< SMRange > | Ranges = None |
||
| ) | [pure virtual] |
Warning - Emit a warning at the location L, with the message Msg.
Referenced by llvm::MCAsmParserExtension::Warning().