[llvm] Add thread-local overrides for `llvm::errs()` and `llvm::outs()`. (PR #90374)
Michael Spencer via llvm-commits
llvm-commits at lists.llvm.org
Wed May 1 00:59:35 PDT 2024
================
@@ -893,7 +893,13 @@ void raw_fd_ostream::anchor() {}
// outs(), errs(), nulls()
//===----------------------------------------------------------------------===//
+static thread_local raw_fd_ostream *OutsOverride = nullptr;
+static thread_local raw_fd_ostream *ErrsOverride = nullptr;
----------------
Bigcheese wrote:
These should probably use `LLVM_THREAD_LOCAL` so they are just normal globals when `LLVM_ENABLE_THREADS` is false.
https://github.com/llvm/llvm-project/pull/90374
More information about the llvm-commits
mailing list