LLVM: llvm::orc::NonOwningSymbolStringPtr Class Reference (original) (raw)

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 253 of file SymbolStringPool.h.