This patch allows llvm-dwarfutil to utilize accelerator tables
authorAlexey Lapshin <a.v.lapshin@mail.ru>
Sun, 15 Jan 2023 21:31:35 +0000 (22:31 +0100)
committerAlexey Lapshin <a.v.lapshin@mail.ru>
Mon, 16 Jan 2023 13:42:30 +0000 (14:42 +0100)
commit2216ee4909f01d6547fd3bda978c00b2c587ff2f
treeaefa90c53fd7c04a864f60195f724085106f4fbb
parent8a0e0c226018a77ea148e128c97c2592e6f25416
This patch allows llvm-dwarfutil to utilize accelerator tables
generation code from DWARFLinker. It adds command line option:

--build-accelerator [none,DWARF]
                        Build accelerator tables(default: none)
  =none - Do not build accelerators
  =DWARF - Build accelerator tables according to the resulting DWARF version
       DWARFv4: .debug_pubnames and .debug_pubtypes
       DWARFv5: .debug_names

Differential Revision: https://reviews.llvm.org/D139638
23 files changed:
llvm/include/llvm/CodeGen/AsmPrinter.h
llvm/include/llvm/DWARFLinker/DWARFLinker.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
llvm/lib/CodeGen/AsmPrinter/DIE.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/lib/DWARFLinker/DWARFLinker.cpp
llvm/lib/DWARFLinker/DWARFStreamer.cpp
llvm/test/tools/llvm-dwarfutil/ELF/X86/Inputs/dwarf5.out [new file with mode: 0755]
llvm/test/tools/llvm-dwarfutil/ELF/X86/accelerator-dwarf4.test [new file with mode: 0644]
llvm/test/tools/llvm-dwarfutil/ELF/X86/accelerator-dwarf5.test [new file with mode: 0644]
llvm/test/tools/llvm-dwarfutil/ELF/X86/dwarf4-macro.test
llvm/test/tools/llvm-dwarfutil/ELF/X86/dwarf5-macro.test
llvm/test/tools/llvm-dwarfutil/ELF/X86/verbose.test
llvm/test/tools/llvm-dwarfutil/ELF/X86/warning-pubnames.test [moved from llvm/test/tools/llvm-dwarfutil/ELF/X86/warning-skipped-pubnames.test with 67% similarity]
llvm/test/tools/llvm-dwarfutil/ELF/X86/warning-pubtypes.test [moved from llvm/test/tools/llvm-dwarfutil/ELF/X86/warning-skipped-pubtypes.test with 67% similarity]
llvm/test/tools/llvm-dwarfutil/ELF/X86/warning-skipped-names.test [deleted file]
llvm/tools/llvm-dwarfutil/DebugInfoLinker.cpp
llvm/tools/llvm-dwarfutil/Options.h
llvm/tools/llvm-dwarfutil/Options.td
llvm/tools/llvm-dwarfutil/llvm-dwarfutil.cpp
llvm/unittests/CodeGen/TestAsmPrinter.cpp