diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-14 06:07:30 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-14 06:07:30 +0000 |
commit | 7c27c8a6a7c233c3c6162d9b86942351fe5f42b3 (patch) | |
tree | 876b610183e2e4d470139b8544cd6cdbf22a6982 /lib/Solver/FastCexSolver.cpp | |
parent | d15a30cc0ce2579747ae4c2e919af54c6b06af70 (diff) | |
download | klee-7c27c8a6a7c233c3c6162d9b86942351fe5f42b3.tar.gz |
Add ConstantExpr::{getLimitedValue,getZExtValue}.
- For use in situations where the range of the constant is known to fit in a uint64 (or smaller), or the extra bits don't matter. - No (intended) functionality change. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73326 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Solver/FastCexSolver.cpp')
-rw-r--r-- | lib/Solver/FastCexSolver.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Solver/FastCexSolver.cpp b/lib/Solver/FastCexSolver.cpp index af2666ab..8c2fcfe6 100644 --- a/lib/Solver/FastCexSolver.cpp +++ b/lib/Solver/FastCexSolver.cpp @@ -346,7 +346,7 @@ public: if (array.isConstantArray() && index.isFixed() && index.min() < array.size) - return ValueRange(array.constantValues[index.min()]->getConstantValue()); + return ValueRange(array.constantValues[index.min()]->getZExtValue(8)); return ValueRange(0, 255); } @@ -1037,7 +1037,7 @@ FastCexSolver::computeInitialValues(const Query& query, ref<Expr> value = cd.evaluatePossible(read); if (ConstantExpr *CE = dyn_cast<ConstantExpr>(value)) { - data.push_back((unsigned char) CE->getConstantValue()); + data.push_back((unsigned char) CE->getZExtValue(8)); } else { // FIXME: When does this happen? return false; |