Skip to content

Commit 93fb018

Browse files
authored
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.
1 parent ac0fc8e commit 93fb018

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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)