diff options
author | Hans Wennborg <hans@hanshq.net> | 2014-09-07 05:14:29 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2014-09-07 05:14:29 +0000 |
commit | e5a96a5c0613111b9350deee9cb17ab3c04465de (patch) | |
tree | a5248633344f35b81da50868f7e8083f6cf36815 /llvm/unittests/Support/AllocatorTest.cpp | |
parent | 44e27464181168faa2b2c4a6e92797ab96215cac (diff) | |
download | llvm-e5a96a5c0613111b9350deee9cb17ab3c04465de.zip llvm-e5a96a5c0613111b9350deee9cb17ab3c04465de.tar.gz llvm-e5a96a5c0613111b9350deee9cb17ab3c04465de.tar.bz2 |
Try to unflake AllocatorTest.TestAlignmentPastSlab
llvm-svn: 217331
Diffstat (limited to 'llvm/unittests/Support/AllocatorTest.cpp')
-rw-r--r-- | llvm/unittests/Support/AllocatorTest.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/unittests/Support/AllocatorTest.cpp b/llvm/unittests/Support/AllocatorTest.cpp index 616f8af..7f15776 100644 --- a/llvm/unittests/Support/AllocatorTest.cpp +++ b/llvm/unittests/Support/AllocatorTest.cpp @@ -118,10 +118,11 @@ TEST(AllocatorTest, TestSmallSlabSize) { // Test requesting alignment that goes past the end of the current slab. TEST(AllocatorTest, TestAlignmentPastSlab) { BumpPtrAllocator Alloc; - Alloc.Allocate(1234, 1); + Alloc.Allocate(4095, 1); - // Any attempt to align the pointer in the current slab would move it beyond - // the end of that slab. + // Aligning the current slab pointer is likely to move it past the end of the + // slab, which would confuse any unsigned comparisons with the difference of + // the the end pointer and the aligned pointer. Alloc.Allocate(1024, 8192); EXPECT_EQ(2U, Alloc.GetNumSlabs()); |