LLVM 19.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=false)
 
 DWARF5AccelTableData (const uint64_t DieOffset, const std::optional< uint64_t > DefiningParentOffset, const unsigned DieTag, const unsigned UnitID, const bool IsTU=false)
 
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 276 of file AccelTable.h.

Constructor & Destructor Documentation

◆ DWARF5AccelTableData() [1/2]

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

Definition at line 368 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 = false 
)
inline

Definition at line 282 of file AccelTable.h.

Member Function Documentation

◆ getAbbrevNumber()

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

Returns AbbrevIndex for an Entry.

Definition at line 332 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 403 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 293 of file AccelTable.h.

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

Referenced by getDieOffsetAndUnitID(), and order().

◆ getDieOffsetAndUnitID()

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

Definition at line 298 of file AccelTable.h.

References getDieOffset(), and UnitID.

◆ getDieTag()

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

Definition at line 302 of file AccelTable.h.

References DieTag.

◆ getParentDieOffset()

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

Definition at line 315 of file AccelTable.h.

References getParentDieOffsetAndUnitID().

◆ getParentDieOffsetAndUnitID()

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

Definition at line 321 of file AccelTable.h.

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

Referenced by getParentDieOffset().

◆ getUnitID()

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

Definition at line 303 of file AccelTable.h.

References UnitID.

Referenced by getParentDieOffsetAndUnitID().

◆ hash()

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

Definition at line 278 of file AccelTable.h.

References llvm::caseFoldingDjbHash(), and Name.

◆ isNormalized()

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

Definition at line 311 of file AccelTable.h.

References OffsetVal.

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

◆ isTU()

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

Definition at line 304 of file AccelTable.h.

References IsTU.

◆ normalizeDIEToOffset()

void llvm::DWARF5AccelTableData::normalizeDIEToOffset ( )
inline

◆ order()

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

Implements llvm::AccelTableData.

Definition at line 345 of file AccelTable.h.

References getDieOffset().

◆ print()

void DWARF5AccelTableData::print ( raw_ostream OS) const
overridevirtual

Implements llvm::AccelTableData.

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

References AbbrevNumber.

Member Data Documentation

◆ AbbrevNumber

uint32_t llvm::DWARF5AccelTableData::AbbrevNumber
protected

Definition at line 342 of file AccelTable.h.

Referenced by getAbbrevNumber(), and setAbbrevNumber().

◆ DieTag

uint32_t llvm::DWARF5AccelTableData::DieTag
protected

Definition at line 341 of file AccelTable.h.

Referenced by getDieTag().

◆ IsTU

uint32_t llvm::DWARF5AccelTableData::IsTU
protected

Definition at line 343 of file AccelTable.h.

Referenced by isTU().

◆ OffsetVal

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

Definition at line 339 of file AccelTable.h.

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

◆ ParentOffset

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

Definition at line 340 of file AccelTable.h.

Referenced by getParentDieOffsetAndUnitID(), and normalizeDIEToOffset().

◆ UnitID

uint32_t llvm::DWARF5AccelTableData::UnitID
protected

Definition at line 344 of file AccelTable.h.

Referenced by getDieOffsetAndUnitID(), and getUnitID().


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