LLVM: llvm::StringSet< AllocatorTy > Class Template Reference (original) (raw)
StringSet - A wrapper for [StringMap](classllvm%5F1%5F1StringMap.html "StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...") that provides set-like functionality. More...
#include "[llvm/ADT/StringSet.h](StringSet%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| StringSet ()=default | |
| StringSet (std::initializer_list< StringRef > initializer) | |
| template<typename Range> | |
| StringSet (llvm::from_range_t, Range &&R) | |
| StringSet (AllocatorTy a) | |
| std::pair< typename Base::iterator, bool > | insert (StringRef key) |
| template | |
| void | insert (InputIt begin, InputIt end) |
| template<typename Range> | |
| void | insert_range (Range &&R) |
| template | |
| std::pair< typename Base::iterator, bool > | insert (const StringMapEntry< ValueTy > &mapEntry) |
| bool | contains (StringRef key) const |
| Check if the set contains the given key. | |
| Public Member Functions inherited from llvm::StringMap< EmptyStringSetTag, MallocAllocator > | |
| MallocAllocator & | getAllocator () |
| const MallocAllocator & | getAllocator () const |
| StringMap () | |
| StringMap & | operator= (StringMap RHS) |
| ~StringMap () | |
| iterator | begin () |
| iterator | end () |
| iterator_range< StringMapKeyIterator< EmptyStringSetTag > > | keys () const |
| iterator | find (StringRef Key) |
| EmptyStringSetTag | lookup (StringRef Key) const |
| lookup - Return the entry for the specified key, or a default constructed value if no such entry exists. | |
| const EmptyStringSetTag & | at (StringRef Val) const |
| at - Return the entry for the specified key, or abort if no such entry exists. | |
| EmptyStringSetTag & | operator[] (StringRef Key) |
| Lookup the ValueTy for the Key, or create a default constructed value if the key is not in the map. | |
| bool | contains (StringRef Key) const |
| contains - Return true if the element is in the map, false otherwise. | |
| size_type | count (StringRef Key) const |
| count - Return 1 if the element is in the map, 0 otherwise. | |
| bool | operator== (const StringMap &RHS) const |
| equal - check whether both of the containers are equal. | |
| bool | operator!= (const StringMap &RHS) const |
| bool | insert (MapEntryTy *KeyValue) |
| insert - Insert the specified key/value pair into the map. | |
| 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. | |
| 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. | |
| std::pair< iterator, bool > | try_emplace_with_hash (StringRef Key, uint32_t FullHashValue, ArgsTy &&...Args) |
| void | clear () |
| void | remove (MapEntryTy *KeyValue) |
| remove - Remove the specified key/value pair from the map, but do not erase it. | |
| void | erase (iterator I) |
| 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 | |
|---|---|
| Public Types inherited from llvm::StringMap< EmptyStringSetTag, MallocAllocator > | |
| using | MapEntryTy |
| using | key_type |
| using | mapped_type |
| using | value_type |
| using | size_type |
| using | const_iterator |
| using | iterator |
| Static Public Member Functions inherited from llvm::StringMapImpl | |
| static StringMapEntryBase * | getTombstoneVal () |
| static LLVM_ABI uint32_t | hash (StringRef Key) |
| Returns the hash value that will be used for the given string. | |
| Static Public Attributes inherited from llvm::StringMapImpl | |
| static constexpr uintptr_t | TombstoneIntVal |
| Protected Member Functions inherited from llvm::StringMapImpl | |
| StringMapImpl (unsigned itemSize) | |
| StringMapImpl (StringMapImpl &&RHS) | |
| LLVM_ABI | StringMapImpl (unsigned InitSize, unsigned ItemSize) |
| ~StringMapImpl () | |
| LLVM_ABI unsigned | RehashTable (unsigned BucketNo=0) |
| RehashTable - Grow the table, redistributing values into the buckets with the appropriate mod-of-hashtable-size. | |
| unsigned | LookupBucketFor (StringRef Key) |
| LookupBucketFor - Look up the bucket that the specified string should end up in. | |
| LLVM_ABI unsigned | LookupBucketFor (StringRef Key, uint32_t FullHashValue) |
| Overload that explicitly takes precomputed hash(Key). | |
| int | FindKey (StringRef Key) const |
| FindKey - Look up the bucket that contains the specified key. | |
| LLVM_ABI int | FindKey (StringRef Key, uint32_t FullHashValue) const |
| Overload that explicitly takes precomputed hash(Key). | |
| LLVM_ABI void | RemoveKey (StringMapEntryBase *V) |
| RemoveKey - Remove the specified StringMapEntry from the table, but do not delete it. | |
| LLVM_ABI StringMapEntryBase * | RemoveKey (StringRef Key) |
| RemoveKey - Remove the StringMapEntry for the specified key from the table, returning it. | |
| LLVM_ABI void | init (unsigned Size) |
| Allocate the table with the specified number of buckets and otherwise setup the map as empty. | |
| iterator_range< StringMapEntryBase ** > | buckets () |
| Protected Attributes inherited from llvm::StringMapImpl | |
| StringMapEntryBase ** | TheTable = nullptr |
| unsigned | NumBuckets = 0 |
| unsigned | NumItems = 0 |
| unsigned | NumTombstones = 0 |
| unsigned | ItemSize |
template
class llvm::StringSet< AllocatorTy >
StringSet - A wrapper for [StringMap](classllvm%5F1%5F1StringMap.html "StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...") that provides set-like functionality.
Definition at line 25 of file StringSet.h.
template
◆ StringSet() [2/4]
template
◆ StringSet() [3/4]
template
template<typename Range>
◆ StringSet() [4/4]
template
◆ contains()
template
◆ insert() [1/3]
template
template
◆ insert() [2/3]
template
template
◆ insert() [3/3]
template
Definition at line 39 of file StringSet.h.
References llvm::StringMap< EmptyStringSetTag, AllocatorTy >::try_emplace().
Referenced by llvm::coverage::CoverageFilenamesSectionWriter::CoverageFilenamesSectionWriter(), insert(), insert(), insert_range(), llvm::KnownAssumptionString::KnownAssumptionString(), llvm::KnownAssumptionString::KnownAssumptionString(), llvm::libDriverMain(), llvm::lsp::URIForFile::registerSupportedScheme(), StringSet(), StringSet(), and ValidatePrefixes().
◆ insert_range()
template
template<typename Range>
The documentation for this class was generated from the following file:
- include/llvm/ADT/StringSet.h