LLVM 18.0.0git
Public Member Functions | Friends | List of all members
llvm::orc::NonOwningSymbolStringPtr Class Reference

Non-owning SymbolStringPool entry pointer. More...

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

Inheritance diagram for llvm::orc::NonOwningSymbolStringPtr:
Inheritance graph

Public Member Functions

 NonOwningSymbolStringPtr ()=default
 NonOwningSymbolStringPtr (const SymbolStringPtr &S)
- Public Member Functions inherited from llvm::orc::SymbolStringPtrBase
 SymbolStringPtrBase ()=default
 SymbolStringPtrBase (std::nullptr_t)
 operator bool () const
StringRef operator* () const
bool poolEntryIsAlive () const


struct DenseMapInfo< orc::NonOwningSymbolStringPtr >

Additional Inherited Members

- Protected Types inherited from llvm::orc::SymbolStringPtrBase
using PoolEntry = SymbolStringPool::PoolMapEntry
using PoolEntryPtr = PoolEntry *
- Protected Member Functions inherited from llvm::orc::SymbolStringPtrBase
 SymbolStringPtrBase (PoolEntryPtr S)
size_t getRefCount () const
- Static Protected Member Functions inherited from llvm::orc::SymbolStringPtrBase
static bool isRealPoolEntry (PoolEntryPtr P)
- Protected Attributes inherited from llvm::orc::SymbolStringPtrBase
PoolEntryPtr S = nullptr
- Static Protected Attributes inherited from llvm::orc::SymbolStringPtrBase
static constexpr uintptr_t EmptyBitPattern
static constexpr uintptr_t TombstoneBitPattern
static constexpr uintptr_t InvalidPtrMask

Detailed Description

Non-owning SymbolStringPool entry pointer.

Instances are comparable with SymbolStringPtr instances and guaranteed to have the same hash, but do not affect the ref-count of the pooled string (and are therefore cheaper to copy).

NonOwningSymbolStringPtrs are silently invalidated if the pool entry's ref-count drops to zero, so they should only be used in contexts where a corresponding SymbolStringPtr is known to exist (which will guarantee that the ref-count stays above zero). E.g. in a graph where nodes are represented by SymbolStringPtrs the edges can be represented by pairs of NonOwningSymbolStringPtrs and this will make the introduction of deletion of edges cheaper.

Definition at line 204 of file SymbolStringPool.h.

Constructor & Destructor Documentation

◆ NonOwningSymbolStringPtr() [1/2]

llvm::orc::NonOwningSymbolStringPtr::NonOwningSymbolStringPtr ( )

◆ NonOwningSymbolStringPtr() [2/2]

llvm::orc::NonOwningSymbolStringPtr::NonOwningSymbolStringPtr ( const SymbolStringPtr S)

Definition at line 209 of file SymbolStringPool.h.

Friends And Related Function Documentation

◆ DenseMapInfo< orc::NonOwningSymbolStringPtr >

Definition at line 187 of file SymbolStringPool.h.

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