Implement equal_range for the DWARF v5 accelerator table
authorPavel Labath <labath@google.com>
Sat, 24 Feb 2018 00:35:21 +0000 (00:35 +0000)
committerPavel Labath <labath@google.com>
Sat, 24 Feb 2018 00:35:21 +0000 (00:35 +0000)
commitd99072bc9749874a7885740959e35ac08d99e324
treef89ad4876b7b009ca75439a04cd3a3dd3a44afc3
parentd4e2dabbbb4cf31d4cebb26bf6fefe4b0249bec9
Implement equal_range for the DWARF v5 accelerator table

Summary:
This patch implements the name lookup functionality of the .debug_names
accelerator table and hooks it up to "llvm-dwarfdump -find". To make the
interface of the two kinds of accelerator tables more consistent, I've
created an abstract "DWARFAcceleratorTable::Entry" class, which provides
a consistent interface to access the common functionality of the table
entries (such as getting the die offset, die tag, etc.). I've also
modified the apple table to vend entries conforming to this interface.

Reviewers: JDevlieghere, aprantl, probinson, dblaikie

Subscribers: vleschuk, clayborg, echristo, llvm-commits

Differential Revision: https://reviews.llvm.org/D43067

llvm-svn: 326003
llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
llvm/test/tools/llvm-dwarfdump/X86/debug-names-find.s [new file with mode: 0644]
llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp