diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-03 01:46:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-03 01:46:05 +0000 |
commit | f1866ab6827c1e54b0438cb4c17fff0f6022d561 (patch) | |
tree | 26fcb914e01c2e60cab6121c50558eed408b9e78 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | 35af0ab3eb6ed1faa28233b8a0384c06aef87681 (diff) | |
download | bcm5719-llvm-f1866ab6827c1e54b0438cb4c17fff0f6022d561.tar.gz bcm5719-llvm-f1866ab6827c1e54b0438cb4c17fff0f6022d561.zip |
privatize a bunch of methods and move \n printing into them.
llvm-svn: 95186
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 3358d04fc29..9844571f96e 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -350,20 +350,16 @@ void AsmPrinter::EmitFunctionBody() { case TargetInstrInfo::DBG_LABEL: case TargetInstrInfo::EH_LABEL: case TargetInstrInfo::GC_LABEL: - printLabel(II); - O << '\n'; + printLabelInst(II); break; case TargetInstrInfo::INLINEASM: printInlineAsm(II); - O << '\n'; break; case TargetInstrInfo::IMPLICIT_DEF: printImplicitDef(II); - O << '\n'; break; case TargetInstrInfo::KILL: printKill(II); - O << '\n'; break; default: EmitInstruction(II); @@ -1429,7 +1425,7 @@ void AsmPrinter::printInlineAsm(const MachineInstr *MI) const { } } } - O << "\n\t" << MAI->getCommentString() << MAI->getInlineAsmEnd(); + O << "\n\t" << MAI->getCommentString() << MAI->getInlineAsmEnd() << '\n'; } /// printImplicitDef - This method prints the specified machine instruction @@ -1438,7 +1434,7 @@ void AsmPrinter::printImplicitDef(const MachineInstr *MI) const { if (!VerboseAsm) return; O.PadToColumn(MAI->getCommentColumn()); O << MAI->getCommentString() << " implicit-def: " - << TRI->getName(MI->getOperand(0).getReg()); + << TRI->getName(MI->getOperand(0).getReg()) << '\n'; } void AsmPrinter::printKill(const MachineInstr *MI) const { @@ -1450,12 +1446,14 @@ void AsmPrinter::printKill(const MachineInstr *MI) const { assert(op.isReg() && "KILL instruction must have only register operands"); O << ' ' << TRI->getName(op.getReg()) << (op.isDef() ? "<def>" : "<kill>"); } + O << '\n'; } /// printLabel - This method prints a local label used by debug and /// exception handling tables. -void AsmPrinter::printLabel(const MachineInstr *MI) const { +void AsmPrinter::printLabelInst(const MachineInstr *MI) const { printLabel(MI->getOperand(0).getImm()); + O << '\n'; } void AsmPrinter::printLabel(unsigned Id) const { |