|
LLVM
4.0.0
|
StringMap - This is an unconventional map that is specialized for handling keys that are "strings", which are basically ranges of bytes. More...
#include <StringMap.h>
Inherits llvm::StringMapImpl.
Public Types | |
| typedef StringMapEntry< ValueTy > | MapEntryTy |
| typedef const char * | key_type |
| typedef ValueTy | mapped_type |
| typedef StringMapEntry< ValueTy > | value_type |
| typedef size_t | size_type |
| typedef StringMapConstIterator < ValueTy > | const_iterator |
| typedef StringMapIterator < ValueTy > | iterator |
Public Member Functions | |
| StringMap () | |
| StringMap (unsigned InitialSize) | |
| StringMap (AllocatorTy A) | |
| StringMap (unsigned InitialSize, AllocatorTy A) | |
| StringMap (std::initializer_list< std::pair< StringRef, ValueTy >> List) | |
| StringMap (StringMap &&RHS) | |
| StringMap & | operator= (StringMap RHS) |
| StringMap (const StringMap &RHS) | |
| AllocatorTy & | getAllocator () |
| const AllocatorTy & | getAllocator () const |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| iterator | find (StringRef Key) |
| const_iterator | find (StringRef Key) const |
| ValueTy | lookup (StringRef Key) const |
| lookup - Return the entry for the specified key, or a default constructed value if no such entry exists. More... | |
| ValueTy & | operator[] (StringRef Key) |
Lookup the ValueTy for the Key, or create a default constructed value if the key is not in the map. More... | |
| size_type | count (StringRef Key) const |
| count - Return 1 if the element is in the map, 0 otherwise. More... | |
| bool | insert (MapEntryTy *KeyValue) |
| insert - Insert the specified key/value pair into the map. More... | |
| std::pair< iterator, bool > | insert (std::pair< StringRef, ValueTy > KV) |
| insert - Inserts the specified key/value pair into the map if the key isn't already in the map. More... | |
| template<typename... ArgsTy> | |
| std::pair< iterator, bool > | try_emplace (StringRef Key, ArgsTy &&...Args) |
| Emplace a new element for the specified key into the map if the key isn't already in the map. More... | |
| void | clear () |
| void | remove (MapEntryTy *KeyValue) |
| remove - Remove the specified key/value pair from the map, but do not erase it. More... | |
| void | erase (iterator I) |
| bool | erase (StringRef Key) |
| ~StringMap () | |
Public Member Functions inherited from llvm::StringMapImpl | |
| unsigned | getNumBuckets () const |
| unsigned | getNumItems () const |
| bool | empty () const |
| unsigned | size () const |
| void | swap (StringMapImpl &Other) |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::StringMapImpl | |
| static StringMapEntryBase * | getTombstoneVal () |
Protected Member Functions inherited from llvm::StringMapImpl | |
| StringMapImpl (unsigned itemSize) | |
| StringMapImpl (StringMapImpl &&RHS) | |
| StringMapImpl (unsigned InitSize, unsigned ItemSize) | |
| unsigned | RehashTable (unsigned BucketNo=0) |
| RehashTable - Grow the table, redistributing values into the buckets with the appropriate mod-of-hashtable-size. More... | |
| unsigned | LookupBucketFor (StringRef Key) |
| LookupBucketFor - Look up the bucket that the specified string should end up in. More... | |
| int | FindKey (StringRef Key) const |
| FindKey - Look up the bucket that contains the specified key. More... | |
| void | RemoveKey (StringMapEntryBase *V) |
| RemoveKey - Remove the specified StringMapEntry from the table, but do not delete it. More... | |
| StringMapEntryBase * | RemoveKey (StringRef Key) |
| RemoveKey - Remove the StringMapEntry for the specified key from the table, returning it. More... | |
| void | init (unsigned Size) |
| Allocate the table with the specified number of buckets and otherwise setup the map as empty. More... | |
Protected Attributes inherited from llvm::StringMapImpl | |
| StringMapEntryBase ** | TheTable |
| unsigned | NumBuckets |
| unsigned | NumItems |
| unsigned | NumTombstones |
| unsigned | ItemSize |
StringMap - This is an unconventional map that is specialized for handling keys that are "strings", which are basically ranges of bytes.
This does some funky memory allocation and hashing things to make it extremely efficient, storing the string data after the value in the map.
Definition at line 223 of file StringMap.h.
| typedef StringMapConstIterator<ValueTy> llvm::StringMap< ValueTy, AllocatorTy >::const_iterator |
Definition at line 299 of file StringMap.h.
| typedef StringMapIterator<ValueTy> llvm::StringMap< ValueTy, AllocatorTy >::iterator |
Definition at line 300 of file StringMap.h.
| typedef const char* llvm::StringMap< ValueTy, AllocatorTy >::key_type |
Definition at line 294 of file StringMap.h.
| typedef StringMapEntry<ValueTy> llvm::StringMap< ValueTy, AllocatorTy >::MapEntryTy |
Definition at line 227 of file StringMap.h.
| typedef ValueTy llvm::StringMap< ValueTy, AllocatorTy >::mapped_type |
Definition at line 295 of file StringMap.h.
| typedef size_t llvm::StringMap< ValueTy, AllocatorTy >::size_type |
Definition at line 297 of file StringMap.h.
| typedef StringMapEntry<ValueTy> llvm::StringMap< ValueTy, AllocatorTy >::value_type |
Definition at line 296 of file StringMap.h.
|
inline |
Definition at line 229 of file StringMap.h.
|
inlineexplicit |
Definition at line 230 of file StringMap.h.
|
inlineexplicit |
Definition at line 233 of file StringMap.h.
|
inline |
Definition at line 236 of file StringMap.h.
|
inline |
Definition at line 240 of file StringMap.h.
|
inline |
Definition at line 247 of file StringMap.h.
|
inline |
Definition at line 256 of file StringMap.h.
|
inline |
Definition at line 431 of file StringMap.h.
|
inline |
Definition at line 302 of file StringMap.h.
Referenced by llvm::RecordStreamer::begin(), llvm::ValueSymbolTable::begin(), llvm::pdb::NameMapBuilder::commit(), llvm::DwarfAccelTable::FinalizeTable(), llvm::ExecutionEngine::getGlobalValueAtAddress(), llvm::LLVMContext::getMDKindNames(), LookupNearestOption(), llvm::opt::OptTable::OptTable(), llvm::DwarfAccelTable::print(), and sortOpts().
|
inline |
Definition at line 308 of file StringMap.h.
|
inline |
Definition at line 395 of file StringMap.h.
Referenced by llvm::ExecutionEngine::clearAllGlobalMappings(), llvm::RuntimeDyldELF::finalizeLoad(), llvm::MCContext::reset(), and llvm::LTOCodeGenerator::setModule().
|
inline |
count - Return 1 if the element is in the map, 0 otherwise.
Definition at line 341 of file StringMap.h.
Referenced by HandlePrefixedOrGroupedOption(), and llvm::SpecialCaseList::Entry::match().
|
inline |
Definition at line 305 of file StringMap.h.
Referenced by llvm::pdb::DbiStreamBuilder::addModuleSourceFile(), llvm::pdb::NameMapBuilder::commit(), llvm::StringMap< uint64_t >::count(), llvm::RecordStreamer::end(), llvm::ValueSymbolTable::end(), llvm::StringMap< uint64_t >::erase(), llvm::DwarfAccelTable::FinalizeTable(), llvm::StringMap< uint64_t >::find(), llvm::ExecutionEngine::getAddressToGlobalIfAvailable(), llvm::ExecutionEngine::getGlobalValueAtAddress(), llvm::LLVMContext::getMDKindNames(), llvm::LLVMContextImpl::getOperandBundleTagID(), getOptionPred(), llvm::PassRegistry::getPassInfo(), llvm::SpecialCaseList::inSection(), llvm::StringPool::intern(), llvm::ThinLTOCodeGenerator::internalize(), llvm::StringMap< uint64_t >::lookup(), LookupNearestOption(), llvm::opt::OptTable::OptTable(), llvm::DwarfAccelTable::print(), llvm::RuntimeDyldELF::processRelocationRef(), llvm::ThinLTOCodeGenerator::promote(), llvm::ImportedFunctionsInliningStatistics::recordInline(), llvm::ExecutionEngineState::RemoveMapping(), llvm::ThinLTOCodeGenerator::run(), llvm::orc::LocalCXXRuntimeOverrides::searchOverrides(), and sortOpts().
|
inline |
Definition at line 311 of file StringMap.h.
|
inline |
Definition at line 418 of file StringMap.h.
Referenced by llvm::StringMap< uint64_t >::erase(), and llvm::ExecutionEngineState::RemoveMapping().
|
inline |
Definition at line 424 of file StringMap.h.
|
inline |
Definition at line 315 of file StringMap.h.
Referenced by llvm::pdb::DbiStreamBuilder::addModuleSourceFile(), llvm::StringMap< uint64_t >::count(), llvm::StringMap< uint64_t >::erase(), llvm::ExecutionEngine::getAddressToGlobalIfAvailable(), llvm::LLVMContextImpl::getOperandBundleTagID(), getOptionPred(), llvm::PassRegistry::getPassInfo(), HandlePrefixedOrGroupedOption(), llvm::SpecialCaseList::inSection(), llvm::StringPool::intern(), llvm::ThinLTOCodeGenerator::internalize(), llvm::StringMap< uint64_t >::lookup(), llvm::RuntimeDyldELF::processRelocationRef(), llvm::ThinLTOCodeGenerator::promote(), llvm::ImportedFunctionsInliningStatistics::recordInline(), llvm::ExecutionEngineState::RemoveMapping(), llvm::ThinLTOCodeGenerator::run(), and llvm::orc::LocalCXXRuntimeOverrides::searchOverrides().
|
inline |
Definition at line 321 of file StringMap.h.
|
inline |
Definition at line 291 of file StringMap.h.
Referenced by llvm::StructType::setName().
|
inline |
Definition at line 292 of file StringMap.h.
|
inline |
insert - Insert the specified key/value pair into the map.
If the key already exists in the map, return false and ignore the request, otherwise insert it and return true.
Definition at line 348 of file StringMap.h.
Referenced by llvm::pdb::NameMapBuilder::addMapping(), llvm::pdb::DbiStreamBuilder::addModuleInfo(), llvm::pdb::DbiStreamBuilder::addModuleSourceFile(), llvm::MCContext::createELFRelSection(), createIndexMap(), llvm::MCDwarfLineTableHeader::getFile(), llvm::LLVMContext::getMDKindID(), llvm::StringToOffsetTable::GetOrAddStringOffset(), llvm::LLVMContextImpl::getOrInsertBundleTag(), llvm::Module::getOrInsertComdat(), llvm::StringPool::intern(), and llvm::StringMap< uint64_t >::StringMap().
|
inline |
insert - Inserts the specified key/value pair into the map if the key isn't already in the map.
The bool component of the returned pair is true if and only if the insertion takes place, and the iterator component of the pair points to the element with key equivalent to the key of the pair.
Definition at line 368 of file StringMap.h.
|
inline |
lookup - Return the entry for the specified key, or a default constructed value if no such entry exists.
Definition at line 329 of file StringMap.h.
Referenced by llvm::gatherImportedSummariesForModule(), llvm::ValueSymbolTable::lookup(), and llvm::MCContext::lookupSymbol().
|
inline |
Definition at line 250 of file StringMap.h.
|
inline |
Lookup the ValueTy for the Key, or create a default constructed value if the key is not in the map.
Definition at line 338 of file StringMap.h.
|
inline |
remove - Remove the specified key/value pair from the map, but do not erase it.
This aborts if the key is not in the map.
Definition at line 414 of file StringMap.h.
Referenced by llvm::StructType::setName().
|
inline |
Emplace a new element for the specified key into the map if the key isn't already in the map.
The bool component of the returned pair is true if and only if the insertion takes place, and the iterator component of the pair points to the element with key equivalent to the key of the pair.
Definition at line 377 of file StringMap.h.
Referenced by llvm::StringMap< uint64_t >::insert(), and llvm::StringMap< uint64_t >::operator[]().
1.8.6