diff options
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfUnit.h')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfUnit.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfUnit.h b/lib/CodeGen/AsmPrinter/DwarfUnit.h index 7d7b351b9b..808c9c25ed 100644 --- a/lib/CodeGen/AsmPrinter/DwarfUnit.h +++ b/lib/CodeGen/AsmPrinter/DwarfUnit.h @@ -146,12 +146,21 @@ protected: /// The label for the start of the range sets for the elements of this unit. MCSymbol *LabelRange; + /// Skeleton unit associated with this unit. + DwarfUnit *Skeleton; + DwarfUnit(unsigned UID, DIE *D, DICompileUnit CU, AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU); public: virtual ~DwarfUnit(); + /// Set the skeleton unit associated with this unit. + void setSkeleton(DwarfUnit *Skel) { Skeleton = Skel; } + + /// Get the skeleton unit associated with this unit. + DwarfUnit *getSkeleton() const { return Skeleton; } + /// 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). @@ -171,11 +180,27 @@ public: return Section; } + /// If there's a skeleton then return the section symbol for the skeleton + /// unit, otherwise return the section symbol for this unit. + MCSymbol *getLocalSectionSym() const { + if (Skeleton) + return Skeleton->getSectionSym(); + return SectionSym; + } + MCSymbol *getSectionSym() const { assert(Section); return SectionSym; } + /// If there's a skeleton then return the begin label for the skeleton unit, + /// otherwise return the local label for this unit. + MCSymbol *getLocalLabelBegin() const { + if (Skeleton) + return Skeleton->getLabelBegin(); + return LabelBegin; + } + MCSymbol *getLabelBegin() const { assert(Section); return LabelBegin; |