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

String pool for symbol names used by the JIT. More...

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

Public Member Functions

 ~SymbolStringPool ()
 Destroy a SymbolStringPool. More...
 
SymbolStringPtr intern (StringRef S)
 Create a symbol string pointer from the given string. More...
 
void clearDeadEntries ()
 Remove from the pool any entries that are no longer referenced. More...
 
bool empty () const
 Returns true if the pool is empty. More...
 

Friends

class SymbolStringPtr
 
raw_ostreamoperator<< (raw_ostream &OS, const SymbolStringPool &SSP)
 Dump a SymbolStringPool. Useful for debugging dangling-pointer crashes. More...
 

Detailed Description

String pool for symbol names used by the JIT.

Definition at line 30 of file SymbolStringPool.h.

Constructor & Destructor Documentation

◆ ~SymbolStringPool()

llvm::orc::SymbolStringPool::~SymbolStringPool ( )
inline

Destroy a SymbolStringPool.

Definition at line 161 of file SymbolStringPool.h.

References assert(), clearDeadEntries(), and llvm::StringMapImpl::empty().

Member Function Documentation

◆ clearDeadEntries()

void llvm::orc::SymbolStringPool::clearDeadEntries ( )
inline

Remove from the pool any entries that are no longer referenced.

Definition at line 176 of file SymbolStringPool.h.

References llvm::StringMap< ValueTy, AllocatorTy >::begin(), E, llvm::StringMap< ValueTy, AllocatorTy >::end(), llvm::StringMap< ValueTy, AllocatorTy >::erase(), I, and llvm::Lock.

Referenced by ~SymbolStringPool().

◆ empty()

bool llvm::orc::SymbolStringPool::empty ( ) const
inline

Returns true if the pool is empty.

Definition at line 185 of file SymbolStringPool.h.

References llvm::StringMapImpl::empty(), and llvm::Lock.

◆ intern()

SymbolStringPtr llvm::orc::SymbolStringPool::intern ( StringRef  S)
inline

Create a symbol string pointer from the given string.

Definition at line 168 of file SymbolStringPool.h.

References I, llvm::Lock, S, SymbolStringPtr, and llvm::StringMap< ValueTy, AllocatorTy >::try_emplace().

Friends And Related Function Documentation

◆ operator<<

raw_ostream& operator<< ( raw_ostream OS,
const SymbolStringPool SSP 
)
friend

Dump a SymbolStringPool. Useful for debugging dangling-pointer crashes.

Definition at line 300 of file DebugUtils.cpp.

◆ SymbolStringPtr

friend class SymbolStringPtr
friend

Definition at line 31 of file SymbolStringPool.h.

Referenced by intern().


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