LLVM  14.0.0git
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 71 of file CachedHashString.h.

Constructor & Destructor Documentation

◆ CachedHashString() [1/5]

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

Definition at line 97 of file CachedHashString.h.

◆ CachedHashString() [2/5]

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

Definition at line 100 of file CachedHashString.h.

◆ CachedHashString() [3/5]

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

Definition at line 103 of file CachedHashString.h.

References memcpy(), P, and S.

◆ CachedHashString() [4/5]

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

Definition at line 110 of file CachedHashString.h.

References memcpy(), Other, and P.

◆ CachedHashString() [5/5]

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

Definition at line 125 of file CachedHashString.h.

References Other, and P.

◆ ~CachedHashString()

llvm::CachedHashString::~CachedHashString ( )
inline

Definition at line 130 of file CachedHashString.h.

References P.

Member Function Documentation

◆ hash()

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

Definition at line 137 of file CachedHashString.h.

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

◆ operator CachedHashStringRef()

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

Definition at line 140 of file CachedHashString.h.

References val().

◆ operator StringRef()

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

Definition at line 139 of file CachedHashString.h.

References val().

◆ operator=()

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

Definition at line 120 of file CachedHashString.h.

References Other, and swap.

◆ size()

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

Definition at line 136 of file CachedHashString.h.

◆ val()

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

Friends And Related Function Documentation

◆ DenseMapInfo< CachedHashString >

friend struct DenseMapInfo< CachedHashString >
friend

Definition at line 72 of file CachedHashString.h.

◆ swap

void swap ( CachedHashString LHS,
CachedHashString RHS 
)
friend

Definition at line 144 of file CachedHashString.h.

Referenced by operator=().


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