Reapply: "DebugInfo: Emit only one kind of accelerated access/name table""
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 23 Apr 2019 19:00:45 +0000 (19:00 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 23 Apr 2019 19:00:45 +0000 (19:00 +0000)
commit2f51176223f19dde7fd90e97c203649aefb35310
tree44b2e8406a827ac26a78699d0eada5e1376be88f
parent867bc3951bff977f930ca2451e9d1d3548587522
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
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/test/DebugInfo/X86/accel-tables.ll
llvm/test/DebugInfo/X86/gnu-names.ll [new file with mode: 0644]