diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -3062,6 +3062,9 @@ ~InstructionRemover() override { delete Replacer; } + InstructionRemover &operator=(const InstructionRemover &other) = delete; + InstructionRemover(const InstructionRemover &other) = delete; + /// Resurrect the instruction and reassign it to the proper uses if /// new value was provided when build this action. void undo() override {