projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Define placement new wrappers for BumpPtrAllocator and
[oota-llvm.git]
/
include
/
llvm
/
Support
/
RecyclingAllocator.h
diff --git
a/include/llvm/Support/RecyclingAllocator.h
b/include/llvm/Support/RecyclingAllocator.h
index 609193ffd7624835ad1470b9c504fc99faec88a6..49f77537188d9e63ba3baae708041c6ea5b2be80 100644
(file)
--- a/
include/llvm/Support/RecyclingAllocator.h
+++ b/
include/llvm/Support/RecyclingAllocator.h
@@
-56,4
+56,11
@@
public:
}
+template<class AllocatorType, class T, size_t Size, size_t Align>
+inline void *operator new(size_t,
+ llvm::RecyclingAllocator<AllocatorType,
+ T, Size, Align> &Allocator) {
+ return Allocator.Allocate();
+}
+
#endif