LLVM 20.0.0git
Classes | Public Member Functions | List of all members
llvm::AppleAcceleratorTable Class Reference

This implements the Apple accelerator table format, a precursor of the DWARF 5 accelerator table format. More...

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

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

Classes

class  Entry
 Apple-specific implementation of an Accelerator Entry. More...
 
struct  EntryWithName
 
class  Iterator
 An iterator for all entries in the table. More...
 
class  SameNameIterator
 An iterator for Entries all having the same string as key. More...
 

Public Member Functions

 AppleAcceleratorTable (const DWARFDataExtractor &AccelSection, DataExtractor StringSection)
 
Error extract () override
 
uint32_t getNumBuckets () const
 
uint32_t getNumHashes () const
 
uint32_t getSizeHdr () const
 
uint32_t getHeaderDataLength () const
 
uint32_t getHashDataEntryLength () const
 Returns the size of one HashData entry.
 
ArrayRef< std::pair< HeaderData::AtomType, HeaderData::Form > > getAtomsDesc ()
 Return the Atom description, which can be used to interpret the raw values of the Accelerator Entries in this table.
 
bool containsAtomType (HeaderData::AtomType AtomTy) const
 Returns true iff AtomTy is one of the atoms available in Entries of this table.
 
bool validateForms ()
 
std::pair< uint64_t, dwarf::TagreadAtoms (uint64_t *HashDataOffset)
 Return information related to the DWARF DIE we're looking for when performing a lookup by name.
 
void dump (raw_ostream &OS) const override
 
iterator_range< SameNameIteratorequal_range (StringRef Key) const
 Look up all entries in the accelerator table matching Key.
 
auto entries () const
 Lookup all entries in the accelerator table.
 
- Public Member Functions inherited from llvm::DWARFAcceleratorTable
 DWARFAcceleratorTable (const DWARFDataExtractor &AccelSection, DataExtractor StringSection)
 
virtual ~DWARFAcceleratorTable ()
 
virtual Error extract ()=0
 
virtual void dump (raw_ostream &OS) const =0
 
 DWARFAcceleratorTable (const DWARFAcceleratorTable &)=delete
 
void operator= (const DWARFAcceleratorTable &)=delete
 

Additional Inherited Members

- Protected Attributes inherited from llvm::DWARFAcceleratorTable
DWARFDataExtractor AccelSection
 
DataExtractor StringSection
 

Detailed Description

This implements the Apple accelerator table format, a precursor of the DWARF 5 accelerator table format.

Definition at line 100 of file DWARFAcceleratorTable.h.

Constructor & Destructor Documentation

◆ AppleAcceleratorTable()

llvm::AppleAcceleratorTable::AppleAcceleratorTable ( const DWARFDataExtractor AccelSection,
DataExtractor  StringSection 
)
inline

Definition at line 317 of file DWARFAcceleratorTable.h.

Member Function Documentation

◆ containsAtomType()

bool llvm::AppleAcceleratorTable::containsAtomType ( HeaderData::AtomType  AtomTy) const
inline

Returns true iff AtomTy is one of the atoms available in Entries of this table.

Definition at line 336 of file DWARFAcceleratorTable.h.

References llvm::is_contained(), and llvm::make_first_range().

◆ dump()

LLVM_DUMP_METHOD void AppleAcceleratorTable::dump ( raw_ostream OS) const
overridevirtual

◆ entries()

auto llvm::AppleAcceleratorTable::entries ( ) const
inline

Lookup all entries in the accelerator table.

Definition at line 357 of file DWARFAcceleratorTable.h.

References llvm::make_range().

◆ equal_range()

iterator_range< AppleAcceleratorTable::SameNameIterator > AppleAcceleratorTable::equal_range ( StringRef  Key) const

Look up all entries in the accelerator table matching Key.

Definition at line 350 of file DWARFAcceleratorTable.cpp.

References llvm::DWARFAcceleratorTable::AccelSection, llvm::djbHash(), getHashDataEntryLength(), llvm::make_range(), and llvm::DataExtractor::size().

◆ extract()

Error AppleAcceleratorTable::extract ( )
overridevirtual

◆ getAtomsDesc()

ArrayRef< std::pair< AppleAcceleratorTable::HeaderData::AtomType, AppleAcceleratorTable::HeaderData::Form > > AppleAcceleratorTable::getAtomsDesc ( )

Return the Atom description, which can be used to interpret the raw values of the Accelerator Entries in this table.

Definition at line 103 of file DWARFAcceleratorTable.cpp.

Referenced by readAtoms(), and validateForms().

◆ getHashDataEntryLength()

uint32_t llvm::AppleAcceleratorTable::getHashDataEntryLength ( ) const
inline

Returns the size of one HashData entry.

Definition at line 328 of file DWARFAcceleratorTable.h.

Referenced by dump(), equal_range(), and llvm::AppleAcceleratorTable::SameNameIterator::operator++().

◆ getHeaderDataLength()

uint32_t AppleAcceleratorTable::getHeaderDataLength ( ) const

Definition at line 97 of file DWARFAcceleratorTable.cpp.

◆ getNumBuckets()

uint32_t AppleAcceleratorTable::getNumBuckets ( ) const

Definition at line 92 of file DWARFAcceleratorTable.cpp.

◆ getNumHashes()

uint32_t AppleAcceleratorTable::getNumHashes ( ) const

Definition at line 95 of file DWARFAcceleratorTable.cpp.

◆ getSizeHdr()

uint32_t AppleAcceleratorTable::getSizeHdr ( ) const

Definition at line 96 of file DWARFAcceleratorTable.cpp.

◆ readAtoms()

std::pair< uint64_t, dwarf::Tag > AppleAcceleratorTable::readAtoms ( uint64_t HashDataOffset)

Return information related to the DWARF DIE we're looking for when performing a lookup by name.

Parameters
HashDataOffsetan offset into the hash data table
Returns
<DieOffset, DieTag> DieOffset is the offset into the .debug_info section for the DIE related to the input hash data offset. DieTag is the tag of the DIE

Definition at line 127 of file DWARFAcceleratorTable.cpp.

References llvm::DWARFAcceleratorTable::AccelSection, llvm::dwarf::DW_ATOM_die_offset, llvm::dwarf::DW_ATOM_die_tag, llvm::dwarf::DW_INVALID_OFFSET, llvm::DWARFFormValue::extractValue(), llvm::DWARFFormValue::getAsUnsignedConstant(), and getAtomsDesc().

◆ validateForms()

bool AppleAcceleratorTable::validateForms ( )

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