LLVM API Documentation
#include <TypeSymbolTable.h>


Public Types | |
Types | |
| typedef std::map< const std::string, const Type * > | TypeMap |
| A mapping of names to types. | |
| typedef TypeMap::iterator | iterator |
| An iterator over the TypeMap. | |
| typedef TypeMap::const_iterator | const_iterator |
| A const_iterator over the TypeMap. | |
Public Member Functions | |
Constructors | |
| TypeSymbolTable () | |
| ~TypeSymbolTable () | |
Accessors | |
| std::string | getUniqueName (const std::string &BaseName) const |
| Get a unique name for a type. | |
| Type * | lookup (const std::string &name) const |
| Lookup a type by name. | |
| bool | empty () const |
| Determine if the symbol table is empty. | |
| unsigned | size () const |
| The number of name/type pairs is returned. | |
| void | dump () const |
| Print out symbol table on stderr. | |
Iteration | |
| iterator | begin () |
| Get an iterator to the start of the symbol table. | |
| const_iterator | begin () const |
| Get a const_iterator to the start of the symbol table. | |
| iterator | end () |
| Get an iterator to the end of the symbol talbe. | |
| const_iterator | end () const |
| Get a const_iterator to the end of the symbol table. | |
Mutators | |
| void | insert (const std::string &Name, const Type *Typ) |
| Insert a type under a new name. | |
| Type * | remove (iterator TI) |
Definition at line 26 of file TypeSymbolTable.h.
| typedef std::map<const std::string, const Type*> llvm::TypeSymbolTable::TypeMap |
| typedef TypeMap::const_iterator llvm::TypeSymbolTable::const_iterator |
| llvm::TypeSymbolTable::TypeSymbolTable | ( | ) | [inline] |
Definition at line 46 of file TypeSymbolTable.h.
| TypeSymbolTable::~TypeSymbolTable | ( | ) |
Definition at line 24 of file TypeSymbolTable.cpp.
| std::string TypeSymbolTable::getUniqueName | ( | const std::string & | BaseName | ) | const |
Get a unique name for a type.
Generates a unique name for a type based on the BaseName by incrementing an integer and appending it to the name, if necessary
Definition at line 32 of file TypeSymbolTable.cpp.
References End, and llvm::utostr().
Referenced by insert().
| Type * TypeSymbolTable::lookup | ( | const std::string & | name | ) | const |
Lookup a type by name.
This method finds the type with the given name in the type map and returns it.
name. Definition at line 43 of file TypeSymbolTable.cpp.
Referenced by llvm::Module::addTypeName(), llvm::Module::getTypeByName(), insert(), and LinkTypes().
| bool llvm::TypeSymbolTable::empty | ( | ) | const [inline] |
Determine if the symbol table is empty.
Definition at line 69 of file TypeSymbolTable.h.
Referenced by WriteTypeSymbolTable().
| unsigned llvm::TypeSymbolTable::size | ( | ) | const [inline] |
The number of name/type pairs is returned.
Definition at line 73 of file TypeSymbolTable.h.
| void TypeSymbolTable::dump | ( | ) | const [virtual] |
Print out symbol table on stderr.
This function can be used from the debugger to display the content of the symbol table while debugging.
Implements llvm::AbstractTypeUser.
Definition at line 160 of file TypeSymbolTable.cpp.
References llvm::cerr(), and DumpTypes().
| iterator llvm::TypeSymbolTable::begin | ( | ) | [inline] |
Get an iterator to the start of the symbol table.
Definition at line 85 of file TypeSymbolTable.h.
Referenced by llvm::CloneModule(), fillTypeNameTable(), findTypeName(), llvm::Module::getTypeName(), LinkTypes(), LLVMDeleteTypeName(), StripDebugInfo(), StripTypeSymtab(), and WriteTypeSymbolTable().
| const_iterator llvm::TypeSymbolTable::begin | ( | ) | const [inline] |
Get a const_iterator to the start of the symbol table.
Definition at line 88 of file TypeSymbolTable.h.
| iterator llvm::TypeSymbolTable::end | ( | ) | [inline] |
Get an iterator to the end of the symbol talbe.
Definition at line 91 of file TypeSymbolTable.h.
Referenced by llvm::CloneModule(), fillTypeNameTable(), findTypeName(), llvm::Module::getTypeName(), LinkTypes(), LLVMDeleteTypeName(), StripDebugInfo(), StripTypeSymtab(), and WriteTypeSymbolTable().
| const_iterator llvm::TypeSymbolTable::end | ( | ) | const [inline] |
Get a const_iterator to the end of the symbol table.
Definition at line 94 of file TypeSymbolTable.h.
| void TypeSymbolTable::insert | ( | const std::string & | Name, | |
| const Type * | Typ | |||
| ) |
Insert a type under a new name.
Inserts a type into the symbol table with the specified name. There can be a many-to-one mapping between names and types. This method allows a type with an existing entry in the symbol table to get a new name.
Definition at line 79 of file TypeSymbolTable.cpp.
References llvm::cerr(), dump(), llvm::Type::getDescription(), getUniqueName(), llvm::Type::isAbstract(), and lookup().
Referenced by llvm::Module::addTypeName(), and LinkTypes().
Remove a type at the specified position in the symbol table.
Definition at line 51 of file TypeSymbolTable.cpp.
References llvm::cerr(), and dump().
Referenced by LLVMDeleteTypeName(), StripDebugInfo(), and StripTypeSymtab().
This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.