LLVM  8.0.1
Public Member Functions | List of all members
llvm::CachedHashStringRef Class Reference

A container which contains a StringRef plus a precomputed hash. More...

#include "llvm/ADT/CachedHashString.h"

Public Member Functions

 CachedHashStringRef (StringRef S)
 
 CachedHashStringRef (StringRef S, uint32_t Hash)
 
StringRef val () const
 
const chardata () const
 
uint32_t size () const
 
uint32_t hash () const
 

Detailed Description

A container which contains a StringRef plus a precomputed hash.

Definition at line 30 of file CachedHashString.h.

Constructor & Destructor Documentation

◆ CachedHashStringRef() [1/2]

llvm::CachedHashStringRef::CachedHashStringRef ( StringRef  S)
inlineexplicit

◆ CachedHashStringRef() [2/2]

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

Definition at line 40 of file CachedHashString.h.

References assert(), llvm::max(), and llvm::StringRef::size().

Member Function Documentation

◆ data()

const char* llvm::CachedHashStringRef::data ( ) const
inline

Definition at line 46 of file CachedHashString.h.

◆ hash()

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

◆ size()

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

Definition at line 47 of file CachedHashString.h.

Referenced by llvm::StringTableBuilder::add().

◆ val()

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

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