[llvm-commits] [llvm] r75199 - in /llvm/trunk: include/llvm/Support/raw_ostream.h lib/Support/raw_ostream.cpp

David Greene dag at cray.com
Thu Jul 9 17:36:33 PDT 2009


On Thursday 09 July 2009 18:58, Dan Gohman wrote:
> On Jul 9, 2009, at 4:43 PM, David Greene wrote:
> > void raw_ostream::flush_nonempty() {
> >   assert(OutBufCur > OutBufStart && "Invalid call to
> > flush_nonempty.");
> > +  AboutToFlush();
> >   write_impl(OutBufStart, OutBufCur - OutBufStart);
>
> Instead of introducing a new hook and making flush_nonempty make two
> virtual
> calls, could you make AsmOStream override write_impl to do its work, and
> then call its superclass' write_impl?

Makes sense.  I'll do that.  It also reminds me I need to fix
something else in raw_ostream because there's at least one case
where it bypasses its buffer and that will kill everything 
raw_asm_fd_stream is trying to do.

                          -Dave



More information about the llvm-commits mailing list