LLVM 22.0.0git
llvm::ScopedHashTable< K, V, KInfo, AllocatorTy > Class Template Reference

#include "llvm/ADT/ScopedHashTable.h"

Inheritance diagram for llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >:
[legend]

Public Types

using ScopeTy = ScopedHashTableScope<K, V, KInfo, AllocatorTy>
 ScopeTy - This is a helpful typedef that allows clients to get easy access to the name of the scope for this hash table.
using size_type = unsigned
using iterator = ScopedHashTableIterator<K, V, KInfo>

Public Member Functions

 ScopedHashTable ()=default
 ScopedHashTable (AllocatorTy A)
 ScopedHashTable (const ScopedHashTable &)=delete
ScopedHashTableoperator= (const ScopedHashTable &)=delete
 ~ScopedHashTable ()
size_type count (const K &Key) const
 Return 1 if the specified key is in the table, 0 otherwise.
lookup (const K &Key) const
void insert (const K &Key, const V &Val)
iterator end ()
iterator begin (const K &Key)
ScopeTygetCurScope ()
const ScopeTygetCurScope () const
void insertIntoScope (ScopeTy *S, const K &Key, const V &Val)
 insertIntoScope - This inserts the specified key/value at the specified (possibly not the current) scope.
AllocatorTy & getAllocator ()
 Access to the allocator.
const AllocatorTy & getAllocator () const
 Access to the allocator.

Friends

class ScopedHashTableScope< K, V, KInfo, AllocatorTy >

Detailed Description

template<typename K, typename V, typename KInfo, typename AllocatorTy>
class llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >

Definition at line 150 of file ScopedHashTable.h.

Member Typedef Documentation

◆ iterator

template<typename K, typename V, typename KInfo, typename AllocatorTy>
using llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::iterator = ScopedHashTableIterator<K, V, KInfo>

Definition at line 197 of file ScopedHashTable.h.

◆ ScopeTy

template<typename K, typename V, typename KInfo, typename AllocatorTy>
using llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::ScopeTy = ScopedHashTableScope<K, V, KInfo, AllocatorTy>

ScopeTy - This is a helpful typedef that allows clients to get easy access to the name of the scope for this hash table.

Definition at line 156 of file ScopedHashTable.h.

◆ size_type

template<typename K, typename V, typename KInfo, typename AllocatorTy>
using llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::size_type = unsigned

Definition at line 157 of file ScopedHashTable.h.

Constructor & Destructor Documentation

◆ ScopedHashTable() [1/3]

template<typename K, typename V, typename KInfo, typename AllocatorTy>
llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::ScopedHashTable ( )
default

◆ ScopedHashTable() [2/3]

template<typename K, typename V, typename KInfo, typename AllocatorTy>
llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::ScopedHashTable ( AllocatorTy A)
inline

Definition at line 169 of file ScopedHashTable.h.

◆ ScopedHashTable() [3/3]

template<typename K, typename V, typename KInfo, typename AllocatorTy>
llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::ScopedHashTable ( const ScopedHashTable< K, V, KInfo, AllocatorTy > & )
delete

◆ ~ScopedHashTable()

template<typename K, typename V, typename KInfo, typename AllocatorTy>
llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::~ScopedHashTable ( )
inline

Definition at line 173 of file ScopedHashTable.h.

Member Function Documentation

◆ begin()

template<typename K, typename V, typename KInfo, typename AllocatorTy>
iterator llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::begin ( const K & Key)
inline

Definition at line 201 of file ScopedHashTable.h.

◆ count()

template<typename K, typename V, typename KInfo, typename AllocatorTy>
size_type llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::count ( const K & Key) const
inline

Return 1 if the specified key is in the table, 0 otherwise.

Definition at line 181 of file ScopedHashTable.h.

◆ end()

template<typename K, typename V, typename KInfo, typename AllocatorTy>
iterator llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::end ( )
inline

◆ getAllocator() [1/2]

template<typename K, typename V, typename KInfo, typename AllocatorTy>
AllocatorTy & llvm::detail::AllocatorHolder< AllocatorTy >::getAllocator ( )
inline

Access to the allocator.

Definition at line 115 of file AllocatorBase.h.

◆ getAllocator() [2/2]

template<typename K, typename V, typename KInfo, typename AllocatorTy>
const AllocatorTy & llvm::detail::AllocatorHolder< AllocatorTy >::getAllocator ( ) const
inline

Access to the allocator.

Definition at line 116 of file AllocatorBase.h.

◆ getCurScope() [1/2]

template<typename K, typename V, typename KInfo, typename AllocatorTy>
ScopeTy * llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::getCurScope ( )
inline

Definition at line 208 of file ScopedHashTable.h.

◆ getCurScope() [2/2]

template<typename K, typename V, typename KInfo, typename AllocatorTy>
const ScopeTy * llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::getCurScope ( ) const
inline

Definition at line 209 of file ScopedHashTable.h.

◆ insert()

template<typename K, typename V, typename KInfo, typename AllocatorTy>
void llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::insert ( const K & Key,
const V & Val )
inline

Definition at line 193 of file ScopedHashTable.h.

Referenced by loadCSE().

◆ insertIntoScope()

template<typename K, typename V, typename KInfo, typename AllocatorTy>
void llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::insertIntoScope ( ScopeTy * S,
const K & Key,
const V & Val )
inline

insertIntoScope - This inserts the specified key/value at the specified (possibly not the current) scope.

While it is ok to insert into a scope that isn't the current one, it isn't ok to insert underneath an existing value of the specified key.

Definition at line 215 of file ScopedHashTable.h.

Referenced by llvm::ScopedHashTable< MachineInstr *, unsigned, MachineInstrExpressionTrait, AllocatorTy >::insert().

◆ lookup()

template<typename K, typename V, typename KInfo, typename AllocatorTy>
V llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::lookup ( const K & Key) const
inline

Definition at line 185 of file ScopedHashTable.h.

Referenced by loadCSE().

◆ operator=()

template<typename K, typename V, typename KInfo, typename AllocatorTy>
ScopedHashTable & llvm::ScopedHashTable< K, V, KInfo, AllocatorTy >::operator= ( const ScopedHashTable< K, V, KInfo, AllocatorTy > & )
delete

◆ ScopedHashTableScope< K, V, KInfo, AllocatorTy >

template<typename K, typename V, typename KInfo, typename AllocatorTy>
friend class ScopedHashTableScope< K, V, KInfo, AllocatorTy >
friend

Definition at line 144 of file ScopedHashTable.h.


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