aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-01-06 23:03:34 +0000
committerEric Christopher <echristo@apple.com>2012-01-06 23:03:34 +0000
commitfa03db0d2d896a689ac58cb63ec9e1b10af72868 (patch)
tree2900a83e19c8a8adb5b6861939146b989b102134
parent547abbb40bc9d986446fa493b0caae5ed1f346f2 (diff)
downloadexternal_llvm-fa03db0d2d896a689ac58cb63ec9e1b10af72868.zip
external_llvm-fa03db0d2d896a689ac58cb63ec9e1b10af72868.tar.gz
external_llvm-fa03db0d2d896a689ac58cb63ec9e1b10af72868.tar.bz2
Use const vector references instead of a vector copy. Spotted by Devang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147694 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 7e58c30..4e949d4 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1767,7 +1767,7 @@ void DwarfDebug::emitAccelNames() {
for (StringMap<std::vector<DIE*> >::const_iterator
GI = Names.begin(), GE = Names.end(); GI != GE; ++GI) {
const char *Name = GI->getKeyData();
- std::vector<DIE *> Entities = GI->second;
+ const std::vector<DIE *> &Entities = GI->second;
for (std::vector<DIE *>::const_iterator DI = Entities.begin(),
DE = Entities.end(); DI != DE; ++DI)
AT.AddName(Name, (*DI));
@@ -1796,7 +1796,7 @@ void DwarfDebug::emitAccelObjC() {
for (StringMap<std::vector<DIE*> >::const_iterator
GI = Names.begin(), GE = Names.end(); GI != GE; ++GI) {
const char *Name = GI->getKeyData();
- std::vector<DIE *> Entities = GI->second;
+ const std::vector<DIE *> &Entities = GI->second;
for (std::vector<DIE *>::const_iterator DI = Entities.begin(),
DE = Entities.end(); DI != DE; ++DI)
AT.AddName(Name, (*DI));
@@ -1825,7 +1825,7 @@ void DwarfDebug::emitAccelNamespaces() {
for (StringMap<std::vector<DIE*> >::const_iterator
GI = Names.begin(), GE = Names.end(); GI != GE; ++GI) {
const char *Name = GI->getKeyData();
- std::vector<DIE *> Entities = GI->second;
+ const std::vector<DIE *> &Entities = GI->second;
for (std::vector<DIE *>::const_iterator DI = Entities.begin(),
DE = Entities.end(); DI != DE; ++DI)
AT.AddName(Name, (*DI));
@@ -1860,7 +1860,7 @@ void DwarfDebug::emitAccelTypes() {
for (StringMap<std::vector<std::pair<DIE*, unsigned> > >::const_iterator
GI = Names.begin(), GE = Names.end(); GI != GE; ++GI) {
const char *Name = GI->getKeyData();
- std::vector<std::pair<DIE *, unsigned> > Entities = GI->second;
+ const std::vector<std::pair<DIE *, unsigned> > &Entities = GI->second;
for (std::vector<std::pair<DIE *, unsigned> >::const_iterator DI
= Entities.begin(), DE = Entities.end(); DI !=DE; ++DI)
AT.AddName(Name, (*DI).first, (*DI).second);