[llvm] Add thread-local overrides for `llvm::errs()` and `llvm::outs()`. (PR #90374)

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Tue May 14 09:54:45 PDT 2024


================
@@ -893,7 +893,13 @@ void raw_fd_ostream::anchor() {}
 //  outs(), errs(), nulls()
 //===----------------------------------------------------------------------===//
 
+static LLVM_THREAD_LOCAL raw_fd_ostream *OutsOverride = nullptr;
----------------
aganea wrote:

`thread_local` implies zero init, is ` = nullptr` for clarity or should we omit it?

https://github.com/llvm/llvm-project/pull/90374


More information about the llvm-commits mailing list