LLVM API Documentation
#include <StringMap.h>


Public Member Functions | |
| unsigned | getNumBuckets () const |
| unsigned | getNumItems () const |
| bool | empty () const |
| unsigned | size () const |
Static Public Member Functions | |
| static StringMapEntryBase * | getTombstoneVal () |
Protected Member Functions | |
| StringMapImpl (unsigned itemSize) | |
| StringMapImpl (unsigned InitSize, unsigned ItemSize) | |
| void | RehashTable () |
| bool | ShouldRehash () const |
| unsigned | LookupBucketFor (const char *KeyStart, const char *KeyEnd) |
| int | FindKey (const char *KeyStart, const char *KeyEnd) const |
| void | RemoveKey (StringMapEntryBase *V) |
| StringMapEntryBase * | RemoveKey (const char *KeyStart, const char *KeyEnd) |
Protected Attributes | |
| ItemBucket * | TheTable |
| unsigned | NumBuckets |
| unsigned | NumItems |
| unsigned | NumTombstones |
| unsigned | ItemSize |
Classes | |
| struct | ItemBucket |
Definition at line 52 of file StringMap.h.
| llvm::StringMapImpl::StringMapImpl | ( | unsigned | itemSize | ) | [inline, explicit, protected] |
Definition at line 72 of file StringMap.h.
References NumBuckets, NumItems, NumTombstones, and TheTable.
Definition at line 18 of file StringMap.cpp.
References ItemSize, NumBuckets, NumItems, NumTombstones, and TheTable.
| void StringMapImpl::RehashTable | ( | ) | [protected] |
RehashTable - Grow the table, redistributing values into the buckets with the appropriate mod-of-hashtable-size.
Definition at line 198 of file StringMap.cpp.
References E, llvm::StringMapImpl::ItemBucket::FullHashValue, getTombstoneVal(), llvm::StringMapImpl::ItemBucket::Item, NumBuckets, and TheTable.
Referenced by llvm::StringMap< llvm::StringPool::PooledString >::GetOrCreateValue(), and llvm::StringMap< llvm::StringPool::PooledString >::insert().
| bool llvm::StringMapImpl::ShouldRehash | ( | ) | const [inline, protected] |
ShouldRehash - Return true if the table should be rehashed after a new element was recently inserted.
Definition at line 84 of file StringMap.h.
References NumBuckets, NumItems, and NumTombstones.
Referenced by llvm::StringMap< llvm::StringPool::PooledString >::GetOrCreateValue(), and llvm::StringMap< llvm::StringPool::PooledString >::insert().
| unsigned StringMapImpl::LookupBucketFor | ( | const char * | NameStart, | |
| const char * | NameEnd | |||
| ) | [protected] |
LookupBucketFor - Look up the bucket that the specified string should end up in. If it already exists as a key in the map, the Item pointer for the specified bucket will be non-null. Otherwise, it will be null. In either case, the FullHashValue field of the bucket will be set to the hash value of the string.
LookupBucketFor - Look up the bucket that the specified string should end up in. If it already exists as a key in the map, the Item pointer for the specified bucket will be non-null. Otherwise, it will be null. In either case, the FullHashValue field of the bucket will be set to the hash value of the string.
Definition at line 68 of file StringMap.cpp.
References llvm::StringMapImpl::ItemBucket::FullHashValue, llvm::StringMapEntryBase::getKeyLength(), getTombstoneVal(), HashString(), llvm::StringMapImpl::ItemBucket::Item, ItemSize, NumBuckets, and TheTable.
Referenced by llvm::StringMap< llvm::StringPool::PooledString >::GetOrCreateValue(), and llvm::StringMap< llvm::StringPool::PooledString >::insert().
| int StringMapImpl::FindKey | ( | const char * | KeyStart, | |
| const char * | KeyEnd | |||
| ) | const [protected] |
FindKey - Look up the bucket that contains the specified key. If it exists in the map, return the bucket number of the key. Otherwise return -1. This does not modify the map.
FindKey - Look up the bucket that contains the specified key. If it exists in the map, return the bucket number of the key. Otherwise return -1. This does not modify the map.
Definition at line 129 of file StringMap.cpp.
References llvm::StringMapImpl::ItemBucket::FullHashValue, llvm::StringMapEntryBase::getKeyLength(), getTombstoneVal(), HashString(), llvm::StringMapImpl::ItemBucket::Item, ItemSize, NumBuckets, and TheTable.
Referenced by llvm::StringMap< llvm::StringPool::PooledString >::find(), and RemoveKey().
| void StringMapImpl::RemoveKey | ( | StringMapEntryBase * | V | ) | [protected] |
RemoveKey - Remove the specified StringMapEntry from the table, but do not delete it. This aborts if the value isn't in the table.
RemoveKey - Remove the specified StringMapEntry from the table, but do not delete it. This aborts if the value isn't in the table.
Definition at line 173 of file StringMap.cpp.
References llvm::StringMapEntryBase::getKeyLength(), and ItemSize.
Referenced by llvm::StringMap< llvm::StringPool::PooledString >::remove().
| StringMapEntryBase * StringMapImpl::RemoveKey | ( | const char * | KeyStart, | |
| const char * | KeyEnd | |||
| ) | [protected] |
RemoveKey - Remove the StringMapEntry for the specified key from the table, returning it. If the key is not in the table, this returns null.
RemoveKey - Remove the StringMapEntry for the specified key from the table, returning it. If the key is not in the table, this returns null.
Definition at line 182 of file StringMap.cpp.
References FindKey(), getTombstoneVal(), llvm::StringMapImpl::ItemBucket::Item, NumItems, NumTombstones, and TheTable.
| static StringMapEntryBase* llvm::StringMapImpl::getTombstoneVal | ( | ) | [inline, static] |
Definition at line 114 of file StringMap.h.
Referenced by llvm::StringMap< llvm::StringPool::PooledString >::clear(), FindKey(), llvm::StringMap< llvm::StringPool::PooledString >::GetOrCreateValue(), llvm::StringMap< llvm::StringPool::PooledString >::insert(), LookupBucketFor(), RehashTable(), and RemoveKey().
| unsigned llvm::StringMapImpl::getNumBuckets | ( | ) | const [inline] |
| unsigned llvm::StringMapImpl::getNumItems | ( | ) | const [inline] |
| bool llvm::StringMapImpl::empty | ( | ) | const [inline] |
Definition at line 121 of file StringMap.h.
References NumItems.
Referenced by llvm::StringMap< llvm::StringPool::PooledString >::clear(), llvm::X86IntelAsmPrinter::doFinalization(), and llvm::X86ATTAsmPrinter::doFinalization().
| unsigned llvm::StringMapImpl::size | ( | ) | const [inline] |
ItemBucket* llvm::StringMapImpl::TheTable [protected] |
Definition at line 66 of file StringMap.h.
Referenced by llvm::StringMap< llvm::StringPool::PooledString >::begin(), llvm::StringMap< llvm::StringPool::PooledString >::clear(), llvm::StringMap< llvm::StringPool::PooledString >::end(), llvm::StringMap< llvm::StringPool::PooledString >::find(), FindKey(), llvm::StringMap< llvm::StringPool::PooledString >::GetOrCreateValue(), llvm::StringMap< llvm::StringPool::PooledString >::insert(), LookupBucketFor(), RehashTable(), RemoveKey(), StringMapImpl(), and llvm::StringMap< llvm::StringPool::PooledString >::~StringMap().
unsigned llvm::StringMapImpl::NumBuckets [protected] |
Definition at line 67 of file StringMap.h.
Referenced by llvm::StringMap< llvm::StringPool::PooledString >::begin(), llvm::StringMap< llvm::StringPool::PooledString >::clear(), llvm::StringMap< llvm::StringPool::PooledString >::end(), FindKey(), getNumBuckets(), LookupBucketFor(), RehashTable(), ShouldRehash(), and StringMapImpl().
unsigned llvm::StringMapImpl::NumItems [protected] |
Definition at line 68 of file StringMap.h.
Referenced by empty(), getNumItems(), llvm::StringMap< llvm::StringPool::PooledString >::GetOrCreateValue(), llvm::StringMap< llvm::StringPool::PooledString >::insert(), RemoveKey(), ShouldRehash(), size(), and StringMapImpl().
unsigned llvm::StringMapImpl::NumTombstones [protected] |
Definition at line 69 of file StringMap.h.
Referenced by llvm::StringMap< llvm::StringPool::PooledString >::GetOrCreateValue(), llvm::StringMap< llvm::StringPool::PooledString >::insert(), RemoveKey(), ShouldRehash(), and StringMapImpl().
unsigned llvm::StringMapImpl::ItemSize [protected] |
Definition at line 70 of file StringMap.h.
Referenced by FindKey(), LookupBucketFor(), RemoveKey(), and StringMapImpl().
This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.