Skip to content

Commit

Permalink
Make LLVMToSPIRVBase comply with Rule of Five. (#2860)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
maarquitos14 authored Nov 14, 2024
1 parent ac0fc8e commit 93fb018
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/SPIRV/SPIRVWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ namespace SPIRV {
class LLVMToSPIRVBase : protected BuiltinCallHelper {
public:
LLVMToSPIRVBase(SPIRVModule *SMod);
LLVMToSPIRVBase(const LLVMToSPIRVBase &Other) = delete;
LLVMToSPIRVBase &operator=(const LLVMToSPIRVBase &Other) = delete;
LLVMToSPIRVBase(LLVMToSPIRVBase &&Other) = delete;
LLVMToSPIRVBase &operator=(LLVMToSPIRVBase &&Other) = delete;
bool runLLVMToSPIRV(Module &Mod);

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

0 comments on commit 93fb018

Please sign in to comment.