diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-10-15 17:19:13 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-10-15 17:19:13 +0000 |
commit | 8f138d1121730007f973131ca79a06a58f981011 (patch) | |
tree | 63a0790f0dfc2543dd3c60e31d8033b68671403f /include/llvm/MC/MCParser | |
parent | 655fa1225b49dc3d8c2f1eed049eaf47ceb3ae8d (diff) | |
download | external_llvm-8f138d1121730007f973131ca79a06a58f981011.zip external_llvm-8f138d1121730007f973131ca79a06a58f981011.tar.gz external_llvm-8f138d1121730007f973131ca79a06a58f981011.tar.bz2 |
[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
Diffstat (limited to 'include/llvm/MC/MCParser')
-rw-r--r-- | include/llvm/MC/MCParser/MCAsmParser.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/llvm/MC/MCParser/MCAsmParser.h b/include/llvm/MC/MCParser/MCAsmParser.h index a572e6d..08758cd 100644 --- a/include/llvm/MC/MCParser/MCAsmParser.h +++ b/include/llvm/MC/MCParser/MCAsmParser.h @@ -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. |