summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/FormattedStream.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-17 15:48:08 +0000
committerChris Lattner <sabre@nondot.org>2009-08-17 15:48:08 +0000
commitee97b8b11c4555fd59b3d0db7b0100298070492d (patch)
tree3cc6b7af9c24264d4aee979e5c8d619e5b7d8b1d /llvm/lib/Support/FormattedStream.cpp
parent5906bc105942319fcebe5911e52a3c9e372545bf (diff)
downloadbcm5719-llvm-ee97b8b11c4555fd59b3d0db7b0100298070492d.tar.gz
bcm5719-llvm-ee97b8b11c4555fd59b3d0db7b0100298070492d.zip
the MinPad argument to PadToColumn only really makes sense to be 1,
just remove the argument and replace it with 1. llvm-svn: 79246
Diffstat (limited to 'llvm/lib/Support/FormattedStream.cpp')
-rw-r--r--llvm/lib/Support/FormattedStream.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Support/FormattedStream.cpp b/llvm/lib/Support/FormattedStream.cpp
index 0db21f651a7..0c787f8c4f9 100644
--- a/llvm/lib/Support/FormattedStream.cpp
+++ b/llvm/lib/Support/FormattedStream.cpp
@@ -51,21 +51,20 @@ void formatted_raw_ostream::ComputeColumn() {
/// \param MinPad - The minimum space to give after the most recent
/// I/O, even if the current column + minpad > newcol.
///
-void formatted_raw_ostream::PadToColumn(unsigned NewCol, unsigned MinPad) {
+void formatted_raw_ostream::PadToColumn(unsigned NewCol) {
// Figure out what's in the buffer and add it to the column count.
ComputeColumn();
// Output spaces until we reach the desired column.
unsigned num = NewCol - ColumnScanned;
- if (NewCol < ColumnScanned || num < MinPad)
- num = MinPad;
+ if (NewCol < ColumnScanned || num < 1)
+ num = 1;
// Keep a buffer of spaces handy to speed up processing.
const char *Spaces = " "
" ";
assert(num < MAX_COLUMN_PAD && "Unexpectedly large column padding");
-
write(Spaces, num);
}
OpenPOWER on IntegriCloud