LLVM 19.0.0git
Namespaces | Functions
DWARFDie.cpp File Reference
#include "llvm/DebugInfo/DWARF/DWARFDie.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h"
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
#include "llvm/DebugInfo/DWARF/DWARFDebugLine.h"
#include "llvm/DebugInfo/DWARF/DWARFDebugLoc.h"
#include "llvm/DebugInfo/DWARF/DWARFExpression.h"
#include "llvm/DebugInfo/DWARF/DWARFFormValue.h"
#include "llvm/DebugInfo/DWARF/DWARFTypePrinter.h"
#include "llvm/DebugInfo/DWARF/DWARFTypeUnit.h"
#include "llvm/DebugInfo/DWARF/DWARFUnit.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/DataExtractor.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cinttypes>
#include <cstdint>
#include <string>
#include <utility>

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.
 
void llvm::dumpTypeQualifiedName (const DWARFDie &DIE, raw_ostream &OS)
 
void llvm::dumpTypeUnqualifiedName (const DWARFDie &DIE, raw_ostream &OS, std::string *OriginalFullName=nullptr)
 

Function Documentation

◆ dumpApplePropertyAttribute()

static 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(), llvm::format(), and OS.

Referenced by dumpAttribute().

◆ dumpAttribute()

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

◆ dumpLocationExpr()

static void dumpLocationExpr ( raw_ostream OS,
const DWARFFormValue FormValue,
DWARFUnit U,
unsigned  Indent,
DIDumpOptions  DumpOpts 
)
static

◆ dumpLocationList()

static void dumpLocationList ( raw_ostream OS,
const DWARFFormValue FormValue,
DWARFUnit U,
unsigned  Indent,
DIDumpOptions  DumpOpts 
)
static

◆ dumpParentChain()

static 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 565 of file DWARFDie.cpp.

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

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

◆ dumpRanges()

static 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(), OS, and llvm::DIDumpOptions::ShowAddresses.

Referenced by dumpAttribute().

◆ getTypeSizeImpl()

static std::optional< uint64_t > getTypeSizeImpl ( DWARFDie  Die,
uint64_t  PointerSize,
SmallPtrSetImpl< const DWARFDebugInfoEntry * > &  Visited 
)
static

◆ resolveReferencedType()

static DWARFDie resolveReferencedType ( DWARFDie  D,
DWARFFormValue  F 
)
static

Definition at line 106 of file DWARFDie.cpp.

References D, and F.

Referenced by dumpAttribute().