[llvm] r188483 - Use a reference instead of making an unnecessary copy. Also use 'const'.
Bill Wendling
isanbard at gmail.com
Thu Aug 15 13:21:49 PDT 2013
Author: void
Date: Thu Aug 15 15:21:49 2013
New Revision: 188483
URL: http://llvm.org/viewvc/llvm-project?rev=188483&view=rev
Log:
Use a reference instead of making an unnecessary copy. Also use 'const'.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=188483&r1=188482&r2=188483&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Thu Aug 15 15:21:49 2013
@@ -658,11 +658,11 @@ void AsmPrinter::emitPrologLabel(const M
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;
More information about the llvm-commits
mailing list