LLVM  8.0.1
Public Member Functions | List of all members
llvm::PooledStringPtr Class Reference

PooledStringPtr - A pointer to an interned string. More...

#include "llvm/Support/StringPool.h"

Public Member Functions

 PooledStringPtr ()=default
 
 PooledStringPtr (entry_t *E)
 
 PooledStringPtr (const PooledStringPtr &That)
 
PooledStringPtroperator= (const PooledStringPtr &That)
 
void clear ()
 
 ~PooledStringPtr ()
 
const charbegin () const
 
const charend () const
 
unsigned size () const
 
const charoperator* () const
 
 operator bool () const
 
bool operator== (const PooledStringPtr &That) const
 
bool operator!= (const PooledStringPtr &That) const
 

Detailed Description

PooledStringPtr - A pointer to an interned string.

Use operator bool to test whether the pointer is valid, and operator * to get the string if so. This is a lightweight value class with storage requirements equivalent to a single pointer, but it does have reference-counting overhead when copied.

Definition at line 79 of file StringPool.h.

Constructor & Destructor Documentation

◆ PooledStringPtr() [1/3]

llvm::PooledStringPtr::PooledStringPtr ( )
default

◆ PooledStringPtr() [2/3]

llvm::PooledStringPtr::PooledStringPtr ( entry_t E)
inlineexplicit

Definition at line 87 of file StringPool.h.

References llvm::StringMapEntry< ValueTy >::getValue().

◆ PooledStringPtr() [3/3]

llvm::PooledStringPtr::PooledStringPtr ( const PooledStringPtr That)
inline

Definition at line 91 of file StringPool.h.

References llvm::StringMapEntry< ValueTy >::getValue().

◆ ~PooledStringPtr()

llvm::PooledStringPtr::~PooledStringPtr ( )
inline

Definition at line 114 of file StringPool.h.

References clear().

Member Function Documentation

◆ begin()

const char* llvm::PooledStringPtr::begin ( ) const
inline

Definition at line 116 of file StringPool.h.

References assert(), and llvm::StringMapEntry< ValueTy >::getKeyData().

◆ clear()

void llvm::PooledStringPtr::clear ( )
inline

◆ end()

const char* llvm::PooledStringPtr::end ( ) const
inline

◆ operator bool()

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

Definition at line 132 of file StringPool.h.

◆ operator!=()

bool llvm::PooledStringPtr::operator!= ( const PooledStringPtr That) const
inline

Definition at line 135 of file StringPool.h.

◆ operator*()

const char* llvm::PooledStringPtr::operator* ( ) const
inline

Definition at line 131 of file StringPool.h.

References llvm::sys::path::begin().

◆ operator=()

PooledStringPtr& llvm::PooledStringPtr::operator= ( const PooledStringPtr That)
inline

Definition at line 95 of file StringPool.h.

References clear(), and llvm::StringMapEntry< ValueTy >::getValue().

◆ operator==()

bool llvm::PooledStringPtr::operator== ( const PooledStringPtr That) const
inline

Definition at line 134 of file StringPool.h.

◆ size()

unsigned llvm::PooledStringPtr::size ( ) const
inline

Definition at line 126 of file StringPool.h.

References assert(), and llvm::StringMapEntryBase::getKeyLength().


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