[PATCH] D108850: [LLD] Remove global state in lldCommon
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 27 21:18:19 PDT 2021
MaskRay added inline comments.
================
Comment at: lld/Common/ErrorHandler.cpp:44
+};
+ErrorState *initError(char *const start, char *&next, unsigned &offset) {
+ return initGlobalHelper<ErrorState>(start, next, offset);
----------------
add empty line
================
Comment at: lld/Common/ErrorHandler.cpp:47
+}
+void freeError(ErrorState *e) { e->~ErrorState(); }
+} // namespace lld
----------------
add empty line
================
Comment at: lld/Common/Globals.cpp:74
+ assert(lcg && "The current thread must reference a global state!");
+ // Release states in reverse order
+ freeTimer(&lcg->t());
----------------
================
Comment at: lld/Common/Globals.cpp:80
+ valid = nullptr;
+ // Detach the current thread from the global state
+ lcg = nullptr;
----------------
================
Comment at: lld/include/lld/Common/Globals.h:51
+ // each other, since they should be accessed quite frequently.
+ std::uint64_t storage[50]{};
+
----------------
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