LLVM 19.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)
 
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 578 of file DWARFAcceleratorTable.h.

Constructor & Destructor Documentation

◆ NameIndex()

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

Definition at line 605 of file DWARFAcceleratorTable.h.

References llvm::sampleprof::Base.

Member Function Documentation

◆ begin()

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

Definition at line 654 of file DWARFAcceleratorTable.h.

◆ dump()

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

Definition at line 901 of file DWARFAcceleratorTable.cpp.

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

◆ end()

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

Definition at line 655 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 933 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 638 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 794 of file DWARFAcceleratorTable.cpp.

References assert().

◆ getBucketCount()

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

Definition at line 624 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 726 of file DWARFAcceleratorTable.cpp.

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

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

◆ 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 646 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

Definition at line 618 of file DWARFAcceleratorTable.h.

◆ getForeignTUSignature()

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

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

Definition at line 741 of file DWARFAcceleratorTable.cpp.

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

◆ 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 800 of file DWARFAcceleratorTable.cpp.

References assert().

◆ 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 733 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 636 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 777 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

◆ getUnitOffset()

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

Definition at line 658 of file DWARFAcceleratorTable.h.

References llvm::sampleprof::Base.

Friends And Related Function Documentation

◆ DWARFDebugNames

friend class DWARFDebugNames
friend

Definition at line 665 of file DWARFAcceleratorTable.h.


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