LLVM  6.0.0svn
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 "llvm/ADT/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

◆ CachedHashString() [1/5]

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

Definition at line 98 of file CachedHashString.h.

◆ CachedHashString() [2/5]

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

Definition at line 101 of file CachedHashString.h.

◆ CachedHashString() [3/5]

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().

◆ CachedHashString() [4/5]

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

Definition at line 111 of file CachedHashString.h.

◆ CachedHashString() [5/5]

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

Definition at line 126 of file CachedHashString.h.

References Other.

◆ ~CachedHashString()

llvm::CachedHashString::~CachedHashString ( )
inline

Definition at line 131 of file CachedHashString.h.

Member Function Documentation

◆ hash()

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

◆ operator CachedHashStringRef()

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

◆ operator StringRef()

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

Definition at line 140 of file CachedHashString.h.

References llvm::CachedHashStringRef::val().

◆ operator=()

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

Definition at line 121 of file CachedHashString.h.

References std::swap().

◆ size()

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

Definition at line 137 of file CachedHashString.h.

◆ val()

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

Definition at line 136 of file CachedHashString.h.

Referenced by llvm::DenseMapInfo< CachedHashString >::isEqual().

Friends And Related Function Documentation

◆ DenseMapInfo< CachedHashString >

friend struct DenseMapInfo< CachedHashString >
friend

Definition at line 73 of file CachedHashString.h.

◆ swap

void swap ( CachedHashString LHS,
CachedHashString RHS 
)
friend

Definition at line 145 of file CachedHashString.h.


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