diff options
Diffstat (limited to 'llvm/lib/Support/Allocator.cpp')
| -rw-r--r-- | llvm/lib/Support/Allocator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Allocator.cpp b/llvm/lib/Support/Allocator.cpp index 11f7ba80a6f..da1bf3e18c4 100644 --- a/llvm/lib/Support/Allocator.cpp +++ b/llvm/lib/Support/Allocator.cpp @@ -39,7 +39,7 @@ void MallocSlabAllocator::Deallocate(MemSlab *Slab) { void BumpPtrAllocatorBase::PrintStats() const { unsigned NumSlabs = 0; size_t TotalMemory = 0; - for (MemSlab *Slab = CurSlab; Slab != nullptr; Slab = Slab->NextPtr) { + for (MemSlab *Slab = CurSlab; Slab; Slab = Slab->NextPtr) { TotalMemory += Slab->Size; ++NumSlabs; } @@ -53,7 +53,7 @@ void BumpPtrAllocatorBase::PrintStats() const { size_t BumpPtrAllocatorBase::getTotalMemory() const { size_t TotalMemory = 0; - for (MemSlab *Slab = CurSlab; Slab != nullptr; Slab = Slab->NextPtr) { + for (MemSlab *Slab = CurSlab; Slab; Slab = Slab->NextPtr) { TotalMemory += Slab->Size; } return TotalMemory; |

