]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lld/Common/Memory.cpp
Upgrade Unbound to 1.6.2. More to follow.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lld / Common / Memory.cpp
1 //===- 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
12 using namespace llvm;
13 using namespace lld;
14
15 BumpPtrAllocator lld::BAlloc;
16 StringSaver lld::Saver{BAlloc};
17 std::vector<SpecificAllocBase *> lld::SpecificAllocBase::Instances;
18
19 void lld::freeArena() {
20   for (SpecificAllocBase *Alloc : SpecificAllocBase::Instances)
21     Alloc->reset();
22   BAlloc.Reset();
23 }