[all-commits] [llvm/llvm-project] 8e1290: [lldb/DWARF] Refactor DWARFDIE::Get{Decl, TypeLooku...
Pavel Labath via All-commits
all-commits at lists.llvm.org
Wed May 29 05:20:10 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8e1290432adf33a7aeca65a53d1faa7577ed0e66
https://github.com/llvm/llvm-project/commit/8e1290432adf33a7aeca65a53d1faa7577ed0e66
Author: Pavel Labath <pavel at labath.sk>
Date: 2024-05-29 (Wed, 29 May 2024)
Changed paths:
M lldb/include/lldb/Symbol/Type.h
M lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
M lldb/source/Symbol/Type.cpp
M lldb/unittests/SymbolFile/DWARF/DWARFDIETest.cpp
Log Message:
-----------
[lldb/DWARF] Refactor DWARFDIE::Get{Decl,TypeLookup}Context (#93291)
After a bug (the bug is that the functions don't handle DW_AT_signature,
aka type units) led me to one of these similar-but-different functions,
I started to realize that most of the differences between these two
functions are actually bugs.
As a first step towards merging them, this patch rewrites both of them
to follow the same pattern, while preserving all of their differences.
The main change is that GetTypeLookupContext now also uses a `seen` list
to avoid reference loops (currently that's not necessary because the
function strictly follows parent links, but that will change with
DW_AT_signatures).
I've also optimized both functions to avoid recursion by starting contruction
with the deepest scope first (and then reversing it).
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list