[PATCH] D108850: [LLD] Remove global state in lldCommon

Amy Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 1 15:27:56 PDT 2021


akhuang added a comment.

This is cool, I was also looking at refactoring out some of the globals in lldCOFF (for now just trying to move some globals into existing classes and passing the classes around). Looks good to me, although I'm not very familiar with structuring code in this way / making things work with threads.



================
Comment at: lld/Common/Globals.cpp:45
+// valid LLD instance, through `attachContext()`.
+static LLVM_THREAD_LOCAL CommonLinkingContext *lctx;
+} // namespace
----------------
does static make the anonymous namespace unnecessary?


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