diff options
author | Michael Buch <michaelbuch12@gmail.com> | 2025-01-17 14:11:05 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-17 14:11:05 +0000 |
commit | dc1ef2cc1aa2de7ef6830419de37ad93eb74d34a (patch) | |
tree | 76684c1ed86369f81f0494f6b7d89d7a57253bf7 /llvm/unittests/ADT/DAGDeltaAlgorithmTest.cpp | |
parent | 7629e01479bb1ec8b7279ec7515b3bba7e6c9e31 (diff) | |
download | llvm-dc1ef2cc1aa2de7ef6830419de37ad93eb74d34a.zip llvm-dc1ef2cc1aa2de7ef6830419de37ad93eb74d34a.tar.gz llvm-dc1ef2cc1aa2de7ef6830419de37ad93eb74d34a.tar.bz2 |
[lldb][DWARFASTParserClang] Don't overwrite DW_AT_object_pointer of definition with that of a declaration (#123089)
In https://github.com/llvm/llvm-project/pull/122742 we will start
attaching DW_AT_object_pointer to method declarations (in addition to
definitions).
Currently when LLDB parses a `DW_TAG_subprogram` definition, it will
parse all the attributes of the declaration as well. If we have
`DW_AT_object_pointer` on both, then we would overwrite the more
specific attribute that we got from the defintion with the one from the
specification. This is problematic because LLDB relies on getting the
`DW_AT_name` from the `DW_AT_object_pointer`, which doesn't exist on the
specification.
Note GCC does attach `DW_AT_object_pointer` on declarations *and*
definitions already (see https://godbolt.org/z/G1GvddY48), so there's
definitely some expressions that will fail for GCC compiled binaries.
This patch will fix those cases (e.g., I would expect `TestConstThis.py`
to fail with GCC).
Diffstat (limited to 'llvm/unittests/ADT/DAGDeltaAlgorithmTest.cpp')
0 files changed, 0 insertions, 0 deletions