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/Expr.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/Expr.cpp')
-rw-r--r-- | lib/Expr/Expr.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Expr/Expr.cpp b/lib/Expr/Expr.cpp index 82c60205..d54b8f4d 100644 --- a/lib/Expr/Expr.cpp +++ b/lib/Expr/Expr.cpp @@ -14,13 +14,13 @@ #include "llvm/ADT/Hashing.h" #endif #include "llvm/Support/CommandLine.h" +#include "llvm/Support/raw_ostream.h" // FIXME: We shouldn't need this once fast constant support moves into // Core. If we need to do arithmetic, we probably want to use APInt. #include "klee/Internal/Support/IntEvaluation.h" #include "klee/util/ExprPPrinter.h" -#include <iostream> #include <sstream> using namespace klee; @@ -116,7 +116,7 @@ int Expr::compare(const Expr &b, ExprEquivSet &equivs) const { return 0; } -void Expr::printKind(std::ostream &os, Kind k) { +void Expr::printKind(llvm::raw_ostream &os, Kind k) { switch(k) { #define X(C) case C: os << #C; break X(Constant); @@ -286,7 +286,7 @@ ref<Expr> Expr::createFromKind(Kind k, std::vector<CreateArg> args) { } -void Expr::printWidth(std::ostream &os, Width width) { +void Expr::printWidth(llvm::raw_ostream &os, Width width) { switch(width) { case Expr::Bool: os << "Expr::Bool"; break; case Expr::Int8: os << "Expr::Int8"; break; @@ -306,13 +306,13 @@ ref<Expr> Expr::createIsZero(ref<Expr> e) { return EqExpr::create(e, ConstantExpr::create(0, e->getWidth())); } -void Expr::print(std::ostream &os) const { +void Expr::print(llvm::raw_ostream &os) const { ExprPPrinter::printSingleExpr(os, const_cast<Expr*>(this)); } void Expr::dump() const { - this->print(std::cerr); - std::cerr << std::endl; + this->print(errs()); + errs() << "\n"; } /***/ |