LLVM API Documentation
#include <UniqueVector.h>
Public Types | |
typedef std::vector< T > | VectorType |
typedef VectorType::iterator | iterator |
typedef VectorType::const_iterator | const_iterator |
Public Member Functions | |
unsigned | insert (const T &Entry) |
unsigned | idFor (const T &Entry) const |
const T & | operator[] (unsigned ID) const |
iterator | begin () |
Return an iterator to the start of the vector. | |
const_iterator | begin () const |
Return an iterator to the start of the vector. | |
iterator | end () |
Return an iterator to the end of the vector. | |
const_iterator | end () const |
Return an iterator to the end of the vector. | |
size_t | size () const |
bool | empty () const |
void | reset () |
UniqueVector - This class produces a sequential ID number (base 1) for each unique entry that is added. T is the type of entries in the vector. This class should have an implementation of operator== and of operator<. Entries can be fetched using operator[] with the entry ID.
Definition at line 24 of file UniqueVector.h.
typedef VectorType::const_iterator llvm::UniqueVector< T >::const_iterator |
Definition at line 28 of file UniqueVector.h.
typedef VectorType::iterator llvm::UniqueVector< T >::iterator |
Definition at line 27 of file UniqueVector.h.
typedef std::vector<T> llvm::UniqueVector< T >::VectorType |
Definition at line 26 of file UniqueVector.h.
iterator llvm::UniqueVector< T >::begin | ( | ) | [inline] |
Return an iterator to the start of the vector.
Definition at line 77 of file UniqueVector.h.
const_iterator llvm::UniqueVector< T >::begin | ( | ) | const [inline] |
Return an iterator to the start of the vector.
Definition at line 80 of file UniqueVector.h.
bool llvm::UniqueVector< T >::empty | ( | ) | const [inline] |
empty - Returns true if the vector is empty.
Definition at line 94 of file UniqueVector.h.
iterator llvm::UniqueVector< T >::end | ( | ) | [inline] |
Return an iterator to the end of the vector.
Definition at line 83 of file UniqueVector.h.
const_iterator llvm::UniqueVector< T >::end | ( | ) | const [inline] |
Return an iterator to the end of the vector.
Definition at line 86 of file UniqueVector.h.
idFor - return the ID for an existing entry. Returns 0 if the entry is not found.
Definition at line 58 of file UniqueVector.h.
Referenced by llvm::ValueEnumerator::getComdatID().
insert - Append entry to the vector if it doesn't already exist. Returns the entry's index + 1 to be used as a unique ID.
Definition at line 41 of file UniqueVector.h.
const T& llvm::UniqueVector< T >::operator[] | ( | unsigned | ID | ) | const [inline] |
operator[] - Returns a reference to the entry with the specified ID.
Definition at line 71 of file UniqueVector.h.
void llvm::UniqueVector< T >::reset | ( | ) | [inline] |
reset - Clears all the entries.
Definition at line 98 of file UniqueVector.h.
size_t llvm::UniqueVector< T >::size | ( | ) | const [inline] |
size - Returns the number of entries in the vector.
Definition at line 90 of file UniqueVector.h.
Referenced by llvm::UniqueVector< const Comdat * >::operator[]().