summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2019-11-12 14:15:37 -0800
committerDavid Blaikie <dblaikie@gmail.com>2019-11-15 18:51:13 -0800
commit77cfcd75092b57693d40123a013e59295634a945 (patch)
tree1199d6a4ddee2a0351d11eacd99f2ec373a8f156 /llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
parent97c742e6b74e731afdef74dd5f8366ce883e0520 (diff)
downloadbcm5719-llvm-77cfcd75092b57693d40123a013e59295634a945.tar.gz
bcm5719-llvm-77cfcd75092b57693d40123a013e59295634a945.zip
DebugInfo: Use loclistx for DWARFv5 location lists to reduce the number of relocations
This only implements the non-dwo part, but loclistx is necessary to use location lists in DWARFv5, so it's a precursor to that work - and generally reduces relocations (only using one reloc, then indexes/relative offsets for all location list references) in non-split DWARF.
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp b/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
index 26090638b34..820f530a3e3 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
@@ -312,6 +312,7 @@ bool DWARFFormValue::extractValue(const DWARFDataExtractor &Data,
case DW_FORM_udata:
case DW_FORM_ref_udata:
case DW_FORM_rnglistx:
+ case DW_FORM_loclistx:
Value.uval = Data.getULEB128(OffsetPtr);
break;
case DW_FORM_string:
@@ -551,6 +552,10 @@ void DWARFFormValue::dump(raw_ostream &OS, DIDumpOptions DumpOpts) const {
OS << format("indexed (0x%x) rangelist = ", (uint32_t)UValue);
break;
+ case DW_FORM_loclistx:
+ OS << format("indexed (0x%x) loclist = ", (uint32_t)UValue);
+ break;
+
// Should be formatted to 64-bit for DWARF64.
case DW_FORM_sec_offset:
AddrOS << format("0x%08x", (uint32_t)UValue);
OpenPOWER on IntegriCloud