Use a reference instead of making an unnecessary copy. Also use 'const'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188483 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2013-08-15 20:21:49 +00:00
parent a77d9f726a
commit 7d938adacc

View File

@ -658,11 +658,11 @@ void AsmPrinter::emitPrologLabel(const MachineInstr &MI) {
OutStreamer.EmitCompactUnwindEncoding(MMI->getCompactUnwindEncoding()); OutStreamer.EmitCompactUnwindEncoding(MMI->getCompactUnwindEncoding());
MachineModuleInfo &MMI = MF->getMMI(); MachineModuleInfo &MMI = MF->getMMI();
std::vector<MCCFIInstruction> Instructions = MMI.getFrameInstructions(); const std::vector<MCCFIInstruction> &Instrs = MMI.getFrameInstructions();
bool FoundOne = false; bool FoundOne = false;
(void)FoundOne; (void)FoundOne;
for (std::vector<MCCFIInstruction>::iterator I = Instructions.begin(), for (std::vector<MCCFIInstruction>::const_iterator I = Instrs.begin(),
E = Instructions.end(); I != E; ++I) { E = Instrs.end(); I != E; ++I) {
if (I->getLabel() == Label) { if (I->getLabel() == Label) {
emitCFIInstruction(*I); emitCFIInstruction(*I);
FoundOne = true; FoundOne = true;