Skip to content

Commit 568ec70

Browse files
committed
replace_symbolt: avoid a couple of direct references to expr_map
Makes out-of-tree alterations to replace_symbolt easier by using its own interface rather than directly inspecting its data structures where possible.
1 parent 7905492 commit 568ec70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/util/replace_symbol.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ bool replace_symbolt::replace(exprt &dest) const
119119

120120
bool replace_symbolt::have_to_replace(const exprt &dest) const
121121
{
122-
if(expr_map.empty())
122+
if(empty())
123123
return false;
124124

125125
// first look at type
@@ -132,7 +132,7 @@ bool replace_symbolt::have_to_replace(const exprt &dest) const
132132
if(dest.id()==ID_symbol)
133133
{
134134
const irep_idt &identifier = to_symbol_expr(dest).get_identifier();
135-
return expr_map.find(identifier) != expr_map.end();
135+
return replaces_symbol(identifier);
136136
}
137137

138138
forall_operands(it, dest)

0 commit comments

Comments
 (0)