|
LLVM
10.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 "llvm/ADT/StringMap.h"
Inherits llvm::StringMapImpl.
Public Types | |
| using | MapEntryTy = StringMapEntry< ValueTy > |
| using | key_type = const char * |
| using | mapped_type = ValueTy |
| using | value_type = StringMapEntry< ValueTy > |
| using | size_type = size_t |
| using | const_iterator = StringMapConstIterator< ValueTy > |
| using | iterator = StringMapIterator< ValueTy > |
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 (const StringMap &RHS) | |
| StringMap & | operator= (StringMap RHS) |
| ~StringMap () | |
| AllocatorTy & | getAllocator () |
| const AllocatorTy & | getAllocator () const |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| iterator_range< StringMapKeyIterator< ValueTy > > | keys () 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... | |
| template<typename InputTy > | |
| size_type | count (const StringMapEntry< InputTy > &MapEntry) const |
| 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 V > | |
| std::pair< iterator, bool > | insert_or_assign (StringRef Key, V &&Val) |
| Inserts an element or assigns to the current element if the key already exists. 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) |
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 = nullptr |
| unsigned | NumBuckets = 0 |
| unsigned | NumItems = 0 |
| unsigned | NumTombstones = 0 |
| 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 242 of file StringMap.h.
| using llvm::StringMap< ValueTy, AllocatorTy >::const_iterator = StringMapConstIterator<ValueTy> |
Definition at line 334 of file StringMap.h.
| using llvm::StringMap< ValueTy, AllocatorTy >::iterator = StringMapIterator<ValueTy> |
Definition at line 335 of file StringMap.h.
| using llvm::StringMap< ValueTy, AllocatorTy >::key_type = const char* |
Definition at line 329 of file StringMap.h.
| using llvm::StringMap< ValueTy, AllocatorTy >::MapEntryTy = StringMapEntry<ValueTy> |
Definition at line 246 of file StringMap.h.
| using llvm::StringMap< ValueTy, AllocatorTy >::mapped_type = ValueTy |
Definition at line 330 of file StringMap.h.
| using llvm::StringMap< ValueTy, AllocatorTy >::size_type = size_t |
Definition at line 332 of file StringMap.h.
| using llvm::StringMap< ValueTy, AllocatorTy >::value_type = StringMapEntry<ValueTy> |
Definition at line 331 of file StringMap.h.
|
inline |
Definition at line 248 of file StringMap.h.
|
inlineexplicit |
Definition at line 250 of file StringMap.h.
|
inlineexplicit |
Definition at line 253 of file StringMap.h.
|
inline |
Definition at line 256 of file StringMap.h.
|
inline |
Definition at line 260 of file StringMap.h.
|
inline |
Definition at line 267 of file StringMap.h.
|
inline |
Definition at line 270 of file StringMap.h.
|
inline |
Definition at line 311 of file StringMap.h.
|
inline |
Definition at line 337 of file StringMap.h.
Referenced by llvm::RecordStreamer::begin(), llvm::codeview::DebugStringTableSubsection::begin(), llvm::ValueSymbolTable::begin(), llvm::vfs::detail::InMemoryDirectory::begin(), llvm::LLVMContext::getMDKindNames(), LookupNearestOption(), llvm::LTOModule::makeBuffer(), llvm::opt::OptTable::OptTable(), llvm::TimeRecord::print(), and sortOpts().
|
inline |
Definition at line 343 of file StringMap.h.
|
inline |
Definition at line 450 of file StringMap.h.
Referenced by llvm::RuntimeDyldELF::finalizeLoad(), llvm::MCContext::reset(), llvm::LTOCodeGenerator::setModule(), and llvm::PerTargetMIParsingState::setTarget().
|
inline |
count - Return 1 if the element is in the map, 0 otherwise.
Definition at line 381 of file StringMap.h.
Referenced by llvm::jitlink::MachOLinkGraphBuilder::addCustomSectionParser(), llvm::LTOCodeGenerator::compile(), HandlePrefixedOrGroupedOption(), llvm::ModuleSummaryIndex::hasExportedFunctions(), llvm::jitlink::MachOLinkGraphBuilder::isAltEntry(), llvm::CachedPathResolver::resolve(), and shouldApply().
|
inline |
Definition at line 386 of file StringMap.h.
|
inline |
Definition at line 340 of file StringMap.h.
Referenced by llvm::RuntimeDyldImpl::applyExternalSymbolRelocations(), llvm::BTFDebug::BTFDebug(), llvm::LTOCodeGenerator::compile(), createGlobalFwdRef(), llvm::RecordStreamer::EmitCommonSymbol(), llvm::RecordStreamer::end(), llvm::codeview::DebugStringTableSubsection::end(), llvm::ValueSymbolTable::end(), llvm::vfs::detail::InMemoryDirectory::end(), llvm::FileCollector::FileCollector(), llvm::RecordStreamer::flushSymverDirectives(), llvm::PerTargetMIParsingState::getBitmaskTargetFlag(), llvm::vfs::detail::InMemoryDirectory::getChild(), llvm::PerTargetMIParsingState::getDirectTargetFlag(), llvm::codeview::DebugStringTableSubsection::getIdForString(), llvm::LLVMContext::getMDKindNames(), getMinVisibility(), llvm::PerTargetMIParsingState::getMMOTargetFlag(), llvm::ModuleSummaryIndex::getModule(), llvm::ModuleSummaryIndex::getModuleHash(), llvm::LLVMContextImpl::getOperandBundleTagID(), getOptionPred(), llvm::AMDGPULibFunc::getOrInsertFunction(), llvm::PassRegistry::getPassInfo(), llvm::PerTargetMIParsingState::getRegBank(), llvm::PerTargetMIParsingState::getRegClass(), llvm::PerTargetMIParsingState::getRegisterByName(), llvm::PerTargetMIParsingState::getRegMask(), getSignature(), llvm::pdb::DbiStreamBuilder::getSourceFileNameIndex(), llvm::PerTargetMIParsingState::getSubRegIndex(), llvm::RuntimeDyldImpl::getSymbol(), llvm::RuntimeDyldImpl::getSymbolLocalAddress(), llvm::RuntimeDyldImpl::getSymbolSectionID(), llvm::PerTargetMIParsingState::getTargetIndex(), llvm::DWARFVerifier::handleDebugInfo(), INITIALIZE_PASS(), llvm::SpecialCaseList::inSectionBlame(), llvm::StringPool::intern(), llvm::jitlink::MachOLinkGraphBuilder::isAltEntry(), llvm::MCContext::lookupMacro(), LookupNearestOption(), llvm::SpecialCaseList::Matcher::match(), llvm::opt::OptTable::OptTable(), llvm::SpecialCaseList::parse(), llvm::PerTargetMIParsingState::parseInstrName(), llvm::Annotations::point(), popFront(), llvm::TimeRecord::print(), llvm::RuntimeDyldMachOARM::processRelocationRef(), llvm::RuntimeDyldELF::processRelocationRef(), llvm::ImportedFunctionsInliningStatistics::recordInline(), RefineErrorLoc(), llvm::RuntimeDyldELF::resolveRelocation(), and sortOpts().
|
inline |
Definition at line 346 of file StringMap.h.
|
inline |
Definition at line 473 of file StringMap.h.
Referenced by llvm::MCContext::undefineMacro(), and llvm::ExecutionEngine::updateGlobalMapping().
|
inline |
Definition at line 479 of file StringMap.h.
|
inline |
Definition at line 355 of file StringMap.h.
Referenced by llvm::RuntimeDyldImpl::applyExternalSymbolRelocations(), llvm::BTFDebug::BTFDebug(), llvm::LTOCodeGenerator::compile(), createGlobalFwdRef(), llvm::RecordStreamer::EmitCommonSymbol(), llvm::FileCollector::FileCollector(), llvm::RuntimeDyldMachOX86_64::finalizeSection(), llvm::RuntimeDyldMachOAArch64::finalizeSection(), llvm::RecordStreamer::flushSymverDirectives(), llvm::PerTargetMIParsingState::getBitmaskTargetFlag(), llvm::vfs::detail::InMemoryDirectory::getChild(), llvm::PerTargetMIParsingState::getDirectTargetFlag(), llvm::codeview::DebugStringTableSubsection::getIdForString(), getMinVisibility(), llvm::PerTargetMIParsingState::getMMOTargetFlag(), llvm::ModuleSummaryIndex::getModule(), llvm::ModuleSummaryIndex::getModuleHash(), llvm::LLVMContextImpl::getOperandBundleTagID(), getOptionPred(), llvm::AMDGPULibFunc::getOrInsertFunction(), llvm::PassRegistry::getPassInfo(), llvm::PerTargetMIParsingState::getRegBank(), llvm::PerTargetMIParsingState::getRegClass(), llvm::PerTargetMIParsingState::getRegisterByName(), llvm::PerTargetMIParsingState::getRegMask(), getSignature(), llvm::pdb::DbiStreamBuilder::getSourceFileNameIndex(), llvm::PerTargetMIParsingState::getSubRegIndex(), llvm::RuntimeDyldImpl::getSymbol(), llvm::RuntimeDyldImpl::getSymbolLocalAddress(), llvm::RuntimeDyldImpl::getSymbolSectionID(), llvm::PerTargetMIParsingState::getTargetIndex(), llvm::DWARFVerifier::handleDebugInfo(), HandlePrefixedOrGroupedOption(), INITIALIZE_PASS(), llvm::SpecialCaseList::inSectionBlame(), llvm::StringPool::intern(), llvm::jitlink::MachOLinkGraphBuilder::isAltEntry(), llvm::MCContext::lookupMacro(), llvm::SpecialCaseList::Matcher::match(), llvm::SpecialCaseList::parse(), llvm::PerTargetMIParsingState::parseInstrName(), llvm::Annotations::point(), popFront(), llvm::RuntimeDyldMachOARM::processRelocationRef(), llvm::RuntimeDyldELF::processRelocationRef(), llvm::ImportedFunctionsInliningStatistics::recordInline(), RefineErrorLoc(), and llvm::RuntimeDyldELF::resolveRelocation().
|
inline |
Definition at line 361 of file StringMap.h.
|
inline |
Definition at line 326 of file StringMap.h.
Referenced by llvm::StructType::setName().
|
inline |
Definition at line 327 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 393 of file StringMap.h.
Referenced by llvm::vfs::detail::InMemoryDirectory::addChild(), llvm::ModuleSummaryIndex::addModule(), llvm::pdb::DbiStreamBuilder::addModuleSourceFile(), llvm::LTOCodeGenerator::compile(), llvm::ComputeCrossModuleImportForModuleFromIndex(), computeImportForFunction(), computeImportForReferencedGlobals(), llvm::MCContext::createELFRelSection(), createIndexMap(), llvm::MCContext::defineMacro(), llvm::StringInit::get(), llvm::PerTargetMIParsingState::getBitmaskTargetFlag(), llvm::PerTargetMIParsingState::getDirectTargetFlag(), llvm::NonRelocatableStringpool::getEntry(), llvm::LLVMContext::getMDKindID(), llvm::PerTargetMIParsingState::getMMOTargetFlag(), llvm::StringToOffsetTable::GetOrAddStringOffset(), llvm::LLVMContextImpl::getOrInsertBundleTag(), llvm::Module::getOrInsertComdat(), llvm::LLVMContextImpl::getOrInsertSyncScopeID(), llvm::PerTargetMIParsingState::getRegisterByName(), llvm::PerTargetMIParsingState::getRegMask(), llvm::PerTargetMIParsingState::getSubRegIndex(), llvm::PerTargetMIParsingState::getTargetIndex(), llvm::codeview::DebugStringTableSubsection::insert(), llvm::StringPool::intern(), llvm::NonRelocatableStringpool::internString(), llvm::PerTargetMIParsingState::parseInstrName(), parseNamePrefix(), printMemberHeader(), llvm::CachedPathResolver::resolve(), llvm::RuntimeDyldImpl::resolveExternalSymbols(), llvm::PerTargetMIParsingState::setTarget(), and llvm::ValueSymbolTable::~ValueSymbolTable().
|
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 413 of file StringMap.h.
|
inline |
Inserts an element or assigns to the current element if the key already exists.
The return type is the same as try_emplace.
Definition at line 420 of file StringMap.h.
|
inline |
Definition at line 350 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 369 of file StringMap.h.
Referenced by llvm::gatherImportedSummariesForModule(), getGNUBinOpPrecedence(), llvm::MCContext::getInlineAsmLabel(), llvm::ModuleSummaryIndex::getModuleId(), llvm::ValueSymbolTable::lookup(), llvm::MCContext::lookupSymbol(), parseNamePrefix(), and llvm::Annotations::points().
|
inline |
Definition at line 305 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 378 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 469 of file StringMap.h.
Referenced by llvm::StructType::setName(), and llvm::ValueSymbolTable::~ValueSymbolTable().
|
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 432 of file StringMap.h.
Referenced by llvm::lto::createWriteIndexesThinBackend(), and llvm::pdb::NamedStreamMap::entries().
1.8.13