LLVM 22.0.0git
llvm::DWARF5AccelTableData Class Reference

The Data class implementation for DWARF v5 accelerator table. More...

#include "llvm/CodeGen/AccelTable.h"

Inheritance diagram for llvm::DWARF5AccelTableData:
[legend]

Public Member Functions

LLVM_ABI DWARF5AccelTableData (const DIE &Die, const uint32_t UnitID, const bool IsTU)
 DWARF5AccelTableData (const uint64_t DieOffset, const std::optional< uint64_t > DefiningParentOffset, const unsigned DieTag, const unsigned UnitID, const bool IsTU)
void print (raw_ostream &OS) const override
uint64_t getDieOffset () const
OffsetAndUnitID getDieOffsetAndUnitID () const
unsigned getDieTag () const
unsigned getUnitID () const
bool isTU () const
void normalizeDIEToOffset ()
bool isNormalized () const
std::optional< uint64_tgetParentDieOffset () const
std::optional< OffsetAndUnitIDgetParentDieOffsetAndUnitID () const
void setAbbrevNumber (uint16_t AbbrevNum)
 Sets AbbrevIndex for an Entry.
uint16_t getAbbrevNumber () const
 Returns AbbrevIndex for an Entry.
Public Member Functions inherited from llvm::AccelTableData
virtual ~AccelTableData ()=default
bool operator< (const AccelTableData &Other) const

Static Public Member Functions

static uint32_t hash (StringRef Name)
static LLVM_ABI std::optional< uint64_tgetDefiningParentDieOffset (const DIE &Die)
 If Die has a non-null parent and the parent is not a declaration, return its offset.

Protected Member Functions

uint64_t order () const override

Protected Attributes

std::variant< const DIE *, uint64_tOffsetVal
std::optional< uint64_tParentOffset
uint32_t DieTag: 16
uint32_t AbbrevNumber: 15
uint32_t IsTU: 1
uint32_t UnitID

Detailed Description

The Data class implementation for DWARF v5 accelerator table.

Unlike the Apple Data classes, this class is just a DIE wrapper, and does not know to serialize itself. The complete serialization logic is in the emitDWARF5AccelTable function.

Definition at line 293 of file AccelTable.h.

Constructor & Destructor Documentation

◆ DWARF5AccelTableData() [1/2]

DWARF5AccelTableData::DWARF5AccelTableData ( const DIE & Die,
const uint32_t UnitID,
const bool IsTU )

Definition at line 365 of file AccelTable.cpp.

References AbbrevNumber, DieTag, getTag(), IsTU, OffsetVal, and UnitID.

◆ DWARF5AccelTableData() [2/2]

llvm::DWARF5AccelTableData::DWARF5AccelTableData ( const uint64_t DieOffset,
const std::optional< uint64_t > DefiningParentOffset,
const unsigned DieTag,
const unsigned UnitID,
const bool IsTU )
inline

Definition at line 299 of file AccelTable.h.

References AbbrevNumber, DieTag, IsTU, OffsetVal, ParentOffset, and UnitID.

Member Function Documentation

◆ getAbbrevNumber()

uint16_t llvm::DWARF5AccelTableData::getAbbrevNumber ( ) const
inline

Returns AbbrevIndex for an Entry.

Definition at line 349 of file AccelTable.h.

References AbbrevNumber.

◆ getDefiningParentDieOffset()

std::optional< uint64_t > DWARF5AccelTableData::getDefiningParentDieOffset ( const DIE & Die)
static

If Die has a non-null parent and the parent is not a declaration, return its offset.

Definition at line 401 of file AccelTable.cpp.

References llvm::DIE::findAttribute(), and llvm::DIE::getParent().

Referenced by normalizeDIEToOffset().

◆ getDieOffset()

uint64_t llvm::DWARF5AccelTableData::getDieOffset ( ) const
inline

Definition at line 310 of file AccelTable.h.

References assert(), isNormalized(), and OffsetVal.

Referenced by getDieOffsetAndUnitID(), order(), and print().

◆ getDieOffsetAndUnitID()

OffsetAndUnitID llvm::DWARF5AccelTableData::getDieOffsetAndUnitID ( ) const
inline

Definition at line 315 of file AccelTable.h.

References getDieOffset(), getUnitID(), and isTU().

◆ getDieTag()

unsigned llvm::DWARF5AccelTableData::getDieTag ( ) const
inline

Definition at line 319 of file AccelTable.h.

References DieTag.

Referenced by print().

◆ getParentDieOffset()

std::optional< uint64_t > llvm::DWARF5AccelTableData::getParentDieOffset ( ) const
inline

Definition at line 332 of file AccelTable.h.

References getParentDieOffsetAndUnitID().

◆ getParentDieOffsetAndUnitID()

std::optional< OffsetAndUnitID > llvm::DWARF5AccelTableData::getParentDieOffsetAndUnitID ( ) const
inline

Definition at line 338 of file AccelTable.h.

References assert(), getUnitID(), isNormalized(), isTU(), and ParentOffset.

Referenced by getParentDieOffset().

◆ getUnitID()

unsigned llvm::DWARF5AccelTableData::getUnitID ( ) const
inline

Definition at line 320 of file AccelTable.h.

References UnitID.

Referenced by getDieOffsetAndUnitID(), and getParentDieOffsetAndUnitID().

◆ hash()

uint32_t llvm::DWARF5AccelTableData::hash ( StringRef Name)
inlinestatic

Definition at line 295 of file AccelTable.h.

References llvm::caseFoldingDjbHash().

◆ isNormalized()

bool llvm::DWARF5AccelTableData::isNormalized ( ) const
inline

Definition at line 328 of file AccelTable.h.

References OffsetVal.

Referenced by getDieOffset(), getParentDieOffsetAndUnitID(), and normalizeDIEToOffset().

◆ isTU()

bool llvm::DWARF5AccelTableData::isTU ( ) const
inline

Definition at line 321 of file AccelTable.h.

References IsTU.

Referenced by getDieOffsetAndUnitID(), and getParentDieOffsetAndUnitID().

◆ normalizeDIEToOffset()

void llvm::DWARF5AccelTableData::normalizeDIEToOffset ( )
inline

◆ order()

uint64_t llvm::DWARF5AccelTableData::order ( ) const
inlineoverrideprotectedvirtual

Implements llvm::AccelTableData.

Definition at line 363 of file AccelTable.h.

References getDieOffset().

◆ print()

void DWARF5AccelTableData::print ( raw_ostream & OS) const
overridevirtual

Implements llvm::AccelTableData.

Definition at line 812 of file AccelTable.cpp.

References getDieOffset(), getDieTag(), and llvm::dwarf::TagString().

◆ setAbbrevNumber()

void llvm::DWARF5AccelTableData::setAbbrevNumber ( uint16_t AbbrevNum)
inline

Sets AbbrevIndex for an Entry.

Definition at line 346 of file AccelTable.h.

References AbbrevNumber.

Member Data Documentation

◆ AbbrevNumber

uint32_t llvm::DWARF5AccelTableData::AbbrevNumber
protected

◆ DieTag

uint32_t llvm::DWARF5AccelTableData::DieTag
protected

Definition at line 359 of file AccelTable.h.

Referenced by DWARF5AccelTableData(), DWARF5AccelTableData(), and getDieTag().

◆ IsTU

uint32_t llvm::DWARF5AccelTableData::IsTU
protected

Definition at line 361 of file AccelTable.h.

Referenced by DWARF5AccelTableData(), DWARF5AccelTableData(), and isTU().

◆ OffsetVal

std::variant<const DIE *, uint64_t> llvm::DWARF5AccelTableData::OffsetVal
protected

◆ ParentOffset

std::optional<uint64_t> llvm::DWARF5AccelTableData::ParentOffset
protected

◆ UnitID

uint32_t llvm::DWARF5AccelTableData::UnitID
protected

Definition at line 362 of file AccelTable.h.

Referenced by DWARF5AccelTableData(), DWARF5AccelTableData(), and getUnitID().


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