From 9767a37f9e8a743fa81629510346cb0a5a3a7900 Mon Sep 17 00:00:00 2001 From: Julian Büning Date: Wed, 20 Mar 2019 22:01:00 +0100 Subject: drop support for LLVM <= 3.7 --- lib/Support/CompressionStream.cpp | 11 +++-------- lib/Support/FileHandling.cpp | 8 -------- 2 files changed, 3 insertions(+), 16 deletions(-) (limited to 'lib/Support') diff --git a/lib/Support/CompressionStream.cpp b/lib/Support/CompressionStream.cpp index ff2d290f..4f818897 100644 --- a/lib/Support/CompressionStream.cpp +++ b/lib/Support/CompressionStream.cpp @@ -10,15 +10,13 @@ #include "klee/Config/Version.h" #ifdef HAVE_ZLIB_H #include "klee/Internal/Support/CompressionStream.h" -#if (LLVM_VERSION_CODE == LLVM_VERSION(3, 4)) -#include "llvm/Support/system_error.h" -#else + #include "llvm/Support/FileSystem.h" + #include #include #include #include -#endif #include namespace klee { @@ -31,12 +29,9 @@ compressed_fd_ostream::compressed_fd_ostream(const std::string &Filename, #if LLVM_VERSION_CODE >= LLVM_VERSION(7, 0) std::error_code EC = llvm::sys::fs::openFileForWrite(Filename, FD); -#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 5) +#else std::error_code EC = llvm::sys::fs::openFileForWrite(Filename, FD, llvm::sys::fs::F_None); -#else - llvm::error_code EC = - llvm::sys::fs::openFileForWrite(Filename, FD, llvm::sys::fs::F_Binary); #endif if (EC) { ErrorInfo = EC.message(); diff --git a/lib/Support/FileHandling.cpp b/lib/Support/FileHandling.cpp index 068ce44b..af532a0e 100644 --- a/lib/Support/FileHandling.cpp +++ b/lib/Support/FileHandling.cpp @@ -12,9 +12,7 @@ #include "klee/Config/config.h" #include "klee/Internal/Support/ErrorHandling.h" -#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 5) #include "llvm/Support/FileSystem.h" -#endif #ifdef HAVE_ZLIB_H #include "klee/Internal/Support/CompressionStream.h" @@ -26,16 +24,10 @@ std::unique_ptr klee_open_output_file(const std::string &path, std::string &error) { error = ""; std::unique_ptr f; -#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 6) std::error_code ec; f = std::unique_ptr(new llvm::raw_fd_ostream(path.c_str(), ec, llvm::sys::fs::F_None)); // FIXME C++14 if (ec) error = ec.message(); -#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 5) - f = std::unique_ptr(new llvm::raw_fd_ostream(path.c_str(), error, llvm::sys::fs::F_None)); // FIXME C++14 -#else - f = std::unique_ptr(new llvm::raw_fd_ostream(path.c_str(), error, llvm::sys::fs::F_Binary)); // FIXME C++14 -#endif if (!error.empty()) { f.reset(nullptr); } -- cgit 1.4.1