aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/FormattedStream.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-22 23:16:09 +0000
committerChris Lattner <sabre@nondot.org>2009-08-22 23:16:09 +0000
commitba4bd50a805a997cd73427222440560a587c75b1 (patch)
treeef6da62ec0c0bd3f1e93e5e97d5ffefef4618fd8 /llvm/lib/Support/FormattedStream.cpp
parente6db2c338b52fe4dadf29c6bdba76b7f8a50ba18 (diff)
downloadllvm-ba4bd50a805a997cd73427222440560a587c75b1.zip
llvm-ba4bd50a805a997cd73427222440560a587c75b1.tar.gz
llvm-ba4bd50a805a997cd73427222440560a587c75b1.tar.bz2
switch formattedstream to use raw_ostream::indent. This eliminates
the weird MAX_COLUMN_PAD limitation. llvm-svn: 79785
Diffstat (limited to 'llvm/lib/Support/FormattedStream.cpp')
-rw-r--r--llvm/lib/Support/FormattedStream.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/llvm/lib/Support/FormattedStream.cpp b/llvm/lib/Support/FormattedStream.cpp
index 4e62427..70f2cfa 100644
--- a/llvm/lib/Support/FormattedStream.cpp
+++ b/llvm/lib/Support/FormattedStream.cpp
@@ -63,16 +63,7 @@ void formatted_raw_ostream::PadToColumn(unsigned NewCol) {
ComputeColumn(getBufferStart(), GetNumBytesInBuffer());
// Output spaces until we reach the desired column.
- unsigned num = NewCol - ColumnScanned;
- 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);
+ indent(std::max(int(NewCol - ColumnScanned), 1));
}
void formatted_raw_ostream::write_impl(const char *Ptr, size_t Size) {