From 6e1f3170e061b16c9096a769508f0a6d7eb95b9c Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Fri, 6 Dec 2019 10:10:04 +0100 Subject: [PATCH] [lldb/DWARF] Remove DWARFDebugRangesBase abstract class now that we use llvm to parse debug_rnglists, this abstraction is not useful. --- lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h | 15 +++------------ lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp | 2 +- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h index 99ef04d..1888a77 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h @@ -17,22 +17,13 @@ namespace lldb_private { class DWARFContext; } -class DWARFDebugRangesBase { -public: - virtual ~DWARFDebugRangesBase(){}; - - virtual void Extract(lldb_private::DWARFContext &context) = 0; - virtual bool FindRanges(const DWARFUnit *cu, dw_offset_t debug_ranges_offset, - DWARFRangeList &range_list) const = 0; -}; - -class DWARFDebugRanges final : public DWARFDebugRangesBase { +class DWARFDebugRanges { public: DWARFDebugRanges(); - void Extract(lldb_private::DWARFContext &context) override; + void Extract(lldb_private::DWARFContext &context); bool FindRanges(const DWARFUnit *cu, dw_offset_t debug_ranges_offset, - DWARFRangeList &range_list) const override; + DWARFRangeList &range_list) const; static void Dump(lldb_private::Stream &s, const lldb_private::DWARFDataExtractor &debug_ranges_data, diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp index 71375da..ab8b3cfc 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp @@ -883,7 +883,7 @@ uint32_t DWARFUnit::GetHeaderByteSize() const { llvm::Expected DWARFUnit::FindRnglistFromOffset(dw_offset_t offset) { if (GetVersion() <= 4) { - const DWARFDebugRangesBase *debug_ranges = m_dwarf.GetDebugRanges(); + const DWARFDebugRanges *debug_ranges = m_dwarf.GetDebugRanges(); if (!debug_ranges) return llvm::make_error( "No debug_ranges section"); -- 2.7.4