aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-04-08 15:22:35 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-04-08 15:22:35 +0000
commit180c3d4edd1219832be8f2cf91f5f73f9757c36f (patch)
treec131587bfa5e192c1a01ae05149a65ba6060965d /include
parentf042f97d7e6fbaa73a26f494ed642f2e4e2a948d (diff)
downloadexternal_llvm-180c3d4edd1219832be8f2cf91f5f73f9757c36f.zip
external_llvm-180c3d4edd1219832be8f2cf91f5f73f9757c36f.tar.gz
external_llvm-180c3d4edd1219832be8f2cf91f5f73f9757c36f.tar.bz2
Provide operator delete for BumpPtrAllocator and RecyclingAllocator. They will
never be called but msvc complains that they're missing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100766 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/Allocator.h2
-rw-r--r--include/llvm/Support/RecyclingAllocator.h7
2 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h
index 148d47e..4a7251f 100644
--- a/include/llvm/Support/Allocator.h
+++ b/include/llvm/Support/Allocator.h
@@ -236,4 +236,6 @@ inline void *operator new(size_t Size, llvm::BumpPtrAllocator &Allocator) {
offsetof(S, x)));
}
+inline void operator delete(void *, llvm::BumpPtrAllocator &) {}
+
#endif // LLVM_SUPPORT_ALLOCATOR_H
diff --git a/include/llvm/Support/RecyclingAllocator.h b/include/llvm/Support/RecyclingAllocator.h
index 49f7753..34ab874 100644
--- a/include/llvm/Support/RecyclingAllocator.h
+++ b/include/llvm/Support/RecyclingAllocator.h
@@ -63,4 +63,11 @@ inline void *operator new(size_t,
return Allocator.Allocate();
}
+template<class AllocatorType, class T, size_t Size, size_t Align>
+inline void operator delete(void *E,
+ llvm::RecyclingAllocator<AllocatorType,
+ T, Size, Align> &A) {
+ A.Deallocate(E);
+}
+
#endif