summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-08-19 20:27:57 +0000
committerDan Gohman <gohman@apple.com>2009-08-19 20:27:57 +0000
commit7ab2fef792238ec467cf3351ee63b4b8c026a3dd (patch)
treebb5e2abde6a47634dc19d5c098135af903336142 /include
parent58268a770f238b9f72d4a9709b8fd215f40c5dad (diff)
downloadllvm-7ab2fef792238ec467cf3351ee63b4b8c026a3dd.tar.gz
llvm-7ab2fef792238ec467cf3351ee63b4b8c026a3dd.tar.bz2
llvm-7ab2fef792238ec467cf3351ee63b4b8c026a3dd.tar.xz
Unbreak GetBufferSize() on uninitialized streams. This fixes a problem
that led to errs() getting made buffered. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79458 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/raw_ostream.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h
index dc496d46e0..a9d1b5a7a2 100644
--- a/include/llvm/Support/raw_ostream.h
+++ b/include/llvm/Support/raw_ostream.h
@@ -123,7 +123,7 @@ public:
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.