LLVM  4.0.0
Public Member Functions | List of all members
llvm::StringSet< AllocatorTy > Class Template Reference

StringSet - A wrapper for StringMap that provides set-like functionality. More...

#include <StringSet.h>

Inheritance diagram for llvm::StringSet< AllocatorTy >:
[legend]
Collaboration diagram for llvm::StringSet< AllocatorTy >:
[legend]

Public Member Functions

 StringSet ()=default
 
 StringSet (std::initializer_list< StringRef > S)
 
std::pair< typename
base::iterator, bool
insert (StringRef Key)
 
template<typename InputIt >
void insert (const InputIt &Begin, const InputIt &End)
 
- Public Member Functions inherited from llvm::StringMap< char, AllocatorTy >
 StringMap ()
 
 StringMap (unsigned InitialSize)
 
 StringMap (AllocatorTy A)
 
 StringMap (unsigned InitialSize, AllocatorTy A)
 
 StringMap (std::initializer_list< std::pair< StringRef, char >> List)
 
 StringMap (StringMap &&RHS)
 
 StringMap (const StringMap &RHS)
 
StringMapoperator= (StringMap RHS)
 
AllocatorTy & getAllocator ()
 
const AllocatorTy & getAllocator () const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
iterator find (StringRef Key)
 
const_iterator find (StringRef Key) const
 
char lookup (StringRef Key) const
 lookup - Return the entry for the specified key, or a default constructed value if no such entry exists. More...
 
char & 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, boolinsert (std::pair< StringRef, char > KV)
 insert - Inserts the specified key/value pair into the map if the key isn't already in the map. More...
 
std::pair< iterator, booltry_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

- Public Types inherited from llvm::StringMap< char, AllocatorTy >
typedef StringMapEntry< char > MapEntryTy
 
typedef const char * key_type
 
typedef char mapped_type
 
typedef StringMapEntry< char > value_type
 
typedef size_t size_type
 
typedef StringMapConstIterator
< char > 
const_iterator
 
typedef StringMapIterator< char > iterator
 
- Static Public Member Functions inherited from llvm::StringMapImpl
static StringMapEntryBasegetTombstoneVal ()
 
- 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...
 
StringMapEntryBaseRemoveKey (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
 

Detailed Description

template<class AllocatorTy = llvm::MallocAllocator>
class llvm::StringSet< AllocatorTy >

StringSet - A wrapper for StringMap that provides set-like functionality.

Definition at line 23 of file StringSet.h.

Constructor & Destructor Documentation

template<class AllocatorTy = llvm::MallocAllocator>
llvm::StringSet< AllocatorTy >::StringSet ( )
default
template<class AllocatorTy = llvm::MallocAllocator>
llvm::StringSet< AllocatorTy >::StringSet ( std::initializer_list< StringRef S)
inline

Definition at line 27 of file StringSet.h.

References llvm::StringSet< AllocatorTy >::insert(), and X.

Member Function Documentation

template<class AllocatorTy = llvm::MallocAllocator>
std::pair<typename base::iterator, bool> llvm::StringSet< AllocatorTy >::insert ( StringRef  Key)
inline
template<class AllocatorTy = llvm::MallocAllocator>
template<typename InputIt >
void llvm::StringSet< AllocatorTy >::insert ( const InputIt &  Begin,
const InputIt &  End 
)
inline

The documentation for this class was generated from the following file: