[llvm] r175687 - as the allocator is reset zero out the number of bytes allocated, this was just

Pedro Artigas partigas at apple.com
Wed Feb 20 15:42:52 PST 2013


The allocator is pretty well tested by the compiler. How would I add a test to verify this particular fix?

Pedro

On Feb 20, 2013, at 3:36 PM, Eli Bendersky <eliben at google.com> wrote:

> The allocator has unit tests in unittests/Support/AllocatorTest.cpp -
> can you add a test that exercises this?
> 
> Eli
> 
> 
> On Wed, Feb 20, 2013 at 3:30 PM, Pedro Artigas <partigas at apple.com> wrote:
>> Author: partigas
>> Date: Wed Feb 20 17:30:56 2013
>> New Revision: 175687
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=175687&view=rev
>> Log:
>> as the allocator is reset zero out the number of bytes allocated, this was just
>> missed before but probably what was intended.
>> 
>> Modified:
>>    llvm/trunk/lib/Support/Allocator.cpp
>> 
>> Modified: llvm/trunk/lib/Support/Allocator.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Allocator.cpp?rev=175687&r1=175686&r2=175687&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Support/Allocator.cpp (original)
>> +++ llvm/trunk/lib/Support/Allocator.cpp Wed Feb 20 17:30:56 2013
>> @@ -83,6 +83,7 @@ void BumpPtrAllocator::Reset() {
>>   CurSlab->NextPtr = 0;
>>   CurPtr = (char*)(CurSlab + 1);
>>   End = ((char*)CurSlab) + CurSlab->Size;
>> +  BytesAllocated = 0;
>> }
>> 
>> /// Allocate - Allocate space at the specified alignment.
>> 
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list