30 const std::string &name_prefix,
31 const std::string &basename_prefix,
37 irep_idt identifier = basename_prefix;
38 std::size_t prefix_size = 0;
39 if(!name_prefix.empty())
41 identifier = name_prefix +
"::" + basename_prefix;
42 prefix_size = name_prefix.
size() + 2;
45 std::string basename =
id2string(identifier).substr(prefix_size);
48 new_symbol.
name = identifier;
49 new_symbol.
location = source_location;
50 new_symbol.
mode = symbol_mode;
51 std::pair<symbolt &, bool> res = symbol_table.
insert(std::move(new_symbol));
The type of an expression.
irep_idt name
The unique identifier.
const std::string & id2string(const irep_idt &d)
irep_idt mode
Language mode.
Fresh auxiliary symbol creation.
Symbol table entry.This is a symbol in the symbol table, stored in an object of type symbol_tablet...
#define CHECK_RETURN(CONDITION)
Internally generated symbol table entryThis is a symbol generated as part of translation to or modifi...
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
source_locationt location
Source code location of definition of symbol.
symbolt & get_fresh_aux_symbol(const typet &type, const std::string &name_prefix, const std::string &basename_prefix, const source_locationt &source_location, const irep_idt &symbol_mode, symbol_table_baset &symbol_table)
Installs a fresh-named symbol with the requested name pattern.
The symbol table base class interface.
virtual std::pair< symbolt &, bool > insert(symbolt symbol)=0
Move or copy a new symbol to the symbol table.
void get_new_name(symbolt &symbol, const namespacet &ns)
automated variable renaming