diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-10-19 20:57:14 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-10-19 20:57:14 +0000 |
commit | 96d58e64cfe88356f8be4ce622b829fbd9fb5908 (patch) | |
tree | aa5883e266315318a6b7835bbd46cb0652797d13 /include | |
parent | e2b95ebfb031c3defc75417521e89ef289a94171 (diff) | |
download | external_llvm-96d58e64cfe88356f8be4ce622b829fbd9fb5908.zip external_llvm-96d58e64cfe88356f8be4ce622b829fbd9fb5908.tar.gz external_llvm-96d58e64cfe88356f8be4ce622b829fbd9fb5908.tar.bz2 |
[ms-inline asm] Have the TargetParser callback to Sema to determine the size of
a memory operand. Retain this information and then add the sizing directives
to the IR. This allows the backend to do proper instruction selection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166316 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/MC/MCParser/MCParsedAsmOperand.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/MC/MCParser/MCParsedAsmOperand.h b/include/llvm/MC/MCParser/MCParsedAsmOperand.h index 280145b..7d0914e 100644 --- a/include/llvm/MC/MCParser/MCParsedAsmOperand.h +++ b/include/llvm/MC/MCParser/MCParsedAsmOperand.h @@ -57,12 +57,17 @@ public: /// isMem - Is this a memory operand? virtual bool isMem() const = 0; + virtual unsigned getMemSize() const { return 0; } /// 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. virtual SMLoc getEndLoc() const = 0; + /// needSizeDirective - Do we need to emit a sizing directive for this + /// operand? Only valid when parsing MS-style inline assembly. + virtual bool needSizeDirective() const { return false; } + /// print - Print a debug representation of the operand to the given stream. virtual void print(raw_ostream &OS) const = 0; /// dump - Print to the debug stream. |