raw_ostream: unbuffered streams weren't being immediately flushed on
authorDaniel Dunbar <daniel@zuster.org>
Thu, 12 Mar 2009 22:02:44 +0000 (22:02 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 12 Mar 2009 22:02:44 +0000 (22:02 +0000)
single character writes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66827 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/raw_ostream.h

index 852f7db4a17cd9767be7208517eb3fb888980608..1eb92ed0ffaf693714a17c23e86278b825ba23b5 100644 (file)
@@ -84,6 +84,8 @@ public:
     if (OutBufCur >= OutBufEnd)
       flush_impl();
     *OutBufCur++ = C;
+    if (Unbuffered)
+      flush_impl();
     return *this;
   }
 
@@ -91,6 +93,8 @@ public:
     if (OutBufCur >= OutBufEnd)
       flush_impl();
     *OutBufCur++ = C;
+    if (Unbuffered)
+      flush_impl();
     return *this;
   }
 
@@ -98,6 +102,8 @@ public:
     if (OutBufCur >= OutBufEnd)
       flush_impl();
     *OutBufCur++ = C;
+    if (Unbuffered)
+      flush_impl();
     return *this;
   }