LLVM API Documentation

llvm::SmallSet< T, N > Class Template Reference

#include <SmallSet.h>

Inheritance diagram for llvm::SmallSet< T, N >:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SmallSet ()
bool empty () const
unsigned size () const
bool count (const T &V) const
 count - Return true if the element is in the set.
bool insert (const T &V)
 insert - Insert an element into the set if it isn't already there.
bool erase (const T &V)
void clear ()


Detailed Description

template<typename T, unsigned N>
class llvm::SmallSet< T, N >

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.


Constructor & Destructor Documentation

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

Definition at line 40 of file SmallSet.h.


Member Function Documentation

template<typename T, unsigned N>
bool llvm::SmallSet< T, N >::empty (  )  const [inline]

Definition at line 42 of file SmallSet.h.

template<typename T, unsigned N>
unsigned llvm::SmallSet< T, N >::size (  )  const [inline]

Definition at line 43 of file SmallSet.h.

template<typename T, unsigned N>
bool llvm::SmallSet< T, N >::count ( const T V  )  const [inline]

count - Return true if the element is in the set.

Definition at line 48 of file SmallSet.h.

Referenced by llvm::SetVector< T, llvm::SmallVector< T, N >, llvm::SmallSet< T, N > >::count(), and llvm::SimpleRegisterCoalescing::runOnMachineFunction().

template<typename T, unsigned N>
bool llvm::SmallSet< T, N >::insert ( const T V  )  [inline]

template<typename T, unsigned N>
bool llvm::SmallSet< T, N >::erase ( const T V  )  [inline]

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


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



This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.