LLVM API Documentation

Public Types | Public Member Functions
llvm::SmallSet< T, N, C > Class Template Reference

#include <SmallSet.h>

Inheritance diagram for llvm::SmallSet< T, N, C >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef size_t size_type

Public Member Functions

 SmallSet ()
bool LLVM_ATTRIBUTE_UNUSED_RESULT empty () const
size_type size () const
size_type count (const T &V) const
 count - Return 1 if the element is in the set, 0 otherwise.
bool insert (const T &V)
template<typename IterT >
void insert (IterT I, IterT E)
bool erase (const T &V)
void clear ()

Detailed Description

template<typename T, unsigned N, typename C = std::less<T>>
class llvm::SmallSet< T, N, C >

SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less than N). In this case, the set can be maintained with no mallocs. If the set gets large, we expand to using an std::set to maintain reasonable lookup times.

Note that this set does not provide a way to iterate over members in the set.

Definition at line 31 of file SmallSet.h.


Member Typedef Documentation

template<typename T, unsigned N, typename C = std::less<T>>
typedef size_t llvm::SmallSet< T, N, C >::size_type

Definition at line 40 of file SmallSet.h.


Constructor & Destructor Documentation

template<typename T, unsigned N, typename C = std::less<T>>
llvm::SmallSet< T, N, C >::SmallSet ( ) [inline]

Definition at line 41 of file SmallSet.h.


Member Function Documentation

template<typename T, unsigned N, typename C = std::less<T>>
void llvm::SmallSet< T, N, C >::clear ( ) [inline]

Definition at line 101 of file SmallSet.h.

Referenced by llvm::MachineDominatorTree::runOnMachineFunction().

template<typename T, unsigned N, typename C = std::less<T>>
size_type llvm::SmallSet< T, N, C >::count ( const T V) const [inline]
template<typename T, unsigned N, typename C = std::less<T>>
bool LLVM_ATTRIBUTE_UNUSED_RESULT llvm::SmallSet< T, N, C >::empty ( ) const [inline]
template<typename T, unsigned N, typename C = std::less<T>>
bool llvm::SmallSet< T, N, C >::erase ( const T V) [inline]
template<typename T, unsigned N, typename C = std::less<T>>
bool llvm::SmallSet< T, N, C >::insert ( const T V) [inline]
template<typename T, unsigned N, typename C = std::less<T>>
template<typename IterT >
void llvm::SmallSet< T, N, C >::insert ( IterT  I,
IterT  E 
) [inline]

Definition at line 85 of file SmallSet.h.

template<typename T, unsigned N, typename C = std::less<T>>
size_type llvm::SmallSet< T, N, C >::size ( ) const [inline]

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