[PATCH] D63313: [llvm-objcopy] Remove no-op flush of errs

Alex Brachet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 14 07:30:51 PDT 2019


abrachet added a comment.

>> although I vaguely remember seeing something in the code somewhere that automatically did it on process termination.
> 
> No, there is no such thing i'm afraid, else i would not have had that bug..

raw_ostream does not flush in its destructor (although it does assert that the buffer is empty) but all sub classes in raw_ostream.h flush their buffers in their destructors. outs() would have its destructor called by __cxa_atexit, @jhenderson is right.

raw_fd_ostream's destructor can be found here: https://github.com/llvm/llvm-project/blob/master/llvm/lib/Support/raw_ostream.cpp#L592


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63313/new/

https://reviews.llvm.org/D63313





More information about the llvm-commits mailing list