diff options
author | MartinNowack <martin.nowack@gmail.com> | 2014-05-30 00:09:00 +0200 |
---|---|---|
committer | MartinNowack <martin.nowack@gmail.com> | 2014-05-30 00:09:00 +0200 |
commit | 15470d2661900bae90ac457dd60694a4f4f7ec3c (patch) | |
tree | a3b45da7700f765408b1236eeefd4d1ec01e22bb /lib/Expr/ExprPPrinter.cpp | |
parent | c2dec441f3f89916962175f0307b5c33473fa616 (diff) | |
parent | eaac527a2821c41aa88c8767fd0305f9d610fb23 (diff) | |
download | klee-15470d2661900bae90ac457dd60694a4f4f7ec3c.tar.gz |
Merge pull request #117 from MartinNowack/llvm_raw_ostream
Refactor std::ostreams to llvm::raw_ostream and minor cleanups
Diffstat (limited to 'lib/Expr/ExprPPrinter.cpp')
-rw-r--r-- | lib/Expr/ExprPPrinter.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/Expr/ExprPPrinter.cpp b/lib/Expr/ExprPPrinter.cpp index d58358b5..ddcc57a1 100644 --- a/lib/Expr/ExprPPrinter.cpp +++ b/lib/Expr/ExprPPrinter.cpp @@ -13,12 +13,10 @@ #include "klee/Constraints.h" #include "llvm/Support/CommandLine.h" +#include "llvm/Support/raw_ostream.h" #include <map> #include <vector> -#include <iostream> -#include <sstream> -#include <iomanip> using namespace klee; @@ -47,7 +45,7 @@ private: std::map<const UpdateNode*, unsigned> updateBindings; std::set< ref<Expr> > couldPrint, shouldPrint; std::set<const UpdateNode*> couldPrintUpdates, shouldPrintUpdates; - std::ostream &os; + llvm::raw_ostream &os; unsigned counter; unsigned updateCounter; bool hasScan; @@ -300,7 +298,7 @@ private: } public: - PPrinter(std::ostream &_os) : os(_os), newline("\n") { + PPrinter(llvm::raw_ostream &_os) : os(_os), newline("\n") { reset(); } @@ -426,11 +424,11 @@ public: } }; -ExprPPrinter *klee::ExprPPrinter::create(std::ostream &os) { +ExprPPrinter *klee::ExprPPrinter::create(llvm::raw_ostream &os) { return new PPrinter(os); } -void ExprPPrinter::printOne(std::ostream &os, +void ExprPPrinter::printOne(llvm::raw_ostream &os, const char *message, const ref<Expr> &e) { PPrinter p(os); @@ -444,7 +442,7 @@ void ExprPPrinter::printOne(std::ostream &os, PC.breakLine(); } -void ExprPPrinter::printSingleExpr(std::ostream &os, const ref<Expr> &e) { +void ExprPPrinter::printSingleExpr(llvm::raw_ostream &os, const ref<Expr> &e) { PPrinter p(os); p.scan(e); @@ -454,13 +452,13 @@ void ExprPPrinter::printSingleExpr(std::ostream &os, const ref<Expr> &e) { p.print(e, PC); } -void ExprPPrinter::printConstraints(std::ostream &os, +void ExprPPrinter::printConstraints(llvm::raw_ostream &os, const ConstraintManager &constraints) { printQuery(os, constraints, ConstantExpr::alloc(false, Expr::Bool)); } -void ExprPPrinter::printQuery(std::ostream &os, +void ExprPPrinter::printQuery(llvm::raw_ostream &os, const ConstraintManager &constraints, const ref<Expr> &q, const ref<Expr> *evalExprsBegin, |