diff options
| author | David Greene <greened@obbligato.org> | 2009-08-05 21:00:52 +0000 | 
|---|---|---|
| committer | David Greene <greened@obbligato.org> | 2009-08-05 21:00:52 +0000 | 
| commit | fdd2519eb5cb5615d25bd61817020f75845d7f77 (patch) | |
| tree | 3bdcb64d20b639bd9126e2428862c98552e3ebca /llvm/include | |
| parent | 39fb546b9e2296abf69d5a61007b7bbf656a3270 (diff) | |
| download | bcm5719-llvm-fdd2519eb5cb5615d25bd61817020f75845d7f77.tar.gz bcm5719-llvm-fdd2519eb5cb5615d25bd61817020f75845d7f77.zip | |
Fix some column padding bugs, reorganize things as suggested by Chris
and eliminate complexity.  Yay!
llvm-svn: 78243
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; | 

