diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-10-02 21:49:07 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-10-02 21:49:07 +0000 |
commit | 95707c90ccb7309df76ea7f3f0b81495e4f7d0e6 (patch) | |
tree | 5bc9a7456e36c5cfae9d81b51f699292366c3da3 /include/llvm/MC/MCParser | |
parent | 27cb347d0e765175efb2c4d388bcbba84cf1b95e (diff) | |
download | external_llvm-95707c90ccb7309df76ea7f3f0b81495e4f7d0e6.zip external_llvm-95707c90ccb7309df76ea7f3f0b81495e4f7d0e6.tar.gz external_llvm-95707c90ccb7309df76ea7f3f0b81495e4f7d0e6.tar.bz2 |
[ms-inline asm] Add basic support for wildcard MCParsedAsmOperands. This type
of operand is specific to MS-style inline assembly and should not be generated
when parsing normal assembly.
The purpose of the wildcard operands are to allow the AsmParser to match
multiple instructions (i.e., MCInsts) to a given ms-style asm statement. For
the time being the matcher just returns the first match. This patch only
implements wildcard matches for memory operands. Support for register
wildcards will be added in the near future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165057 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCParser')
-rw-r--r-- | include/llvm/MC/MCParser/MCParsedAsmOperand.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/MC/MCParser/MCParsedAsmOperand.h b/include/llvm/MC/MCParser/MCParsedAsmOperand.h index 0ce32d6..06e9dc9 100644 --- a/include/llvm/MC/MCParser/MCParsedAsmOperand.h +++ b/include/llvm/MC/MCParser/MCParsedAsmOperand.h @@ -34,6 +34,13 @@ public: /// isMem - Is this a memory operand? virtual bool isMem() const = 0; + /// isMSAsmWildcard - Is this a wildcard operand? This is specific to + /// MS-style inline assembly and should never happen in normal assembly. + virtual bool isMSAsmWildcard() const { return false; } + + /// setMSAsmWildcard - Convert the operand into a wildcard. + virtual void setMSAsmWildcard(unsigned Size) { } + /// getStartLoc - Get the location of the first token of this operand. virtual SMLoc getStartLoc() const = 0; /// getEndLoc - Get the location of the last token of this operand. |