Do not use errs() or outs() directly. Instead use message(), log() or error()

LLD is a multi-threaded program. errs() or outs() are not guaranteed
to be thread-safe (they are actually not).

LLD's message(), log() or error() are thread-safe. We should use them.

llvm-svn: 295787
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index 7998d89..9eff851 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -568,8 +568,8 @@
 template <class ELFT> static void reportDiscarded(InputSectionBase<ELFT> *IS) {
   if (!Config->PrintGcSections)
     return;
-  errs() << "removing unused section from '" << IS->Name << "' in file '"
-         << IS->getFile()->getName() << "'\n";
+  message("removing unused section from '" + IS->Name + "' in file '" +
+          IS->getFile()->getName());
 }
 
 template <class ELFT>