LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 >:
Inheritance graph
[legend]
Collaboration diagram for llvm::StringSet< AllocatorTy >:
Collaboration graph
[legend]

Public Member Functions

bool insert (StringRef Key)
 
- Public Member Functions inherited from llvm::StringMap< char, AllocatorTy >
 StringMap ()
 
 StringMap (unsigned InitialSize)
 
 StringMap (AllocatorTy A)
 
 StringMap (unsigned InitialSize, AllocatorTy A)
 
 StringMap (const StringMap &RHS)
 
void operator= (const StringMap &RHS)
 
AllocatorRefTy getAllocator ()
 
AllocatorCRefTy 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
 
char & operator[] (StringRef Key)
 
size_type count (StringRef Key) const
 
bool insert (MapEntryTy *KeyValue)
 
void clear ()
 
MapEntryTyGetOrCreateValue (StringRef Key, InitTy Val)
 
MapEntryTyGetOrCreateValue (StringRef Key)
 
void remove (MapEntryTy *KeyValue)
 
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 ReferenceAdder
< AllocatorTy >::result 
AllocatorRefTy
 
typedef ReferenceAdder< const
AllocatorTy >::result 
AllocatorCRefTy
 
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 (unsigned InitSize, unsigned ItemSize)
 
void RehashTable ()
 
unsigned LookupBucketFor (StringRef Key)
 
int FindKey (StringRef Key) const
 
void RemoveKey (StringMapEntryBase *V)
 
StringMapEntryBaseRemoveKey (StringRef Key)
 
- 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.

Member Function Documentation

template<class AllocatorTy = llvm::MallocAllocator>
bool llvm::StringSet< AllocatorTy >::insert ( StringRef  Key)
inline

insert - Insert the specified key into the set. If the key already exists in the set, return false and ignore the request, otherwise insert it and return true.

Definition at line 30 of file StringSet.h.

References llvm::StringRef::empty(), and llvm::StringMap< char, AllocatorTy >::GetOrCreateValue().

Referenced by llvm::opt::OptTable::OptTable().


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