LLVM API Documentation
#include <DIE.h>
Public Member Functions | |
DIE (dwarf::Tag Tag) | |
DIEAbbrev & | getAbbrev () |
const DIEAbbrev & | getAbbrev () 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 |
DIE * | getParent () const |
const DIE * | getUnit () const |
const DIE * | getUnitOrNull () 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) |
DIEValue * | findAttribute (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 |
DIE * | Parent |
SmallVector< DIEValue *, 12 > | Values |
llvm::DIE::DIE | ( | ) | [inline, protected] |
llvm::DIE::DIE | ( | dwarf::Tag | Tag | ) | [inline, explicit] |
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] |
addValue - Add a value and attributes to a DIE.
Definition at line 174 of file DIE.h.
References Abbrev, llvm::DIEAbbrev::AddAttribute(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and Values.
Referenced by llvm::DwarfUnit::addBlock(), llvm::DwarfUnit::addDIEEntry(), llvm::DwarfUnit::addDIETypeSignature(), llvm::DwarfUnit::addExpr(), llvm::DwarfUnit::addFlag(), llvm::DwarfUnit::addLabel(), llvm::DwarfCompileUnit::addLabelAddress(), llvm::DwarfUnit::addLabelDelta(), llvm::DwarfCompileUnit::addLocalLabelAddress(), llvm::DwarfUnit::addLocalString(), llvm::DwarfUnit::addLocationList(), llvm::DwarfUnit::addSectionDelta(), llvm::DwarfUnit::addSInt(), llvm::DwarfUnit::addString(), llvm::DwarfUnit::addUInt(), and llvm::DwarfCompileUnit::applyStmtList().
void DIE::dump | ( | ) |
Definition at line 186 of file DIE.cpp.
References llvm::dbgs(), and print().
DIEValue * DIE::findAttribute | ( | dwarf::Attribute | Attribute | ) | const |
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().
DIEAbbrev& llvm::DIE::getAbbrev | ( | ) | [inline] |
Definition at line 152 of file DIE.h.
References Abbrev.
Referenced by llvm::DwarfCompileUnit::applyStmtList(), llvm::DwarfFile::computeSizeAndOffset(), llvm::DwarfDebug::emitDIE(), findAttribute(), and getDIEStringAttr().
const DIEAbbrev& llvm::DIE::getAbbrev | ( | ) | const [inline] |
unsigned llvm::DIE::getAbbrevNumber | ( | ) | const [inline] |
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] |
Definition at line 158 of file DIE.h.
References Children.
Referenced by llvm::DwarfFile::computeSizeAndOffset(), llvm::DwarfUnit::createAndAddDIE(), llvm::DwarfDebug::emitDIE(), and llvm::DwarfUnit::hasContent().
unsigned llvm::DIE::getOffset | ( | ) | const [inline] |
Definition at line 156 of file DIE.h.
References Offset.
Referenced by compareDIEs(), llvm::DwarfFile::computeSizeAndOffset(), llvm::DwarfDebug::emitDIE(), llvm::DIEEntry::EmitValue(), and llvm::DwarfAccelTable::HashDataContents::print().
DIE* llvm::DIE::getParent | ( | ) | const [inline] |
Definition at line 162 of file DIE.h.
References Parent.
Referenced by llvm::DIEHash::computeDIEODRSignature(), llvm::DIEHash::computeTypeSignature(), and getUnitOrNull().
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] |
Definition at line 155 of file DIE.h.
References Abbrev, and llvm::DIEAbbrev::getTag().
Referenced by llvm::DIEHash::computeDIEODRSignature(), computeIndexValue(), llvm::DwarfUnit::constructTypeDIE(), llvm::DwarfUnit::getOrCreateStaticMemberDIE(), getUnitOrNull(), and llvm::DwarfAccelTable::HashDataContents::print().
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().
const DIE * DIE::getUnitOrNull | ( | ) | const |
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().
const SmallVectorImpl<DIEValue *>& llvm::DIE::getValues | ( | ) | const [inline] |
Definition at line 161 of file DIE.h.
References Values.
Referenced by llvm::DwarfCompileUnit::applyStmtList(), llvm::DwarfFile::computeSizeAndOffset(), llvm::DwarfDebug::emitDIE(), findAttribute(), getDIEStringAttr(), and llvm::DwarfCompileUnit::initStmtList().
void DIE::print | ( | raw_ostream & | O, |
unsigned | IndentCount = 0 |
||
) | const |
Definition at line 141 of file DIE.cpp.
References Abbrev, llvm::dwarf::AttributeString(), Children, llvm::dwarf::ChildrenString(), llvm::format(), llvm::dwarf::FormEncodingString(), llvm::DIEAbbrev::getData(), llvm::DIEAbbrev::getTag(), llvm::DIEAbbrev::hasChildren(), N, Offset, Size, llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::dwarf::TagString(), and Values.
Referenced by dump().
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().
DIEAbbrev llvm::DIE::Abbrev [protected] |
Abbrev - Buffer for constructing abbreviation.
Definition at line 123 of file DIE.h.
Referenced by addChild(), addValue(), llvm::DIELoc::ComputeSize(), llvm::DIEBlock::ComputeSize(), llvm::DIELoc::EmitValue(), llvm::DIEBlock::EmitValue(), getAbbrev(), getAbbrevNumber(), getTag(), and print().
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().
unsigned llvm::DIE::Offset [protected] |
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().
unsigned llvm::DIE::Size [protected] |
SmallVector<DIEValue *, 12> llvm::DIE::Values [protected] |
Attribute values.
Definition at line 139 of file DIE.h.
Referenced by addValue(), llvm::DIELoc::ComputeSize(), llvm::DIEBlock::ComputeSize(), llvm::DIELoc::EmitValue(), llvm::DIEBlock::EmitValue(), findAttribute(), getValues(), and print().