[lldb] Use LLVM's implementation of AppleTables for apple_debug_types
authorFelipe de Azevedo Piovezan <fpiovezan@apple.com>
Tue, 20 Jun 2023 16:21:38 +0000 (12:21 -0400)
committerFelipe de Azevedo Piovezan <fpiovezan@apple.com>
Wed, 28 Jun 2023 13:19:14 +0000 (09:19 -0400)
commite12c701ff0405880045f0330fb6ff94e31ec5c47
treea37aa8c94632ae6c686c69008196d734ef772578
parent98390ccb80569e8fbb20e6c996b4b8cff87fbec6
[lldb] Use LLVM's implementation of AppleTables for apple_debug_types

This commit is replacing really old LLDB code, and we've found some odd
behavior while doing this replacement. While the changes here are largely NFC,
there are some subtle changes that fix such odd behavior.

The most curious example of this is the method `FindCompleteObjCClassName`,
which has a flag `must_be_implementation`. This flag was _only_ being respected
for accelerator tables containing the atom `type_flags`, which seems
counter-intuitive. The implementation for DWARF 5 tables does not do that and
neither does the code introduced in this patch.

There were other weird cases, for example, we found boolean logic that was
always true in a code path: look for a `if  !has_qualified_name...` deleted
line; that condition was true by simple if/else analysis.

Differential Revision: https://reviews.llvm.org/D153867
lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp
lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.h
lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h