diff --git a/llvm/include/llvm/Support/Allocator.h b/llvm/include/llvm/Support/Allocator.h --- a/llvm/include/llvm/Support/Allocator.h +++ b/llvm/include/llvm/Support/Allocator.h @@ -79,6 +79,11 @@ BumpPtrAllocatorImpl(T &&Allocator) : AllocatorT(std::forward(Allocator)) {} + // BumpPtrAllocator shouldn't be copyable. Explicitly delete this + // specialization of the perfect-forwarding constructor above. + template + BumpPtrAllocatorImpl(BumpPtrAllocatorImpl &) = delete; + // Manually implement a move constructor as we must clear the old allocator's // slabs as a matter of correctness. BumpPtrAllocatorImpl(BumpPtrAllocatorImpl &&Old)