From 2f51176223f19dde7fd90e97c203649aefb35310 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 23 Apr 2019 19:00:45 +0000 Subject: Reapply: "DebugInfo: Emit only one kind of accelerated access/name table"" Originally committed in r358931 Reverted in r358997 Seems this change made Apple accelerator tables miss names (because names started respecting the CU NameTableKind GNU & assuming that shouldn't produce accelerated names too), which is never correct (apple accelerator tables don't have separators or CU lists - if present, they must describe all names in all CUs). Original Description: 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: 359026 --- llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp b/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp index c4eef7ad722..b5617f46ddd 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp @@ -555,8 +555,8 @@ void llvm::emitDWARF5AccelTable( SmallVector 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()); -- cgit v1.2.3