Add a GetBufferSize() member to raw_ostream and use it to
[oota-llvm.git] / include / llvm / Support / raw_ostream.h
index 09ee03098f49df0de07594f64250f25e018c55f9..5f6578fcb505e649c39077a77436667f1c7d2ce8 100644 (file)
@@ -106,6 +106,10 @@ public:
     Unbuffered = false;
   }
 
+  size_t GetBufferSize() const {
+    return OutBufEnd - OutBufStart;
+  }
+
   /// SetUnbuffered - Set the streams buffering status. When
   /// unbuffered the stream will flush after every write. This routine
   /// will also flush the buffer immediately when the stream is being