[ms-inline asm] Add a few new APIs to the AsmParser class in support of MS-Style

inline assembly.  For the time being, these will be called directly by clang.
However, in the near future I expect these to be sunk back into the MC layer
and more basic APIs (e.g., getClobbers(), getConstraints(), etc.) will be called
by clang.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165946 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chad Rosier
2012-10-15 17:19:13 +00:00
parent 655fa1225b
commit 8f138d1121
2 changed files with 54 additions and 13 deletions

View File

@@ -20,6 +20,7 @@ class MCAsmLexer;
class MCAsmParserExtension;
class MCContext;
class MCExpr;
class MCParsedAsmOperand;
class MCStreamer;
class MCTargetAsmParser;
class SMLoc;
@@ -75,6 +76,25 @@ public:
virtual void setParsingInlineAsm(bool V) = 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.