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
This commit is contained in:
Benjamin Kramer 2010-04-08 15:22:35 +00:00
parent f042f97d7e
commit 180c3d4edd
2 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -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