blob: efc5bcc2218b43edb61ffa9c0ae3ebe7b7e1fcb6 [file] [log] [blame]
Rui Ueyama2017d522017-11-28 20:39:17 +00001//===- Memory.cpp ---------------------------------------------------------===//
2//
3// The LLVM Linker
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "lld/Common/Memory.h"
11
12using namespace llvm;
13using namespace lld;
14
15BumpPtrAllocator lld::BAlloc;
16StringSaver lld::Saver{BAlloc};
17std::vector<SpecificAllocBase *> lld::SpecificAllocBase::Instances;
18
19void lld::freeArena() {
20 for (SpecificAllocBase *Alloc : SpecificAllocBase::Instances)
21 Alloc->reset();
22 BAlloc.Reset();
23}