For fastcc on x86, let ECX be used as a return register after EAX and EDX
[oota-llvm.git] / lib / Support / FormattedStream.cpp
index 4e624275300eec0e7186cb48964fa6ec04b2eb80..70f2cfa6ae882cf0ca772679eaa49b73df9ebc32 100644 (file)
@@ -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) {