DebugInfo: Include the section and start-of-section label in the unit

This is a precursor to moving type units into the correct (debug_types)
section with comdat groups and full type unit headers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196615 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2013-12-06 22:14:48 +00:00
parent 42883d0ac4
commit b5a244bd54
4 changed files with 59 additions and 16 deletions

View File

@@ -127,12 +127,36 @@ protected:
// DIEIntegerOne - A preallocated DIEValue because 1 is used frequently.
DIEInteger *DIEIntegerOne;
/// The section this unit will be emitted in.
const MCSection *Section;
/// A label at the start of the non-dwo section related to this unit.
MCSymbol *SectionSym;
Unit(unsigned UID, DIE *D, DICompileUnit CU, AsmPrinter *A, DwarfDebug *DW,
DwarfFile *DWU);
public:
virtual ~Unit();
/// Pass in the SectionSym even though we could recreate it in every compile
/// unit (type units will have actually distinct symbols once they're in
/// comdat sections).
void initSection(const MCSection *Section, MCSymbol *SectionSym) {
assert(!this->Section);
this->Section = Section;
this->SectionSym = SectionSym;
}
const MCSection *getSection() const {
assert(Section);
return Section;
}
MCSymbol *getSectionSym() {
assert(Section);
return SectionSym;
}
// Accessors.
unsigned getUniqueID() const { return UniqueID; }
virtual uint16_t getLanguage() const = 0;