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 ||
145 else if(dest.
id()==ID_code)
155 expr_mapt::const_iterator e_it =
expr_map.find(p.get_identifier());
159 p.set_identifier(e_it->second);
164 else if(dest.
id() == ID_symbol_type)
166 type_mapt::const_iterator it=
175 else if(dest.
id()==ID_c_enum_tag ||
176 dest.
id()==ID_struct_tag ||
177 dest.
id()==ID_union_tag)
179 type_mapt::const_iterator it=
188 else if(dest.
id()==ID_array)
211 if(dest.
id()==ID_struct ||
217 for(
const auto &c : struct_union_type.
components())
221 else if(dest.
id()==ID_code)
236 else if(dest.
id() == ID_symbol_type)
241 else if(dest.
id()==ID_c_enum_tag ||
242 dest.
id()==ID_struct_tag ||
243 dest.
id()==ID_union_tag)
245 else if(dest.
id()==ID_array)
The type of an expression, extends irept.
#define forall_subtypes(it, type)
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
const irep_idt & get_identifier() const
const tag_typet & to_tag_type(const typet &type)
Cast a typet to a tag_typet.
const symbol_typet & to_symbol_type(const typet &type)
Cast a typet to a symbol_typet.
const componentst & components() const
void set_identifier(const irep_idt &identifier)
typet & type()
Return the type of the expression.
depth_iteratort depth_begin()
Forward depth-first search iterators These iterators' copy operations are expensive,...
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 an 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 for structs and unions.
void insert_expr(const irep_idt &old_id, const irep_idt &new_id)
const array_typet & to_array_type(const typet &type)
Cast a 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 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()