aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/Allocator.h5
1 files changed, 5 insertions, 0 deletions
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 <typename T>
T *Allocate() { return static_cast<T*>(malloc(sizeof(T))); }
+ template <typename T>
+ T *Allocate(size_t Num) {
+ return static_cast<T*>(malloc(sizeof(T)*Num));
+ }
+
void Deallocate(void *Ptr) { free(Ptr); }
void PrintStats() const {}