llvm.org GIT mirror llvm / e348b77
[debug info] Minor cleanup from D27170/r288399 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288421 91177308-0d34-0410-b5e6-96231b3b80d8 David Blaikie 3 years ago
4 changed file(s) with 3 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
618618 DIE() = delete;
619619 explicit DIE(dwarf::Tag Tag) : Offset(0), Size(0), Tag(Tag) {}
620620
621 protected:
622 void setUnit(DIEUnit *U) {
623 Owner = U;
624 }
625621 public:
626622 static DIE *get(BumpPtrAllocator &Alloc, dwarf::Tag Tag) {
627623 return new (Alloc) DIE(Tag);
705701 //===--------------------------------------------------------------------===//
706702 /// Represents a compile or type unit.
707703 class DIEUnit {
708 protected:
709704 /// The compile unit or type unit DIE. This variable must be an instance of
710705 /// DIE so that we can calculate the DIEUnit from any DIE by traversing the
711706 /// parent backchain and getting the Unit DIE, and then casting itself to a
201201 : Die(UnitTag), Section(nullptr), Offset(0), Length(0), Version(V),
202202 AddrSize(A)
203203 {
204 Die.setUnit(this);
204 Die.Owner = this;
205205 assert((UnitTag == dwarf::DW_TAG_compile_unit ||
206206 UnitTag == dwarf::DW_TAG_type_unit ||
207207 UnitTag == dwarf::DW_TAG_partial_unit) && "expected a unit TAG");
193193 void emitHeader(bool UseOffsets) override;
194194
195195 MCSymbol *getLabelBegin() const {
196 assert(Section);
196 assert(getSection());
197197 return LabelBegin;
198198 }
199199
111111 const DICompileUnit *getCUNode() const { return CUNode; }
112112
113113 /// Return true if this compile unit has something to write out.
114 bool hasContent() const { return Die.hasChildren(); }
114 bool hasContent() const { return getUnitDie().hasChildren(); }
115115
116116 /// Get string containing language specific context for a global name.
117117 ///