llvm.org GIT mirror llvm / efbdaa6
make PadToColumn return the stream so you can use: OS.PadToColumn(42) << "foo"; git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96208 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 10 years ago
2 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
118118 /// space.
119119 ///
120120 /// \param NewCol - The column to move to.
121 void PadToColumn(unsigned NewCol);
121 formatted_raw_ostream &PadToColumn(unsigned NewCol);
122122
123123 private:
124124 void releaseStream() {
5858 /// \param MinPad - The minimum space to give after the most recent
5959 /// I/O, even if the current column + minpad > newcol.
6060 ///
61 void formatted_raw_ostream::PadToColumn(unsigned NewCol) {
61 formatted_raw_ostream &formatted_raw_ostream::PadToColumn(unsigned NewCol) {
6262 // Figure out what's in the buffer and add it to the column count.
6363 ComputeColumn(getBufferStart(), GetNumBytesInBuffer());
6464
6565 // Output spaces until we reach the desired column.
6666 indent(std::max(int(NewCol - ColumnScanned), 1));
67 return *this;
6768 }
6869
6970 void formatted_raw_ostream::write_impl(const char *Ptr, size_t Size) {