Skip to content

Commit 9e00405

Browse files
[CodeGen][X86] Remove Expensive option copy and delete copy assignment (#85187)
Remove Expensive option copy and delete copy assignment
1 parent 6f3f659 commit 9e00405

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

llvm/include/llvm/CodeGen/MachinePassManager.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ template <typename PassT> struct MachinePassModel : MachinePassConcept {
7272
return *this;
7373
}
7474

75+
MachinePassModel &operator=(const MachinePassModel &) = delete;
7576
PreservedAnalyses run(MachineFunction &IR,
7677
MachineFunctionAnalysisManager &AM) override {
7778
return Pass.run(IR, AM);

llvm/include/llvm/Target/TargetMachine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ class LLVMTargetMachine : public TargetMachine {
455455

456456
virtual Error buildCodeGenPipeline(ModulePassManager &, raw_pwrite_stream &,
457457
raw_pwrite_stream *, CodeGenFileType,
458-
CGPassBuilderOption,
458+
const CGPassBuilderOption &,
459459
PassInstrumentationCallbacks *) {
460460
return make_error<StringError>("buildCodeGenPipeline is not overridden",
461461
inconvertibleErrorCode());

llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Error X86CodeGenPassBuilder::addInstSelector(AddMachinePass &) const {
4848

4949
Error X86TargetMachine::buildCodeGenPipeline(
5050
ModulePassManager &MPM, raw_pwrite_stream &Out, raw_pwrite_stream *DwoOut,
51-
CodeGenFileType FileType, CGPassBuilderOption Opt,
51+
CodeGenFileType FileType, const CGPassBuilderOption &Opt,
5252
PassInstrumentationCallbacks *PIC) {
5353
auto CGPB = X86CodeGenPassBuilder(*this, Opt, PIC);
5454
return CGPB.buildPipeline(MPM, Out, DwoOut, FileType);

llvm/lib/Target/X86/X86TargetMachine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class X86TargetMachine final : public LLVMTargetMachine {
6060

6161
Error buildCodeGenPipeline(ModulePassManager &, raw_pwrite_stream &,
6262
raw_pwrite_stream *, CodeGenFileType,
63-
CGPassBuilderOption,
63+
const CGPassBuilderOption &,
6464
PassInstrumentationCallbacks *) override;
6565

6666
bool isJIT() const { return IsJIT; }

0 commit comments

Comments
 (0)