[llvm-commits] [llvm] r79458 - /llvm/trunk/include/llvm/Support/raw_ostream.h

Dan Gohman gohman at apple.com
Wed Aug 19 13:27:57 PDT 2009


Author: djg
Date: Wed Aug 19 15:27:57 2009
New Revision: 79458

URL: http://llvm.org/viewvc/llvm-project?rev=79458&view=rev
Log:
Unbreak GetBufferSize() on uninitialized streams. This fixes a problem
that led to errs() getting made buffered.

Modified:
    llvm/trunk/include/llvm/Support/raw_ostream.h

Modified: llvm/trunk/include/llvm/Support/raw_ostream.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/raw_ostream.h?rev=79458&r1=79457&r2=79458&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/raw_ostream.h (original)
+++ llvm/trunk/include/llvm/Support/raw_ostream.h Wed Aug 19 15:27:57 2009
@@ -123,7 +123,7 @@
   size_t GetBufferSize() {
     // If we're supposed to be buffered but haven't actually gotten around
     // to allocating the buffer yet, return the value that would be used.
-    if (!Unbuffered && !OutBufStart)
+    if (BufferMode != Unbuffered && OutBufStart == 0)
       return preferred_buffer_size();
 
     // Otherwise just return the size of the allocated buffer.





More information about the llvm-commits mailing list