LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
llvm::UniqueVector< T > Class Template Reference

#include <UniqueVector.h>

Public Member Functions

unsigned insert (const T &Entry)
 
unsigned idFor (const T &Entry) const
 
const Toperator[] (unsigned ID) const
 
size_t size () const
 
bool empty () const
 
void reset ()
 

Detailed Description

template<class T>
class llvm::UniqueVector< T >

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.

Member Function Documentation

template<class T>
bool llvm::UniqueVector< T >::empty ( ) const
inline

empty - Returns true if the vector is empty.

Definition at line 77 of file UniqueVector.h.

template<class T>
unsigned llvm::UniqueVector< T >::idFor ( const T Entry) const
inline

idFor - return the ID for an existing entry. Returns 0 if the entry is not found.

Definition at line 53 of file UniqueVector.h.

References llvm::A64CC::MI.

template<class T>
unsigned llvm::UniqueVector< T >::insert ( const T Entry)
inline

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 36 of file UniqueVector.h.

template<class T>
const T& llvm::UniqueVector< T >::operator[] ( unsigned  ID) const
inline

operator[] - Returns a reference to the entry with the specified ID.

Definition at line 66 of file UniqueVector.h.

References llvm::UniqueVector< T >::size().

template<class T>
void llvm::UniqueVector< T >::reset ( )
inline

reset - Clears all the entries.

Definition at line 81 of file UniqueVector.h.

template<class T>
size_t llvm::UniqueVector< T >::size ( ) const
inline

size - Returns the number of entries in the vector.

Definition at line 73 of file UniqueVector.h.

Referenced by llvm::UniqueVector< T >::operator[]().


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