diff options
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFDie.cpp')
| -rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFDie.cpp | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp index abe63f2716a..49a7f7dc2a5 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp @@ -79,7 +79,6 @@ static void dumpLocation(raw_ostream &OS, DWARFFormValue &FormValue, DWARFUnit *U, unsigned Indent, DIDumpOptions DumpOpts) { DWARFContext &Ctx = U->getContext(); - const DWARFObject &Obj = Ctx.getDWARFObj(); const MCRegisterInfo *MRI = Ctx.getRegisterInfo(); if (FormValue.isFormClass(DWARFFormValue::FC_Block) || FormValue.isFormClass(DWARFFormValue::FC_Exprloc)) { @@ -97,32 +96,8 @@ static void dumpLocation(raw_ostream &OS, DWARFFormValue &FormValue, uint64_t Offset = *FormValue.getAsSectionOffset(); - if (const DWARFLocationTable *LT = U->getLocationTable()) { - LT->dumpLocationList(&Offset, OS, U->getBaseAddress(), MRI, U, LLDumpOpts, - Indent); - return; - } - - DWARFDebugLoc DebugLoc; - DWARFDataExtractor Data(Obj, *U->getLocSection(), Ctx.isLittleEndian(), - Obj.getAddressSize()); - - FormValue.dump(OS, DumpOpts); - OS << ": "; - - if (Expected<DWARFDebugLoc::LocationList> LL = - DebugLoc.parseOneLocationList(Data, &Offset)) { - uint64_t BaseAddr = 0; - if (Optional<object::SectionedAddress> BA = U->getBaseAddress()) - BaseAddr = BA->Address; - LL->dump(OS, BaseAddr, Ctx.isLittleEndian(), Obj.getAddressSize(), MRI, U, - LLDumpOpts, Indent); - } else { - OS << '\n'; - OS.indent(Indent); - OS << formatv("error extracting location list: {0}", - fmt_consume(LL.takeError())); - } + U->getLocationTable().dumpLocationList(&Offset, OS, U->getBaseAddress(), + MRI, U, LLDumpOpts, Indent); return; } |

