[PATCH] D108850: [LLD] Remove global state in lldCommon
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 14 16:24:08 PDT 2021
mehdi_amini added a comment.
Nice work!
================
Comment at: lld/Common/ErrorHandler.cpp:109
lld::outs().flush();
lld::errs().flush();
}
----------------
I'm curious about this change: you're protecting what seems to be global methods with a non-global mutex. The code comment for the mutex says ```
// The functions defined in this file can be called from multiple threads,
// but lld::outs() or lld::errs() are not thread-safe. We protect them using a
// mutex.
```
This made sense when the mutex was global, less so now. Can you clarify this? (and update the comment)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108850/new/
https://reviews.llvm.org/D108850
More information about the llvm-commits
mailing list