36 exprt * modifiable_expr =
nullptr;
41 modifiable_expr = &it.mutate();
46 if(it->id()==ID_symbol)
48 expr_mapt::const_iterator entry =
54 modifiable_expr = &it.mutate();
60 const typet &c_sizeof_type =
61 static_cast<const typet&
>(it->find(ID_C_c_sizeof_type));
65 modifiable_expr = &it.mutate();
67 rename(static_cast<typet&>(modifiable_expr->
add(ID_C_c_sizeof_type)));
70 const typet &va_arg_type =
71 static_cast<const typet&
>(it->find(ID_C_va_arg_type));
75 modifiable_expr = &it.mutate();
77 rename(static_cast<typet&>(modifiable_expr->
add(ID_C_va_arg_type)));
96 if(dest.
id()==ID_symbol)
106 const irept &c_sizeof_type=dest.
find(ID_C_c_sizeof_type);
112 const irept &va_arg_type=dest.
find(ID_C_va_arg_type);
136 if(dest.
id()==ID_struct ||
143 for(struct_union_typet::componentst::iterator
144 it=components.begin();
145 it!=components.end();
150 else if(dest.
id()==ID_code)
156 for(code_typet::parameterst::iterator it = parameters.begin();
157 it!=parameters.end();
163 expr_mapt::const_iterator e_it=
164 expr_map.find(it->get_identifier());
168 it->set_identifier(e_it->second);
173 else if(dest.
id()==ID_symbol)
175 type_mapt::const_iterator it=
184 else if(dest.
id()==ID_c_enum_tag ||
185 dest.
id()==ID_struct_tag ||
186 dest.
id()==ID_union_tag)
188 type_mapt::const_iterator it=
197 else if(dest.
id()==ID_array)
220 if(dest.
id()==ID_struct ||
229 for(struct_union_typet::componentst::const_iterator
230 it=components.begin();
231 it!=components.end();
236 else if(dest.
id()==ID_code)
244 for(code_typet::parameterst::const_iterator
245 it=parameters.begin();
246 it!=parameters.end();
256 else if(dest.
id()==ID_symbol)
261 else if(dest.
id()==ID_c_enum_tag ||
262 dest.
id()==ID_struct_tag ||
263 dest.
id()==ID_union_tag)
265 else if(dest.
id()==ID_array)
The type of an expression.
#define forall_subtypes(it, type)
const code_typet & to_code_type(const typet &type)
Cast a generic typet to a code_typet.
const irep_idt & get_identifier() const
const tag_typet & to_tag_type(const typet &type)
Cast a generic typet to a tag_typet.
std::vector< componentt > componentst
const symbol_typet & to_symbol_type(const typet &type)
Cast a generic typet to a symbol_typet.
std::vector< parametert > parameterst
const componentst & components() const
void set_identifier(const irep_idt &identifier)
depth_iteratort depth_begin()
void set_identifier(const irep_idt &identifier)
bool have_to_rename(const exprt &dest) const
const irep_idt & id() const
API to expression classes.
bool rename(exprt &dest) const
const exprt & size() const
Base class for tree-like data structures with sharing.
#define forall_operands(it, expr)
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast a generic exprt to a symbol_exprt.
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
Base type of C structs and unions, and C++ classes.
void insert_expr(const irep_idt &old_id, const irep_idt &new_id)
const array_typet & to_array_type(const typet &type)
Cast a generic typet to an array_typet.
Base class for all expressions.
const parameterst & parameters() const
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a generic typet to a struct_union_typet.
irept & add(const irep_namet &name)
#define Forall_subtypes(it, type)
void set_identifier(const irep_idt &identifier)
Expression to hold a symbol (variable)
depth_iteratort depth_end()
const typet & subtype() const
void insert(const class symbol_exprt &old_expr, const class symbol_exprt &new_expr)
const irept & find(const irep_namet &name) const
const typet & return_type() const
const irep_idt & get_identifier() const
virtual ~rename_symbolt()