diff --git a/llvm/include/llvm/SYCLLowerIR/ESIMD/ESIMDUtils.h b/llvm/include/llvm/SYCLLowerIR/ESIMD/ESIMDUtils.h index a1336b22ffd47..9066df0d96fd7 100644 --- a/llvm/include/llvm/SYCLLowerIR/ESIMD/ESIMDUtils.h +++ b/llvm/include/llvm/SYCLLowerIR/ESIMD/ESIMDUtils.h @@ -61,6 +61,7 @@ Type *getVectorTyOrNull(StructType *STy); class SimpleAllocator { protected: SmallVector Ptrs; + SimpleAllocator &operator=(const SimpleAllocator &) = delete; public: void reset() { @@ -84,6 +85,10 @@ class SimpleAllocator { return Ptr; } + SimpleAllocator() = default; + SimpleAllocator(const SimpleAllocator &) : SimpleAllocator() { + assert(false && "Unreachable"); + } ~SimpleAllocator() { reset(); } };