10 #ifndef LLVM_MC_MCPARSER_MCASMPARSER_H
11 #define LLVM_MC_MCPARSER_MCASMPARSER_H
16 #include "llvm/Support/DataTypes.h"
21 class MCAsmParserExtension;
27 class MCTargetAsmParser;
39 unsigned Length, Size,
Type;
53 bool IsUnevaluatedContext) = 0;
56 unsigned &Offset) = 0;
67 typedef std::pair<MCAsmParserExtension*, DirectiveHandler>
72 void operator=(const
MCAsmParser &) LLVM_DELETED_FUNCTION;
76 unsigned ShowParsedOperands : 1;
82 virtual ~MCAsmParser();
106 virtual bool Run(
bool NoInitialTextSection,
bool NoFinalize =
false) = 0;
113 unsigned &NumOutputs,
unsigned &NumInputs,
199 MCStreamer &,
const MCAsmInfo &);
virtual bool Warning(SMLoc L, const Twine &Msg, ArrayRef< SMRange > Ranges=None)=0
virtual ~MCAsmParserSemaCallback()
virtual void setAssemblerDialect(unsigned i)
MCTargetAsmParser - Generic interface to target specific assembly parsers.
virtual const AsmToken & Lex()=0
virtual SourceMgr & getSourceManager()=0
virtual void * LookupInlineAsmIdentifier(StringRef &LineBuf, InlineAsmIdentifierInfo &Info, bool IsUnevaluatedContext)=0
bool TokError(const Twine &Msg, ArrayRef< SMRange > Ranges=None)
Report an error at the current lexer location.
MCTargetAsmParser & getTargetParser() const
AsmToken - Target independent representation for an assembler token.
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 addDirectiveHandler(StringRef Directive, ExtensionDirectiveHandler Handler)=0
virtual bool parseExpression(const MCExpr *&Res, SMLoc &EndLoc)=0
const AsmToken & getTok()
getTok - Get the current AsmToken from the stream.
void setShowParsedOperands(bool Value)
MCAsmParserSemaCallback::InlineAsmIdentifierInfo InlineAsmIdentifierInfo
virtual bool parseEscapedString(std::string &Data)=0
virtual void eatToEndOfStatement()=0
virtual MCContext & getContext()=0
virtual bool isParsingInlineAsm()=0
virtual bool parsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc)=0
virtual bool Run(bool NoInitialTextSection, bool NoFinalize=false)=0
Run - Run the parser on the input source buffer.
virtual MCAsmLexer & getLexer()=0
MCAsmParser * createMCAsmParser(SourceMgr &, MCContext &, MCStreamer &, const MCAsmInfo &)
Create an MCAsmParser instance.
MCAsmParserSemaCallback - Generic Sema callback for assembly parser.
std::pair< MCAsmParserExtension *, DirectiveHandler > ExtensionDirectiveHandler
virtual StringRef parseStringToEndOfStatement()=0
Parse up to the end of statement and return the contents from the current token until the end of the ...
virtual bool Error(SMLoc L, const Twine &Msg, ArrayRef< SMRange > Ranges=None)=0
virtual bool LookupInlineAsmField(StringRef Base, StringRef Member, unsigned &Offset)=0
virtual void setParsingInlineAsm(bool V)=0
virtual MCStreamer & getStreamer()=0
getStreamer - Return the output streamer for the assembler.
virtual void checkForValidSection()=0
#define LLVM_DELETED_FUNCTION
bool(* DirectiveHandler)(MCAsmParserExtension *, StringRef, SMLoc)
virtual bool parseAbsoluteExpression(int64_t &Res)=0
virtual unsigned getAssemblerDialect()
Generic interface for extending the MCAsmParser, which is implemented by target and object file assem...
LLVM Value Representation.
void setTargetParser(MCTargetAsmParser &P)
virtual bool parseIdentifier(StringRef &Res)=0
bool getShowParsedOperands() const
Represents a location in source code.
virtual bool parseParenExpression(const MCExpr *&Res, SMLoc &EndLoc)=0