summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Allocator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/Allocator.cpp')
-rw-r--r--llvm/lib/Support/Allocator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/Allocator.cpp b/llvm/lib/Support/Allocator.cpp
index 7e177481cb5..11f7ba80a6f 100644
--- a/llvm/lib/Support/Allocator.cpp
+++ b/llvm/lib/Support/Allocator.cpp
@@ -28,7 +28,7 @@ MallocSlabAllocator::~MallocSlabAllocator() { }
MemSlab *MallocSlabAllocator::Allocate(size_t Size) {
MemSlab *Slab = (MemSlab*)Allocator.Allocate(Size, 0);
Slab->Size = Size;
- Slab->NextPtr = 0;
+ Slab->NextPtr = nullptr;
return Slab;
}
@@ -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 != 0; Slab = Slab->NextPtr) {
+ for (MemSlab *Slab = CurSlab; Slab != nullptr; 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 != 0; Slab = Slab->NextPtr) {
+ for (MemSlab *Slab = CurSlab; Slab != nullptr; Slab = Slab->NextPtr) {
TotalMemory += Slab->Size;
}
return TotalMemory;
OpenPOWER on IntegriCloud