Delete dead code.
[oota-llvm.git] / lib / Support / Allocator.cpp
index b4fdc1e1bc1e02f98b9afc3917cc3ea75d54c2ce..3c4191b805a368eecb820cdecb11dad839ae497a 100644 (file)
@@ -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.
@@ -104,8 +105,8 @@ void *BumpPtrAllocator::Allocate(size_t Size, size_t Alignment) {
   if (Ptr + Size <= End) {
     CurPtr = Ptr + Size;
     // Update the allocation point of this memory block in MemorySanitizer.
-    // Without this, MemorySanitizer reports for values originating from it will
-    // point to the allocation point of the entire slab.
+    // Without this, MemorySanitizer messages for values originated from here
+    // will point to the allocation of the entire slab.
     __msan_allocated_memory(Ptr, Size);
     return Ptr;
   }