From: Bill Wendling Date: Sat, 16 Jan 2010 01:06:58 +0000 (+0000) Subject: Temporarily revert r93581. It was causing failures in the ExecutionEngine tests X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=c5b7b196770f8c3c83e4ec06c0f2a1f53b623b6f;p=oota-llvm.git Temporarily revert r93581. It was causing failures in the ExecutionEngine tests on the build bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93606 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h index 496496b4c15..b0ed33d6ed5 100644 --- a/include/llvm/Support/Allocator.h +++ b/include/llvm/Support/Allocator.h @@ -128,11 +128,11 @@ class BumpPtrAllocator { /// one. void DeallocateSlabs(MemSlab *Slab); - static MallocSlabAllocator &GetDefaultSlabAllocator(); + static MallocSlabAllocator DefaultSlabAllocator; public: BumpPtrAllocator(size_t size = 4096, size_t threshold = 4096, - SlabAllocator &allocator = GetDefaultSlabAllocator()); + SlabAllocator &allocator = DefaultSlabAllocator); ~BumpPtrAllocator(); /// Reset - Deallocate all but the current slab and reset the current pointer diff --git a/lib/Support/Allocator.cpp b/lib/Support/Allocator.cpp index 19d69f6f944..31b45c8d4aa 100644 --- a/lib/Support/Allocator.cpp +++ b/lib/Support/Allocator.cpp @@ -142,10 +142,8 @@ void BumpPtrAllocator::PrintStats() const { << " (includes alignment, etc)\n"; } -MallocSlabAllocator &BumpPtrAllocator::GetDefaultSlabAllocator() { - static MallocSlabAllocator DefaultSlabAllocator; - return DefaultSlabAllocator; -} +MallocSlabAllocator BumpPtrAllocator::DefaultSlabAllocator = + MallocSlabAllocator(); SlabAllocator::~SlabAllocator() { }