[PATCH] D87272: [lld] Buffer writes when composing a single diagnostic

Andrew Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 02:25:23 PDT 2020


andrewng added inline comments.


================
Comment at: lld/Common/ErrorHandler.cpp:191
+  reportDiagnostic(getLocation(msg), Colors::MAGENTA, "warning", msg);
   sep = getSeparator(msg);
 }
----------------
IIRC, the update of `sep` needs to be within the same lock to avoid a race condition.


================
Comment at: lld/Common/ErrorHandler.cpp:220
 
     sep = getSeparator(msg);
     ++errorCount;
----------------
Same locking/race condition for `sep` as above.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87272/new/

https://reviews.llvm.org/D87272



More information about the llvm-commits mailing list