raw_ostream: unbuffered streams weren't being immediately flushed on

single character writes.

llvm-svn: 66827
This commit is contained in:
Daniel Dunbar 2009-03-12 22:02:44 +00:00
parent 1f853d6a2a
commit db948ffaf0
1 changed files with 6 additions and 0 deletions

View File

@ -84,6 +84,8 @@ public:
if (OutBufCur >= OutBufEnd) if (OutBufCur >= OutBufEnd)
flush_impl(); flush_impl();
*OutBufCur++ = C; *OutBufCur++ = C;
if (Unbuffered)
flush_impl();
return *this; return *this;
} }
@ -91,6 +93,8 @@ public:
if (OutBufCur >= OutBufEnd) if (OutBufCur >= OutBufEnd)
flush_impl(); flush_impl();
*OutBufCur++ = C; *OutBufCur++ = C;
if (Unbuffered)
flush_impl();
return *this; return *this;
} }
@ -98,6 +102,8 @@ public:
if (OutBufCur >= OutBufEnd) if (OutBufCur >= OutBufEnd)
flush_impl(); flush_impl();
*OutBufCur++ = C; *OutBufCur++ = C;
if (Unbuffered)
flush_impl();
return *this; return *this;
} }