From e35472e3a948a0b2e71e18c2c7ad781216e50a43 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 7 Aug 2009 23:16:27 +0000 Subject: [PATCH] remove a bunch of now-dead crud from the asmprinter and TAI interfaces. llvm-svn: 78428 --- llvm/include/llvm/CodeGen/AsmPrinter.h | 13 --------- llvm/include/llvm/Target/TargetAsmInfo.h | 14 ---------- llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 32 ---------------------- llvm/lib/Target/TargetAsmInfo.cpp | 2 -- 4 files changed, 61 deletions(-) diff --git a/llvm/include/llvm/CodeGen/AsmPrinter.h b/llvm/include/llvm/CodeGen/AsmPrinter.h index 0ab780b0ab07..73644a76003a 100644 --- a/llvm/include/llvm/CodeGen/AsmPrinter.h +++ b/llvm/include/llvm/CodeGen/AsmPrinter.h @@ -327,19 +327,6 @@ 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 - /// space, except for the first operand so that initial operands are - /// always lined up by tabs. - void PadToColumn(unsigned Operand) const; - /// EmitZeros - Emit a block of zeros. /// void EmitZeros(uint64_t NumZeros, unsigned AddrSpace = 0) const; diff --git a/llvm/include/llvm/Target/TargetAsmInfo.h b/llvm/include/llvm/Target/TargetAsmInfo.h index b5c1796e393f..70d211222561 100644 --- a/llvm/include/llvm/Target/TargetAsmInfo.h +++ b/llvm/include/llvm/Target/TargetAsmInfo.h @@ -72,14 +72,6 @@ namespace llvm { /// assembler. const char *CommentString; // Defaults to "#" - /// FirstOperandColumn - The output column where the first operand - /// should be printed - unsigned FirstOperandColumn; // Defaults to 0 (ignored) - - /// MaxOperandLength - The maximum length of any printed asm - /// operand - unsigned MaxOperandLength; // Defaults to 0 (ignored) - /// GlobalPrefix - If this is set to a non-empty string, it is prepended /// onto all global symbols. This is often used for "_" or ".". const char *GlobalPrefix; // Defaults to "" @@ -361,12 +353,6 @@ namespace llvm { const char *getCommentString() const { return CommentString; } - unsigned getFirstOperandColumn() const { - return FirstOperandColumn; - } - unsigned getMaxOperandLength() const { - return MaxOperandLength; - } const char *getGlobalPrefix() const { return GlobalPrefix; } diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 15b3a6dc4d2d..433590c7f998 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -783,38 +783,6 @@ void AsmPrinter::EmitAlignment(unsigned NumBits, const GlobalValue *GV, O << '\n'; } -/// 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 AsmPrinter::getOperandColumn(int operand) const { - if (TAI->getFirstOperandColumn() > 0 && TAI->getMaxOperandLength() > 0) - return TAI->getFirstOperandColumn() + - (TAI->getMaxOperandLength()+1)*(operand-1); - return 0; -} - -/// 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 -/// space, except for the first operand so that initial operands are -/// always lined up by tabs. -void AsmPrinter::PadToColumn(unsigned Operand) const { - if (getOperandColumn(Operand) > 0) { - O.PadToColumn(getOperandColumn(Operand), 1); - } - else { - if (Operand == 1) { - // Emit the tab after the mnemonic. - O << '\t'; - } - else { - // Replace the tab with a space. - O << ' '; - } - } -} - /// EmitZeros - Emit a block of zeros. /// void AsmPrinter::EmitZeros(uint64_t NumZeros, unsigned AddrSpace) const { diff --git a/llvm/lib/Target/TargetAsmInfo.cpp b/llvm/lib/Target/TargetAsmInfo.cpp index 5f20ea0fc1b8..b59e140a1237 100644 --- a/llvm/lib/Target/TargetAsmInfo.cpp +++ b/llvm/lib/Target/TargetAsmInfo.cpp @@ -26,8 +26,6 @@ TargetAsmInfo::TargetAsmInfo() { SeparatorChar = ';'; CommentColumn = 60; CommentString = "#"; - FirstOperandColumn = 0; - MaxOperandLength = 0; GlobalPrefix = ""; PrivateGlobalPrefix = "."; LinkerPrivateGlobalPrefix = "";