X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FCodeGen%2FAsmPrinter%2FDwarfCompileUnit.h;h=dd59024e786f69a5eee001d315535121ae90c9a0;hp=0fb3bb473796dfcfd9ba24526585b29cf9cf46d0;hb=33e07581b22ed472103c91a246dab5b8ce08a1c7;hpb=4e35ac1b48558c17ec98f49607173d651f9e4fb1 diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h index 0fb3bb47379..dd59024e786 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h +++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h @@ -34,7 +34,10 @@ class DwarfCompileUnit : public DwarfUnit { unsigned stmtListIndex; /// Skeleton unit associated with this unit. - DwarfUnit *Skeleton; + DwarfCompileUnit *Skeleton; + + /// A label at the start of the non-dwo section related to this unit. + MCSymbol *SectionSym; /// \brief Construct a DIE for the given DbgVariable without initializing the /// DbgVariable's DIE reference. @@ -46,7 +49,7 @@ public: DwarfDebug *DW, DwarfFile *DWU); DwarfCompileUnit *getSkeleton() const { - return static_cast(Skeleton); + return Skeleton; } void initStmtList(MCSymbol *DwarfLineSectionSym); @@ -155,7 +158,21 @@ public: } /// Set the skeleton unit associated with this unit. - void setSkeleton(DwarfUnit &Skel) { Skeleton = &Skel; } + void setSkeleton(DwarfCompileUnit &Skel) { Skeleton = &Skel; } + + MCSymbol *getSectionSym() const { + assert(Section); + return SectionSym; + } + + /// 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) { + DwarfUnit::initSection(Section); + this->SectionSym = SectionSym; + } + }; } // end llvm namespace