Skip to content

Commit 5a08891

Browse files
maarquitos14jsji
authored andcommitted
Make LLVMToSPIRVBase comply with Rule of Five. (#2860)
LLVMToSPIRVBase had a custom destructor, but no copy constructor, no move constructor, no move assignment operator, and no copy assignment operator, so it was not complying with the Rule of Five. Explicitly add them as deleted to comply. Original commit: KhronosGroup/SPIRV-LLVM-Translator@93fb018aa342da1
1 parent ad9ea64 commit 5a08891

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm-spirv/lib/SPIRV/SPIRVWriter.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ namespace SPIRV {
7272
class LLVMToSPIRVBase : protected BuiltinCallHelper {
7373
public:
7474
LLVMToSPIRVBase(SPIRVModule *SMod);
75+
LLVMToSPIRVBase(const LLVMToSPIRVBase &Other) = delete;
76+
LLVMToSPIRVBase &operator=(const LLVMToSPIRVBase &Other) = delete;
77+
LLVMToSPIRVBase(LLVMToSPIRVBase &&Other) = delete;
78+
LLVMToSPIRVBase &operator=(LLVMToSPIRVBase &&Other) = delete;
7579
bool runLLVMToSPIRV(Module &Mod);
7680

7781
// This enum sets the mode used to translate the value which is

0 commit comments

Comments
 (0)