diff options
Diffstat (limited to 'Common/Memory.cpp')
-rw-r--r-- | Common/Memory.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Common/Memory.cpp b/Common/Memory.cpp new file mode 100644 index 000000000000..efc5bcc2218b --- /dev/null +++ b/Common/Memory.cpp @@ -0,0 +1,23 @@ +//===- Memory.cpp ---------------------------------------------------------===// +// +// The LLVM Linker +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lld/Common/Memory.h" + +using namespace llvm; +using namespace lld; + +BumpPtrAllocator lld::BAlloc; +StringSaver lld::Saver{BAlloc}; +std::vector<SpecificAllocBase *> lld::SpecificAllocBase::Instances; + +void lld::freeArena() { + for (SpecificAllocBase *Alloc : SpecificAllocBase::Instances) + Alloc->reset(); + BAlloc.Reset(); +} |