diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 7e58c3027304..4e949d42ef83 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1767,7 +1767,7 @@ void DwarfDebug::emitAccelNames() { for (StringMap >::const_iterator GI = Names.begin(), GE = Names.end(); GI != GE; ++GI) { const char *Name = GI->getKeyData(); - std::vector Entities = GI->second; + const std::vector &Entities = GI->second; for (std::vector::const_iterator DI = Entities.begin(), DE = Entities.end(); DI != DE; ++DI) AT.AddName(Name, (*DI)); @@ -1796,7 +1796,7 @@ void DwarfDebug::emitAccelObjC() { for (StringMap >::const_iterator GI = Names.begin(), GE = Names.end(); GI != GE; ++GI) { const char *Name = GI->getKeyData(); - std::vector Entities = GI->second; + const std::vector &Entities = GI->second; for (std::vector::const_iterator DI = Entities.begin(), DE = Entities.end(); DI != DE; ++DI) AT.AddName(Name, (*DI)); @@ -1825,7 +1825,7 @@ void DwarfDebug::emitAccelNamespaces() { for (StringMap >::const_iterator GI = Names.begin(), GE = Names.end(); GI != GE; ++GI) { const char *Name = GI->getKeyData(); - std::vector Entities = GI->second; + const std::vector &Entities = GI->second; for (std::vector::const_iterator DI = Entities.begin(), DE = Entities.end(); DI != DE; ++DI) AT.AddName(Name, (*DI)); @@ -1860,7 +1860,7 @@ void DwarfDebug::emitAccelTypes() { for (StringMap > >::const_iterator GI = Names.begin(), GE = Names.end(); GI != GE; ++GI) { const char *Name = GI->getKeyData(); - std::vector > Entities = GI->second; + const std::vector > &Entities = GI->second; for (std::vector >::const_iterator DI = Entities.begin(), DE = Entities.end(); DI !=DE; ++DI) AT.AddName(Name, (*DI).first, (*DI).second);