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/SMT | |
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/SMT')
-rw-r--r-- | lib/SMT/SMTParser.cpp | 11 | ||||
-rw-r--r-- | lib/SMT/SMTParser.h | 2 | ||||
-rw-r--r-- | lib/SMT/main.cpp | 3 | ||||
-rw-r--r-- | lib/SMT/smtlib.y | 2 |
4 files changed, 5 insertions, 13 deletions
diff --git a/lib/SMT/SMTParser.cpp b/lib/SMT/SMTParser.cpp index 22578f46..03042fdd 100644 --- a/lib/SMT/SMTParser.cpp +++ b/lib/SMT/SMTParser.cpp @@ -14,7 +14,6 @@ #include "klee/Constraints.h" #include "expr/Parser.h" -#include <iostream> #include <fstream> #include <string> #include <sstream> @@ -23,7 +22,6 @@ //#define DEBUG -using namespace std; using namespace klee; using namespace klee::expr; @@ -103,9 +101,8 @@ bool SMTParser::Solve() { // XXX: give more info int SMTParser::Error(const string& msg) { - std::cerr << SMTParser::parserTemp->fileName << ":" - << SMTParser::parserTemp->lineNum - << ": " << msg << "\n"; + llvm::errs() << SMTParser::parserTemp->fileName << ":" + << SMTParser::parserTemp->lineNum << ": " << msg << "\n"; exit(1); return 0; } @@ -213,7 +210,7 @@ void SMTParser::AddVar(std::string name, ExprHandle val) { ExprHandle SMTParser::GetVar(std::string name) { VarEnv top = varEnvs.top(); if (top.find(name) == top.end()) { - std::cerr << "Cannot find variable ?" << name << "\n"; + llvm::errs() << "Cannot find variable ?" << name << "\n"; exit(1); } return top[name]; @@ -241,7 +238,7 @@ void SMTParser::AddFVar(std::string name, ExprHandle val) { ExprHandle SMTParser::GetFVar(std::string name) { FVarEnv top = fvarEnvs.top(); if (top.find(name) == top.end()) { - std::cerr << "Cannot find fvar $" << name << "\n"; + llvm::errs() << "Cannot find fvar $" << name << "\n"; exit(1); } return top[name]; diff --git a/lib/SMT/SMTParser.h b/lib/SMT/SMTParser.h index fd1ec044..ac84e74c 100644 --- a/lib/SMT/SMTParser.h +++ b/lib/SMT/SMTParser.h @@ -13,8 +13,6 @@ #include "expr/Parser.h" -#include <cassert> -#include <iostream> #include <map> #include <stack> #include <string> diff --git a/lib/SMT/main.cpp b/lib/SMT/main.cpp index 034c4ce4..31fa311d 100644 --- a/lib/SMT/main.cpp +++ b/lib/SMT/main.cpp @@ -2,9 +2,6 @@ #include "klee/ExprBuilder.h" -#include <iostream> - -using namespace std; using namespace klee; int main(int argc, char** argv) { diff --git a/lib/SMT/smtlib.y b/lib/SMT/smtlib.y index 01d3539d..eb3b3890 100644 --- a/lib/SMT/smtlib.y +++ b/lib/SMT/smtlib.y @@ -254,7 +254,7 @@ bench_attribute: | COLON_TOK LOGIC_TOK logic_name { if (*$3 != "QF_BV" && *$3 != "QF_AUFBV" && *$3 != "QF_UFBV") { - std::cerr << "ERROR: Logic " << *$3 << " not supported."; + llvm::errs() << "ERROR: Logic " << *$3 << " not supported."; exit(1); } |