diff options
| author | David Blaikie <dblaikie@gmail.com> | 2019-04-22 22:45:11 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2019-04-22 22:45:11 +0000 |
| commit | 68602ab2f3535291753a6149d1f445c5fd416152 (patch) | |
| tree | 004cdbf51128ff617fcb3ccace9b8674147c6094 /llvm/lib/CodeGen | |
| parent | bf8aacb7151cf3ed569c4907c934c45244f6914f (diff) | |
| download | bcm5719-llvm-68602ab2f3535291753a6149d1f445c5fd416152.tar.gz bcm5719-llvm-68602ab2f3535291753a6149d1f445c5fd416152.zip | |
DebugInfo: Emit only one kind of accelerated access/name table
Currently to opt in to debug_names in DWARFv5, the IR must contain
'nameTableKind: Default' which also enables debug_pubnames.
Instead, only allow one of {debug_names, apple_names, debug_pubnames,
debug_gnu_pubnames}.
nameTableKind: Default gives debug_names in DWARFv5 and greater,
debug_pubnames in v4 and earlier - and apple_names when tuning for lldb
on MachO.
nameTableKind: GNU always gives gnu_pubnames
llvm-svn: 358931
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp b/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp index 2de473b57a3..16286ea8bf3 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp @@ -556,8 +556,8 @@ void llvm::emitDWARF5AccelTable( SmallVector<unsigned, 1> CUIndex(CUs.size()); int Count = 0; for (const auto &CU : enumerate(CUs)) { - if (CU.value()->getCUNode()->getNameTableKind() == - DICompileUnit::DebugNameTableKind::None) + if (CU.value()->getCUNode()->getNameTableKind() != + DICompileUnit::DebugNameTableKind::Default) continue; CUIndex[CU.index()] = Count++; assert(CU.index() == CU.value()->getUniqueID()); diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index c1e8ffec75a..0a06dfdae06 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -1036,7 +1036,9 @@ bool DwarfCompileUnit::hasDwarfPubSections() const { return true; case DICompileUnit::DebugNameTableKind::Default: return DD->tuneForGDB() && !includeMinimalInlineScopes() && - !CUNode->isDebugDirectivesOnly(); + !CUNode->isDebugDirectivesOnly() && + DD->getAccelTableKind() != AccelTableKind::Apple && + DD->getDwarfVersion() < 5; } llvm_unreachable("Unhandled DICompileUnit::DebugNameTableKind enum"); } diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index c0b0d0c9273..f94215bb47d 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2765,6 +2765,9 @@ void DwarfDebug::addAccelNameImpl(const DICompileUnit &CU, CU.getNameTableKind() == DICompileUnit::DebugNameTableKind::None) return; + if (CU.getNameTableKind() == DICompileUnit::DebugNameTableKind::GNU) + return; + DwarfFile &Holder = useSplitDwarf() ? SkeletonHolder : InfoHolder; DwarfStringPoolEntryRef Ref = Holder.getStringPool().getEntry(*Asm, Name); |

