summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-23 00:51:00 +0000
committerChris Lattner <sabre@nondot.org>2009-08-23 00:51:00 +0000
commit81e8e02e2fa89a891e2128d0bc9aba9310760f06 (patch)
tree0899ef3bfce3c2e05757ec6897bb79afce031442 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parent1216f54276aae7fc2bd4056c198c8d2dd6b2ec5a (diff)
downloadbcm5719-llvm-81e8e02e2fa89a891e2128d0bc9aba9310760f06.tar.gz
bcm5719-llvm-81e8e02e2fa89a891e2128d0bc9aba9310760f06.zip
remove some random indentation stuff, yay for efficiency.
llvm-svn: 79797
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 211f708c791..d2afe1e46dd 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1774,19 +1774,6 @@ void AsmPrinter::EmitComments(const MCInst &MI) const
}
}
-/// Indent - Insert spaces into the character output stream. The
-/// "level" is multiplied by the "scale" to calculate the number of
-/// spaces to insert. "level" can represent something like loop
-/// nesting level, for example.
-///
-static formatted_raw_ostream &
-Indent(formatted_raw_ostream &out, int level, int scale = 2) {
- for(int i = 0; i < level*scale; ++i) {
- out << " ";
- }
- return out;
-}
-
/// PrintChildLoopComment - Print comments about child loops within
/// the loop for this basic block, with nesting.
///
@@ -1806,7 +1793,7 @@ static void PrintChildLoopComment(formatted_raw_ostream &O,
O.PadToColumn(MAI->getCommentColumn());
O << MAI->getCommentString();
- Indent(O, (*cl)->getLoopDepth()-1)
+ O.indent(((*cl)->getLoopDepth()-1)*2)
<< " Child Loop BB" << FunctionNumber << "_"
<< Header->getNumber() << " Depth " << (*cl)->getLoopDepth();
@@ -1858,7 +1845,7 @@ void AsmPrinter::EmitComments(const MachineBasicBlock &MBB) const
O << '\n';
O.PadToColumn(MAI->getCommentColumn());
O << MAI->getCommentString();
- Indent(O, CurLoop->getLoopDepth()-1)
+ O.indent((CurLoop->getLoopDepth()-1)*2)
<< " Inside Loop BB" << getFunctionNumber() << "_"
<< Header->getNumber() << " Depth " << CurLoop->getLoopDepth();
}
OpenPOWER on IntegriCloud