LLVM 20.0.0git
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::DWARF5AccelTableData Class Reference

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

#include "llvm/CodeGen/AccelTable.h"

Inheritance diagram for llvm::DWARF5AccelTableData:
Inheritance graph
[legend]

Public Member Functions

 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
 
virtual void print (raw_ostream &OS) const =0
 

Static Public Member Functions

static uint32_t hash (StringRef Name)
 
static 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
 
virtual uint64_t order () const =0
 

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 292 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 366 of file AccelTable.cpp.

◆ 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 297 of file AccelTable.h.

Member Function Documentation

◆ getAbbrevNumber()

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

Returns AbbrevIndex for an Entry.

Definition at line 347 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 402 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 308 of file AccelTable.h.

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

Referenced by getDieOffsetAndUnitID(), and order().

◆ getDieOffsetAndUnitID()

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

Definition at line 313 of file AccelTable.h.

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

◆ getDieTag()

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

Definition at line 317 of file AccelTable.h.

References DieTag.

◆ getParentDieOffset()

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

Definition at line 330 of file AccelTable.h.

References getParentDieOffsetAndUnitID().

◆ getParentDieOffsetAndUnitID()

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

Definition at line 336 of file AccelTable.h.

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

Referenced by getParentDieOffset().

◆ getUnitID()

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

Definition at line 318 of file AccelTable.h.

References UnitID.

Referenced by getDieOffsetAndUnitID(), and getParentDieOffsetAndUnitID().

◆ hash()

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

Definition at line 294 of file AccelTable.h.

References llvm::caseFoldingDjbHash(), and Name.

◆ isNormalized()

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

Definition at line 326 of file AccelTable.h.

References OffsetVal.

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

◆ isTU()

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

Definition at line 319 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 360 of file AccelTable.h.

References getDieOffset().

◆ print()

void DWARF5AccelTableData::print ( raw_ostream OS) const
overridevirtual

Implements llvm::AccelTableData.

Definition at line 813 of file AccelTable.cpp.

References OS, and llvm::dwarf::TagString().

◆ setAbbrevNumber()

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

Sets AbbrevIndex for an Entry.

Definition at line 344 of file AccelTable.h.

References AbbrevNumber.

Member Data Documentation

◆ AbbrevNumber

uint32_t llvm::DWARF5AccelTableData::AbbrevNumber
protected

Definition at line 357 of file AccelTable.h.

Referenced by getAbbrevNumber(), and setAbbrevNumber().

◆ DieTag

uint32_t llvm::DWARF5AccelTableData::DieTag
protected

Definition at line 356 of file AccelTable.h.

Referenced by getDieTag().

◆ IsTU

uint32_t llvm::DWARF5AccelTableData::IsTU
protected

Definition at line 358 of file AccelTable.h.

Referenced by isTU().

◆ OffsetVal

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

Definition at line 354 of file AccelTable.h.

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

◆ ParentOffset

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

Definition at line 355 of file AccelTable.h.

Referenced by getParentDieOffsetAndUnitID(), and normalizeDIEToOffset().

◆ UnitID

uint32_t llvm::DWARF5AccelTableData::UnitID
protected

Definition at line 359 of file AccelTable.h.

Referenced by getUnitID().


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