diff options
author | Eric Christopher <echristo@apple.com> | 2012-01-06 04:35:23 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-01-06 04:35:23 +0000 |
commit | c36145f19c1e164f7d630b813e9970600d8f2976 (patch) | |
tree | 4fecb1e41d03e3621ef56ccba6182f17c712fc38 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 3b205175ea417349ab96f3525d730e005e12c0f9 (diff) |
As part of the ongoing work in finalizing the accelerator tables, extend
the debug type accelerator tables to contain the tag and a flag
stating whether or not a compound type is a complete type.
rdar://10652330
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147651 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 94ce04a92d..7e58c30273 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1844,19 +1844,26 @@ void DwarfDebug::emitAccelNamespaces() { /// emitAccelTypes() - Emit type dies into a hashed accelerator table. void DwarfDebug::emitAccelTypes() { - DwarfAccelTable AT(DwarfAccelTable::Atom(DwarfAccelTable::eAtomTypeDIEOffset, - dwarf::DW_FORM_data4)); + std::vector<DwarfAccelTable::Atom> Atoms; + Atoms.push_back(DwarfAccelTable::Atom(DwarfAccelTable::eAtomTypeDIEOffset, + dwarf::DW_FORM_data4)); + Atoms.push_back(DwarfAccelTable::Atom(DwarfAccelTable::eAtomTypeTag, + dwarf::DW_FORM_data2)); + Atoms.push_back(DwarfAccelTable::Atom(DwarfAccelTable::eAtomTypeTypeFlags, + dwarf::DW_FORM_data1)); + DwarfAccelTable AT(Atoms); for (DenseMap<const MDNode *, CompileUnit *>::iterator I = CUMap.begin(), E = CUMap.end(); I != E; ++I) { CompileUnit *TheCU = I->second; - const StringMap<std::vector<DIE*> > &Names = TheCU->getAccelTypes(); - for (StringMap<std::vector<DIE*> >::const_iterator + const StringMap<std::vector<std::pair<DIE*, unsigned > > > &Names + = TheCU->getAccelTypes(); + 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<DIE *> Entities = GI->second; - for (std::vector<DIE *>::const_iterator DI = Entities.begin(), - DE= Entities.end(); DI !=DE; ++DI) - AT.AddName(Name, (*DI)); + 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); } } |