From 2d1fc4375f3885f0ee0ffcb58fc554530cd74ef2 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 29 Mar 2018 13:47:57 +0000 Subject: .debug_names: Parse DW_IDX_die_offset as a reference Before this patch we were parsing the attributes as section offsets, as that is what apple_names is doing. However, this is not correct as DWARF v5 specifies that this attribute should use the Reference form class. This also updates all the testcases (except the ones that deliberately pass a different form) to use the correct form class. llvm-svn: 328773 --- llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/DebugInfo') diff --git a/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp b/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp index 3b9662067c3..40174119b0a 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp @@ -535,7 +535,7 @@ DWARFDebugNames::Entry::lookup(dwarf::Index Index) const { Optional DWARFDebugNames::Entry::getDIEUnitOffset() const { if (Optional Off = lookup(dwarf::DW_IDX_die_offset)) - return Off->getAsSectionOffset(); + return Off->getAsReferenceUVal(); return None; } -- cgit v1.2.3