about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorCristian Cadar <cristic@cs.stanford.edu>2009-07-11 19:29:04 +0000
committerCristian Cadar <cristic@cs.stanford.edu>2009-07-11 19:29:04 +0000
commitdadbf3a772a74deee16006103d0ae2ac8b40065a (patch)
tree0839d87a33f3b8d4060653b2795fc91794bbadf6
parentdb7adeb304b11dfd67f67ee12190425b79257aea (diff)
downloadklee-dadbf3a772a74deee16006103d0ae2ac8b40065a.tar.gz
Removed the Nz macro.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@75377 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Expr/ExprPPrinter.cpp13
-rw-r--r--lib/Expr/Parser.cpp12
2 files changed, 3 insertions, 22 deletions
diff --git a/lib/Expr/ExprPPrinter.cpp b/lib/Expr/ExprPPrinter.cpp
index 691ccd89..7130da97 100644
--- a/lib/Expr/ExprPPrinter.cpp
+++ b/lib/Expr/ExprPPrinter.cpp
@@ -408,19 +408,6 @@ public:
           bindings.insert(std::make_pair(e, counter++));
         }
 
-        // Detect Nz
-        // FIXME: This should be in common code.
-        if (const EqExpr *ee = dyn_cast<EqExpr>(e)) {
-          if (ee->left == ConstantExpr::alloc(false, Expr::Bool)) {
-            PC << "(Nz";
-            printWidth(PC, e);
-            PC << ' ';
-            print(ee->right, PC);
-            PC << ')';
-            return;
-          }
-        }
-
         // Detect multibyte reads.
         // FIXME: Hrm. One problem with doing this is that we are
         // masking the sharing of the indices which aren't
diff --git a/lib/Expr/Parser.cpp b/lib/Expr/Parser.cpp
index 85a9a1ac..11fb8546 100644
--- a/lib/Expr/Parser.cpp
+++ b/lib/Expr/Parser.cpp
@@ -776,12 +776,11 @@ ExprResult ParserImpl::ParseExpr(TypeResult ExpectedType) {
 
 // Additional kinds for macro forms.
 enum MacroKind {
-  eMacroKind_Nz = Expr::LastKind + 1,      // false == x
-  eMacroKind_Neg,                          // 0 - x
-  eMacroKind_ReadLSB,                      // Multibyte read
+  eMacroKind_ReadLSB = Expr::LastKind + 1, // Multibyte read
   eMacroKind_ReadMSB,                      // Multibyte write
+  eMacroKind_Neg,                          // 0 - x // CrC: will disappear soon
   eMacroKind_Concat,                       // Magic concatenation syntax
-  eMacroKind_LastMacroKind = eMacroKind_ReadMSB
+  eMacroKind_LastMacroKind = eMacroKind_Concat
 };
 
 /// LookupExprInfo - Return information on the named token, if it is
@@ -807,9 +806,6 @@ static bool LookupExprInfo(const Token &Tok, unsigned &Kind,
     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);
     break;
@@ -1018,8 +1014,6 @@ ExprResult ParserImpl::ParseUnaryParenExpr(const Token &Name,
   ExpectRParen("unexpected argument in unary expression.");  
   ExprHandle E = Arg.get();
   switch (Kind) {
-  case eMacroKind_Nz:
-    return Builder->Eq(Builder->Constant(0, E->getWidth()), E);
   case eMacroKind_Neg:
     return Builder->Sub(Builder->Constant(0, E->getWidth()), E);
   case Expr::Not: