summaryrefslogtreecommitdiff
path: root/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
commit7d938adacc9a625b09dd1b4c0c0df0247a1b1ed2 (patch)
tree90d65054e5f1a47f4792e005075882635787a826 /lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parenta77d9f726a7e3c51f04d1d74d091ae1a87d63544 (diff)
downloadllvm-7d938adacc9a625b09dd1b4c0c0df0247a1b1ed2.tar.gz
llvm-7d938adacc9a625b09dd1b4c0c0df0247a1b1ed2.tar.bz2
llvm-7d938adacc9a625b09dd1b4c0c0df0247a1b1ed2.tar.xz
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
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index d8a20f800b..4d9497a96b 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;