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
diff --git a/llvm/lib/DebugInfo/DWARFCompileUnit.h b/llvm/lib/DebugInfo/DWARFCompileUnit.h
index bf875fb..47c7191 100644
--- a/llvm/lib/DebugInfo/DWARFCompileUnit.h
+++ b/llvm/lib/DebugInfo/DWARFCompileUnit.h
@@ -18,8 +18,9 @@
public:
DWARFCompileUnit(DWARFContext& Context, const DWARFDebugAbbrev *DA,
StringRef IS, StringRef RS, StringRef SS, StringRef SOS,
- StringRef AOS, const RelocAddrMap *M, bool LE)
- : DWARFUnit(Context, DA, IS, RS, SS, SOS, AOS, M, LE) {}
+ StringRef AOS, const RelocAddrMap *M, bool LE,
+ const DWARFUnitSectionBase &UnitSection)
+ : DWARFUnit(Context, DA, IS, RS, SS, SOS, AOS, M, LE, UnitSection) {}
void dump(raw_ostream &OS);
// VTable anchor.
~DWARFCompileUnit() override;