diff options
-rw-r--r-- | llvm/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h | 7 | ||||
-rw-r--r-- | llvm/include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h | 4 | ||||
-rw-r--r-- | llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h | 14 | ||||
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp | 19 | ||||
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp | 8 |
5 files changed, 22 insertions, 30 deletions
diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h index 780ddcb223e..a18adf87bf8 100644 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h +++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h @@ -20,11 +20,10 @@ public: DWARFCompileUnit(DWARFContext &Context, const DWARFSection &Section, const DWARFDebugAbbrev *DA, const DWARFSection *RS, StringRef SS, const DWARFSection &SOS, - const DWARFSection *AOS, const DWARFSection &LS, - StringRef LSS, bool LE, bool IsDWO, - const DWARFUnitSectionBase &UnitSection, + const DWARFSection *AOS, const DWARFSection &LS, bool LE, + bool IsDWO, const DWARFUnitSectionBase &UnitSection, const DWARFUnitIndex::Entry *Entry) - : DWARFUnit(Context, Section, DA, RS, SS, SOS, AOS, LS, LSS, LE, IsDWO, + : DWARFUnit(Context, Section, DA, RS, SS, SOS, AOS, LS, LE, IsDWO, UnitSection, Entry) {} // VTable anchor. diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h index d7302a998c8..a7842454f43 100644 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h +++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h @@ -32,10 +32,10 @@ public: DWARFTypeUnit(DWARFContext &Context, const DWARFSection &Section, const DWARFDebugAbbrev *DA, const DWARFSection *RS, StringRef SS, const DWARFSection &SOS, const DWARFSection *AOS, - const DWARFSection &LS, StringRef LSS, bool LE, bool IsDWO, + const DWARFSection &LS, bool LE, bool IsDWO, const DWARFUnitSectionBase &UnitSection, const DWARFUnitIndex::Entry *Entry) - : DWARFUnit(Context, Section, DA, RS, SS, SOS, AOS, LS, LSS, LE, IsDWO, + : DWARFUnit(Context, Section, DA, RS, SS, SOS, AOS, LS, LE, IsDWO, UnitSection, Entry) {} uint32_t getHeaderSize() const override { diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h index 3baa0a4fc51..c4fcd85ca60 100644 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h +++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h @@ -60,8 +60,7 @@ protected: const DWARFDebugAbbrev *DA, const DWARFSection *RS, StringRef SS, const DWARFSection &SOS, const DWARFSection *AOS, const DWARFSection &LS, - StringRef LSS, bool isLittleEndian, bool isDWO, - bool Lazy) = 0; + bool isLittleEndian, bool isDWO, bool Lazy) = 0; }; const DWARFUnitIndex &getDWARFUnitIndex(DWARFContext &Context, @@ -120,7 +119,7 @@ private: void parseImpl(DWARFContext &Context, const DWARFSection &Section, const DWARFDebugAbbrev *DA, const DWARFSection *RS, StringRef SS, const DWARFSection &SOS, const DWARFSection *AOS, - const DWARFSection &LS, StringRef LSS, bool LE, bool IsDWO, + const DWARFSection &LS, bool LE, bool IsDWO, bool Lazy) override { if (Parsed) return; @@ -134,7 +133,7 @@ private: if (!Data.isValidOffset(Offset)) return nullptr; auto U = llvm::make_unique<UnitType>( - Context, Section, DA, RS, SS, SOS, AOS, LS, LSS, LE, IsDWO, *this, + Context, Section, DA, RS, SS, SOS, AOS, LS, LE, IsDWO, *this, Index ? Index->getFromOffset(Offset) : nullptr); if (!U->extract(Data, &Offset)) return nullptr; @@ -198,7 +197,6 @@ class DWARFUnit { const DWARFSection *RangeSection; uint32_t RangeSectionBase; const DWARFSection &LineSection; - StringRef LineStringSection; StringRef StringSection; const DWARFSection &StringOffsetSection; const DWARFSection *AddrOffsetSection; @@ -295,7 +293,7 @@ public: DWARFUnit(DWARFContext &Context, const DWARFSection &Section, const DWARFDebugAbbrev *DA, const DWARFSection *RS, StringRef SS, const DWARFSection &SOS, const DWARFSection *AOS, - const DWARFSection &LS, StringRef LSS, bool LE, bool IsDWO, + const DWARFSection &LS, bool LE, bool IsDWO, const DWARFUnitSectionBase &UnitSection, const DWARFUnitIndex::Entry *IndexEntry = nullptr); @@ -304,7 +302,6 @@ public: DWARFContext& getContext() const { return Context; } const DWARFSection &getLineSection() const { return LineSection; } - StringRef getLineStringSection() const { return LineStringSection; } StringRef getStringSection() const { return StringSection; } const DWARFSection &getStringOffsetSection() const { return StringOffsetSection; @@ -325,9 +322,6 @@ public: DWARFDataExtractor getDebugInfoExtractor() const; - DataExtractor getLineStringExtractor() const { - return DataExtractor(LineStringSection, false, 0); - } DataExtractor getStringExtractor() const { return DataExtractor(StringSection, false, 0); } diff --git a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp index 7ed818b2ca3..df55d7debf9 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp @@ -34,8 +34,8 @@ void DWARFUnitSectionBase::parse(DWARFContext &C, const DWARFSection &Section) { const DWARFObject &D = C.getDWARFObj(); parseImpl(C, Section, C.getDebugAbbrev(), &D.getRangeSection(), D.getStringSection(), D.getStringOffsetSection(), - &D.getAddrSection(), D.getLineSection(), D.getLineStringSection(), - D.isLittleEndian(), false, false); + &D.getAddrSection(), D.getLineSection(), D.isLittleEndian(), false, + false); } void DWARFUnitSectionBase::parseDWO(DWARFContext &C, @@ -43,21 +43,20 @@ void DWARFUnitSectionBase::parseDWO(DWARFContext &C, const DWARFObject &D = C.getDWARFObj(); parseImpl(C, DWOSection, C.getDebugAbbrevDWO(), &D.getRangeDWOSection(), D.getStringDWOSection(), D.getStringOffsetDWOSection(), - &D.getAddrSection(), D.getLineDWOSection(), StringRef(), - C.isLittleEndian(), true, Lazy); + &D.getAddrSection(), D.getLineDWOSection(), C.isLittleEndian(), + true, Lazy); } DWARFUnit::DWARFUnit(DWARFContext &DC, const DWARFSection &Section, const DWARFDebugAbbrev *DA, const DWARFSection *RS, StringRef SS, const DWARFSection &SOS, - const DWARFSection *AOS, const DWARFSection &LS, - StringRef LSS, bool LE, bool IsDWO, - const DWARFUnitSectionBase &UnitSection, + const DWARFSection *AOS, const DWARFSection &LS, bool LE, + bool IsDWO, const DWARFUnitSectionBase &UnitSection, const DWARFUnitIndex::Entry *IndexEntry) : Context(DC), InfoSection(Section), Abbrev(DA), RangeSection(RS), - LineSection(LS), LineStringSection(LSS), StringSection(SS), - StringOffsetSection(SOS), AddrOffsetSection(AOS), isLittleEndian(LE), - isDWO(IsDWO), UnitSection(UnitSection), IndexEntry(IndexEntry) { + LineSection(LS), StringSection(SS), StringOffsetSection(SOS), + AddrOffsetSection(AOS), isLittleEndian(LE), isDWO(IsDWO), + UnitSection(UnitSection), IndexEntry(IndexEntry) { clear(); } diff --git a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp index c4723461a16..da3226ed0a2 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp @@ -282,8 +282,8 @@ bool DWARFVerifier::handleDebugInfo() { DCtx, DObj.getInfoSection(), DCtx.getDebugAbbrev(), &DObj.getRangeSection(), DObj.getStringSection(), DObj.getStringOffsetSection(), &DObj.getAppleObjCSection(), - DObj.getLineSection(), DObj.getLineStringSection(), - DCtx.isLittleEndian(), false, TUSection, nullptr)); + DObj.getLineSection(), DCtx.isLittleEndian(), false, TUSection, + nullptr)); break; } case dwarf::DW_UT_skeleton: @@ -297,8 +297,8 @@ bool DWARFVerifier::handleDebugInfo() { DCtx, DObj.getInfoSection(), DCtx.getDebugAbbrev(), &DObj.getRangeSection(), DObj.getStringSection(), DObj.getStringOffsetSection(), &DObj.getAppleObjCSection(), - DObj.getLineSection(), DObj.getLineStringSection(), - DCtx.isLittleEndian(), false, CUSection, nullptr)); + DObj.getLineSection(), DCtx.isLittleEndian(), false, CUSection, + nullptr)); break; } default: { llvm_unreachable("Invalid UnitType."); } |