LLVM  4.0.0
Classes | Public Member Functions | Friends | List of all members
llvm::CachedHashString Class Reference

A container which contains a string, which it owns, plus a precomputed hash. More...

#include <CachedHashString.h>

Public Member Functions

 CachedHashString (const char *S)
 
 CachedHashString (StringRef S)
 
 CachedHashString (StringRef S, uint32_t Hash)
 
 CachedHashString (const CachedHashString &Other)
 
CachedHashStringoperator= (CachedHashString Other)
 
 CachedHashString (CachedHashString &&Other) noexcept
 
 ~CachedHashString ()
 
StringRef val () const
 
uint32_t size () const
 
uint32_t hash () const
 
 operator StringRef () const
 
 operator CachedHashStringRef () const
 

Friends

struct DenseMapInfo< CachedHashString >
 
void swap (CachedHashString &LHS, CachedHashString &RHS)
 

Detailed Description

A container which contains a string, which it owns, plus a precomputed hash.

We do not null-terminate the string.

Definition at line 72 of file CachedHashString.h.

Constructor & Destructor Documentation

llvm::CachedHashString::CachedHashString ( const char *  S)
inlineexplicit

Definition at line 98 of file CachedHashString.h.

llvm::CachedHashString::CachedHashString ( StringRef  S)
inlineexplicit

Definition at line 101 of file CachedHashString.h.

llvm::CachedHashString::CachedHashString ( StringRef  S,
uint32_t  Hash 
)
inline

Definition at line 104 of file CachedHashString.h.

References llvm::StringRef::data(), and llvm::StringRef::size().

llvm::CachedHashString::CachedHashString ( const CachedHashString Other)
inline

Definition at line 111 of file CachedHashString.h.

llvm::CachedHashString::CachedHashString ( CachedHashString &&  Other)
inlinenoexcept

Definition at line 126 of file CachedHashString.h.

References Other.

llvm::CachedHashString::~CachedHashString ( )
inline

Definition at line 131 of file CachedHashString.h.

Member Function Documentation

uint32_t llvm::CachedHashString::hash ( ) const
inline
llvm::CachedHashString::operator CachedHashStringRef ( ) const
inline

Definition at line 141 of file CachedHashString.h.

References val().

llvm::CachedHashString::operator StringRef ( ) const
inline

Definition at line 140 of file CachedHashString.h.

References val().

CachedHashString& llvm::CachedHashString::operator= ( CachedHashString  Other)
inline

Definition at line 121 of file CachedHashString.h.

References swap.

uint32_t llvm::CachedHashString::size ( ) const
inline

Definition at line 137 of file CachedHashString.h.

StringRef llvm::CachedHashString::val ( ) const
inline

Friends And Related Function Documentation

friend struct DenseMapInfo< CachedHashString >
friend

Definition at line 73 of file CachedHashString.h.

void swap ( CachedHashString LHS,
CachedHashString RHS 
)
friend

Definition at line 145 of file CachedHashString.h.

Referenced by operator=().


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