@@ -452,7 +452,7 @@ void MIRPrinter::convertStackObjects(yaml::MachineFunction &YMF,
452
452
YamlObject.IsAliased = MFI.isAliasedObjectIndex (I);
453
453
// Save the ID' position in FixedStackObjects storage vector.
454
454
FixedStackObjectsIdx[ID] = YMF.FixedStackObjects .size ();
455
- YMF.FixedStackObjects .push_back (YamlObject);
455
+ YMF.FixedStackObjects .push_back (std::move ( YamlObject) );
456
456
StackObjectOperandMapping.insert (
457
457
std::make_pair (I, FrameIndexOperand::createFixed (ID)));
458
458
}
@@ -506,11 +506,11 @@ void MIRPrinter::convertStackObjects(yaml::MachineFunction &YMF,
506
506
auto &Object =
507
507
YMF.FixedStackObjects
508
508
[FixedStackObjectsIdx[FrameIdx + MFI.getNumFixedObjects ()]];
509
- Object.CalleeSavedRegister = Reg;
509
+ Object.CalleeSavedRegister = std::move ( Reg) ;
510
510
Object.CalleeSavedRestored = CSInfo.isRestored ();
511
511
} else {
512
512
auto &Object = YMF.StackObjects [StackObjectsIdx[FrameIdx]];
513
- Object.CalleeSavedRegister = Reg;
513
+ Object.CalleeSavedRegister = std::move ( Reg) ;
514
514
Object.CalleeSavedRestored = CSInfo.isRestored ();
515
515
}
516
516
}
@@ -576,7 +576,7 @@ void MIRPrinter::convertCallSiteObjects(yaml::MachineFunction &YMF,
576
576
printRegMIR (ArgReg.Reg , YmlArgReg.Reg , TRI);
577
577
YmlCS.ArgForwardingRegs .emplace_back (YmlArgReg);
578
578
}
579
- YMF.CallSitesInfo .push_back (YmlCS);
579
+ YMF.CallSitesInfo .push_back (std::move ( YmlCS) );
580
580
}
581
581
582
582
// Sort call info by position of call instructions.
@@ -597,7 +597,7 @@ void MIRPrinter::convertMachineMetadataNodes(yaml::MachineFunction &YMF,
597
597
std::string NS;
598
598
raw_string_ostream StrOS (NS);
599
599
MD.second ->print (StrOS, MST, MF.getFunction ().getParent ());
600
- YMF.MachineMetadataNodes .push_back (NS );
600
+ YMF.MachineMetadataNodes .push_back (std::move (NS) );
601
601
}
602
602
}
603
603
@@ -612,7 +612,7 @@ void MIRPrinter::convertCalledGlobals(yaml::MachineFunction &YMF,
612
612
613
613
yaml::CalledGlobal YamlCG{CallSite, CG.Callee ->getName ().str (),
614
614
CG.TargetFlags };
615
- YMF.CalledGlobals .push_back (YamlCG);
615
+ YMF.CalledGlobals .push_back (std::move ( YamlCG) );
616
616
}
617
617
618
618
// Sort by position of call instructions.
@@ -638,11 +638,11 @@ void MIRPrinter::convert(yaml::MachineFunction &MF,
638
638
639
639
yaml::MachineConstantPoolValue YamlConstant;
640
640
YamlConstant.ID = ID++;
641
- YamlConstant.Value = Str;
641
+ YamlConstant.Value = std::move ( Str) ;
642
642
YamlConstant.Alignment = Constant.getAlign ();
643
643
YamlConstant.IsTargetSpecific = Constant.isMachineConstantPoolEntry ();
644
644
645
- MF.Constants .push_back (YamlConstant);
645
+ MF.Constants .push_back (std::move ( YamlConstant) );
646
646
}
647
647
}
648
648
@@ -661,7 +661,7 @@ void MIRPrinter::convert(ModuleSlotTracker &MST,
661
661
Entry.Blocks .push_back (Str);
662
662
Str.clear ();
663
663
}
664
- YamlJTI.Entries .push_back (Entry);
664
+ YamlJTI.Entries .push_back (std::move ( Entry) );
665
665
}
666
666
}
667
667
0 commit comments