diff options
author | Eric Christopher <echristo@apple.com> | 2011-11-10 21:47:55 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-11-10 21:47:55 +0000 |
commit | 8bd36eafca6992754006cbace5ba471884631d08 (patch) | |
tree | e05992add7e46c83ca8fdcf4698b4c61158a5f91 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 169698095dcdd09d9e9fd27d9a788477ee182b4d (diff) | |
download | external_llvm-8bd36eafca6992754006cbace5ba471884631d08.zip external_llvm-8bd36eafca6992754006cbace5ba471884631d08.tar.gz external_llvm-8bd36eafca6992754006cbace5ba471884631d08.tar.bz2 |
Make types and namespaces take multiple DIEs for the accelerator tables
as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144319 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 3ca2318..5d05a3c 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1823,12 +1823,14 @@ void DwarfDebug::emitAccelNamespaces() { for (DenseMap<const MDNode *, CompileUnit *>::iterator I = CUMap.begin(), E = CUMap.end(); I != E; ++I) { CompileUnit *TheCU = I->second; - const StringMap<DIE*> &Names = TheCU->getAccelNamespace(); - for (StringMap<DIE*>::const_iterator + const StringMap<std::vector<DIE*> > &Names = TheCU->getAccelNamespace(); + for (StringMap<std::vector<DIE*> >::const_iterator GI = Names.begin(), GE = Names.end(); GI != GE; ++GI) { const char *Name = GI->getKeyData(); - DIE *Entity = GI->second; - AT.AddName(Name, Entity); + 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)); } } @@ -1849,12 +1851,14 @@ void DwarfDebug::emitAccelTypes() { for (DenseMap<const MDNode *, CompileUnit *>::iterator I = CUMap.begin(), E = CUMap.end(); I != E; ++I) { CompileUnit *TheCU = I->second; - const StringMap<DIE*> &Names = TheCU->getAccelTypes(); - for (StringMap<DIE*>::const_iterator + const StringMap<std::vector<DIE*> > &Names = TheCU->getAccelTypes(); + for (StringMap<std::vector<DIE*> >::const_iterator GI = Names.begin(), GE = Names.end(); GI != GE; ++GI) { const char *Name = GI->getKeyData(); - DIE *Entity = GI->second; - AT.AddName(Name, Entity); + 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)); } } |