Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lld/include/lld/Common/Memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ template <typename T, typename... U> T *make(U &&... args) {
template <typename T>
inline llvm::SpecificBumpPtrAllocator<T> &
getSpecificAllocSingletonThreadLocal() {
#if LLVM_ENABLE_THREADS
thread_local SpecificAlloc<T> instance;
#else
static SpecificAlloc<T> instance;
#endif
return instance.alloc;
}

Expand Down