LLVM 20.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 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(), P, and llvm::StringRef::size().

◆ CachedHashString() [4/5]

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

Definition at line 111 of file CachedHashString.h.

References llvm::Other, and P.

◆ CachedHashString() [5/5]

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

Definition at line 126 of file CachedHashString.h.

References llvm::Other, and P.

◆ ~CachedHashString()

llvm::CachedHashString::~CachedHashString ( )
inline

Definition at line 131 of file CachedHashString.h.

References P.

Member Function Documentation

◆ hash()

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

◆ operator CachedHashStringRef()

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

Definition at line 141 of file CachedHashString.h.

References val().

◆ operator StringRef()

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

Definition at line 140 of file CachedHashString.h.

References val().

◆ operator=()

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

Definition at line 121 of file CachedHashString.h.

References llvm::Other, and 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.

References P.

Referenced by operator CachedHashStringRef(), and operator StringRef().

Friends And Related Function Documentation

◆ DenseMapInfo< CachedHashString >

friend struct DenseMapInfo< CachedHashString >
friend

Definition at line 62 of file CachedHashString.h.

◆ swap

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: