LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
llvm::DIE Class Reference

#include <DIE.h>

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

Public Member Functions

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

Protected Attributes

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

Detailed Description

Definition at line 109 of file DIE.h.

Constructor & Destructor Documentation

llvm::DIE::DIE ( unsigned  Tag)
inlineexplicit

Definition at line 134 of file DIE.h.

DIE::~DIE ( )
virtual

Definition at line 110 of file DIE.cpp.

References Children, and N.

Member Function Documentation

void llvm::DIE::addChild ( DIE Child)
inline

addChild - Add a child to the DIE.

Definition at line 168 of file DIE.h.

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

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

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

Definition at line 193 of file DIE.cpp.

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

DIEValue * DIE::findAttribute ( uint16_t  Attribute)

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

Definition at line 135 of file DIE.cpp.

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

Referenced by computeIndexValue(), and getDIEStringAttr().

DIEAbbrev& llvm::DIE::getAbbrev ( )
inline

Definition at line 140 of file DIE.h.

References Abbrev.

Referenced by llvm::DwarfUnits::computeSizeAndOffset(), findAttribute(), and getDIEStringAttr().

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

Definition at line 141 of file DIE.h.

References Abbrev.

unsigned llvm::DIE::getAbbrevNumber ( ) const
inline
const std::vector<DIE *>& llvm::DIE::getChildren ( ) const
inline

Definition at line 146 of file DIE.h.

References Children.

Referenced by llvm::DwarfUnits::computeSizeAndOffset(), and llvm::DwarfDebug::emitDIE().

const DIE * DIE::getCompileUnit ( ) const

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

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

Definition at line 117 of file DIE.cpp.

References getCompileUnitOrNull().

Referenced by llvm::DwarfDebug::emitDIE().

const DIE * DIE::getCompileUnitOrNull ( ) const

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

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

Definition at line 125 of file DIE.cpp.

References getParent(), and getTag().

Referenced by llvm::CompileUnit::addDIEEntry(), and getCompileUnit().

unsigned llvm::DIE::getOffset ( ) const
inline
DIE* llvm::DIE::getParent ( ) const
inline
unsigned llvm::DIE::getSize ( ) const
inline

Definition at line 145 of file DIE.h.

References Size.

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

dwarf::Tag llvm::DIE::getTag ( ) const
inline
const SmallVectorImpl<DIEValue*>& llvm::DIE::getValues ( ) const
inline
void DIE::print ( raw_ostream O,
unsigned  IndentCount = 0 
) const
void llvm::DIE::setOffset ( unsigned  O)
inline

Definition at line 155 of file DIE.h.

References Offset.

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

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

Definition at line 156 of file DIE.h.

References Size.

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

Member Data Documentation

DIEAbbrev llvm::DIE::Abbrev
protected

Abbrev - Buffer for constructing abbreviation.

Definition at line 121 of file DIE.h.

Referenced by addChild(), addValue(), llvm::DIEBlock::ComputeSize(), llvm::DIEBlock::EmitValue(), getAbbrev(), getAbbrevNumber(), getTag(), and print().

std::vector<DIE *> llvm::DIE::Children
protected

Children DIEs.

Definition at line 125 of file DIE.h.

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

unsigned llvm::DIE::Offset
protected

Offset - Offset in debug info section.

Definition at line 113 of file DIE.h.

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

DIE* llvm::DIE::Parent
protected

Definition at line 127 of file DIE.h.

Referenced by addChild(), and getParent().

unsigned llvm::DIE::Size
protected

Size - Size of instance + children.

Definition at line 117 of file DIE.h.

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

SmallVector<DIEValue*, 12> llvm::DIE::Values
protected

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