summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-12-06 22:14:48 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-12-06 22:14:48 +0000
commit03073f747e1832801a0435e5d707a924932b93a9 (patch)
tree10db1e20b7d6ab36d64f75222d60ca8502b7538f /llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
parentfb6621ef4bbbf27f51769045de9193e74a6be370 (diff)
downloadbcm5719-llvm-03073f747e1832801a0435e5d707a924932b93a9.tar.gz
bcm5719-llvm-03073f747e1832801a0435e5d707a924932b93a9.zip
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. llvm-svn: 196615
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
index ed44a10cf3b..852b4c3cc5a 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
@@ -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;
OpenPOWER on IntegriCloud