summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.