diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Support/Allocator.cpp | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/llvm/lib/Support/Allocator.cpp b/llvm/lib/Support/Allocator.cpp index 3c4191b805a..6e7a541dd4b 100644 --- a/llvm/lib/Support/Allocator.cpp +++ b/llvm/lib/Support/Allocator.cpp @@ -26,6 +26,10 @@ BumpPtrAllocator::BumpPtrAllocator(size_t size, size_t threshold,      : SlabSize(size), SizeThreshold(std::min(size, threshold)),        Allocator(allocator), CurSlab(0), BytesAllocated(0) { } +BumpPtrAllocator::BumpPtrAllocator(size_t size, size_t threshold) +    : SlabSize(size), SizeThreshold(std::min(size, threshold)), +      Allocator(DefaultSlabAllocator), CurSlab(0), BytesAllocated(0) { } +  BumpPtrAllocator::~BumpPtrAllocator() {    DeallocateSlabs(CurSlab);  } @@ -167,9 +171,6 @@ void BumpPtrAllocator::PrintStats() const {           << " (includes alignment, etc)\n";  } -MallocSlabAllocator BumpPtrAllocator::DefaultSlabAllocator = -  MallocSlabAllocator(); -  SlabAllocator::~SlabAllocator() { }  MallocSlabAllocator::~MallocSlabAllocator() { } | 

