- /// \param MinPad - The minimum space to give after the most
- /// recent I/O, even if the current column + minpad > newcol.
- ///
- void PadToColumn(unsigned NewCol, unsigned MinPad = 0);
+ formatted_raw_ostream &PadToColumn(unsigned NewCol);
+
+ private:
+ void releaseStream() {
+ // Delete the stream if needed. Otherwise, transfer the buffer
+ // settings from this raw_ostream back to the underlying stream.
+ if (!TheStream)
+ return;
+ if (DeleteStream)
+ delete TheStream;
+ else if (size_t BufferSize = GetBufferSize())
+ TheStream->SetBufferSize(BufferSize);
+ else
+ TheStream->SetUnbuffered();
+ }