class DIE
Declaration
class DIE : private IntrusiveBackListNode, public DIEValueList { /* full declaration omitted */ };
Description
A structured debug information entry. Has an abbreviation which describes its organization.
Declared at: llvm/include/llvm/CodeGen/DIE.h:739
Inherits from: IntrusiveBackListNode, DIEValueList
Member Variables
- private unsigned int Offset = 0
- Dwarf unit relative offset.
- private unsigned int Size = 0
- Size of instance + children.
- private unsigned int AbbrevNumber = ~0U
- private dwarf::Tag Tag = (llvm::dwarf::Tag)0
- Dwarf tag code.
- private bool ForceChildren = false
- Set to true to force a DIE to emit an abbreviation that says it has children even when it doesn't. This is used for unit testing purposes.
- private IntrusiveBackList<llvm::DIE> Children
- Children DIEs.
- private PointerUnion<llvm::DIE*, llvm::DIEUnit*> Owner
- The owner is either the parent DIE for children of other DIEs, or a DIEUnit which contains this DIE as its unit DIE.
Method Overview
- public DIE()
- public DIE(const llvm::DIE & RHS)
- public DIE(llvm::DIE && RHS)
- private DIE(dwarf::Tag Tag)
- public llvm::DIE & addChild(llvm::DIE * Child)
- public llvm::DIE & addChildFront(llvm::DIE * Child)
- public llvm::DIE::const_child_range children() const
- public llvm::DIE::child_range children()
- public unsigned int computeOffsetsAndAbbrevs(const dwarf::FormParams & FormParams, llvm::DIEAbbrevSet & AbbrevSet, unsigned int CUOffset)
- public void dump() const
- public llvm::DIEValue findAttribute(dwarf::Attribute Attribute) const
- public llvm::DIEAbbrev generateAbbrev() const
- public static llvm::DIE * get(llvm::BumpPtrAllocator & Alloc, dwarf::Tag Tag)
- public unsigned int getAbbrevNumber() const
- public uint64_t getDebugSectionOffset() const
- public unsigned int getOffset() const
- public llvm::DIE * getParent() const
- public unsigned int getSize() const
- public dwarf::Tag getTag() const
- public llvm::DIEUnit * getUnit() const
- public const llvm::DIE * getUnitDie() const
- public bool hasChildren() const
- public void print(llvm::raw_ostream & O, unsigned int IndentCount = 0) const
- public void setAbbrevNumber(unsigned int I)
- public void setForceChildren(bool B)
- public void setOffset(unsigned int O)
- public void setSize(unsigned int S)
Inherited from DIEValueList:
Methods
¶DIE()
DIE()
Declared at: llvm/include/llvm/CodeGen/DIE.h:763
¶DIE(const llvm::DIE& RHS)
DIE(const llvm::DIE& RHS)
Declared at: llvm/include/llvm/CodeGen/DIE.h:764
Parameters
- const llvm::DIE& RHS
¶DIE(llvm::DIE&& RHS)
DIE(llvm::DIE&& RHS)
Declared at: llvm/include/llvm/CodeGen/DIE.h:765
Parameters
- llvm::DIE&& RHS
¶DIE(dwarf::Tag Tag)
DIE(dwarf::Tag Tag)
Declared at: llvm/include/llvm/CodeGen/DIE.h:760
Parameters
- dwarf::Tag Tag
¶llvm::DIE& addChild(llvm::DIE* Child)
llvm::DIE& addChild(llvm::DIE* Child)
Description
Add a child to the DIE.
Declared at: llvm/include/llvm/CodeGen/DIE.h:854
Parameters
- llvm::DIE* Child
¶llvm::DIE& addChildFront(llvm::DIE* Child)
llvm::DIE& addChildFront(llvm::DIE* Child)
Declared at: llvm/include/llvm/CodeGen/DIE.h:861
Parameters
- llvm::DIE* Child
¶llvm::DIE::const_child_range children() const
llvm::DIE::const_child_range children() const
Declared at: llvm/include/llvm/CodeGen/DIE.h:798
¶llvm::DIE::child_range children()
llvm::DIE::child_range children()
Declared at: llvm/include/llvm/CodeGen/DIE.h:795
¶unsigned int computeOffsetsAndAbbrevs(
const dwarf::FormParams& FormParams,
llvm::DIEAbbrevSet& AbbrevSet,
unsigned int CUOffset)
unsigned int computeOffsetsAndAbbrevs(
const dwarf::FormParams& FormParams,
llvm::DIEAbbrevSet& AbbrevSet,
unsigned int CUOffset)
Description
Compute the offset of this DIE and all its children. This function gets called just before we are going to generate the debug information and gives each DIE a chance to figure out its CU relative DIE offset, unique its abbreviation and fill in the abbreviation code, and return the unit offset that points to where the next DIE will be emitted within the debug unit section. After this function has been called for all DIE objects, the DWARF can be generated since all DIEs will be able to properly refer to other DIE objects since all DIEs have calculated their offsets.
Declared at: llvm/include/llvm/CodeGen/DIE.h:833
Parameters
- const dwarf::FormParams& FormParams
- Used when calculating sizes.
- llvm::DIEAbbrevSet& AbbrevSet
- the abbreviation used to unique DIE abbreviations.
- unsigned int CUOffset
- the compile/type unit relative offset in bytes.
Returns
the offset for the DIE that follows this DIE within the current compile/type unit.
¶void dump() const
void dump() const
Declared at: llvm/include/llvm/CodeGen/DIE.h:875
¶llvm::DIEValue findAttribute(
dwarf::Attribute Attribute) const
llvm::DIEValue findAttribute(
dwarf::Attribute Attribute) const
Description
Find a value in the DIE with the attribute given. Returns a default-constructed DIEValue (where \a DIEValue::getType() gives \a DIEValue::isNone) if no such attribute exists.
Declared at: llvm/include/llvm/CodeGen/DIE.h:872
Parameters
- dwarf::Attribute Attribute
¶llvm::DIEAbbrev generateAbbrev() const
llvm::DIEAbbrev generateAbbrev() const
Description
Generate the abbreviation for this DIE. Calculate the abbreviation for this, which should be uniqued and eventually used to call \a setAbbrevNumber().
Declared at: llvm/include/llvm/CodeGen/DIE.h:808
¶static llvm::DIE* get(
llvm::BumpPtrAllocator& Alloc,
dwarf::Tag Tag)
static llvm::DIE* get(
llvm::BumpPtrAllocator& Alloc,
dwarf::Tag Tag)
Declared at: llvm/include/llvm/CodeGen/DIE.h:769
Parameters
- llvm::BumpPtrAllocator& Alloc
- dwarf::Tag Tag
¶unsigned int getAbbrevNumber() const
unsigned int getAbbrevNumber() const
Declared at: llvm/include/llvm/CodeGen/DIE.h:774
¶uint64_t getDebugSectionOffset() const
uint64_t getDebugSectionOffset() const
Description
Get the absolute offset within the .debug_info or .debug_types section for this DIE.
Declared at: llvm/include/llvm/CodeGen/DIE.h:815
¶unsigned int getOffset() const
unsigned int getOffset() const
Description
Get the compile/type unit relative offset of this DIE.
Declared at: llvm/include/llvm/CodeGen/DIE.h:777
¶llvm::DIE* getParent() const
llvm::DIE* getParent() const
Declared at: llvm/include/llvm/CodeGen/DIE.h:802
¶unsigned int getSize() const
unsigned int getSize() const
Declared at: llvm/include/llvm/CodeGen/DIE.h:782
¶dwarf::Tag getTag() const
dwarf::Tag getTag() const
Declared at: llvm/include/llvm/CodeGen/DIE.h:775
¶llvm::DIEUnit* getUnit() const
llvm::DIEUnit* getUnit() const
Description
Climb up the parent chain to get the compile unit or type unit that this DIE belongs to.
Declared at: llvm/include/llvm/CodeGen/DIE.h:848
Returns
the DIEUnit that represents the compile or type unit that owns this DIE, or NULL if this DIE hasn't been added to a unit DIE.
¶const llvm::DIE* getUnitDie() const
const llvm::DIE* getUnitDie() const
Description
Climb up the parent chain to get the compile unit or type unit DIE that this DIE belongs to.
Declared at: llvm/include/llvm/CodeGen/DIE.h:841
Returns
the compile or type unit DIE that owns this DIE, or NULL if this DIE hasn't been added to a unit DIE.
¶bool hasChildren() const
bool hasChildren() const
Declared at: llvm/include/llvm/CodeGen/DIE.h:787
¶void print(llvm::raw_ostream& O,
unsigned int IndentCount = 0) const
void print(llvm::raw_ostream& O,
unsigned int IndentCount = 0) const
Declared at: llvm/include/llvm/CodeGen/DIE.h:874
Parameters
- llvm::raw_ostream& O
- unsigned int IndentCount = 0
¶void setAbbrevNumber(unsigned int I)
void setAbbrevNumber(unsigned int I)
Description
Set the abbreviation number for this DIE.
Declared at: llvm/include/llvm/CodeGen/DIE.h:811
Parameters
- unsigned int I
¶void setForceChildren(bool B)
void setForceChildren(bool B)
Declared at: llvm/include/llvm/CodeGen/DIE.h:788
Parameters
- bool B
¶void setOffset(unsigned int O)
void setOffset(unsigned int O)
Declared at: llvm/include/llvm/CodeGen/DIE.h:850
Parameters
- unsigned int O
¶void setSize(unsigned int S)
void setSize(unsigned int S)
Declared at: llvm/include/llvm/CodeGen/DIE.h:851
Parameters
- unsigned int S