aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit46148950d8ca80286b88da5dffc5fefc75239778 (patch)
tree04eacae3bf80f9ad085e50a0af64dc0ebf02fb1e /lib/Support/FormattedStream.cpp
parentfc6ae99b8679ea9e84203dd41cef6c321489d2b7 (diff)
downloadexternal_llvm-46148950d8ca80286b88da5dffc5fefc75239778.zip
external_llvm-46148950d8ca80286b88da5dffc5fefc75239778.tar.gz
external_llvm-46148950d8ca80286b88da5dffc5fefc75239778.tar.bz2
the MinPad argument to PadToColumn only really makes sense to be 1,
just remove the argument and replace it with 1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79246 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/FormattedStream.cpp')
-rw-r--r--lib/Support/FormattedStream.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Support/FormattedStream.cpp b/lib/Support/FormattedStream.cpp
index 0db21f6..0c787f8 100644
--- a/lib/Support/FormattedStream.cpp
+++ b/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);
}