LLVM API Documentation
#include <StringMap.h>
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 226 of file StringMap.h.
typedef StringMapConstIterator<ValueTy> llvm::StringMap< ValueTy, AllocatorTy >::const_iterator |
Definition at line 261 of file StringMap.h.
typedef StringMapIterator<ValueTy> llvm::StringMap< ValueTy, AllocatorTy >::iterator |
Definition at line 262 of file StringMap.h.
typedef const char* llvm::StringMap< ValueTy, AllocatorTy >::key_type |
Definition at line 256 of file StringMap.h.
typedef StringMapEntry<ValueTy> llvm::StringMap< ValueTy, AllocatorTy >::MapEntryTy |
Definition at line 229 of file StringMap.h.
typedef ValueTy llvm::StringMap< ValueTy, AllocatorTy >::mapped_type |
Definition at line 257 of file StringMap.h.
typedef size_t llvm::StringMap< ValueTy, AllocatorTy >::size_type |
Definition at line 259 of file StringMap.h.
typedef StringMapEntry<ValueTy> llvm::StringMap< ValueTy, AllocatorTy >::value_type |
Definition at line 258 of file StringMap.h.
llvm::StringMap< ValueTy, AllocatorTy >::StringMap | ( | ) | [inline] |
Definition at line 231 of file StringMap.h.
llvm::StringMap< ValueTy, AllocatorTy >::StringMap | ( | unsigned | InitialSize | ) | [inline, explicit] |
Definition at line 232 of file StringMap.h.
llvm::StringMap< ValueTy, AllocatorTy >::StringMap | ( | AllocatorTy | A | ) | [inline, explicit] |
Definition at line 235 of file StringMap.h.
llvm::StringMap< ValueTy, AllocatorTy >::StringMap | ( | unsigned | InitialSize, |
AllocatorTy | A | ||
) | [inline] |
Definition at line 238 of file StringMap.h.
llvm::StringMap< ValueTy, AllocatorTy >::StringMap | ( | StringMap< ValueTy, AllocatorTy > && | RHS | ) | [inline] |
Definition at line 242 of file StringMap.h.
llvm::StringMap< ValueTy, AllocatorTy >::~StringMap | ( | ) | [inline] |
Definition at line 397 of file StringMap.h.
iterator llvm::StringMap< ValueTy, AllocatorTy >::begin | ( | ) | [inline] |
Definition at line 264 of file StringMap.h.
Referenced by llvm::RecordStreamer::begin(), llvm::ValueSymbolTable::end(), llvm::StringTableBuilder::finalize(), llvm::DwarfAccelTable::FinalizeTable(), llvm::LLVMContext::getMDKindNames(), LookupNearestOption(), llvm::opt::OptTable::OptTable(), llvm::DwarfAccelTable::print(), llvm::FileInfo::print(), llvm::RuntimeDyldImpl::resolveExternalSymbols(), sortOpts(), llvm::LLVMContextImpl::~LLVMContextImpl(), llvm::MipsFunctionInfo::~MipsFunctionInfo(), and llvm::ValueSymbolTable::~ValueSymbolTable().
const_iterator llvm::StringMap< ValueTy, AllocatorTy >::begin | ( | ) | const [inline] |
Definition at line 270 of file StringMap.h.
void llvm::StringMap< ValueTy, AllocatorTy >::clear | ( | ) | [inline] |
Definition at line 349 of file StringMap.h.
Referenced by llvm::GCModuleInfo::clear(), llvm::SelectionDAG::clear(), llvm::cl::ParseCommandLineOptions(), llvm::MCContext::reset(), and llvm::LLVMContextImpl::~LLVMContextImpl().
size_type llvm::StringMap< ValueTy, AllocatorTy >::count | ( | StringRef | Key | ) | const [inline] |
count - Return 1 if the element is in the map, 0 otherwise.
Definition at line 303 of file StringMap.h.
Referenced by llvm::StringTableBuilder::getOffset(), HandlePrefixedOrGroupedOption(), and llvm::SpecialCaseList::Entry::match().
iterator llvm::StringMap< ValueTy, AllocatorTy >::end | ( | ) | [inline] |
Definition at line 267 of file StringMap.h.
Referenced by llvm::StringMap< const DIE * >::count(), llvm::ConstantDataSequential::destroyConstant(), llvm::RecordStreamer::end(), llvm::StringMap< const DIE * >::erase(), llvm::StringTableBuilder::finalize(), llvm::DwarfAccelTable::FinalizeTable(), llvm::StringMap< const DIE * >::find(), llvm::LLVMContext::getMDKindNames(), getOptionPred(), llvm::PassRegistry::getPassInfo(), llvm::RuntimeDyldMachO::getRelocationValueRef(), llvm::SpecialCaseList::inSection(), llvm::StringPool::intern(), llvm::StringMap< const DIE * >::lookup(), LookupNearestOption(), LookupOption(), llvm::opt::OptTable::OptTable(), llvm::DwarfAccelTable::print(), llvm::FileInfo::print(), llvm::RuntimeDyldELF::processRelocationRef(), sortOpts(), llvm::LLVMContextImpl::~LLVMContextImpl(), llvm::MipsFunctionInfo::~MipsFunctionInfo(), and llvm::ValueSymbolTable::~ValueSymbolTable().
const_iterator llvm::StringMap< ValueTy, AllocatorTy >::end | ( | ) | const [inline] |
Definition at line 273 of file StringMap.h.
void llvm::StringMap< ValueTy, AllocatorTy >::erase | ( | iterator | I | ) | [inline] |
Definition at line 384 of file StringMap.h.
Referenced by llvm::ConstantDataSequential::destroyConstant(), llvm::StringMap< const DIE * >::erase(), and llvm::PassRegistry::unregisterPass().
bool llvm::StringMap< ValueTy, AllocatorTy >::erase | ( | StringRef | Key | ) | [inline] |
Definition at line 390 of file StringMap.h.
iterator llvm::StringMap< ValueTy, AllocatorTy >::find | ( | StringRef | Key | ) | [inline] |
Definition at line 277 of file StringMap.h.
Referenced by llvm::StringMap< const DIE * >::count(), llvm::ConstantDataSequential::destroyConstant(), llvm::StringMap< const DIE * >::erase(), getOptionPred(), llvm::PassRegistry::getPassInfo(), llvm::RuntimeDyldMachO::getRelocationValueRef(), HandlePrefixedOrGroupedOption(), llvm::SpecialCaseList::inSection(), llvm::StringPool::intern(), llvm::StringMap< const DIE * >::lookup(), LookupOption(), llvm::RuntimeDyldELF::processRelocationRef(), and llvm::RuntimeDyldImpl::resolveExternalSymbols().
const_iterator llvm::StringMap< ValueTy, AllocatorTy >::find | ( | StringRef | Key | ) | const [inline] |
Definition at line 283 of file StringMap.h.
AllocatorTy& llvm::StringMap< ValueTy, AllocatorTy >::getAllocator | ( | ) | [inline] |
Definition at line 253 of file StringMap.h.
Referenced by llvm::StructType::setName().
const AllocatorTy& llvm::StringMap< ValueTy, AllocatorTy >::getAllocator | ( | ) | const [inline] |
Definition at line 254 of file StringMap.h.
MapEntryTy& llvm::StringMap< ValueTy, AllocatorTy >::GetOrCreateValue | ( | StringRef | Key, |
InitTy | Val | ||
) | [inline] |
GetOrCreateValue - Look up the specified key in the table. If a value exists, return it. Otherwise, default construct a value, insert it, and return.
Definition at line 370 of file StringMap.h.
Referenced by llvm::StringTableBuilder::add(), llvm::MDString::get(), llvm::MCDwarfLineTableHeader::getFile(), llvm::ConstantDataSequential::getImpl(), llvm::LLVMContext::getMDKindID(), GetOptionInfo(), llvm::StringToOffsetTable::GetOrAddStringOffset(), llvm::MCContext::GetOrCreateSymbol(), llvm::StringMap< const DIE * >::GetOrCreateValue(), llvm::Module::getOrInsertComdat(), llvm::StringMap< const DIE * >::operator[](), and llvm::StructType::setName().
MapEntryTy& llvm::StringMap< ValueTy, AllocatorTy >::GetOrCreateValue | ( | StringRef | Key | ) | [inline] |
Definition at line 374 of file StringMap.h.
bool llvm::StringMap< ValueTy, AllocatorTy >::insert | ( | MapEntryTy * | KeyValue | ) | [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 310 of file StringMap.h.
Referenced by llvm::StringMap< const DIE * >::GetOrCreateValue(), and llvm::StringPool::intern().
std::pair<iterator, bool> llvm::StringMap< ValueTy, AllocatorTy >::insert | ( | std::pair< StringRef, ValueTy > | KV | ) | [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 330 of file StringMap.h.
ValueTy llvm::StringMap< ValueTy, AllocatorTy >::lookup | ( | StringRef | Key | ) | const [inline] |
lookup - Return the entry for the specified key, or a default constructed value if no such entry exists.
Definition at line 291 of file StringMap.h.
Referenced by llvm::ValueSymbolTable::empty(), llvm::SetTheory::evaluate(), llvm::SetTheory::expand(), llvm::LibCallInfo::getFunctionInfo(), llvm::Module::getTypeByName(), and llvm::MCContext::LookupSymbol().
StringMap& llvm::StringMap< ValueTy, AllocatorTy >::operator= | ( | StringMap< ValueTy, AllocatorTy > | RHS | ) | [inline] |
Definition at line 245 of file StringMap.h.
ValueTy& llvm::StringMap< ValueTy, AllocatorTy >::operator[] | ( | StringRef | Key | ) | [inline] |
Definition at line 298 of file StringMap.h.
void llvm::StringMap< ValueTy, AllocatorTy >::remove | ( | MapEntryTy * | KeyValue | ) | [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 380 of file StringMap.h.
Referenced by llvm::StructType::setName().