LLVM 20.0.0git
Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
llvm::orc::SymbolStringPtrBase Class Reference

Base class for both owning and non-owning symbol-string ptrs. More...

#include "llvm/ExecutionEngine/Orc/SymbolStringPool.h"

Inheritance diagram for llvm::orc::SymbolStringPtrBase:
Inheritance graph
[legend]

Public Member Functions

 SymbolStringPtrBase ()=default
 
 SymbolStringPtrBase (std::nullptr_t)
 
 operator bool () const
 
StringRef operator* () const
 
bool poolEntryIsAlive () const
 

Protected Types

using PoolEntry = SymbolStringPool::PoolMapEntry
 
using PoolEntryPtr = PoolEntry *
 

Protected Member Functions

 SymbolStringPtrBase (PoolEntryPtr S)
 
size_t getRefCount () const
 

Static Protected Member Functions

static bool isRealPoolEntry (PoolEntryPtr P)
 

Protected Attributes

PoolEntryPtr S = nullptr
 

Static Protected Attributes

static constexpr uintptr_t EmptyBitPattern
 
static constexpr uintptr_t TombstoneBitPattern
 
static constexpr uintptr_t InvalidPtrMask
 

Friends

class SymbolStringPool
 
struct DenseMapInfo< SymbolStringPtr >
 
struct DenseMapInfo< NonOwningSymbolStringPtr >
 
bool operator== (SymbolStringPtrBase LHS, SymbolStringPtrBase RHS)
 
bool operator!= (SymbolStringPtrBase LHS, SymbolStringPtrBase RHS)
 
bool operator< (SymbolStringPtrBase LHS, SymbolStringPtrBase RHS)
 

Detailed Description

Base class for both owning and non-owning symbol-string ptrs.

All symbol-string ptrs are convertible to bool, dereferenceable and comparable.

SymbolStringPtrBases are default-constructible and constructible from nullptr to enable comparison with these values.

Definition at line 70 of file SymbolStringPool.h.

Member Typedef Documentation

◆ PoolEntry

Definition at line 106 of file SymbolStringPool.h.

◆ PoolEntryPtr

Definition at line 107 of file SymbolStringPool.h.

Constructor & Destructor Documentation

◆ SymbolStringPtrBase() [1/3]

llvm::orc::SymbolStringPtrBase::SymbolStringPtrBase ( )
default

◆ SymbolStringPtrBase() [2/3]

llvm::orc::SymbolStringPtrBase::SymbolStringPtrBase ( std::nullptr_t  )
inline

Definition at line 77 of file SymbolStringPool.h.

◆ SymbolStringPtrBase() [3/3]

llvm::orc::SymbolStringPtrBase::SymbolStringPtrBase ( PoolEntryPtr  S)
inlineprotected

Definition at line 109 of file SymbolStringPool.h.

Member Function Documentation

◆ getRefCount()

size_t llvm::orc::SymbolStringPtrBase::getRefCount ( ) const
inlineprotected

◆ isRealPoolEntry()

static bool llvm::orc::SymbolStringPtrBase::isRealPoolEntry ( PoolEntryPtr  P)
inlinestaticprotected

◆ operator bool()

llvm::orc::SymbolStringPtrBase::operator bool ( ) const
inlineexplicit

Definition at line 79 of file SymbolStringPool.h.

References S.

◆ operator*()

StringRef llvm::orc::SymbolStringPtrBase::operator* ( ) const
inline

Definition at line 81 of file SymbolStringPool.h.

References llvm::StringMapEntry< ValueTy >::first(), and S.

◆ poolEntryIsAlive()

bool llvm::orc::SymbolStringPtrBase::poolEntryIsAlive ( ) const
inline

Friends And Related Function Documentation

◆ DenseMapInfo< NonOwningSymbolStringPtr >

friend struct DenseMapInfo< NonOwningSymbolStringPtr >
friend

Definition at line 71 of file SymbolStringPool.h.

◆ DenseMapInfo< SymbolStringPtr >

friend struct DenseMapInfo< SymbolStringPtr >
friend

Definition at line 71 of file SymbolStringPool.h.

◆ operator!=

bool operator!= ( SymbolStringPtrBase  LHS,
SymbolStringPtrBase  RHS 
)
friend

Definition at line 87 of file SymbolStringPool.h.

◆ operator<

bool operator< ( SymbolStringPtrBase  LHS,
SymbolStringPtrBase  RHS 
)
friend

Definition at line 91 of file SymbolStringPool.h.

◆ operator==

bool operator== ( SymbolStringPtrBase  LHS,
SymbolStringPtrBase  RHS 
)
friend

Definition at line 83 of file SymbolStringPool.h.

◆ SymbolStringPool

friend class SymbolStringPool
friend

Definition at line 71 of file SymbolStringPool.h.

Member Data Documentation

◆ EmptyBitPattern

constexpr uintptr_t llvm::orc::SymbolStringPtrBase::EmptyBitPattern
staticconstexprprotected
Initial value:
=
std::numeric_limits<uintptr_t>::max()
<< PointerLikeTypeTraits<PoolEntryPtr>::NumLowBitsAvailable

Definition at line 111 of file SymbolStringPool.h.

◆ InvalidPtrMask

constexpr uintptr_t llvm::orc::SymbolStringPtrBase::InvalidPtrMask
staticconstexprprotected
Initial value:
=
(std::numeric_limits<uintptr_t>::max() - 3)
<< PointerLikeTypeTraits<PoolEntryPtr>::NumLowBitsAvailable

Definition at line 119 of file SymbolStringPool.h.

Referenced by isRealPoolEntry().

◆ S

PoolEntryPtr llvm::orc::SymbolStringPtrBase::S = nullptr
protected

◆ TombstoneBitPattern

constexpr uintptr_t llvm::orc::SymbolStringPtrBase::TombstoneBitPattern
staticconstexprprotected
Initial value:
=
(std::numeric_limits<uintptr_t>::max() - 1)
<< PointerLikeTypeTraits<PoolEntryPtr>::NumLowBitsAvailable

Definition at line 115 of file SymbolStringPool.h.


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