From 4aed7ea6f89a091aede10ccf0fb45b3ce12c710d Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 17 Jan 2018 17:29:21 -0500 Subject: update embedded LLD to 6.0.0rc1 --- deps/lld/Common/Memory.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 deps/lld/Common/Memory.cpp (limited to 'deps/lld/Common/Memory.cpp') diff --git a/deps/lld/Common/Memory.cpp b/deps/lld/Common/Memory.cpp new file mode 100644 index 0000000000..efc5bcc221 --- /dev/null +++ b/deps/lld/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 lld::SpecificAllocBase::Instances; + +void lld::freeArena() { + for (SpecificAllocBase *Alloc : SpecificAllocBase::Instances) + Alloc->reset(); + BAlloc.Reset(); +} -- cgit v1.2.3