summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-08-15 20:21:49 +0000
committerBill Wendling <isanbard@gmail.com>2013-08-15 20:21:49 +0000
commit2d092f05b4c08c8f39e16356e54341c877faa271 (patch)
tree8e5bd39bbc0fa61160265ed0ab093c816733205c /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parent4e7ef80e68f9d3a984b354e152eabe71be9b6b44 (diff)
downloadbcm5719-llvm-2d092f05b4c08c8f39e16356e54341c877faa271.tar.gz
bcm5719-llvm-2d092f05b4c08c8f39e16356e54341c877faa271.zip
Use a reference instead of making an unnecessary copy. Also use 'const'.
llvm-svn: 188483
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index d8a20f800b9..4d9497a96bd 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud