diff options
author | Eric Christopher <echristo@apple.com> | 2012-01-06 23:03:34 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-01-06 23:03:34 +0000 |
commit | fa03db0d2d896a689ac58cb63ec9e1b10af72868 (patch) | |
tree | 2900a83e19c8a8adb5b6861939146b989b102134 | |
parent | 547abbb40bc9d986446fa493b0caae5ed1f346f2 (diff) | |
download | external_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.cpp | 8 |
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); |