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/Core/SeedInfo.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/Core/SeedInfo.cpp')
-rw-r--r-- | lib/Core/SeedInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Core/SeedInfo.cpp b/lib/Core/SeedInfo.cpp index 30377ee4..62b71e87 100644 --- a/lib/Core/SeedInfo.cpp +++ b/lib/Core/SeedInfo.cpp @@ -77,9 +77,9 @@ void SeedInfo::patchSeed(const ExecutionState &state, for (std::vector< ref<ReadExpr> >::iterator it = reads.begin(), ie = reads.end(); it != ie; ++it) { ReadExpr *re = it->get(); - if (re->index->isConstant()) { - unsigned index = (unsigned) re->index->getConstantValue(); - directReads.insert(std::make_pair(re->updates.root, index)); + if (ConstantExpr *CE = dyn_cast<ConstantExpr>(re->index)) { + directReads.insert(std::make_pair(re->updates.root, + (unsigned) CE->getConstantValue())); } } |