A symbol table which can be used to represent a single scoped set of a programs variables. This is simply an unordered map of strings to llvm::Values.  
 More...
#include <openvdb_ax/codegen/SymbolTable.h>
|  | 
| using | MapType = std::unordered_map<std::string, llvm::Value*> | 
|  | 
|  | 
|  | SymbolTable () | 
|  | 
|  | ~SymbolTable ()=default | 
|  | 
| llvm::Value * | get (const std::string &name) const | 
|  | Get a llvm::Value from this symbol table with the given name mapping. It it does not exist, a nullptr is returned. 
 | 
|  | 
| bool | exists (const std::string &name) const | 
|  | Returns true if a variable exists in this symbol table with the given name. 
 | 
|  | 
| bool | insert (const std::string &name, llvm::Value *value) | 
|  | Insert a variable to this symbol table if it does not exist. Returns true if successfully, false if a variable already exists with the given name. 
 | 
|  | 
| bool | replace (const std::string &name, llvm::Value *value) | 
|  | Replace a variable in this symbol table. Returns true if the variable previously existed and false if not. In both cases, the variable is inserted. 
 | 
|  | 
| void | clear () | 
|  | Clear all symbols in this table. 
 | 
|  | 
| const MapType & | map () const | 
|  | Access to the underlying map. 
 | 
|  | 
A symbol table which can be used to represent a single scoped set of a programs variables. This is simply an unordered map of strings to llvm::Values. 
- Note
- Consider using llvm's ValueSymbolTable 
◆ MapType
      
        
          | using MapType = std::unordered_map<std::string, llvm::Value*> | 
      
 
 
◆ SymbolTable()
◆ ~SymbolTable()
◆ clear()
Clear all symbols in this table. 
 
 
◆ exists()
  
  | 
        
          | bool exists | ( | const std::string & | name | ) | const |  | inline | 
 
Returns true if a variable exists in this symbol table with the given name. 
- Parameters
- 
  
    | name | The name of the variable |  
 
 
 
◆ get()
  
  | 
        
          | llvm::Value * get | ( | const std::string & | name | ) | const |  | inline | 
 
Get a llvm::Value from this symbol table with the given name mapping. It it does not exist, a nullptr is returned. 
- Parameters
- 
  
    | name | The name of the variable |  
 
 
 
◆ insert()
  
  | 
        
          | bool insert | ( | const std::string & | name, |  
          |  |  | llvm::Value * | value ) |  | inline | 
 
Insert a variable to this symbol table if it does not exist. Returns true if successfully, false if a variable already exists with the given name. 
- Parameters
- 
  
    | name | The name of the variable |  | value | The llvm::Value corresponding to this variable |  
 
 
 
◆ map()
Access to the underlying map. 
 
 
◆ replace()
  
  | 
        
          | bool replace | ( | const std::string & | name, |  
          |  |  | llvm::Value * | value ) |  | inline | 
 
Replace a variable in this symbol table. Returns true if the variable previously existed and false if not. In both cases, the variable is inserted. 
- Parameters
- 
  
    | name | The name of the variable |  | value | The llvm::Value corresponding to this variable |