[lldb/DWARF] Simplify DWARFDebugInfoEntry::LookupAddress
authorPavel Labath <pavel@labath.sk>
Fri, 17 Jan 2020 13:58:46 +0000 (14:58 +0100)
committerPavel Labath <pavel@labath.sk>
Mon, 20 Jan 2020 11:39:59 +0000 (12:39 +0100)
commitb7af1bfa6e31a2a896e8a94a7f086914719e7d5d
tree89b178f3551a6a3847d48963f360a20f1d4b04fb
parent8248190a730cd62850afe9bef731ce6726778b4b
[lldb/DWARF] Simplify DWARFDebugInfoEntry::LookupAddress

Summary:
This method was doing a lot more than it's only caller needed
(DWARFDIE::LookupDeepestBlock) needed, so I inline it into the caller,
and remove any code which is not actually used. This includes code for
searching for the deepest function, and the code for working around
incomplete DW_AT_low_pc/high_pc attributes on a compile unit DIE (modern
compiler get this right, and this method is called on function DIEs
anyway).

This also improves our llvm consistency, as llvm::DWARFDebugInfoEntry is
just a very simple struct with no nontrivial logic.

Reviewers: JDevlieghere, aprantl

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D72920
lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h