diff options
author | Frederic Riss <friss@apple.com> | 2014-09-15 07:50:27 +0000 |
---|---|---|
committer | Frederic Riss <friss@apple.com> | 2014-09-15 07:50:27 +0000 |
commit | 4e126a0011973a63f2e674c2a08ab5f987bd0544 (patch) | |
tree | 8d7ac39496de977d549dddd6c8228990a0b89682 /llvm/lib/DebugInfo/DWARFUnit.cpp | |
parent | 7dad93bec2657b444d02d027c7e41efd6c540c74 (diff) | |
download | llvm-4e126a0011973a63f2e674c2a08ab5f987bd0544.zip llvm-4e126a0011973a63f2e674c2a08ab5f987bd0544.tar.gz llvm-4e126a0011973a63f2e674c2a08ab5f987bd0544.tar.bz2 |
Introduce the DWARFUnitSection abstraction.
A DWARFUnitSection is the collection of Units that have been extracted from
the same debug section.
By embeding a reference to their DWARFUnitSection in each unit, the DIEs
will be able to resolve inter-unit references by interrogating their Unit's
DWARFUnitSection.
This is a minimal patch where the DWARFUnitSection is-a SmallVector of Units,
thus exposing exactly the same interface as before. Followup-up patches might
change from inheritance to composition in order to expose only the wanted
DWARFUnitSection abstraction.
Differential Revision: http://reviews.llvm.org/D5310
llvm-svn: 217747
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFUnit.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARFUnit.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/DWARFUnit.cpp b/llvm/lib/DebugInfo/DWARFUnit.cpp index 2bb7933..faf385c 100644 --- a/llvm/lib/DebugInfo/DWARFUnit.cpp +++ b/llvm/lib/DebugInfo/DWARFUnit.cpp @@ -19,10 +19,11 @@ using namespace dwarf; DWARFUnit::DWARFUnit(DWARFContext &DC, const DWARFDebugAbbrev *DA, StringRef IS, StringRef RS, StringRef SS, StringRef SOS, - StringRef AOS, const RelocAddrMap *M, bool LE) + StringRef AOS, const RelocAddrMap *M, bool LE, + const DWARFUnitSectionBase& UnitSection) : Context(DC), Abbrev(DA), InfoSection(IS), RangeSection(RS), StringSection(SS), StringOffsetSection(SOS), AddrOffsetSection(AOS), - RelocMap(M), isLittleEndian(LE) { + RelocMap(M), isLittleEndian(LE), UnitSection(UnitSection) { clear(); } |