Collections of IdentifierInfo objects. More...
#include <IdentifierPool.h>
Public Types | |
typedef PoolType::const_iterator | iterator |
Public Member Functions | |
IdentifierInfo & | getIdentifierInfo (const char *name, size_t len) |
Returns an IdentifierInfo object associated with the given string. | |
IdentifierInfo & | getIdentifierInfo (const char *name) |
Returns the IdentifierInfo associated with the given null terminated string. | |
IdentifierInfo & | getIdentifierInfo (const std::string &name) |
Returns the IdentifierInfo associated with the given std::string. | |
iterator | begin () const |
Provides an iterator over the elements of of this pool. | |
iterator | end () const |
Sentinel marking the end of iteration. | |
unsigned | size () const |
Returns the number of IdentifierInfo's managed by this pool. |
Collections of IdentifierInfo objects.
This class is much like a hash table mapping strings to unique IdentifierInfo objects. The interface to this class is quite sparse, as its primary roll is to serve as an allocator which persists throughout the life of the program.
Definition at line 26 of file IdentifierPool.h.
typedef PoolType::const_iterator comma::IdentifierPool::iterator |
Definition at line 72 of file IdentifierPool.h.
iterator comma::IdentifierPool::begin | ( | ) | const [inline] |
Provides an iterator over the elements of of this pool.
The objects returned are of type llvm::StringMapEntry -- essentially key value pairs of string and IdentifierInfo objects.
Definition at line 78 of file IdentifierPool.h.
iterator comma::IdentifierPool::end | ( | ) | const [inline] |
Sentinel marking the end of iteration.
Definition at line 81 of file IdentifierPool.h.
IdentifierInfo& comma::IdentifierPool::getIdentifierInfo | ( | const std::string & | name | ) | [inline] |
Returns the IdentifierInfo associated with the given std::string.
name | The string to associate with an IdentifierInfo object. |
Definition at line 65 of file IdentifierPool.h.
IdentifierInfo& comma::IdentifierPool::getIdentifierInfo | ( | const char * | name | ) | [inline] |
Returns the IdentifierInfo associated with the given null terminated string.
name | The string to associate with an IdentifierInfo object. |
Definition at line 55 of file IdentifierPool.h.
IdentifierInfo& comma::IdentifierPool::getIdentifierInfo | ( | const char * | name, | |
size_t | len | |||
) | [inline] |
Returns an IdentifierInfo object associated with the given string.
If no IdentifierInfo object is associated with the supplied string, the data is copied and a new IdentifierInfo node created. The string need not be null terminated (the copy will be terminated).
name | The string to associate with an IdentifierInfo object. | |
len | The length of the supplied string. |
Definition at line 44 of file IdentifierPool.h.
unsigned comma::IdentifierPool::size | ( | ) | const [inline] |
Returns the number of IdentifierInfo's managed by this pool.
Definition at line 84 of file IdentifierPool.h.