LLVM 22.0.0git
DWARFDie.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Functions

static void dumpApplePropertyAttribute (raw_ostream &OS, uint64_t Val)
static void dumpRanges (const DWARFObject &Obj, raw_ostream &OS, const DWARFAddressRangesVector &Ranges, unsigned AddressSize, unsigned Indent, const DIDumpOptions &DumpOpts)
static void dumpLocationList (raw_ostream &OS, const DWARFFormValue &FormValue, DWARFUnit *U, unsigned Indent, DIDumpOptions DumpOpts)
static void dumpLocationExpr (raw_ostream &OS, const DWARFFormValue &FormValue, DWARFUnit *U, unsigned Indent, DIDumpOptions DumpOpts)
static DWARFDie resolveReferencedType (DWARFDie D, DWARFFormValue F)
static void dumpAttribute (raw_ostream &OS, const DWARFDie &Die, const DWARFAttribute &AttrValue, unsigned Indent, DIDumpOptions DumpOpts)
static std::optional< uint64_tgetTypeSizeImpl (DWARFDie Die, uint64_t PointerSize, SmallPtrSetImpl< const DWARFDebugInfoEntry * > &Visited)
static unsigned dumpParentChain (DWARFDie Die, raw_ostream &OS, unsigned Indent, DIDumpOptions DumpOpts, unsigned Depth=0)
 Helper to dump a DIE with all of its parents, but no siblings.
LLVM_ABI void llvm::dumpTypeQualifiedName (const DWARFDie &DIE, raw_ostream &OS)
LLVM_ABI void llvm::dumpTypeUnqualifiedName (const DWARFDie &DIE, raw_ostream &OS, std::string *OriginalFullName=nullptr)

Function Documentation

◆ dumpApplePropertyAttribute()

void dumpApplePropertyAttribute ( raw_ostream & OS,
uint64_t Val )
static

Definition at line 40 of file DWARFDie.cpp.

References llvm::dwarf::ApplePropertyString(), assert(), llvm::countr_zero(), and llvm::format().

Referenced by dumpAttribute().

◆ dumpAttribute()

void dumpAttribute ( raw_ostream & OS,
const DWARFDie & Die,
const DWARFAttribute & AttrValue,
unsigned Indent,
DIDumpOptions DumpOpts )
static

Definition at line 110 of file DWARFDie.cpp.

References llvm::DILineInfoSpecifier::AbsoluteFilePath, llvm::DWARFAttribute::Attr, llvm::Attribute, llvm::dwarf::AttributeValueString(), llvm::dwarf::computeTombstoneAddress(), llvm::DWARFFormValue::createFromUValue(), llvm::createStringError(), D(), llvm::DWARFFormValue::dump(), llvm::DWARFFormValue::dumpAddress(), dumpApplePropertyAttribute(), dumpLocationExpr(), dumpLocationList(), dumpRanges(), llvm::dumpTypeQualifiedName(), llvm::Enumerator, llvm::DWARFFormValue::FC_Block, llvm::DWARFFormValue::FC_Exprloc, llvm::DWARFFormValue::FC_SectionOffset, llvm::formatv(), llvm::DWARFDie::getAddressRanges(), llvm::DWARFFormValue::getAsAddress(), llvm::DWARFFormValue::getAsSectionOffset(), llvm::DWARFFormValue::getAsUnsignedConstant(), llvm::DWARFDie::getAttributeValueAsReferencedDie(), llvm::DWARFUnit::getContext(), llvm::DWARFContext::getDWARFObj(), llvm::DWARFDie::getDwarfUnit(), llvm::DWARFFormValue::getForm(), llvm::DWARFDie::getLowAndHighPC(), llvm::DWARFDie::getName(), llvm::raw_ostream::indent(), llvm::invalid_argument, llvm::DWARFFormValue::isFormClass(), llvm::DWARFDie::isValid(), llvm::LinkageName, llvm::DWARFAttribute::mayHaveLocationExpr(), llvm::DWARFAttribute::mayHaveLocationList(), llvm::DIDumpOptions::RecoverableErrorHandler, resolveReferencedType(), llvm::DIDumpOptions::ShowAddresses, llvm::DIDumpOptions::ShowForm, llvm::String, llvm::toString(), llvm::DWARFAttribute::Value, and llvm::DIDumpOptions::Verbose.

Referenced by llvm::DWARFDie::dump().

◆ dumpLocationExpr()

◆ dumpLocationList()

◆ dumpParentChain()

unsigned dumpParentChain ( DWARFDie Die,
raw_ostream & OS,
unsigned Indent,
DIDumpOptions DumpOpts,
unsigned Depth = 0 )
static

Helper to dump a DIE with all of its parents, but no siblings.

Definition at line 584 of file DWARFDie.cpp.

References llvm::Depth, llvm::DWARFDie::dump(), dumpParentChain(), llvm::DWARFDie::getParent(), and llvm::DIDumpOptions::ParentRecurseDepth.

Referenced by llvm::DWARFDie::dump(), and dumpParentChain().

◆ dumpRanges()

void dumpRanges ( const DWARFObject & Obj,
raw_ostream & OS,
const DWARFAddressRangesVector & Ranges,
unsigned AddressSize,
unsigned Indent,
const DIDumpOptions & DumpOpts )
static

Definition at line 58 of file DWARFDie.cpp.

References llvm::raw_ostream::indent(), and llvm::DIDumpOptions::ShowAddresses.

Referenced by dumpAttribute().

◆ getTypeSizeImpl()

◆ resolveReferencedType()

DWARFDie resolveReferencedType ( DWARFDie D,
DWARFFormValue F )
static

Definition at line 106 of file DWARFDie.cpp.

References D(), and F.

Referenced by dumpAttribute().