[PATCH] D122922: [lld][common][lld-macho] Support per-thread allocators and StringSavers

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 1 21:51:35 PDT 2022


MaskRay added inline comments.


================
Comment at: lld/include/lld/Common/Memory.h:80
+// instances are destroyed whenever lldMain() goes out of scope.
+template <typename T, typename... U> T *makeThreadSafe(U &&...args) {
+  return new (getSpecificAllocSingletonPerThread<T>().Allocate())
----------------
PerThread may be better than ThreadSafe.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122922



More information about the llvm-commits mailing list