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

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

#include "llvm/CodeGen/DwarfStringPoolEntry.h"

Public Member Functions

 DwarfStringPoolEntryRef ()=default
 
 DwarfStringPoolEntryRef (const StringMapEntry< DwarfStringPoolEntry > &Entry)
 ASSUMPTION: DwarfStringPoolEntryRef keeps pointer to Entry, thus specified entry mustn`t be reallocated.
 
 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/3]

llvm::DwarfStringPoolEntryRef::DwarfStringPoolEntryRef ( )
default

◆ DwarfStringPoolEntryRef() [2/3]

llvm::DwarfStringPoolEntryRef::DwarfStringPoolEntryRef ( const StringMapEntry< DwarfStringPoolEntry > &  Entry)
inline

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

Definition at line 64 of file DwarfStringPoolEntry.h.

◆ DwarfStringPoolEntryRef() [3/3]

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

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.

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.

Referenced by llvm::DwarfUnit::addString(), llvm::DIEString::emitValue(), and llvm::DIEString::sizeOf().

◆ getOffset()

uint64_t llvm::DwarfStringPoolEntryRef::getOffset ( ) const
inline

◆ getString()

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

Definition at line 90 of file DwarfStringPoolEntry.h.

Referenced by llvm::DIEString::getString(), and llvm::DIEString::print().

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

Referenced by llvm::DIEString::emitValue(), and llvm::DIEString::sizeOf().

◆ operator bool()

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

Definition at line 72 of file DwarfStringPoolEntry.h.

References llvm::PointerUnion< PTs >::isNull().

◆ operator!=()

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

Definition at line 109 of file DwarfStringPoolEntry.h.

References llvm::PointerUnion< PTs >::getOpaqueValue(), and X.

◆ operator==()

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

Definition at line 105 of file DwarfStringPoolEntry.h.

References llvm::PointerUnion< PTs >::getOpaqueValue(), and X.


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