Skip to content

Commit 7ed433f

Browse files
author
Daniel Kroening
committed
letify: do not look up expressions without children
1 parent 23d681a commit 7ed433f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/solvers/smt2/letify.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ void letifyt::collect_bindings(
1919
seen_expressionst &map,
2020
std::vector<exprt> &let_order)
2121
{
22+
// do not letify things with no children
23+
if(expr.operands().empty())
24+
return;
25+
2226
// did we already see the expression?
2327
seen_expressionst::iterator entry = map.find(expr);
2428

@@ -30,10 +34,6 @@ void letifyt::collect_bindings(
3034
return;
3135
}
3236

33-
// do not letify things with no children
34-
if(expr.operands().empty())
35-
return;
36-
3737
// not seen before
3838
for(auto &op : expr.operands())
3939
collect_bindings(op, map, let_order);

0 commit comments

Comments
 (0)