This revision was automatically updated to reflect the committed changes.
ioeric marked an inline comment as done.
Closed by commit rCTE340822: [clangd] Use buffered llvm::errs() in the clangd
binary. (authored by ioeric, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D51349?vs=162832&id=162839#toc
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D51349
Files:
clangd/tool/ClangdMain.cpp
Index: clangd/tool/ClangdMain.cpp
===================================================================
--- clangd/tool/ClangdMain.cpp
+++ clangd/tool/ClangdMain.cpp
@@ -259,6 +259,9 @@
if (Tracer)
TracingSession.emplace(*Tracer);
+ // Use buffered stream to stderr (we still flush each log message).
Unbuffered
+ // stream can cause significant (non-deterministic) latency for the logger.
+ llvm::errs().SetBuffered();
JSONOutput Out(llvm::outs(), llvm::errs(), LogLevel,
InputMirrorStream ? InputMirrorStream.getPointer() : nullptr,
PrettyPrint);
Index: clangd/tool/ClangdMain.cpp
===================================================================
--- clangd/tool/ClangdMain.cpp
+++ clangd/tool/ClangdMain.cpp
@@ -259,6 +259,9 @@
if (Tracer)
TracingSession.emplace(*Tracer);
+ // Use buffered stream to stderr (we still flush each log message). Unbuffered
+ // stream can cause significant (non-deterministic) latency for the logger.
+ llvm::errs().SetBuffered();
JSONOutput Out(llvm::outs(), llvm::errs(), LogLevel,
InputMirrorStream ? InputMirrorStream.getPointer() : nullptr,
PrettyPrint);
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits