|
LLVM 24.0.0git
|
This class provides a symbol table of name/value pairs. More...
#include "llvm/IR/ValueSymbolTable.h"
Public Types | |
Types | |
| using | ValueMap = StringMap<Value*> |
| A mapping of names to values. | |
| using | iterator = ValueMap::iterator |
| An iterator over a ValueMap. | |
| using | const_iterator = ValueMap::const_iterator |
| A const_iterator over a ValueMap. | |
Public Member Functions | |
Constructors | |
| ValueSymbolTable (int MaxNameSize=-1) | |
| LLVM_ABI | ~ValueSymbolTable () |
Accessors | |
| Value * | lookup (StringRef Name) const |
This method finds the value with the given Name in the the symbol table. | |
| bool | empty () const |
| unsigned | size () const |
| The number of name/type pairs is returned. | |
| template<typename CreateFn> | |
| Value * | lookupOrInsert (StringRef Name, CreateFn CreateUnnamed) |
Return the value named Name, or give the name to the result of CreateUnnamed, which must return an unnamed value. | |
| LLVM_ABI void | dump () const |
| This function can be used from the debugger to display the content of the symbol table while debugging. | |
Iteration | |
| iterator | begin () |
| Get an iterator that from the beginning of the symbol table. | |
| const_iterator | begin () const |
| Get a const_iterator that from the beginning of the symbol table. | |
| iterator | end () |
| Get an iterator to the end of the symbol table. | |
| const_iterator | end () const |
| Get a const_iterator to the end of the symbol table. | |
This class provides a symbol table of name/value pairs.
It is essentially a std::map<std::string,Value*> but has a controlled interface provided by LLVM as well as ensuring uniqueness of names.
Definition at line 40 of file ValueSymbolTable.h.
A const_iterator over a ValueMap.
Definition at line 61 of file ValueSymbolTable.h.
An iterator over a ValueMap.
Definition at line 58 of file ValueSymbolTable.h.
| using llvm::ValueSymbolTable::ValueMap = StringMap<Value*> |
A mapping of names to values.
Definition at line 55 of file ValueSymbolTable.h.
|
inline |
Definition at line 67 of file ValueSymbolTable.h.
| ValueSymbolTable::~ValueSymbolTable | ( | ) |
Definition at line 33 of file ValueSymbolTable.cpp.
References assert(), and llvm::dbgs().
|
inline |
Get an iterator that from the beginning of the symbol table.
Definition at line 118 of file ValueSymbolTable.h.
|
inline |
Get a const_iterator that from the beginning of the symbol table.
Definition at line 121 of file ValueSymbolTable.h.
| LLVM_DUMP_METHOD void ValueSymbolTable::dump | ( | ) | const |
This function can be used from the debugger to display the content of the symbol table while debugging.
Print out symbol table on stderr
Definition at line 142 of file ValueSymbolTable.cpp.
References I, and LLVM_DUMP_METHOD.
|
inline |
Definition at line 87 of file ValueSymbolTable.h.
|
inline |
Get an iterator to the end of the symbol table.
Definition at line 124 of file ValueSymbolTable.h.
|
inline |
Get a const_iterator to the end of the symbol table.
Definition at line 127 of file ValueSymbolTable.h.
This method finds the value with the given Name in the the symbol table.
Name Lookup a named Value. Definition at line 78 of file ValueSymbolTable.h.
References Value.
Referenced by parseIRValue().
|
inline |
Return the value named Name, or give the name to the result of CreateUnnamed, which must return an unnamed value.
Definition at line 95 of file ValueSymbolTable.h.
|
inline |
The number of name/type pairs is returned.
Definition at line 90 of file ValueSymbolTable.h.
|
friend |
Definition at line 1 of file ValueSymbolTable.h.
|
friend |
Definition at line 1 of file ValueSymbolTable.h.
|
friend |
Definition at line 1 of file ValueSymbolTable.h.
|
friend |
Definition at line 1 of file ValueSymbolTable.h.
|
friend |
Definition at line 1 of file ValueSymbolTable.h.
|
friend |
Definition at line 1 of file ValueSymbolTable.h.
|
friend |
Definition at line 1 of file ValueSymbolTable.h.
|
friend |
Definition at line 49 of file ValueSymbolTable.h.
References Value.
Referenced by lookup(), lookupOrInsert(), and Value.