[all-commits] [llvm/llvm-project] ae7fe6: [lldb/DWARF] Fix linking direction in CopyUniqueCl...
Pavel Labath via All-commits
all-commits at lists.llvm.org
Mon May 9 02:53:30 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ae7fe65cf65dd4f71e117dee868965c152d27542
https://github.com/llvm/llvm-project/commit/ae7fe65cf65dd4f71e117dee868965c152d27542
Author: Pavel Labath <pavel at labath.sk>
Date: 2022-05-09 (Mon, 09 May 2022)
Changed paths:
M lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
A lldb/test/API/lang/cpp/incomplete-types/members/Makefile
A lldb/test/API/lang/cpp/incomplete-types/members/TestCppIncompleteTypeMembers.py
A lldb/test/API/lang/cpp/incomplete-types/members/a.h
A lldb/test/API/lang/cpp/incomplete-types/members/f.cpp
A lldb/test/API/lang/cpp/incomplete-types/members/g.cpp
A lldb/test/API/lang/cpp/incomplete-types/members/main.cpp
Log Message:
-----------
[lldb/DWARF] Fix linking direction in CopyUniqueClassMethodTypes
IIUC, the purpose of CopyUniqueClassMethodTypes is to link together
class definitions in two compile units so that we only have a single
definition of a class. It does this by adding entries to the die_to_type
and die_to_decl_ctx maps.
However, the direction of the linking seems to be reversed. It is taking
entries from the class that has not yet been parsed, and copying them to
the class which has been parsed already -- i.e., it is a very
complicated no-op.
Changing the linking order allows us to revert the changes in D13224
(while keeping the associated test case passing), and is sufficient to
fix PR54761, which was caused by an undesired interaction with that
patch.
Differential Revision: https://reviews.llvm.org/D124370
More information about the All-commits
mailing list