LLVM  8.0.1
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 73 of file CachedHashString.h.

Constructor & Destructor Documentation

◆ CachedHashString() [1/5]

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

Definition at line 99 of file CachedHashString.h.

◆ CachedHashString() [2/5]

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

Definition at line 102 of file CachedHashString.h.

◆ CachedHashString() [3/5]

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

◆ CachedHashString() [4/5]

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

Definition at line 112 of file CachedHashString.h.

References llvm::Intrinsic::memcpy.

◆ CachedHashString() [5/5]

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

Definition at line 127 of file CachedHashString.h.

References Other.

◆ ~CachedHashString()

llvm::CachedHashString::~CachedHashString ( )
inline

Definition at line 132 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 141 of file CachedHashString.h.

References llvm::CachedHashStringRef::val().

◆ operator=()

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

Definition at line 122 of file CachedHashString.h.

References std::swap().

◆ size()

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

Definition at line 138 of file CachedHashString.h.

◆ val()

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

Definition at line 137 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 74 of file CachedHashString.h.

◆ swap

void swap ( CachedHashString LHS,
CachedHashString RHS 
)
friend

Definition at line 146 of file CachedHashString.h.


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