summaryrefslogtreecommitdiff
path: root/lib
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
commitde51ded2fa3d8d92e821e72294a89c1310a70cc6 (patch)
treecf4e751a5acecc4b89a851555ce4538e526f2d31 /lib
parentc5a227ddd1fa09cd66e4fd1c0473be5c2b4f8f32 (diff)
downloadllvm-de51ded2fa3d8d92e821e72294a89c1310a70cc6.tar.gz
llvm-de51ded2fa3d8d92e821e72294a89c1310a70cc6.tar.bz2
llvm-de51ded2fa3d8d92e821e72294a89c1310a70cc6.tar.xz
switch formattedstream to use raw_ostream::indent. This eliminates
the weird MAX_COLUMN_PAD limitation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79785 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Support/FormattedStream.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/Support/FormattedStream.cpp b/lib/Support/FormattedStream.cpp
index 4e62427530..70f2cfa6ae 100644
--- a/lib/Support/FormattedStream.cpp
+++ b/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) {