diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2014-03-30 12:07:07 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2014-03-30 12:07:07 +0000 |
commit | 9df0fd4018b8234c7100b9edf7871d76892fce34 (patch) | |
tree | 0ce4eaa4b5fe16dd1c4e688cc67deb9550344c83 /llvm/unittests/Support/AllocatorTest.cpp | |
parent | 379accd8716a82d91e694ac9dbc162f7f9274540 (diff) | |
download | llvm-9df0fd4018b8234c7100b9edf7871d76892fce34.zip llvm-9df0fd4018b8234c7100b9edf7871d76892fce34.tar.gz llvm-9df0fd4018b8234c7100b9edf7871d76892fce34.tar.bz2 |
[Allocator] Lift the slab size and size threshold into template
parameters rather than runtime parameters.
There is only one user of these parameters and they are compile time for
that user. Making these compile time seems to better reflect their
intended usage as well.
llvm-svn: 205143
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 4cd0163..bcf6bf1 100644 --- a/llvm/unittests/Support/AllocatorTest.cpp +++ b/llvm/unittests/Support/AllocatorTest.cpp @@ -141,7 +141,7 @@ public: // will not. TEST(AllocatorTest, TestBigAlignment) { MockSlabAllocator SlabAlloc; - BumpPtrAllocator Alloc(4096, 4096, SlabAlloc); + BumpPtrAllocator Alloc(SlabAlloc); uintptr_t Ptr = (uintptr_t)Alloc.Allocate(3000, 2048); MemSlab *Slab = SlabAlloc.GetLastSlab(); EXPECT_LE(Ptr + 3000, ((uintptr_t)Slab) + Slab->Size); |