Go to the documentation of this file.
32 const std::string &name_prefix,
33 const std::string &basename_prefix,
39 irep_idt identifier = basename_prefix;
40 std::size_t prefix_size = 0;
41 if(!name_prefix.empty())
43 identifier = name_prefix +
"::" + basename_prefix;
44 prefix_size = name_prefix.
size() + 2;
47 std::string basename =
id2string(identifier).substr(prefix_size);
50 new_symbol.
name = identifier;
51 new_symbol.
location = source_location;
52 new_symbol.
mode = symbol_mode;
53 std::pair<symbolt &, bool> res = symbol_table.
insert(std::move(new_symbol));
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
void get_new_name(symbolt &symbol, const namespacet &ns)
automated variable renaming
The type of an expression, extends irept.
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.
Internally generated symbol table entry.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
irep_idt mode
Language mode.
const std::string & id2string(const irep_idt &d)
The symbol table base class interface.
source_locationt location
Source code location of definition of symbol.
virtual std::pair< symbolt &, bool > insert(symbolt symbol)=0
Move or copy a new symbol to the symbol table.
irep_idt name
The unique identifier.
#define CHECK_RETURN(CONDITION)