diff options
Diffstat (limited to 'lib/Expr')
-rw-r--r-- | lib/Expr/Expr.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Expr/Expr.cpp b/lib/Expr/Expr.cpp index 72514aec..be9051ab 100644 --- a/lib/Expr/Expr.cpp +++ b/lib/Expr/Expr.cpp @@ -445,6 +445,11 @@ ref<ConstantExpr> ConstantExpr::AShr(const ref<ConstantExpr> &RHS) { getWidth()); } +ref<ConstantExpr> ConstantExpr::Not() { + return ConstantExpr::create(ints::eq(getConstantValue(), 0, getWidth()), + Expr::Bool); +} + ref<ConstantExpr> ConstantExpr::Eq(const ref<ConstantExpr> &RHS) { return ConstantExpr::create(ints::eq(getConstantValue(), RHS->getConstantValue(), getWidth()), |