[PATCH] D80803: [DebugInfo] Add flush to ensure debug line errors are in right place

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 30 10:03:11 PDT 2020


MaskRay added a comment.

I am in favor of synchronizing stdout/stderr, i.e. when redirected to a file, making the behavior similar to a pty (line buffered). Like other opinions, I am wary of littering `flush` all over the code base. Also note that flushing too frequently has a performance penalty when full buffering is otherwise used. (I once made `llvm-objdump -d` slow due to a change to make it line buffered)

Can we do something similar to D64165 <https://reviews.llvm.org/D64165>? Teach the warning/error (stderr) handler to flush stdout? If there is no stderr output, usual buffering (full buffering when the output is a file) is used. There is no performance penalty.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80803





More information about the llvm-commits mailing list