DICompileUnit CUNode;
/// Unit debug information entry.
- const std::unique_ptr<DIE> UnitDie;
+ DIE UnitDie;
/// Offset of the UnitDie from beginning of debug info section.
unsigned DebugInfoOffset;
/// Skeleton unit associated with this unit.
DwarfUnit *Skeleton;
- DwarfUnit(unsigned UID, std::unique_ptr<DIE> D, DICompileUnit CU,
- AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU);
+ DwarfUnit(unsigned UID, dwarf::Tag, DICompileUnit CU, AsmPrinter *A,
+ DwarfDebug *DW, DwarfFile *DWU);
public:
virtual ~DwarfUnit();
unsigned getUniqueID() const { return UniqueID; }
uint16_t getLanguage() const { return CUNode.getLanguage(); }
DICompileUnit getCUNode() const { return CUNode; }
- DIE &getUnitDie() const { return *UnitDie; }
+ DIE &getUnitDie() { return UnitDie; }
const StringMap<const DIE *> &getGlobalNames() const { return GlobalNames; }
const StringMap<const DIE *> &getGlobalTypes() const { return GlobalTypes; }
void setDebugInfoOffset(unsigned DbgInfoOff) { DebugInfoOffset = DbgInfoOff; }
/// hasContent - Return true if this compile unit has something to write out.
- bool hasContent() const { return !UnitDie->getChildren().empty(); }
+ bool hasContent() const { return !UnitDie.getChildren().empty(); }
/// addRange - Add an address range to the list of ranges for this unit.
void addRange(RangeSpan Range);
unsigned stmtListIndex;
public:
- DwarfCompileUnit(unsigned UID, std::unique_ptr<DIE> D, DICompileUnit Node,
- AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU);
+ DwarfCompileUnit(unsigned UID, DICompileUnit Node, AsmPrinter *A,
+ DwarfDebug *DW, DwarfFile *DWU);
void initStmtList(MCSymbol *DwarfLineSectionSym);
MCDwarfDwoLineTable *SplitLineTable;
public:
- DwarfTypeUnit(unsigned UID, std::unique_ptr<DIE> D, DwarfCompileUnit &CU,
- AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU,
+ DwarfTypeUnit(unsigned UID, DwarfCompileUnit &CU, AsmPrinter *A,
+ DwarfDebug *DW, DwarfFile *DWU,
MCDwarfDwoLineTable *SplitLineTable = nullptr);
void setTypeSignature(uint64_t Signature) { TypeSignature = Signature; }