llvm-project/lldb
Raphael Isemann 12a89e14b8 [lldb][NFCI] Remove redundant accessibility heuristic in the DWARF parser
LLDB's DWARF parser has some heuristics for guessing and fixing up the
accessibility of C++ class/struct members after they were already created in the
internal Clang AST. The heuristic is that if a struct/class has a base class,
then it's actually a class and it's members are private unless otherwise
specified.

From what I can see this heuristic isn't sound and also unnecessary. The idea
that inheritance implies that the `class` keyword was used and the default
visibility is `private` is incorrect. Also both GCC and Clang use
`DW_TAG_structure_type` and `DW_TAG_class_type` for `struct` and `class` types
respectively, so the default visibility we infer from that information is always
correct and there is no need to fix it up.

And finally, the access specifiers we set in the Clang AST are anyway unused
within LLDB. The expression parser explicitly ignores them to give users access
to private members and there is not SBAPI functionality that exposes this
information.

This patch removes all the heuristic code for the reasons above and instead
just relies on the access values we infer from the tag kind and explicit
annotations in DWARF.

This patch is NFCI.

Reviewed By: werat

Differential Revision: https://reviews.llvm.org/D105463
2021-07-22 13:36:23 +02:00
..
bindings [lldb] Add AllocateMemory/DeallocateMemory to the SBProcess API 2021-07-16 00:45:22 +02:00
cmake [lldb] add LLDB_SKIP_DSYM option 2021-05-26 09:32:59 -07:00
docs [intel pt] Add TSC timestamps 2021-07-20 16:29:17 -07:00
examples [lldb] Update shebang in heap.py and crashlog.py 2021-07-02 15:33:57 -07:00
include/lldb Read and write a LC_NOTE "addrable bits" for addressing mask 2021-07-22 01:06:44 -07:00
packages/Python [intel pt] Add TSC timestamps 2021-07-20 16:29:17 -07:00
resources [lldb] Remove stale LLDB-Info.plist 2021-01-08 10:12:16 -08:00
scripts Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00
source [lldb][NFCI] Remove redundant accessibility heuristic in the DWARF parser 2021-07-22 13:36:23 +02:00
test [lldb] Generalize empty record size computation to avoid giving empty C++ structs a size of 0 2021-07-22 13:30:48 +02:00
third_party/Python/module Revert "[lldb] temporary commit to see why a test is failing only on lldb-aarch64-ubuntu" 2020-08-05 11:55:02 +02:00
tools Remove the DarwinLog functionality from debguserver 2021-07-20 00:36:56 -07:00
unittests [lldb][AArch64] Add tag packing and repetition memory tag manager 2021-07-16 14:21:38 +01:00
utils [lldb] Match test dependencies name to other LLVM projects. 2021-05-21 00:10:27 -07:00
.clang-format
.clang-tidy [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
.gitignore
CMakeLists.txt [LLDB] Don't use the local python to set a default for LLDB_PYTHON_RELATIVE_PATH when cross compiling. 2021-05-11 14:04:41 +03:00
CODE_OWNERS.txt
LICENSE.TXT
use_lldb_suite_root.py