diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-02-15 02:17:50 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-02-15 02:17:50 +0000 |
| commit | f733d75892698d14225f9bff701c4808cfc5dcc1 (patch) | |
| tree | ee769971ca0d847be19dd9db6db6be0e94a87769 /llvm/lib | |
| parent | c704ea1c51d4cb97a8a62f9975ae0a9e5405eb00 (diff) | |
| download | bcm5719-llvm-f733d75892698d14225f9bff701c4808cfc5dcc1.tar.gz bcm5719-llvm-f733d75892698d14225f9bff701c4808cfc5dcc1.zip | |
make PadToColumn return the stream so you can use:
OS.PadToColumn(42) << "foo";
llvm-svn: 96208
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Support/FormattedStream.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Support/FormattedStream.cpp b/llvm/lib/Support/FormattedStream.cpp index 9ab3666340e..39b6cb3f1f7 100644 --- a/llvm/lib/Support/FormattedStream.cpp +++ b/llvm/lib/Support/FormattedStream.cpp @@ -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) { |

