Rework adding function names to the dwarf accelerator tables, allow

multiple dies per function and support C++ basenames.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144304 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2011-11-10 19:25:34 +00:00
parent 39fe397421
commit 0ffe2b4dd6
3 changed files with 86 additions and 71 deletions

View File

@ -75,9 +75,15 @@ void DwarfAccelTable::ComputeBucketCount(void) {
void DwarfAccelTable::FinalizeTable(AsmPrinter *Asm, const char *Prefix) {
// Create the individual hash data outputs.
for (StringMap<DIEArray>::const_iterator
for (StringMap<DIEArray>::iterator
EI = Entries.begin(), EE = Entries.end(); EI != EE; ++EI) {
struct HashData *Entry = new HashData((*EI).getKeyData());
// Unique the entries.
std::sort((*EI).second.begin(), (*EI).second.end());
(*EI).second.erase(std::unique((*EI).second.begin(), (*EI).second.end()),
(*EI).second.end());
for (DIEArray::const_iterator DI = (*EI).second.begin(),
DE = (*EI).second.end();
DI != DE; ++DI)