OSDN Git Service

Stop tracking .debug_line_str in DWARFUnit. NFC.
authorPaul Robinson <paul.robinson@sony.com>
Mon, 29 Jan 2018 22:02:56 +0000 (22:02 +0000)
committerPaul Robinson <paul.robinson@sony.com>
Mon, 29 Jan 2018 22:02:56 +0000 (22:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323701 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h
include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h
include/llvm/DebugInfo/DWARF/DWARFUnit.h
lib/DebugInfo/DWARF/DWARFUnit.cpp
lib/DebugInfo/DWARF/DWARFVerifier.cpp

index 780ddcb..a18adf8 100644 (file)
@@ -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.
index d7302a9..a784245 100644 (file)
@@ -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 {
index 3baa0a4..c4fcd85 100644 (file)
@@ -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);
   }
index 7ed818b..df55d7d 100644 (file)
@@ -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();
 }
 
index c472346..da3226e 100644 (file)
@@ -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."); }