LLVM 22.0.0git
llvm::DwarfStringPoolEntryRef Class Reference

DwarfStringPoolEntryRef: Dwarf string pool entry reference. More...

#include "llvm/CodeGen/DwarfStringPoolEntry.h"

Public Member Functions

 DwarfStringPoolEntryRef ()=default
 DwarfStringPoolEntryRef (const DwarfStringPoolEntryWithExtString &Entry)
 ASSUMPTION: DwarfStringPoolEntryRef keeps pointer to Entry, thus specified entry mustn`t be reallocated.
 operator bool () const
MCSymbolgetSymbol () const
uint64_t getOffset () const
unsigned getIndex () const
StringRef getString () const
const DwarfStringPoolEntrygetEntry () const
bool operator== (const DwarfStringPoolEntryRef &X) const
bool operator!= (const DwarfStringPoolEntryRef &X) const

Detailed Description

DwarfStringPoolEntryRef: Dwarf string pool entry reference.

Dwarf string pool entry keeps string value and its data. There are two variants how data are represented:

  1. String data in pool - StringMapEntry<DwarfStringPoolEntry>.
  2. External string data - DwarfStringPoolEntryWithExtString.

The external data variant allows reducing memory usage for the case when string pool entry does not have data: string entry does not keep any data and so no need to waste space for the full DwarfStringPoolEntry. It is recommended to use external variant if not all entries of dwarf string pool have corresponding DwarfStringPoolEntry.

Definition at line 49 of file DwarfStringPoolEntry.h.

Constructor & Destructor Documentation

◆ DwarfStringPoolEntryRef() [1/2]

llvm::DwarfStringPoolEntryRef::DwarfStringPoolEntryRef ( )
default

Referenced by operator!=(), and operator==().

◆ DwarfStringPoolEntryRef() [2/2]

llvm::DwarfStringPoolEntryRef::DwarfStringPoolEntryRef ( const DwarfStringPoolEntryWithExtString & Entry)
inline

ASSUMPTION: DwarfStringPoolEntryRef keeps pointer to Entry, thus specified entry mustn`t be reallocated.

DwarfStringPoolEntryRef(const StringMapEntry<DwarfStringPoolEntry> &Entry) : MapEntry(&Entry) {}

/ ASSUMPTION: DwarfStringPoolEntryRef keeps pointer to Entry, / thus specified entry mustn`t be reallocated.

Definition at line 69 of file DwarfStringPoolEntry.h.

Member Function Documentation

◆ getEntry()

const DwarfStringPoolEntry & llvm::DwarfStringPoolEntryRef::getEntry ( ) const
inline
Returns
the entire string pool entry for convenience.

Definition at line 98 of file DwarfStringPoolEntry.h.

References llvm::cast(), and llvm::isa().

Referenced by llvm::AsmPrinter::emitDwarfStringOffset(), getIndex(), getOffset(), and getSymbol().

◆ getIndex()

unsigned llvm::DwarfStringPoolEntryRef::getIndex ( ) const
inline
Returns
index for the dwarf string.

Definition at line 84 of file DwarfStringPoolEntry.h.

References assert(), getEntry(), and llvm::DwarfStringPoolEntry::Index.

◆ getOffset()

uint64_t llvm::DwarfStringPoolEntryRef::getOffset ( ) const
inline
Returns
offset for the dwarf string.

Definition at line 81 of file DwarfStringPoolEntry.h.

References getEntry(), and llvm::DwarfStringPoolEntry::Offset.

Referenced by llvm::NonRelocatableStringpool::getStringOffset().

◆ getString()

StringRef llvm::DwarfStringPoolEntryRef::getString ( ) const
inline
Returns
string.

Definition at line 90 of file DwarfStringPoolEntry.h.

References llvm::cast(), and llvm::isa().

◆ getSymbol()

MCSymbol * llvm::DwarfStringPoolEntryRef::getSymbol ( ) const
inline
Returns
symbol for the dwarf string.

Definition at line 75 of file DwarfStringPoolEntry.h.

References assert(), getEntry(), and llvm::DwarfStringPoolEntry::Symbol.

◆ operator bool()

llvm::DwarfStringPoolEntryRef::operator bool ( ) const
inlineexplicit

Definition at line 72 of file DwarfStringPoolEntry.h.

◆ operator!=()

bool llvm::DwarfStringPoolEntryRef::operator!= ( const DwarfStringPoolEntryRef & X) const
inline

Definition at line 109 of file DwarfStringPoolEntry.h.

References DwarfStringPoolEntryRef(), and X.

◆ operator==()

bool llvm::DwarfStringPoolEntryRef::operator== ( const DwarfStringPoolEntryRef & X) const
inline

Definition at line 105 of file DwarfStringPoolEntry.h.

References DwarfStringPoolEntryRef(), and X.


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