summaryrefslogtreecommitdiff
path: root/include/llvm/MC
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/MC')
-rw-r--r--include/llvm/MC/MCParser/MCAsmParser.h36
1 files changed, 20 insertions, 16 deletions
diff --git a/include/llvm/MC/MCParser/MCAsmParser.h b/include/llvm/MC/MCParser/MCAsmParser.h
index 52948f749d6..ea20c15fe18 100644
--- a/include/llvm/MC/MCParser/MCAsmParser.h
+++ b/include/llvm/MC/MCParser/MCAsmParser.h
@@ -20,6 +20,8 @@ class MCAsmLexer;
class MCAsmParserExtension;
class MCContext;
class MCExpr;
+class MCInstPrinter;
+class MCInstrInfo;
class MCParsedAsmOperand;
class MCStreamer;
class MCTargetAsmParser;
@@ -29,6 +31,13 @@ class SourceMgr;
class StringRef;
class Twine;
+/// MCAsmParserSemaCallback - Generic Sema callback for assembly parser.
+class MCAsmParserSemaCallback {
+public:
+ virtual void *LookupInlineAsmIdentifier(StringRef Name, void *Loc,
+ void **IdentifierInfoPtr) = 0;
+};
+
/// MCAsmParser - Generic assembler parser interface, for use by target specific
/// assembly parsers.
class MCAsmParser {
@@ -77,25 +86,20 @@ public:
virtual void setParsingInlineAsm(bool V) = 0;
virtual bool isParsingInlineAsm() = 0;
+ /// ParseMSInlineAsm - Parse ms-style inline assembly.
+ virtual bool ParseMSInlineAsm(void *AsmLoc, std::string &AsmString,
+ unsigned &NumOutputs, unsigned &NumInputs,
+ SmallVectorImpl<void *> &Names,
+ SmallVectorImpl<std::string> &Constraints,
+ SmallVectorImpl<void *> &Exprs,
+ SmallVectorImpl<std::string> &Clobbers,
+ const MCInstrInfo *MII,
+ const MCInstPrinter *IP,
+ MCAsmParserSemaCallback &SI) = 0;
+
/// ParseStatement - Parse the next statement.
virtual bool ParseStatement() = 0;
- /// getNumParsedOperands - Returns the number of MCAsmParsedOperands from the
- /// previously parsed statement.
- virtual unsigned getNumParsedOperands() = 0;
-
- /// getParsedOperand - Get a MCAsmParsedOperand.
- virtual MCParsedAsmOperand &getParsedOperand(unsigned OpNum) = 0;
-
- /// freeParsedOperands - Free the MCAsmParsedOperands.
- virtual void freeParsedOperands() = 0;
-
- /// isInstruction - Was the previously parsed statement an instruction?
- virtual bool isInstruction() = 0;
-
- /// getOpcode - Get the opcode from the previously parsed instruction.
- virtual unsigned getOpcode() = 0;
-
/// Warning - Emit a warning at the location \p L, with the message \p Msg.
///
/// \return The return value is true, if warnings are fatal.