Temporarily revert r93581. It was causing failures in the ExecutionEngine tests
authorBill Wendling <isanbard@gmail.com>
Sat, 16 Jan 2010 01:06:58 +0000 (01:06 +0000)
committerBill Wendling <isanbard@gmail.com>
Sat, 16 Jan 2010 01:06:58 +0000 (01:06 +0000)
on the build bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93606 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/Allocator.h
lib/Support/Allocator.cpp

index 496496b4c151b3e1e757cc9d96a2cdddc8fa9c2d..b0ed33d6ed5a4f62088c0aa46fe23ea926d1a4f9 100644 (file)
@@ -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
index 19d69f6f944dfaec5c10fbc2c89887994f00f07e..31b45c8d4aae77538940f8f1b9e948f7f2726e23 100644 (file)
@@ -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() { }