diff options
author | Martin Nowack <m.nowack@imperial.ac.uk> | 2018-09-12 14:58:11 +0000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2020-02-19 12:05:22 +0000 |
commit | 9cfa329a77d3dfec4746ca307c6da1b3e904cbfa (patch) | |
tree | c9379a0ab0b5afdf740fae0a01c67bf76d061d86 /lib/Expr/ArrayExprOptimizer.cpp | |
parent | 86ab439d589d0afb1b710ef58296d07a263092e3 (diff) | |
download | klee-9cfa329a77d3dfec4746ca307c6da1b3e904cbfa.tar.gz |
Use `ref<>` for UpdateNode
Remove additional reference counting as part of UpdateNodeList and UpdateNode. Simplifies code.
Diffstat (limited to 'lib/Expr/ArrayExprOptimizer.cpp')
-rw-r--r-- | lib/Expr/ArrayExprOptimizer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Expr/ArrayExprOptimizer.cpp b/lib/Expr/ArrayExprOptimizer.cpp index 60f2ca6e..d80cc3bc 100644 --- a/lib/Expr/ArrayExprOptimizer.cpp +++ b/lib/Expr/ArrayExprOptimizer.cpp @@ -284,7 +284,8 @@ ref<Expr> ExprOptimizer::getSelectOptExpr( // reverse the list std::vector<const UpdateNode *> us; us.reserve(read->updates.getSize()); - for (const UpdateNode *un = read->updates.head; un; un = un->next) + for (const UpdateNode *un = read->updates.head.get(); un; + un = un->next.get()) us.push_back(un); auto arrayConstValues = read->updates.root->constantValues; @@ -366,7 +367,7 @@ ref<Expr> ExprOptimizer::getSelectOptExpr( // reverse the list std::vector<const UpdateNode *> us; us.reserve(read->updates.getSize()); - for (const UpdateNode *un = read->updates.head; un; un = un->next) + for (const UpdateNode *un = read->updates.head.get(); un; un = un->next.get()) us.push_back(un); for (auto it = us.rbegin(); it != us.rend(); it++) { |