diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-25 00:34:31 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-25 00:34:31 +0000 |
commit | 0a6bd94fc47543bf91a98b265e2bedbe3ccb77a3 (patch) | |
tree | 9f0d5317f3a3ef7afd2773c5a0b640011919b87b /include | |
parent | 0e29e311c7237561af46af3584d888175e42b1cc (diff) | |
download | klee-0a6bd94fc47543bf91a98b265e2bedbe3ccb77a3.tar.gz |
Switch to using APInt math operations.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@74148 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/klee/Expr.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/klee/Expr.h b/include/klee/Expr.h index fea269e8..bfe839d8 100644 --- a/include/klee/Expr.h +++ b/include/klee/Expr.h @@ -299,7 +299,13 @@ public: private: llvm::APInt value; - ConstantExpr(uint64_t v, Width w) : value(w, v) {} + ConstantExpr(const llvm::APInt &v) : value(v) {} + + static ref<ConstantExpr> alloc(const llvm::APInt &v) { + ref<ConstantExpr> r(new ConstantExpr(v)); + r->computeHash(); + return r; + } public: ~ConstantExpr() {}; @@ -351,7 +357,7 @@ public: static ref<ConstantExpr> alloc(uint64_t v, Width w) { // constructs an "optimized" ConstantExpr - ref<ConstantExpr> r(new ConstantExpr(v, w)); + ref<ConstantExpr> r(new ConstantExpr(llvm::APInt(w, v))); r->computeHash(); return r; } |