LLVM API Documentation
#include <DIE.h>
Public Member Functions | |
DIE (unsigned Tag) | |
virtual | ~DIE () |
DIEAbbrev & | getAbbrev () |
const DIEAbbrev & | getAbbrev () 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 |
DIE * | getParent () const |
const DIE * | getCompileUnit () const |
const DIE * | getCompileUnitOrNull () const |
void | setOffset (unsigned O) |
void | setSize (unsigned S) |
void | addValue (dwarf::Attribute Attribute, dwarf::Form Form, DIEValue *Value) |
void | addChild (DIE *Child) |
DIEValue * | findAttribute (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 |
DIE * | Parent |
SmallVector< DIEValue *, 12 > | Values |
|
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().
|
inline |
addValue - Add a value and attributes to a DIE.
Definition at line 160 of file DIE.h.
References Abbrev, llvm::DIEAbbrev::AddAttribute(), and Values.
Referenced by llvm::CompileUnit::addBlock(), llvm::CompileUnit::addDelta(), llvm::CompileUnit::addDIEEntry(), llvm::CompileUnit::addExpr(), llvm::CompileUnit::addFlag(), llvm::CompileUnit::addLabel(), llvm::CompileUnit::addLabelAddress(), llvm::CompileUnit::addLocalString(), llvm::CompileUnit::addSInt(), llvm::CompileUnit::addString(), and llvm::CompileUnit::addUInt().
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().
|
inline |
Definition at line 140 of file DIE.h.
References Abbrev.
Referenced by llvm::DwarfUnits::computeSizeAndOffset(), findAttribute(), and getDIEStringAttr().
|
inline |
|
inline |
Definition at line 142 of file DIE.h.
References Abbrev, and llvm::DIEAbbrev::getNumber().
Referenced by llvm::DwarfUnits::computeSizeAndOffset(), and llvm::DwarfDebug::emitDIE().
|
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().
|
inline |
Definition at line 144 of file DIE.h.
References Offset.
Referenced by compareDIEs(), llvm::DwarfUnits::computeSizeAndOffset(), llvm::DwarfDebug::emitDIE(), llvm::DIEEntry::EmitValue(), and llvm::DwarfAccelTable::HashDataContents::print().
|
inline |
Definition at line 148 of file DIE.h.
References Parent.
Referenced by addChild(), llvm::DIEHash::computeDIEODRSignature(), llvm::DIEHash::computeTypeSignature(), getCompileUnitOrNull(), and isContainedInAnonNamespace().
|
inline |
Definition at line 145 of file DIE.h.
References Size.
Referenced by llvm::DwarfDebug::emitDIE(), and llvm::DwarfUnits::emitUnits().
|
inline |
Definition at line 143 of file DIE.h.
References Abbrev, and llvm::DIEAbbrev::getTag().
Referenced by llvm::DIEHash::computeDIEODRSignature(), computeIndexValue(), getCompileUnitOrNull(), isContainedInAnonNamespace(), and llvm::DwarfAccelTable::HashDataContents::print().
|
inline |
Definition at line 147 of file DIE.h.
References Values.
Referenced by llvm::DwarfUnits::computeSizeAndOffset(), llvm::DwarfDebug::emitDIE(), findAttribute(), and getDIEStringAttr().
void DIE::print | ( | raw_ostream & | O, |
unsigned | IndentCount = 0 |
||
) | const |
Definition at line 148 of file DIE.cpp.
References Abbrev, llvm::dwarf::AttributeString(), Children, llvm::dwarf::ChildrenString(), llvm::format(), llvm::dwarf::FormEncodingString(), llvm::DIEAbbrev::getChildrenFlag(), llvm::DIEAbbrev::getData(), llvm::DIEAbbrev::getTag(), N, Offset, Size, llvm::SmallVectorTemplateCommon< T >::size(), llvm::dwarf::TagString(), and Values.
Referenced by dump(), and llvm::DIEBlock::print().
|
inline |
Definition at line 155 of file DIE.h.
References Offset.
Referenced by llvm::DwarfUnits::computeSizeAndOffset().
|
inline |
Definition at line 156 of file DIE.h.
References Size.
Referenced by llvm::DwarfUnits::computeSizeAndOffset().
|
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().
|
protected |
Children DIEs.
Definition at line 125 of file DIE.h.
Referenced by addChild(), getChildren(), print(), and ~DIE().
|
protected |
Offset - Offset in debug info section.
Definition at line 113 of file DIE.h.
Referenced by getOffset(), print(), and setOffset().
|
protected |
Definition at line 127 of file DIE.h.
Referenced by addChild(), and getParent().
|
protected |
|
protected |
Attribute values.
Definition at line 131 of file DIE.h.
Referenced by addValue(), llvm::DIEBlock::ComputeSize(), llvm::DIEBlock::EmitValue(), findAttribute(), getValues(), and print().