Fix typo.
[oota-llvm.git] / include / llvm / Support / FormattedStream.h
index 6b51144e9ef6121935aead9480fb512428ad1938..58a18851687ca2b7732f43af1d68b0ef0b4af11f 100644 (file)
@@ -1,4 +1,4 @@
-//===-- llvm/CodeGen/FormattedStream.h - Formatted streams ------*- C++ -*-===//
+//===-- llvm/Support/FormattedStream.h - Formatted streams ------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -59,7 +59,7 @@ namespace llvm
 
     /// current_pos - Return the current position within the stream,
     /// not counting the bytes currently in the buffer.
-    virtual uint64_t current_pos() { 
+    virtual uint64_t current_pos() const 
       // This has the same effect as calling TheStream.current_pos(),
       // but that interface is private.
       return TheStream->tell() - TheStream->GetNumBytesInBuffer();
@@ -105,15 +105,10 @@ namespace llvm
       // own buffering, and it doesn't need or want TheStream to do another
       // layer of buffering underneath. Resize the buffer to what TheStream
       // had been using, and tell TheStream not to do its own buffering.
-      //
-      // If the underlying stream is unbuffered, just use its preferred buffer
-      // size. We can't treat this as an honest wish for unbuffered output,
-      // because it could very well be a stream we previously forced to be
-      // unbuffered.
       if (size_t BufferSize = TheStream->GetBufferSize())
         SetBufferSize(BufferSize);
       else
-        SetBuffered();
+        SetUnbuffered();
       TheStream->SetUnbuffered();
 
       Scanned = 0;
@@ -124,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() {
@@ -149,6 +144,10 @@ formatted_raw_ostream &fouts();
 /// standard error.  Use it like: ferrs() << "foo" << "bar";
 formatted_raw_ostream &ferrs();
 
+/// fdbgs() - This returns a reference to a formatted_raw_ostream for
+/// debug output.  Use it like: fdbgs() << "foo" << "bar";
+formatted_raw_ostream &fdbgs();
+
 } // end llvm namespace