diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-04-23 23:46:25 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-04-23 23:46:25 +0000 |
commit | 23615f8f5c9df2ac2c6df08750753174e8560c2e (patch) | |
tree | e3045f98426ca7c61f2499a1fd3550867c319c24 /lib/CodeGen | |
parent | b8ebb28c65f6d8040cecdc448226f34c8f7cd689 (diff) | |
download | llvm-23615f8f5c9df2ac2c6df08750753174e8560c2e.tar.gz llvm-23615f8f5c9df2ac2c6df08750753174e8560c2e.tar.bz2 llvm-23615f8f5c9df2ac2c6df08750753174e8560c2e.tar.xz |
And actually use the DwarfDebug::AccelNames to emit the names.
Fix for r207049 which would've emitted no accelerated names at all...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207051 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 14 | ||||
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfUnit.h | 6 |
2 files changed, 2 insertions, 18 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index af771f6a82..b4ae7c517f 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1858,24 +1858,14 @@ void DwarfDebug::emitEndOfLineMatrix(unsigned SectionEnd) { // Emit visible names into a hashed accelerator table section. void DwarfDebug::emitAccelNames() { - DwarfAccelTable AT( - DwarfAccelTable::Atom(dwarf::DW_ATOM_die_offset, dwarf::DW_FORM_data4)); - for (const auto &TheU : getUnits()) { - for (const auto &GI : TheU->getAccelNames()) { - StringRef Name = GI.getKey(); - for (const DIE *D : GI.second) - AT.AddName(Name, D); - } - } - - AT.FinalizeTable(Asm, "Names"); + AccelNames.FinalizeTable(Asm, "Names"); Asm->OutStreamer.SwitchSection( Asm->getObjFileLowering().getDwarfAccelNamesSection()); MCSymbol *SectionBegin = Asm->GetTempSymbol("names_begin"); Asm->OutStreamer.EmitLabel(SectionBegin); // Emit the full data. - AT.Emit(Asm, SectionBegin, &InfoHolder); + AccelNames.Emit(Asm, SectionBegin, &InfoHolder); } // Emit objective C classes and categories into a hashed accelerator table diff --git a/lib/CodeGen/AsmPrinter/DwarfUnit.h b/lib/CodeGen/AsmPrinter/DwarfUnit.h index d7086acd30..053bc334a9 100644 --- a/lib/CodeGen/AsmPrinter/DwarfUnit.h +++ b/lib/CodeGen/AsmPrinter/DwarfUnit.h @@ -102,9 +102,6 @@ protected: /// GlobalTypes - A map of globally visible types for this unit. StringMap<const DIE *> GlobalTypes; - /// AccelNames - A map of names for the name accelerator table. - StringMap<std::vector<const DIE *> > AccelNames; - /// AccelObjC - A map of objc spec for the objc accelerator table. StringMap<std::vector<const DIE *> > AccelObjC; @@ -231,9 +228,6 @@ public: const StringMap<const DIE *> &getGlobalNames() const { return GlobalNames; } const StringMap<const DIE *> &getGlobalTypes() const { return GlobalTypes; } - const StringMap<std::vector<const DIE *> > &getAccelNames() const { - return AccelNames; - } const StringMap<std::vector<const DIE *> > &getAccelObjC() const { return AccelObjC; } |