diff options
| author | Alexey Samsonov <vonosmas@gmail.com> | 2014-10-08 00:24:41 +0000 |
|---|---|---|
| committer | Alexey Samsonov <vonosmas@gmail.com> | 2014-10-08 00:24:41 +0000 |
| commit | 4b4d64bce4a946760966013ba35ee273be17612d (patch) | |
| tree | 781da6f8082c1c5034dcf77a65ed54aad1556254 /llvm/lib/DebugInfo/DWARFUnit.h | |
| parent | 7c3f6ac57e7e7e0311708d43f97bd917c34ed537 (diff) | |
| download | bcm5719-llvm-4b4d64bce4a946760966013ba35ee273be17612d.tar.gz bcm5719-llvm-4b4d64bce4a946760966013ba35ee273be17612d.zip | |
[DebugInfo] Pass DWARFSection down to DWARFUnit constructor (NFC).
Keep the actual section contents and the relocation map together.
llvm-svn: 219261
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFUnit.h')
| -rw-r--r-- | llvm/lib/DebugInfo/DWARFUnit.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/llvm/lib/DebugInfo/DWARFUnit.h b/llvm/lib/DebugInfo/DWARFUnit.h index 91245c46ff7..09eb55fc323 100644 --- a/llvm/lib/DebugInfo/DWARFUnit.h +++ b/llvm/lib/DebugInfo/DWARFUnit.h @@ -88,9 +88,8 @@ private: DataExtractor Data(Section.Data, LE, 0); uint32_t Offset = 0; while (Data.isValidOffset(Offset)) { - auto U = - llvm::make_unique<UnitType>(Context, DA, Section.Data, RS, SS, SOS, - AOS, &Section.Relocs, LE, *this); + auto U = llvm::make_unique<UnitType>(Context, Section, DA, RS, SS, SOS, + AOS, LE, *this); if (!U->extract(Data, &Offset)) break; this->push_back(std::move(U)); @@ -102,16 +101,16 @@ private: class DWARFUnit { DWARFContext &Context; + // Section containing this DWARFUnit. + const DWARFSection &InfoSection; const DWARFDebugAbbrev *Abbrev; - StringRef InfoSection; StringRef RangeSection; uint32_t RangeSectionBase; StringRef StringSection; StringRef StringOffsetSection; StringRef AddrOffsetSection; uint32_t AddrOffsetSectionBase; - const RelocAddrMap *RelocMap; bool isLittleEndian; const DWARFUnitSectionBase &UnitSection; @@ -140,9 +139,10 @@ protected: virtual uint32_t getHeaderSize() const { return 11; } public: - DWARFUnit(DWARFContext& Context, const DWARFDebugAbbrev *DA, StringRef IS, - StringRef RS, StringRef SS, StringRef SOS, StringRef AOS, - const RelocAddrMap *M, bool LE, const DWARFUnitSectionBase &UnitSection); + DWARFUnit(DWARFContext &Context, const DWARFSection &Section, + const DWARFDebugAbbrev *DA, StringRef RS, StringRef SS, + StringRef SOS, StringRef AOS, bool LE, + const DWARFUnitSectionBase &UnitSection); virtual ~DWARFUnit(); @@ -164,13 +164,13 @@ public: bool getStringOffsetSectionItem(uint32_t Index, uint32_t &Result) const; DataExtractor getDebugInfoExtractor() const { - return DataExtractor(InfoSection, isLittleEndian, AddrSize); + return DataExtractor(InfoSection.Data, isLittleEndian, AddrSize); } DataExtractor getStringExtractor() const { return DataExtractor(StringSection, false, 0); } - const RelocAddrMap *getRelocMap() const { return RelocMap; } + const RelocAddrMap *getRelocMap() const { return &InfoSection.Relocs; } bool extract(DataExtractor debug_info, uint32_t* offset_ptr); |

