diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-14 21:52:09 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-14 21:52:09 +0000 |
commit | 25b0ab1a3513b5952c0a2e2c59cec72cdf471224 (patch) | |
tree | bce6c8416bb4fad827dbc127bc8f57fce24836b1 /tools | |
parent | 2ad9c2b4a298c04bcbddc80b50f681e712dfbeba (diff) | |
download | klee-25b0ab1a3513b5952c0a2e2c59cec72cdf471224.tar.gz |
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
Diffstat (limited to 'tools')
-rw-r--r-- | tools/kleaver/main.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
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<BuilderKinds> @@ -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<Decl*> 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<QueryCommand>(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; } |