[llvm] [llvm/DWARF] Recursively resolve DW_AT_signature references (PR #97423)
Pavel Labath via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 17 07:47:46 PDT 2024
================
@@ -312,27 +307,19 @@ DWARFDie::getAttributeValueAsReferencedDie(dwarf::Attribute Attr) const {
DWARFDie
DWARFDie::getAttributeValueAsReferencedDie(const DWARFFormValue &V) const {
- DWARFDie Result;
if (auto SpecRef = V.getAsRelativeReference()) {
----------------
labath wrote:
> > Incidentally this has probably added support for some DWARF that GCC produces - where it references the type unit directly from DW_AT_type, maybe? Currently llvm-dwarfdump doesn't resolve such references ( https://godbolt.org/z/E5boxcj1r - note the `DW_TAG_variable`'s ` DW_AT_type (0xc949e2ea8b91cfb0)` only has the signature, and I guess with this patch maybe we now get ` DW_AT_type (0xc949e2ea8b91cfb0 "t1")`?)
>
> Interesting. I'll look into this tomorrow.
Yes, it really does fix it. I added a test (modifying an existing one) for that. PTAL.
https://github.com/llvm/llvm-project/pull/97423
More information about the llvm-commits
mailing list