19 assert(symbol.
type.
id()==ID_struct);
22 std::map<irep_idt, std::map<irep_idt, exprt> > vt_value_maps;
26 for(std::size_t i=0; i < struct_type.
components().size(); i++)
38 irep_idt class_id=parameter_pointer_type.subtype().get(
"identifier");
40 std::map<irep_idt, exprt> &value_map =
41 vt_value_maps[class_id];
45 if(compo.
get_bool(
"is_pure_virtual"))
49 value_map[compo.
get(
"virtual_name")]=e;
54 value_map[compo.
get(
"virtual_name")]=address;
59 for(std::map<
irep_idt, std::map<irep_idt, exprt> >::const_iterator cit =
60 vt_value_maps.begin(); cit!=vt_value_maps.end(); cit++)
62 const std::map<irep_idt, exprt> &value_map=cit->second;
73 vt_symb_var.
mode=ID_cpp;
85 for(std::size_t i=0; i < vt_type.
components().size(); i++)
88 std::map<irep_idt, exprt>::const_iterator cit2 =
89 value_map.find(compo.
get(
"base_name"));
90 assert(cit2!=value_map.end());
91 const exprt &value=cit2->second;
92 assert(value.type()==compo.
type());
95 vt_symb_var.
value=values;
const irep_idt & get_name() const
irep_idt name
The unique identifier.
const std::string & id2string(const irep_idt &d)
pointer_typet pointer_type(const typet &subtype)
irep_idt mode
Language mode.
const code_typet & to_code_type(const typet &type)
Cast a generic typet to a code_typet.
The null pointer constant.
exprt value
Initial value of symbol.
const componentst & components() const
irep_idt module
Name of module the symbol belongs to.
Symbol table entry.This is a symbol in the symbol table, stored in an object of type symbol_tablet...
#define CHECK_RETURN(CONDITION)
bool get_bool(const irep_namet &name) const
symbol_tablet & symbol_table
const irep_idt & id() const
A reference into the symbol table.
API to expression classes.
const irep_idt & get(const irep_namet &name) const
void do_virtual_table(const symbolt &symbol)
C++ Language Type Checking.
const struct_typet & to_struct_type(const typet &type)
Cast a generic typet to a struct_typet.
Operator to return the address of an object.
typet type
Type of symbol.
source_locationt location
Source code location of definition of symbol.
Base class for all expressions.
const parameterst & parameters() const
irep_idt base_name
Base (non-scoped) name.
Expression to hold a symbol (variable)
const pointer_typet & to_pointer_type(const typet &type)
Cast a generic typet to a pointer_typet.
struct constructor from list of elements
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See namespace_baset::lookup().
virtual std::pair< symbolt &, bool > insert(symbolt symbol) override
Author: Diffblue Ltd.