mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-25 13:08:00 +00:00
make PadToColumn return the stream so you can use:
OS.PadToColumn(42) << "foo"; llvm-svn: 96208
This commit is contained in:
parent
c23d94e163
commit
eeadc240f2
@ -119,7 +119,7 @@ namespace llvm
|
||||
/// space.
|
||||
///
|
||||
/// \param NewCol - The column to move to.
|
||||
void PadToColumn(unsigned NewCol);
|
||||
formatted_raw_ostream &PadToColumn(unsigned NewCol);
|
||||
|
||||
private:
|
||||
void releaseStream() {
|
||||
|
@ -59,12 +59,13 @@ void formatted_raw_ostream::ComputeColumn(const char *Ptr, size_t Size) {
|
||||
/// \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) {
|
||||
formatted_raw_ostream &formatted_raw_ostream::PadToColumn(unsigned NewCol) {
|
||||
// Figure out what's in the buffer and add it to the column count.
|
||||
ComputeColumn(getBufferStart(), GetNumBytesInBuffer());
|
||||
|
||||
// Output spaces until we reach the desired column.
|
||||
indent(std::max(int(NewCol - ColumnScanned), 1));
|
||||
return *this;
|
||||
}
|
||||
|
||||
void formatted_raw_ostream::write_impl(const char *Ptr, size_t Size) {
|
||||
|
Loading…
Reference in New Issue
Block a user