From 25b0ab1a3513b5952c0a2e2c59cec72cdf471224 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sun, 14 Jun 2009 21:52:09 +0000 Subject: Rename FoldingExprBuilder -> SimplifyingExprBuilder Also, start printing query # with -print-ast (for testing purposes). git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73350 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/kleaver/main.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'tools/kleaver') diff --git a/tools/kleaver/main.cpp b/tools/kleaver/main.cpp index 8762d332..e45b65d0 100644 --- a/tools/kleaver/main.cpp +++ b/tools/kleaver/main.cpp @@ -47,7 +47,7 @@ namespace { enum BuilderKinds { DefaultBuilder, ConstantFoldingBuilder, - FoldingBuilder + SimplifyingBuilder }; static llvm::cl::opt @@ -59,7 +59,7 @@ namespace { "Default expression construction."), clEnumValN(ConstantFoldingBuilder, "constant-folding", "Fold constant expressions."), - clEnumValN(FoldingBuilder, "folding", + clEnumValN(SimplifyingBuilder, "simplify", "Fold constants and simplify expressions."), clEnumValEnd)); } @@ -100,9 +100,15 @@ static bool PrintInputAST(const char *Filename, std::vector Decls; Parser *P = Parser::Create(Filename, MB, Builder); P->SetMaxErrors(20); + + unsigned NumQueries = 0; while (Decl *D = P->ParseTopLevelDecl()) { - if (!P->GetNumErrors()) + if (!P->GetNumErrors()) { + if (isa(D)) + llvm::cout << "# Query " << ++NumQueries << "\n"; + D->dump(); + } Decls.push_back(D); } @@ -261,10 +267,10 @@ int main(int argc, char **argv) { Builder = createDefaultExprBuilder(); Builder = createConstantFoldingExprBuilder(Builder); break; - case FoldingBuilder: + case SimplifyingBuilder: Builder = createDefaultExprBuilder(); Builder = createConstantFoldingExprBuilder(Builder); - Builder = createFoldingExprBuilder(Builder); + Builder = createSimplifyingExprBuilder(Builder); break; } -- cgit 1.4.1