about summary refs log tree commit diff homepage
path: root/lib/Solver/QueryLoggingSolver.h
diff options
context:
space:
mode:
authorMartin Nowack <martin@se.inf.tu-dresden.de>2014-05-29 23:15:59 +0200
committerMartin Nowack <martin@se.inf.tu-dresden.de>2014-05-29 23:57:45 +0200
commitd934d983692c8952cdb887cbcd59f2df0001b9c0 (patch)
tree9179a257bb053ba0a0da0e9dc4d2c030202c0f28 /lib/Solver/QueryLoggingSolver.h
parentc2dec441f3f89916962175f0307b5c33473fa616 (diff)
downloadklee-d934d983692c8952cdb887cbcd59f2df0001b9c0.tar.gz
Refactoring from std::ostream to llvm::raw_ostream
According to LLVM: lightweight and simpler implementation of streams.
Diffstat (limited to 'lib/Solver/QueryLoggingSolver.h')
-rw-r--r--lib/Solver/QueryLoggingSolver.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Solver/QueryLoggingSolver.h b/lib/Solver/QueryLoggingSolver.h
index 2c7d80e8..ad1722ca 100644
--- a/lib/Solver/QueryLoggingSolver.h
+++ b/lib/Solver/QueryLoggingSolver.h
@@ -12,6 +12,7 @@
 
 #include "klee/Solver.h"
 #include "klee/SolverImpl.h"
+#include "llvm/Support/raw_ostream.h"
 #include <fstream>
 #include <sstream>
 
@@ -25,9 +26,12 @@ class QueryLoggingSolver : public SolverImpl {
 
 protected:
     Solver *solver;
-    std::ofstream os;
-    std::ostringstream logBuffer; // buffer to store logs before flushing to 
-                                  // file
+    std::string ErrorInfo;
+    llvm::raw_fd_ostream os;
+    // @brief Buffer used by logBuffer
+    std::string BufferString;
+    // @brief buffer to store logs before flushing to file
+    llvm::raw_string_ostream logBuffer;
     unsigned queryCount;
     int minQueryTimeToLog; // we log to file only those queries
                            // which take longer than the specified time (ms);