Home | History | Annotate | Download | only in CodeGen

Lines Matching defs:DIE

1 //===- lib/CodeGen/DIE.h - DWARF Info Entries -------------------*- C++ -*-===//
40 class DIE;
131 /// This class will unique the DIE abbreviations for a llvm::DIE object and
148 /// Generate the abbreviation declaration for a DIE and return a pointer to
151 /// \param Die the debug info entry to generate the abbreviation for.
154 DIEAbbrev &uniqueAbbreviation(DIE &Die);
161 /// An integer value DIE.
200 /// An expression DIE.
217 /// A label DIE.
234 /// A simple label difference DIE.
295 DIE *Entry;
299 explicit DIEEntry(DIE &E) : Entry(&E) {}
301 DIE &getEntry() const { return *Entry; }
386 destruct<DIE##T>(); \
390 destruct<const DIE##T *>(); \
407 construct<DIE##T>(*X.get<DIE##T>()); \
411 construct<const DIE##T *>(*X.get<const DIE##T *>()); \
436 DIEValue(dwarf::Attribute Attribute, dwarf::Form Form, const DIE##T &V) \
438 construct<DIE##T>(V); \
441 DIEValue(dwarf::Attribute Attribute, dwarf::Form Form, const DIE##T *V) \
444 construct<const DIE##T *>(V); \
457 const DIE##T &getDIE##T() const { \
459 return *get<DIE##T>(); \
462 const DIE##T &getDIE##T() const { \
464 return **get<const DIE##T *>(); \
574 /// A list of DIE values.
662 class DIE : IntrusiveBackListNode, public DIEValueList {
663 friend class IntrusiveBackList<DIE>;
673 /// Set to true to force a DIE to emit an abbreviation that says it has
677 IntrusiveBackList<DIE> Children;
679 /// The owner is either the parent DIE for children of other DIEs, or a
680 /// DIEUnit which contains this DIE as its unit DIE.
681 PointerUnion<DIE *, DIEUnit *> Owner;
683 explicit DIE(dwarf::Tag Tag) : Tag(Tag) {}
686 DIE() = delete;
687 DIE(const DIE &RHS) = delete;
688 DIE(DIE &&RHS) = delete;
689 DIE &operator=(const DIE &RHS) = delete;
690 DIE &operator=(const DIE &&RHS) = delete;
692 static DIE *get(BumpPtrAllocator &Alloc, dwarf::Tag Tag) {
693 return new (Alloc) DIE(Tag);
699 /// Get the compile/type unit relative offset of this DIE.
705 using child_iterator = IntrusiveBackList<DIE>::iterator;
706 using const_child_iterator = IntrusiveBackList<DIE>::const_iterator;
717 DIE *getParent() const;
719 /// Generate the abbreviation for this DIE.
725 /// Set the abbreviation number for this DIE.
729 /// for this DIE.
732 /// Compute the offset of this DIE and all its children.
735 /// information and gives each DIE a chance to figure out its CU relative DIE
737 /// return the unit offset that points to where the next DIE will be emitted
739 /// DIE objects, the DWARF can be generated since all DIEs will be able to
740 /// properly refer to other DIE objects since all DIEs have calculated their
744 /// \param AbbrevSet the abbreviation used to unique DIE abbreviations.
746 /// \returns the offset for the DIE that follows this DIE within the
751 /// Climb up the parent chain to get the compile unit or type unit DIE that
752 /// this DIE belongs to.
754 /// \returns the compile or type unit DIE that owns this DIE, or NULL if
755 /// this DIE hasn't been added to a unit DIE.
756 const DIE *getUnitDie() const;
759 /// DIE belongs to.
762 /// this DIE, or NULL if this DIE hasn't been added to a unit DIE.
768 /// Add a child to the DIE.
769 DIE &addChild(DIE *Child) {
776 /// Find a value in the DIE with the attribute given.
789 /// The compile unit or type unit DIE. This variable must be an instance of
790 /// DIE so that we can calculate the DIEUnit from any DIE by traversing the
791 /// parent backchain and getting the Unit DIE, and then casting itself to a
792 /// DIEUnit. This allows us to be able to find the DIEUnit for any DIE without
793 /// having to store a pointer to the DIEUnit in each DIE instance.
794 DIE Die;
834 DIE &getUnitDie() { return Die; }
835 const DIE &getUnitDie() const { return Die; }