1//===- Memory.cpp ---------------------------------------------------------===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8 9#include "lld/Common/Memory.h" 10 11using namespace llvm; 12using namespace lld; 13 14BumpPtrAllocator lld::bAlloc; 15StringSaver lld::saver{bAlloc}; 16std::vector<SpecificAllocBase *> lld::SpecificAllocBase::instances; 17 18void lld::freeArena() { 19 for (SpecificAllocBase *alloc : SpecificAllocBase::instances) 20 alloc->reset(); 21 bAlloc.Reset(); 22} 23