[DWARF] Use DWARFDataExtractor::getInitialLength to parse debug_names
authorPavel Labath <pavel@labath.sk>
Tue, 25 Feb 2020 14:40:49 +0000 (15:40 +0100)
committerPavel Labath <pavel@labath.sk>
Mon, 2 Mar 2020 10:21:23 +0000 (11:21 +0100)
commitdba683ccbe994911c2d7ab65e6cb5b2caae10fb0
treea7b8719dab393e2bef8db82c5f05a6136083b3e0
parent164e2c85123044ac4ec3f026282c871b101f95a4
[DWARF] Use DWARFDataExtractor::getInitialLength to parse debug_names

Summary:
In this patch I've done a slightly bigger rewrite to also remove the
hardcoded header lengths.

Reviewers: jhenderson, dblaikie, ikudrin

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75119
llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
llvm/test/tools/llvm-dwarfdump/X86/debug-names-verify-short1.s
llvm/test/tools/llvm-dwarfdump/X86/debug-names-verify-short2.s
llvm/unittests/DebugInfo/DWARF/DWARFAcceleratorTableTest.cpp