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/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 84162ace..eb744d2 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -636,11 +636,12 @@
OutStreamer.EmitCompactUnwindEncoding(MMI->getCompactUnwindEncoding());
MachineModuleInfo &MMI = MF->getMMI();
- std::vector<MachineMove> &Moves = MMI.getFrameMoves();
+ const std::vector<MachineMove> &Moves = MMI.getFrameMoves();
bool FoundOne = false;
(void)FoundOne;
- for (std::vector<MachineMove>::iterator I = Moves.begin(),
- E = Moves.end(); I != E; ++I) {
+ for (std::vector<MachineMove>::const_iterator I = Moves.begin(),
+ E = Moves.end();
+ I != E; ++I) {
if (I->getLabel() == Label) {
EmitCFIFrameMove(*I);
FoundOne = true;