BumpPtrAllocator: Make sure threshold cannot be initialized with a value smaller than the slab size.
This replaces r151834 with a simpler fix.
llvm-svn: 151842
diff --git a/llvm/unittests/Support/AllocatorTest.cpp b/llvm/unittests/Support/AllocatorTest.cpp
index bc5bd3d..8b463c1 100644
--- a/llvm/unittests/Support/AllocatorTest.cpp
+++ b/llvm/unittests/Support/AllocatorTest.cpp
@@ -98,7 +98,7 @@
BumpPtrAllocator Alloc(128);
Alloc.Allocate(200, 0);
- EXPECT_EQ(1U, Alloc.GetNumSlabs());
+ EXPECT_EQ(2U, Alloc.GetNumSlabs());
}
// Mock slab allocator that returns slabs aligned on 4096 bytes. There is no