LLVM API Documentation

Public Member Functions | Protected Member Functions | Protected Attributes
llvm::DIE Class Reference

#include <DIE.h>

Inheritance diagram for llvm::DIE:
Inheritance graph
[legend]
Collaboration diagram for llvm::DIE:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DIE (dwarf::Tag Tag)
DIEAbbrevgetAbbrev ()
const DIEAbbrevgetAbbrev () const
unsigned getAbbrevNumber () const
dwarf::Tag getTag () const
unsigned getOffset () const
unsigned getSize () const
const std::vector
< std::unique_ptr< DIE > > & 
getChildren () const
const SmallVectorImpl
< DIEValue * > & 
getValues () const
DIEgetParent () const
const DIEgetUnit () const
const DIEgetUnitOrNull () const
void setOffset (unsigned O)
void setSize (unsigned S)
void addValue (dwarf::Attribute Attribute, dwarf::Form Form, DIEValue *Value)
void addChild (std::unique_ptr< DIE > Child)
DIEValuefindAttribute (dwarf::Attribute Attribute) const
void print (raw_ostream &O, unsigned IndentCount=0) const
void dump ()

Protected Member Functions

 DIE ()

Protected Attributes

unsigned Offset
unsigned Size
DIEAbbrev Abbrev
std::vector< std::unique_ptr
< DIE > > 
Children
DIEParent
SmallVector< DIEValue *, 12 > Values

Detailed Description

Definition at line 111 of file DIE.h.


Constructor & Destructor Documentation

llvm::DIE::DIE ( ) [inline, protected]

Definition at line 142 of file DIE.h.

llvm::DIE::DIE ( dwarf::Tag  Tag) [inline, explicit]

Definition at line 147 of file DIE.h.


Member Function Documentation

void llvm::DIE::addChild ( std::unique_ptr< DIE Child) [inline]

addChild - Add a child to the DIE.

Definition at line 181 of file DIE.h.

References Abbrev, Children, llvm::dwarf::DW_CHILDREN_yes, and llvm::DIEAbbrev::setChildrenFlag().

Referenced by llvm::DwarfUnit::createAndAddDIE().

void llvm::DIE::addValue ( dwarf::Attribute  Attribute,
dwarf::Form  Form,
DIEValue Value 
) [inline]
void DIE::dump ( )

Definition at line 186 of file DIE.cpp.

References llvm::dbgs(), and print().

findAttribute - Find a value in the DIE with the attribute given, returns NULL if no such attribute exists.

Definition at line 128 of file DIE.cpp.

References getAbbrev(), llvm::DIEAbbrev::getData(), getValues(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and Values.

Referenced by computeIndexValue().

const DIEAbbrev& llvm::DIE::getAbbrev ( ) const [inline]

Definition at line 153 of file DIE.h.

References Abbrev.

Definition at line 154 of file DIE.h.

References Abbrev, and llvm::DIEAbbrev::getNumber().

Referenced by llvm::DwarfFile::computeSizeAndOffset().

const std::vector<std::unique_ptr<DIE> >& llvm::DIE::getChildren ( ) const [inline]
unsigned llvm::DIE::getOffset ( ) const [inline]
DIE* llvm::DIE::getParent ( ) const [inline]
unsigned llvm::DIE::getSize ( ) const [inline]

Definition at line 157 of file DIE.h.

References Size.

Referenced by llvm::DwarfDebug::emitDIE(), and llvm::DwarfFile::emitUnits().

dwarf::Tag llvm::DIE::getTag ( ) const [inline]
const DIE * DIE::getUnit ( ) const

Climb up the parent chain to get the compile or type unit DIE this DIE belongs to.

Climb up the parent chain to get the unit DIE to which this DIE belongs.

Definition at line 109 of file DIE.cpp.

References getUnitOrNull().

Referenced by llvm::DIEEntry::EmitValue().

Similar to getUnit, returns null when DIE is not added to an owner yet.

Climb up the parent chain to get the unit DIE this DIE belongs to. Return NULL if DIE is not added to an owner yet.

Definition at line 117 of file DIE.cpp.

References llvm::dwarf::DW_TAG_compile_unit, llvm::dwarf::DW_TAG_type_unit, getParent(), and getTag().

Referenced by llvm::DwarfUnit::addDIEEntry(), and getUnit().

void DIE::print ( raw_ostream O,
unsigned  IndentCount = 0 
) const
void llvm::DIE::setOffset ( unsigned  O) [inline]

Definition at line 169 of file DIE.h.

References Offset.

Referenced by llvm::DwarfFile::computeSizeAndOffset().

void llvm::DIE::setSize ( unsigned  S) [inline]

Definition at line 170 of file DIE.h.

References Size.

Referenced by llvm::DwarfFile::computeSizeAndOffset().


Member Data Documentation

std::vector<std::unique_ptr<DIE> > llvm::DIE::Children [protected]

Children DIEs.

Definition at line 133 of file DIE.h.

Referenced by addChild(), getChildren(), and print().

Offset - Offset in debug info section.

Definition at line 115 of file DIE.h.

Referenced by getOffset(), print(), and setOffset().

DIE* llvm::DIE::Parent [protected]

Definition at line 135 of file DIE.h.

Referenced by getParent().

Size - Size of instance + children.

Definition at line 119 of file DIE.h.

Referenced by getSize(), print(), and setSize().


The documentation for this class was generated from the following files: