From 07c2a78c2b9bf2500ece856c2df2dc043db9acb6 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 14 Jan 2009 00:38:21 +0000 Subject: Add member template MallocAllocator::Allocate(Num) (to match the same function in BumpPtrAllocator). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62202 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/Allocator.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h index bc36535..b60ebca 100644 --- a/include/llvm/Support/Allocator.h +++ b/include/llvm/Support/Allocator.h @@ -31,6 +31,11 @@ public: template T *Allocate() { return static_cast(malloc(sizeof(T))); } + template + T *Allocate(size_t Num) { + return static_cast(malloc(sizeof(T)*Num)); + } + void Deallocate(void *Ptr) { free(Ptr); } void PrintStats() const {} -- cgit v1.1