diff options
author | Cristian Cadar <cristic@cs.stanford.edu> | 2009-07-10 04:15:25 +0000 |
---|---|---|
committer | Cristian Cadar <cristic@cs.stanford.edu> | 2009-07-10 04:15:25 +0000 |
commit | 7300bfbc2d0df000cd9ce3090eb6716c3be9f98d (patch) | |
tree | bad751cdf18a8e48ad7125d5d30148a9555a47c7 /lib/Expr/Parser.cpp | |
parent | 65319873a052826cbea5198815316f676bb86a84 (diff) | |
download | klee-7300bfbc2d0df000cd9ce3090eb6716c3be9f98d.tar.gz |
Replaced createNot() by createIsZero() and "Not" macro by "Nz".
Not will become bitwise not. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@75224 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Expr/Parser.cpp')
-rw-r--r-- | lib/Expr/Parser.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Expr/Parser.cpp b/lib/Expr/Parser.cpp index 42e8af03..52fba4a6 100644 --- a/lib/Expr/Parser.cpp +++ b/lib/Expr/Parser.cpp @@ -776,7 +776,7 @@ ExprResult ParserImpl::ParseExpr(TypeResult ExpectedType) { // Additional kinds for macro forms. enum MacroKind { - eMacroKind_Not = Expr::LastKind + 1, // false == x + eMacroKind_Nz = Expr::LastKind + 1, // false == x eMacroKind_Neg, // 0 - x eMacroKind_ReadLSB, // Multibyte read eMacroKind_ReadMSB, // Multibyte write @@ -806,6 +806,9 @@ static bool LookupExprInfo(const Token &Tok, unsigned &Kind, return SetOK(Expr::Eq, false, 2); if (memcmp(Tok.start, "Ne", 2) == 0) return SetOK(Expr::Ne, false, 2); + + if (memcmp(Tok.start, "Nz", 2) == 0) + return SetOK(eMacroKind_Nz, true, 1); if (memcmp(Tok.start, "Or", 2) == 0) return SetOK(Expr::Or, true, 2); @@ -826,8 +829,6 @@ static bool LookupExprInfo(const Token &Tok, unsigned &Kind, if (memcmp(Tok.start, "Xor", 3) == 0) return SetOK(Expr::Xor, true, 2); - if (memcmp(Tok.start, "Not", 3) == 0) - return SetOK(eMacroKind_Not, true, 1); if (memcmp(Tok.start, "Neg", 3) == 0) return SetOK(eMacroKind_Neg, true, 1); if (memcmp(Tok.start, "Ult", 3) == 0) @@ -1015,7 +1016,7 @@ ExprResult ParserImpl::ParseUnaryParenExpr(const Token &Name, ExpectRParen("unexpected argument in unary expression."); ExprHandle E = Arg.get(); switch (Kind) { - case eMacroKind_Not: + case eMacroKind_Nz: return Builder->Eq(Builder->Constant(0, E->getWidth()), E); case eMacroKind_Neg: return Builder->Sub(Builder->Constant(0, E->getWidth()), E); |