From 9381eb104563cacdded3c4597d0845707b02737e Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Sun, 18 Dec 2016 14:06:06 +0000 Subject: Remove lld/Support/Memory.h. I thought for a while about how to remove it, but it looks like we can just copy the file for now. Of course I'm not happy about that, but it's just less than 50 lines of code, and we already have duplicate code in Error.h and some other places. I want to solve them all at once later. Differential Revision: https://reviews.llvm.org/D27819 llvm-svn: 290062 --- lld/lib/Support/Memory.cpp | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 lld/lib/Support/Memory.cpp (limited to 'lld/lib/Support/Memory.cpp') diff --git a/lld/lib/Support/Memory.cpp b/lld/lib/Support/Memory.cpp deleted file mode 100644 index 9bdcdcc8fdb..00000000000 --- a/lld/lib/Support/Memory.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//===- Memory.cpp -----------------------------------------------*- C++ -*-===// -// -// The LLVM Linker -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include "lld/Support/Memory.h" - -using namespace llvm; - -namespace lld { -BumpPtrAllocator BAlloc; -StringSaver Saver{BAlloc}; - -SpecificAllocBase::SpecificAllocBase() { Instances.push_back(this); } - -std::vector SpecificAllocBase::Instances; - -void freeArena() { - for (SpecificAllocBase *Alloc : SpecificAllocBase::Instances) - Alloc->reset(); - BAlloc.Reset(); -} -} -- cgit v1.2.3