projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92c6bd2
)
Add member template MallocAllocator::Allocate(Num) (to match the same function in...
author
Ted Kremenek
<kremenek@apple.com>
Wed, 14 Jan 2009 00:38:21 +0000
(
00:38
+0000)
committer
Ted Kremenek
<kremenek@apple.com>
Wed, 14 Jan 2009 00:38:21 +0000
(
00:38
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62202
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Support/Allocator.h
patch
|
blob
|
history
diff --git
a/include/llvm/Support/Allocator.h
b/include/llvm/Support/Allocator.h
index bc3653503caf8715ccc7fce2f0f136e789151f84..b60ebcaddf472bc797b9f055de7e4f04fb993356 100644
(file)
--- 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 {}