Commit 2762cdb8 authored by Cristian Cadar's avatar Cristian Cadar Committed by Dan Liew
Browse files

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
parent 975fdba7
......@@ -473,12 +473,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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment