diff options
author | Cristian Cadar <cristic@cs.stanford.edu> | 2012-09-11 10:14:05 +0000 |
---|---|---|
committer | Cristian Cadar <cristic@cs.stanford.edu> | 2012-09-11 10:14:05 +0000 |
commit | 9c70b1c26a2f7eb9f88d6d5230f3a8e9bfbc8f51 (patch) | |
tree | c3549270b5658486c1b210cae92dd575f3585e38 | |
parent | 64f307114bdb7f0ec42b043ae8cb07017f57e194 (diff) | |
download | klee-9c70b1c26a2f7eb9f88d6d5230f3a8e9bfbc8f51.tar.gz |
Patch by Dan Liew for ConstantExpr::isTrue() and ConstantExpr::isFalse():
http://keeda.stanford.edu/pipermail/klee-dev/2012-August/000892.html git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@163606 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/klee/Expr.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/klee/Expr.h b/include/klee/Expr.h index 8d5306f8..2852bf81 100644 --- a/include/klee/Expr.h +++ b/include/klee/Expr.h @@ -398,12 +398,12 @@ public: /// isTrue - Is this the true expression. bool isTrue() const { - return getZExtValue(1) == 1; + return (getWidth() == Expr::Bool && value.getBoolValue()==true); } /// isFalse - Is this the false expression. bool isFalse() const { - return getZExtValue(1) == 0; + return (getWidth() == Expr::Bool && value.getBoolValue()==false); } /// isAllOnes - Is this constant all ones. |