diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-04-08 15:22:35 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-04-08 15:22:35 +0000 |
commit | a1eafb9afdc41f13ce53c31953065c2cd561ce77 (patch) | |
tree | be7711e6f81017d08c374991ba2952840622fb42 | |
parent | c6a6d39289c1b5a7a27dae119e308dfd325962b7 (diff) | |
download | bcm5719-llvm-a1eafb9afdc41f13ce53c31953065c2cd561ce77.tar.gz bcm5719-llvm-a1eafb9afdc41f13ce53c31953065c2cd561ce77.zip |
Provide operator delete for BumpPtrAllocator and RecyclingAllocator. They will
never be called but msvc complains that they're missing.
llvm-svn: 100766
-rw-r--r-- | llvm/include/llvm/Support/Allocator.h | 2 | ||||
-rw-r--r-- | llvm/include/llvm/Support/RecyclingAllocator.h | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/Allocator.h b/llvm/include/llvm/Support/Allocator.h index 148d47e785c..4a7251fa1ef 100644 --- a/llvm/include/llvm/Support/Allocator.h +++ b/llvm/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/llvm/include/llvm/Support/RecyclingAllocator.h b/llvm/include/llvm/Support/RecyclingAllocator.h index 49f77537188..34ab874778c 100644 --- a/llvm/include/llvm/Support/RecyclingAllocator.h +++ b/llvm/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 |