diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-03-01 22:10:16 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-03-01 22:10:16 +0000 |
commit | f7e02a0cabe78bb20d3b27a1337c266399f93c41 (patch) | |
tree | df3aa97a2326ad3781b930f1d16122bbb5a83288 /llvm/unittests/Support/AllocatorTest.cpp | |
parent | c1e4dd0e8e6ec8b638bc87ee6dd55f114a4d0e2f (diff) | |
download | bcm5719-llvm-f7e02a0cabe78bb20d3b27a1337c266399f93c41.tar.gz bcm5719-llvm-f7e02a0cabe78bb20d3b27a1337c266399f93c41.zip |
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
Diffstat (limited to 'llvm/unittests/Support/AllocatorTest.cpp')
-rw-r--r-- | llvm/unittests/Support/AllocatorTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/Support/AllocatorTest.cpp b/llvm/unittests/Support/AllocatorTest.cpp index bc5bd3dc407..8b463c11dfc 100644 --- a/llvm/unittests/Support/AllocatorTest.cpp +++ b/llvm/unittests/Support/AllocatorTest.cpp @@ -98,7 +98,7 @@ TEST(AllocatorTest, TestSmallSlabSize) { 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 |