[all-commits] [llvm/llvm-project] d0d61a: Split DWARFFormValue::getReference into four funct...
Pavel Labath via All-commits
all-commits at lists.llvm.org
Tue Jul 16 03:56:00 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d0d61a7e4c944defad2292ced385baab734356a8
https://github.com/llvm/llvm-project/commit/d0d61a7e4c944defad2292ced385baab734356a8
Author: Pavel Labath <pavel at labath.sk>
Date: 2024-07-16 (Tue, 16 Jul 2024)
Changed paths:
M llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
M llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp
M llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp
M llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
M llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
M llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
M llvm/lib/DebugInfo/LogicalView/Readers/LVDWARFReader.cpp
M llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
Log Message:
-----------
Split DWARFFormValue::getReference into four functions (#98905)
The result of the function cannot be correctly interpreted without
knowing the precise form type (a type signature needs to be looked up
very differently from a supplementary debug info reference). The
function sort of worked because the two reference types (unit-relative
and section-relative) that can be handled uniformly are also the most
common types of references, but this setup made it easy to write code
which does not support other kinds of reference (and if one tried to
support them, the result didn't look pretty --
https://github.com/llvm/llvm-project/pull/97423/files#r1676217081).
The split is based on the reference type classification from DWARFv5
(Section 7.5.5 Classes and Forms), and it should enable uniform (if
slightly more verbose) hadling. Note that this only affects users which
want more control of how (or if) the references are resolved. Users
which just want to access the referenced DIE can use the higher level
API (DWARFDie::GetAttributeValueAsReferencedDie) which returns (or will
return after #97423 is merged) the correct die for all reference types
(except for supplementary references, which we don't support right now).
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