diff options
author | Eric Christopher <echristo@gmail.com> | 2013-12-30 03:02:12 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2013-12-30 03:02:12 +0000 |
commit | 83fff3fce7743bc84f102dc32680cbd38458e3b8 (patch) | |
tree | f2b838c119e2165fed115f968ba06059cdf586c0 /llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h | |
parent | 94b0f0278e49809e341c9d57b605d54e45b1de9c (diff) | |
download | bcm5719-llvm-83fff3fce7743bc84f102dc32680cbd38458e3b8.tar.gz bcm5719-llvm-83fff3fce7743bc84f102dc32680cbd38458e3b8.zip |
Use a pointer to keep track of the skeleton unit for each normal unit
and construct it up front. Add address ranges at the end and a helper
routine so that we're not needlessly using an indirction in the case
of split dwarf.
Update testcases according to the new ordering of attributes on
the compile unit.
llvm-svn: 198196
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h index 7d7b351b9b0..49c9b0cedc3 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h +++ b/llvm/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). @@ -521,6 +530,11 @@ public: /// either DW_FORM_addr or DW_FORM_GNU_addr_index. void addLabelAddress(DIE *Die, dwarf::Attribute Attribute, MCSymbol *Label); + /// addLocalLabelAddress - Add a dwarf label attribute data and value using + /// DW_FORM_addr. + void addLocalLabelAddress(DIE *Die, dwarf::Attribute Attribute, + MCSymbol *Label); + uint16_t getLanguage() const LLVM_OVERRIDE { return getNode().getLanguage(); } }; |