diff options
author | Richard Trembecký <richardt@centrum.sk> | 2016-05-01 16:38:21 +0200 |
---|---|---|
committer | Dan Liew <delcypher@gmail.com> | 2017-05-24 14:24:47 +0100 |
commit | d3a467d8999e6e52892b13c2bc93ac829ee1b7c9 (patch) | |
tree | 99493da4b33f50eb0c27a237213c615520efbd95 /lib/Solver/QueryLoggingSolver.cpp | |
parent | 92367dec2ee00cb708454e4c33ff34d80eddb878 (diff) | |
download | klee-d3a467d8999e6e52892b13c2bc93ac829ee1b7c9.tar.gz |
llvm: make KLEE compile against LLVM 3.5 and 3.6
Based on work by @ccadeptic23 and @delcypher. Formatting fixed by @snf. Fix compiler warning by @martijnthe. Further fixes by @mchalupa. Refactored, so that changes can be reviewed -- no massive changes in whitespace and in the surrounding code. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Diffstat (limited to 'lib/Solver/QueryLoggingSolver.cpp')
-rw-r--r-- | lib/Solver/QueryLoggingSolver.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Solver/QueryLoggingSolver.cpp b/lib/Solver/QueryLoggingSolver.cpp index a858a7d7..cf4966cd 100644 --- a/lib/Solver/QueryLoggingSolver.cpp +++ b/lib/Solver/QueryLoggingSolver.cpp @@ -42,7 +42,13 @@ QueryLoggingSolver::QueryLoggingSolver(Solver *_solver, std::string path, #ifdef HAVE_ZLIB_H if (!CreateCompressedQueryLog) { #endif -#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 5) +#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 6) + std::error_code ec; + os = new llvm::raw_fd_ostream(path.c_str(), ec, + llvm::sys::fs::OpenFlags::F_Text); + if (ec) + ErrorInfo = ec.message(); +#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 5) os = new llvm::raw_fd_ostream(path.c_str(), ErrorInfo, llvm::sys::fs::OpenFlags::F_Text); #else |