LLVM  16.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. More...
 
 DwarfStringPoolEntryRef (const StringMapEntry< DwarfStringPoolEntry * > &Entry)
 ASSUMPTION: DwarfStringPoolEntryRef keeps pointer to Entry, thus specified entry mustn`t be reallocated. More...
 
 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. By value - StringMapEntry<DwarfStringPoolEntry>.
  2. By pointer - StringMapEntry<DwarfStringPoolEntry *>.

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

Definition at line 44 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 59 of file DwarfStringPoolEntry.h.

◆ DwarfStringPoolEntryRef() [3/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.

Member Function Documentation

◆ getEntry()

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

Definition at line 95 of file DwarfStringPoolEntry.h.

References llvm::PointerUnion< PTs >::get(), and llvm::PointerUnion< PTs >::is().

Referenced by getIndex(), getOffset(), and getSymbol().

◆ getIndex()

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

Definition at line 81 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 87 of file DwarfStringPoolEntry.h.

References llvm::PointerUnion< PTs >::get(), and llvm::PointerUnion< PTs >::is().

Referenced by llvm::DIEString::print().

◆ getSymbol()

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

Definition at line 72 of file DwarfStringPoolEntry.h.

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

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

◆ operator bool()

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

Definition at line 69 of file DwarfStringPoolEntry.h.

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

◆ operator!=()

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

Definition at line 106 of file DwarfStringPoolEntry.h.

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

◆ operator==()

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

Definition at line 102 of file DwarfStringPoolEntry.h.

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


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