LLVM 22.0.0git
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.
LLVM_ABI uint64_t getCUOffset (uint32_t CU) const
 Reads offset of compilation unit CU. CU is 0-based.
uint32_t getCUCount () const
LLVM_ABI uint64_t getLocalTUOffset (uint32_t TU) const
 Reads offset of local type unit TU, TU is 0-based.
uint32_t getLocalTUCount () const
LLVM_ABI uint64_t getForeignTUSignature (uint32_t TU) const
 Reads signature of foreign type unit TU. TU is 0-based.
uint32_t getForeignTUCount () const
LLVM_ABI uint32_t getBucketArrayEntry (uint32_t Bucket) const
 Reads an entry in the Bucket Array for the given Bucket.
uint32_t getBucketCount () const
LLVM_ABI uint32_t getHashArrayEntry (uint32_t Index) const
 Reads an entry in the Hash Array for the given Index.
LLVM_ABI 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
LLVM_ABI 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.
LLVM_ABI iterator_range< ValueIteratorequal_range (StringRef Key) const
 Look up all entries in this Name Index matching Key.
NameIterator begin () const
NameIterator end () const
LLVM_ABI Error extract ()
uint64_t getUnitOffset () const
uint64_t getNextUnitOffset () const
LLVM_ABI 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 600 of file DWARFAcceleratorTable.h.

Constructor & Destructor Documentation

◆ NameIndex()

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

Definition at line 627 of file DWARFAcceleratorTable.h.

References DWARFDebugNames.

Member Function Documentation

◆ begin()

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

Definition at line 682 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_DUMP_METHOD, and llvm::Twine::utohexstr().

◆ end()

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

Definition at line 683 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::InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key, and llvm::make_range().

◆ extract()

◆ getAbbrevs()

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

Definition at line 666 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 652 of file DWARFAcceleratorTable.h.

◆ getCUCount()

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

Definition at line 638 of file DWARFAcceleratorTable.h.

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

◆ getEntry()

◆ 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 674 of file DWARFAcceleratorTable.h.

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

◆ getForeignTUCount()

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

Definition at line 646 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 759 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 818 of file DWARFAcceleratorTable.cpp.

References assert().

◆ getHeader()

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

Returns Hdr field.

Definition at line 631 of file DWARFAcceleratorTable.h.

◆ getLocalTUCount()

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

Definition at line 642 of file DWARFAcceleratorTable.h.

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

◆ getNameCount()

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

Definition at line 664 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().

◆ getNextUnitOffset()

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

◆ getOffsets()

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

Returns Offsets field.

Definition at line 634 of file DWARFAcceleratorTable.h.

◆ getUnitOffset()

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

Definition at line 686 of file DWARFAcceleratorTable.h.

◆ DWARFDebugNames

friend class DWARFDebugNames
friend

Definition at line 693 of file DWARFAcceleratorTable.h.

References DWARFDebugNames.

Referenced by DWARFDebugNames, and NameIndex().


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