Change getFrameMoves to return a const reference.

To add a frame now there is a dedicated addFrameMove which also takes
care of constructing the move itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181657 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/AArch64/AArch64FrameLowering.cpp b/lib/Target/AArch64/AArch64FrameLowering.cpp
index daa7f1d..0474aaf 100644
--- a/lib/Target/AArch64/AArch64FrameLowering.cpp
+++ b/lib/Target/AArch64/AArch64FrameLowering.cpp
@@ -54,7 +54,6 @@
   DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
 
   MachineModuleInfo &MMI = MF.getMMI();
-  std::vector<MachineMove> &Moves = MMI.getFrameMoves();
   bool NeedsFrameMoves = MMI.hasDebugInfo()
     || MF.getFunction()->needsUnwindTableEntry();
 
@@ -98,7 +97,7 @@
 
     MachineLocation Dst(MachineLocation::VirtualFP);
     MachineLocation Src(AArch64::XSP, NumInitialBytes);
-    Moves.push_back(MachineMove(SPLabel, Dst, Src));
+    MMI.addFrameMove(SPLabel, Dst, Src);
   }
 
   // Otherwise we need to set the frame pointer and/or add a second stack
@@ -133,7 +132,7 @@
           .addSym(FPLabel);
         MachineLocation Dst(MachineLocation::VirtualFP);
         MachineLocation Src(AArch64::X29, -MFI->getObjectOffset(X29FrameIdx));
-        Moves.push_back(MachineMove(FPLabel, Dst, Src));
+        MMI.addFrameMove(FPLabel, Dst, Src);
       }
 
       FPNeedsSetting = false;
@@ -165,7 +164,7 @@
 
     MachineLocation Dst(MachineLocation::VirtualFP);
     MachineLocation Src(AArch64::XSP, NumResidualBytes + NumInitialBytes);
-    Moves.push_back(MachineMove(CSLabel, Dst, Src));
+    MMI.addFrameMove(CSLabel, Dst, Src);
   }
 
   // And any callee-saved registers (it's fine to leave them to the end here,
@@ -183,7 +182,7 @@
       MachineLocation Dst(MachineLocation::VirtualFP,
                           MFI->getObjectOffset(I->getFrameIdx()));
       MachineLocation Src(I->getReg());
-      Moves.push_back(MachineMove(CSLabel, Dst, Src));
+      MMI.addFrameMove(CSLabel, Dst, Src);
     }
   }
 }