@@ -452,7 +452,7 @@ void MIRPrinter::convertStackObjects(yaml::MachineFunction &YMF,
452452 YamlObject.IsAliased = MFI.isAliasedObjectIndex (I);
453453 // Save the ID' position in FixedStackObjects storage vector.
454454 FixedStackObjectsIdx[ID] = YMF.FixedStackObjects .size ();
455- YMF.FixedStackObjects .push_back (YamlObject);
455+ YMF.FixedStackObjects .push_back (std::move ( YamlObject) );
456456 StackObjectOperandMapping.insert (
457457 std::make_pair (I, FrameIndexOperand::createFixed (ID)));
458458 }
@@ -506,11 +506,11 @@ void MIRPrinter::convertStackObjects(yaml::MachineFunction &YMF,
506506 auto &Object =
507507 YMF.FixedStackObjects
508508 [FixedStackObjectsIdx[FrameIdx + MFI.getNumFixedObjects ()]];
509- Object.CalleeSavedRegister = Reg;
509+ Object.CalleeSavedRegister = std::move ( Reg) ;
510510 Object.CalleeSavedRestored = CSInfo.isRestored ();
511511 } else {
512512 auto &Object = YMF.StackObjects [StackObjectsIdx[FrameIdx]];
513- Object.CalleeSavedRegister = Reg;
513+ Object.CalleeSavedRegister = std::move ( Reg) ;
514514 Object.CalleeSavedRestored = CSInfo.isRestored ();
515515 }
516516 }
@@ -576,7 +576,7 @@ void MIRPrinter::convertCallSiteObjects(yaml::MachineFunction &YMF,
576576 printRegMIR (ArgReg.Reg , YmlArgReg.Reg , TRI);
577577 YmlCS.ArgForwardingRegs .emplace_back (YmlArgReg);
578578 }
579- YMF.CallSitesInfo .push_back (YmlCS);
579+ YMF.CallSitesInfo .push_back (std::move ( YmlCS) );
580580 }
581581
582582 // Sort call info by position of call instructions.
@@ -597,7 +597,7 @@ void MIRPrinter::convertMachineMetadataNodes(yaml::MachineFunction &YMF,
597597 std::string NS;
598598 raw_string_ostream StrOS (NS);
599599 MD.second ->print (StrOS, MST, MF.getFunction ().getParent ());
600- YMF.MachineMetadataNodes .push_back (NS );
600+ YMF.MachineMetadataNodes .push_back (std::move (NS) );
601601 }
602602}
603603
@@ -612,7 +612,7 @@ void MIRPrinter::convertCalledGlobals(yaml::MachineFunction &YMF,
612612
613613 yaml::CalledGlobal YamlCG{CallSite, CG.Callee ->getName ().str (),
614614 CG.TargetFlags };
615- YMF.CalledGlobals .push_back (YamlCG);
615+ YMF.CalledGlobals .push_back (std::move ( YamlCG) );
616616 }
617617
618618 // Sort by position of call instructions.
@@ -638,11 +638,11 @@ void MIRPrinter::convert(yaml::MachineFunction &MF,
638638
639639 yaml::MachineConstantPoolValue YamlConstant;
640640 YamlConstant.ID = ID++;
641- YamlConstant.Value = Str;
641+ YamlConstant.Value = std::move ( Str) ;
642642 YamlConstant.Alignment = Constant.getAlign ();
643643 YamlConstant.IsTargetSpecific = Constant.isMachineConstantPoolEntry ();
644644
645- MF.Constants .push_back (YamlConstant);
645+ MF.Constants .push_back (std::move ( YamlConstant) );
646646 }
647647}
648648
@@ -661,7 +661,7 @@ void MIRPrinter::convert(ModuleSlotTracker &MST,
661661 Entry.Blocks .push_back (Str);
662662 Str.clear ();
663663 }
664- YamlJTI.Entries .push_back (Entry);
664+ YamlJTI.Entries .push_back (std::move ( Entry) );
665665 }
666666}
667667
0 commit comments