summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorPedro Artigas <partigas@apple.com>2013-02-20 23:30:56 +0000
committerPedro Artigas <partigas@apple.com>2013-02-20 23:30:56 +0000
commit0c09481d6b0a90f4157f816048a508e0a383b64f (patch)
tree36b49c8c8f42be45edc56ac3a513bedb54915ff0 /llvm/lib
parent1ac5322e61a66827dcbedf55941fa95defc2414a (diff)
downloadbcm5719-llvm-0c09481d6b0a90f4157f816048a508e0a383b64f.tar.gz
bcm5719-llvm-0c09481d6b0a90f4157f816048a508e0a383b64f.zip
as the allocator is reset zero out the number of bytes allocated, this was just
missed before but probably what was intended. llvm-svn: 175687
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Support/Allocator.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Support/Allocator.cpp b/llvm/lib/Support/Allocator.cpp
index e269cf997a0..3c4191b805a 100644
--- a/llvm/lib/Support/Allocator.cpp
+++ b/llvm/lib/Support/Allocator.cpp
@@ -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.
OpenPOWER on IntegriCloud