summaryrefslogtreecommitdiff
path: root/include/llvm/Support/Allocator.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-09-05 21:41:34 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-09-05 21:41:34 +0000
commit188b5224fd9c8573713665c77f9d2f415bcc4ff1 (patch)
tree6b97248e10a979a06994e1ff05da6d5ee0abeaf0 /include/llvm/Support/Allocator.h
parentdf344febe27b8fa68424032c4181e494307d6eaf (diff)
downloadllvm-188b5224fd9c8573713665c77f9d2f415bcc4ff1.tar.gz
llvm-188b5224fd9c8573713665c77f9d2f415bcc4ff1.tar.bz2
llvm-188b5224fd9c8573713665c77f9d2f415bcc4ff1.tar.xz
Added Reset() to free all allocated memory regions and reset state to be the same as right after ctor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41728 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/Allocator.h')
-rw-r--r--include/llvm/Support/Allocator.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h
index 527d4c6e2c..f23a41f17f 100644
--- a/include/llvm/Support/Allocator.h
+++ b/include/llvm/Support/Allocator.h
@@ -23,6 +23,7 @@ public:
MallocAllocator() {}
~MallocAllocator() {}
+ void Reset() {}
void *Allocate(unsigned Size, unsigned Alignment) { return malloc(Size); }
void Deallocate(void *Ptr) { free(Ptr); }
void PrintStats() const {}
@@ -38,6 +39,7 @@ public:
BumpPtrAllocator();
~BumpPtrAllocator();
+ void Reset();
void *Allocate(unsigned Size, unsigned Alignment);
void Deallocate(void *Ptr) {}
void PrintStats() const;