diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-04 08:08:21 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-04 08:08:21 +0000 |
commit | 44e3d58b59099f5fd0e6f88893ce431171b3fef6 (patch) | |
tree | 12d7d9af1493e650a42f570de49401776cabde3b /lib/Expr/ExprUtil.cpp | |
parent | c4a0e57c082e567e81ad3609a32ee492d41f03f9 (diff) | |
download | klee-44e3d58b59099f5fd0e6f88893ce431171b3fef6.tar.gz |
Start removing uses of Expr::isConstant.
- These should use cast<>, isa<>, or dyn_cast<> as appropriate (or better yet, changed to use ref<ConstantExpr> when the type is known). git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72857 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Expr/ExprUtil.cpp')
-rw-r--r-- | lib/Expr/ExprUtil.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Expr/ExprUtil.cpp b/lib/Expr/ExprUtil.cpp index 780398f0..0c150a51 100644 --- a/lib/Expr/ExprUtil.cpp +++ b/lib/Expr/ExprUtil.cpp @@ -26,7 +26,7 @@ void klee::findReads(ref<Expr> e, ExprHashSet visited; std::set<const UpdateNode *> updates; - if (!e->isConstant()) { + if (!isa<ConstantExpr>(e)) { visited.insert(e); stack.push_back(e); } @@ -40,7 +40,7 @@ void klee::findReads(ref<Expr> e, // repeats. results.push_back(re); - if (!re->index->isConstant() && + if (!isa<ConstantExpr>(re->index) && visited.insert(re->index).second) stack.push_back(re->index); @@ -53,20 +53,20 @@ void klee::findReads(ref<Expr> e, // 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 (!un->index->isConstant() && + if (!isa<ConstantExpr>(un->index) && visited.insert(un->index).second) stack.push_back(un->index); - if (!un->value->isConstant() && + if (!isa<ConstantExpr>(un->value) && visited.insert(un->value).second) stack.push_back(un->value); } } } - } else if (!top->isConstant()) { + } else if (!isa<ConstantExpr>(top)) { Expr *e = top.get(); for (unsigned i=0; i<e->getNumKids(); i++) { ref<Expr> k = e->getKid(i); - if (!k->isConstant() && + if (!isa<ConstantExpr>(k) && visited.insert(k).second) stack.push_back(k); } |