diff options
Diffstat (limited to 'lib/Expr/ExprUtil.cpp')
-rw-r--r-- | lib/Expr/ExprUtil.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Expr/ExprUtil.cpp b/lib/Expr/ExprUtil.cpp index 911366f3..3819e3a2 100644 --- a/lib/Expr/ExprUtil.cpp +++ b/lib/Expr/ExprUtil.cpp @@ -49,8 +49,9 @@ void klee::findReads(ref<Expr> e, // especially since we memoize all the expr results anyway. So // we take a simple approach of memoizing the results for the // head, which often will be shared among multiple nodes. - if (updates.insert(re->updates.head).second) { - for (const UpdateNode *un=re->updates.head; un; un=un->next) { + if (updates.insert(re->updates.head.get()).second) { + for (const auto *un = re->updates.head.get(); un; + un = un->next.get()) { if (!isa<ConstantExpr>(un->index) && visited.insert(un->index).second) stack.push_back(un->index); @@ -82,7 +83,7 @@ protected: const UpdateList &ul = re.updates; // XXX should we memo better than what ExprVisitor is doing for us? - for (const UpdateNode *un=ul.head; un; un=un->next) { + for (const auto *un = ul.head.get(); un; un = un->next.get()) { visit(un->index); visit(un->value); } @@ -106,7 +107,7 @@ ExprVisitor::Action ConstantArrayFinder::visitRead(const ReadExpr &re) { const UpdateList &ul = re.updates; // FIXME should we memo better than what ExprVisitor is doing for us? - for (const UpdateNode *un = ul.head; un; un = un->next) { + for (const auto *un = ul.head.get(); un; un = un->next.get()) { visit(un->index); visit(un->value); } |