LLVM 20.0.0git
Public Member Functions | Friends | List of all members
llvm::DWARFDebugNames::NameIndex Class Reference

Represents a single accelerator table within the DWARF v5 .debug_names section. More...

#include "llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h"

Public Member Functions

 NameIndex (const DWARFDebugNames &Section, uint64_t Base)
 
Header getHeader () const
 Returns Hdr field.
 
DWARFDebugNamesOffsets getOffsets () const
 Returns Offsets field.
 
uint64_t getCUOffset (uint32_t CU) const
 Reads offset of compilation unit CU. CU is 0-based.
 
uint32_t getCUCount () const
 
uint64_t getLocalTUOffset (uint32_t TU) const
 Reads offset of local type unit TU, TU is 0-based.
 
uint32_t getLocalTUCount () const
 
uint64_t getForeignTUSignature (uint32_t TU) const
 Reads signature of foreign type unit TU. TU is 0-based.
 
uint32_t getForeignTUCount () const
 
uint32_t getBucketArrayEntry (uint32_t Bucket) const
 Reads an entry in the Bucket Array for the given Bucket.
 
uint32_t getBucketCount () const
 
uint32_t getHashArrayEntry (uint32_t Index) const
 Reads an entry in the Hash Array for the given Index.
 
NameTableEntry getNameTableEntry (uint32_t Index) const
 Reads an entry in the Name Table for the given Index.
 
uint32_t getNameCount () const
 
const DenseSet< Abbrev, AbbrevMapInfo > & getAbbrevs () const
 
Expected< EntrygetEntry (uint64_t *Offset) const
 
Expected< EntrygetEntryAtRelativeOffset (uint64_t Offset) const
 Returns the Entry at the relative Offset from the start of the Entry pool.
 
iterator_range< ValueIteratorequal_range (StringRef Key) const
 Look up all entries in this Name Index matching Key.
 
NameIterator begin () const
 
NameIterator end () const
 
Error extract ()
 
uint64_t getUnitOffset () const
 
uint64_t getNextUnitOffset () const
 
void dump (ScopedPrinter &W) const
 

Friends

class DWARFDebugNames
 

Detailed Description

Represents a single accelerator table within the DWARF v5 .debug_names section.

Definition at line 599 of file DWARFAcceleratorTable.h.

Constructor & Destructor Documentation

◆ NameIndex()

llvm::DWARFDebugNames::NameIndex::NameIndex ( const DWARFDebugNames Section,
uint64_t  Base 
)
inline

Definition at line 626 of file DWARFAcceleratorTable.h.

References llvm::sampleprof::Base.

Member Function Documentation

◆ begin()

NameIterator llvm::DWARFDebugNames::NameIndex::begin ( ) const
inline

Definition at line 681 of file DWARFAcceleratorTable.h.

◆ dump()

LLVM_DUMP_METHOD void DWARFDebugNames::NameIndex::dump ( ScopedPrinter W) const

Definition at line 919 of file DWARFAcceleratorTable.cpp.

References llvm::sampleprof::Base, and llvm::Twine::utohexstr().

◆ end()

NameIterator llvm::DWARFDebugNames::NameIndex::end ( ) const
inline

Definition at line 682 of file DWARFAcceleratorTable.h.

References getNameCount().

◆ equal_range()

iterator_range< DWARFDebugNames::ValueIterator > DWARFDebugNames::NameIndex::equal_range ( StringRef  Key) const

Look up all entries in this Name Index matching Key.

Definition at line 951 of file DWARFAcceleratorTable.cpp.

References llvm::make_range().

◆ extract()

Error DWARFDebugNames::NameIndex::extract ( )

◆ getAbbrevs()

const DenseSet< Abbrev, AbbrevMapInfo > & llvm::DWARFDebugNames::NameIndex::getAbbrevs ( ) const
inline

Definition at line 665 of file DWARFAcceleratorTable.h.

◆ getBucketArrayEntry()

uint32_t DWARFDebugNames::NameIndex::getBucketArrayEntry ( uint32_t  Bucket) const

Reads an entry in the Bucket Array for the given Bucket.

The returned value is a (1-based) index into the Names, StringOffsets and EntryOffsets arrays. The input Bucket index is 0-based.

Definition at line 812 of file DWARFAcceleratorTable.cpp.

References assert().

◆ getBucketCount()

uint32_t llvm::DWARFDebugNames::NameIndex::getBucketCount ( ) const
inline

Definition at line 651 of file DWARFAcceleratorTable.h.

◆ getCUCount()

uint32_t llvm::DWARFDebugNames::NameIndex::getCUCount ( ) const
inline

◆ getCUOffset()

uint64_t DWARFDebugNames::NameIndex::getCUOffset ( uint32_t  CU) const

Reads offset of compilation unit CU. CU is 0-based.

Definition at line 744 of file DWARFAcceleratorTable.cpp.

References assert(), llvm::dwarf::getDwarfOffsetByteSize(), and llvm::Offset.

Referenced by llvm::DWARFDebugNames::Entry::getCUOffset(), and llvm::DWARFDebugNames::Entry::getRelatedCUOffset().

◆ getEntry()

Expected< DWARFDebugNames::Entry > DWARFDebugNames::NameIndex::getEntry ( uint64_t Offset) const

◆ getEntryAtRelativeOffset()

Expected< Entry > llvm::DWARFDebugNames::NameIndex::getEntryAtRelativeOffset ( uint64_t  Offset) const
inline

Returns the Entry at the relative Offset from the start of the Entry pool.

Definition at line 673 of file DWARFAcceleratorTable.h.

References llvm::DWARFDebugNames::DWARFDebugNamesOffsets::EntriesBase, getEntry(), and llvm::Offset.

Referenced by llvm::DWARFDebugNames::Entry::getParentDIEEntry().

◆ getForeignTUCount()

uint32_t llvm::DWARFDebugNames::NameIndex::getForeignTUCount ( ) const
inline

◆ getForeignTUSignature()

uint64_t DWARFDebugNames::NameIndex::getForeignTUSignature ( uint32_t  TU) const

Reads signature of foreign type unit TU. TU is 0-based.

Definition at line 759 of file DWARFAcceleratorTable.cpp.

References assert(), llvm::dwarf::getDwarfOffsetByteSize(), and llvm::Offset.

Referenced by llvm::DWARFDebugNames::Entry::getForeignTUTypeSignature().

◆ getHashArrayEntry()

uint32_t DWARFDebugNames::NameIndex::getHashArrayEntry ( uint32_t  Index) const

Reads an entry in the Hash Array for the given Index.

The input Index is 1-based.

Definition at line 818 of file DWARFAcceleratorTable.cpp.

References assert().

◆ getHeader()

Header llvm::DWARFDebugNames::NameIndex::getHeader ( ) const
inline

Returns Hdr field.

Definition at line 630 of file DWARFAcceleratorTable.h.

◆ getLocalTUCount()

uint32_t llvm::DWARFDebugNames::NameIndex::getLocalTUCount ( ) const
inline

◆ getLocalTUOffset()

uint64_t DWARFDebugNames::NameIndex::getLocalTUOffset ( uint32_t  TU) const

Reads offset of local type unit TU, TU is 0-based.

Definition at line 751 of file DWARFAcceleratorTable.cpp.

References assert(), llvm::dwarf::getDwarfOffsetByteSize(), and llvm::Offset.

Referenced by llvm::DWARFDebugNames::Entry::getLocalTUOffset().

◆ getNameCount()

uint32_t llvm::DWARFDebugNames::NameIndex::getNameCount ( ) const
inline

Definition at line 663 of file DWARFAcceleratorTable.h.

Referenced by end().

◆ getNameTableEntry()

DWARFDebugNames::NameTableEntry DWARFDebugNames::NameIndex::getNameTableEntry ( uint32_t  Index) const

Reads an entry in the Name Table for the given Index.

The Name Table consists of two arrays – String Offsets and Entry Offsets. The returned offsets are relative to the starts of respective sections. Input Index is 1-based.

Definition at line 795 of file DWARFAcceleratorTable.cpp.

References assert(), and llvm::dwarf::getDwarfOffsetByteSize().

Referenced by llvm::DWARFDebugNames::NameIterator::operator*().

◆ getNextUnitOffset()

uint64_t llvm::DWARFDebugNames::NameIndex::getNextUnitOffset ( ) const
inline

◆ getOffsets()

DWARFDebugNamesOffsets llvm::DWARFDebugNames::NameIndex::getOffsets ( ) const
inline

Returns Offsets field.

Definition at line 633 of file DWARFAcceleratorTable.h.

◆ getUnitOffset()

uint64_t llvm::DWARFDebugNames::NameIndex::getUnitOffset ( ) const
inline

Definition at line 685 of file DWARFAcceleratorTable.h.

References llvm::sampleprof::Base.

Friends And Related Function Documentation

◆ DWARFDebugNames

friend class DWARFDebugNames
friend

Definition at line 692 of file DWARFAcceleratorTable.h.


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