diff options
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/CodeGen/AsmPrinter.h | 6 | ||||
| -rw-r--r-- | llvm/include/llvm/Target/TargetAsmInfo.h | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/llvm/include/llvm/CodeGen/AsmPrinter.h b/llvm/include/llvm/CodeGen/AsmPrinter.h index 847c9452664..0ab780b0ab0 100644 --- a/llvm/include/llvm/CodeGen/AsmPrinter.h +++ b/llvm/include/llvm/CodeGen/AsmPrinter.h @@ -327,6 +327,12 @@ namespace llvm { void EmitComments(const MCInst &MI) const; protected: + /// getOperandColumn - Return the output column number (zero-based) + /// for operand % "operand." If TargetAsmInfo has FirstOperandColumn + /// == 0 or MaxOperandLength == 0, return 0, meaning column alignment + /// is disabled. + unsigned getOperandColumn(int operand) const; + /// PadToColumn - This gets called every time a tab is emitted. If /// column padding is turned on, we replace the tab with the /// appropriate amount of padding. If not, we replace the tab with a diff --git a/llvm/include/llvm/Target/TargetAsmInfo.h b/llvm/include/llvm/Target/TargetAsmInfo.h index e24302b84ef..b5c1796e393 100644 --- a/llvm/include/llvm/Target/TargetAsmInfo.h +++ b/llvm/include/llvm/Target/TargetAsmInfo.h @@ -361,8 +361,11 @@ namespace llvm { const char *getCommentString() const { return CommentString; } - unsigned getOperandColumn(int operand) const { - return FirstOperandColumn + (MaxOperandLength+1)*(operand-1); + unsigned getFirstOperandColumn() const { + return FirstOperandColumn; + } + unsigned getMaxOperandLength() const { + return MaxOperandLength; } const char *getGlobalPrefix() const { return GlobalPrefix; |

