From 826c82b4c9d43af3a5a6ca01788061d00821b43a Mon Sep 17 00:00:00 2001 From: Andrea Mattavelli Date: Sat, 6 Aug 2016 10:40:42 +0100 Subject: Fix to #445 --- lib/Solver/QueryLoggingSolver.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Solver/QueryLoggingSolver.cpp b/lib/Solver/QueryLoggingSolver.cpp index fb957b65..a858a7d7 100644 --- a/lib/Solver/QueryLoggingSolver.cpp +++ b/lib/Solver/QueryLoggingSolver.cpp @@ -39,16 +39,17 @@ QueryLoggingSolver::QueryLoggingSolver(Solver *_solver, std::string path, : solver(_solver), os(0), BufferString(""), logBuffer(BufferString), queryCount(0), minQueryTimeToLog(queryTimeToLog), startTime(0.0f), lastQueryTime(0.0f), queryCommentSign(commentSign) { +#ifdef HAVE_ZLIB_H if (!CreateCompressedQueryLog) { +#endif #if LLVM_VERSION_CODE >= LLVM_VERSION(3, 5) os = new llvm::raw_fd_ostream(path.c_str(), ErrorInfo, llvm::sys::fs::OpenFlags::F_Text); #else os = new llvm::raw_fd_ostream(path.c_str(), ErrorInfo); #endif - } #ifdef HAVE_ZLIB_H - else { + } else { os = new compressed_fd_ostream((path + ".gz").c_str(), ErrorInfo); } if (ErrorInfo != "") { -- cgit 1.4.1