diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-08-15 20:21:49 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-08-15 20:21:49 +0000 |
commit | 7d938adacc9a625b09dd1b4c0c0df0247a1b1ed2 (patch) | |
tree | 90d65054e5f1a47f4792e005075882635787a826 | |
parent | a77d9f726a7e3c51f04d1d74d091ae1a87d63544 (diff) | |
download | external_llvm-7d938adacc9a625b09dd1b4c0c0df0247a1b1ed2.zip external_llvm-7d938adacc9a625b09dd1b4c0c0df0247a1b1ed2.tar.gz external_llvm-7d938adacc9a625b09dd1b4c0c0df0247a1b1ed2.tar.bz2 |
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
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index d8a20f8..4d9497a 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -658,11 +658,11 @@ void AsmPrinter::emitPrologLabel(const MachineInstr &MI) { OutStreamer.EmitCompactUnwindEncoding(MMI->getCompactUnwindEncoding()); MachineModuleInfo &MMI = MF->getMMI(); - std::vector<MCCFIInstruction> Instructions = MMI.getFrameInstructions(); + const std::vector<MCCFIInstruction> &Instrs = MMI.getFrameInstructions(); bool FoundOne = false; (void)FoundOne; - for (std::vector<MCCFIInstruction>::iterator I = Instructions.begin(), - E = Instructions.end(); I != E; ++I) { + for (std::vector<MCCFIInstruction>::const_iterator I = Instrs.begin(), + E = Instrs.end(); I != E; ++I) { if (I->getLabel() == Label) { emitCFIInstruction(*I); FoundOne = true; |