16 "types to be replaced should match. old type:\n" + what.
type().
pretty() +
19 bool no_change =
true;
28 it.next_sibling_or_parent();
39 bool no_change =
true;
44 replace_mapt::const_iterator findit = what.find(*it);
45 if(findit != what.end())
48 it->type() == findit->second.type(),
49 "types to be replaced should match. old type:\n" + it->type().pretty() +
50 "\nnew type:\n" + findit->second.type().pretty());
52 it.mutate() = findit->second;
54 it.next_sibling_or_parent();
Base class for all expressions.
depth_iteratort depth_end()
depth_iteratort depth_begin()
typet & type()
Return the type of the expression.
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
Forward depth-first search iterators These iterators' copy operations are expensive,...
bool replace_expr(const exprt &what, const exprt &by, exprt &dest)
std::unordered_map< exprt, exprt, irep_hash > replace_mapt
#define PRECONDITION_WITH_DIAGNOSTICS(CONDITION,...)