fix(kernel/replace): make it more robust, and add clear method

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-11-20 13:17:58 -08:00
parent 87eb254a1a
commit be8fe1b902

View file

@ -47,6 +47,8 @@ class replace_fn {
P m_post;
expr apply(expr const & e, unsigned offset) {
if (!e)
return e;
bool sh = false;
if (is_shared(e)) {
expr_cell_offset p(e.raw(), offset);
@ -102,5 +104,9 @@ public:
expr operator()(expr const & e) {
return apply(e, 0);
}
void clear() {
m_cache.clear();
}
};
}