about summary refs log tree commit diff homepage
path: root/lib/Support
diff options
context:
space:
mode:
authorMartin Nowack <martin@se.inf.tu-dresden.de>2017-07-22 01:03:44 +0200
committerMartin Nowack <martin@se.inf.tu-dresden.de>2017-07-23 12:18:35 +0200
commit37e92d0c802524c19a9a84164253639aac47fee3 (patch)
tree6b9036dcc8415544eb5a6d5cace7fddb2bfc323a /lib/Support
parent9fb2f5666d5f8c7c2f335fc8408883a0cf958964 (diff)
downloadklee-37e92d0c802524c19a9a84164253639aac47fee3.tar.gz
Remove support for LLVM < 3.4
Request LLVM 3.4 as minimal requirement for KLEE
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/CompressionStream.cpp13
-rw-r--r--lib/Support/FileHandling.cpp5
2 files changed, 3 insertions, 15 deletions
diff --git a/lib/Support/CompressionStream.cpp b/lib/Support/CompressionStream.cpp
index 36303878..3cd5bc86 100644
--- a/lib/Support/CompressionStream.cpp
+++ b/lib/Support/CompressionStream.cpp
@@ -10,8 +10,7 @@
 #include "klee/Config/Version.h"
 #ifdef HAVE_ZLIB_H
 #include "klee/Internal/Support/CompressionStream.h"
-#if (LLVM_VERSION_CODE >= LLVM_VERSION(3, 3) \
-    && LLVM_VERSION_CODE <= LLVM_VERSION(3, 4))
+#if (LLVM_VERSION_CODE == LLVM_VERSION(3, 4))
 #include "llvm/Support/system_error.h"
 #else
 #include "llvm/Support/FileSystem.h"
@@ -27,12 +26,11 @@ compressed_fd_ostream::compressed_fd_ostream(const char *Filename,
                                              std::string &ErrorInfo)
     : llvm::raw_ostream(), pos(0) {
   ErrorInfo = "";
-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 3)
   // Open file in binary mode
 #if LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
   std::error_code EC =
       llvm::sys::fs::openFileForWrite(Filename, FD, llvm::sys::fs::F_None);
-#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 3)
+#else
   llvm::error_code EC =
       llvm::sys::fs::openFileForWrite(Filename, FD, llvm::sys::fs::F_Binary);
 #endif
@@ -40,13 +38,6 @@ compressed_fd_ostream::compressed_fd_ostream(const char *Filename,
     ErrorInfo = EC.message();
     FD = -1;
   }
-#else
-  FD = ::open(Filename, O_WRONLY | O_CREAT | O_TRUNC, 0666);
-  if (FD < 0) {
-    ErrorInfo = "Could not open file.";
-    FD = -1;
-  }
-#endif
   // Initialize the compression library
   strm.zalloc = 0;
   strm.zfree = 0;
diff --git a/lib/Support/FileHandling.cpp b/lib/Support/FileHandling.cpp
index 092a1af0..e5ead9f7 100644
--- a/lib/Support/FileHandling.cpp
+++ b/lib/Support/FileHandling.cpp
@@ -27,11 +27,8 @@ llvm::raw_fd_ostream *klee_open_output_file(std::string &path,
     error = ec.message();
 #elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 5)
   f = new llvm::raw_fd_ostream(path.c_str(), error, llvm::sys::fs::F_None);
-#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 4)
-  f = new llvm::raw_fd_ostream(path.c_str(), error, llvm::sys::fs::F_Binary);
 #else
-  f = new llvm::raw_fd_ostream(path.c_str(), error,
-                               llvm::raw_fd_ostream::F_Binary);
+  f = new llvm::raw_fd_ostream(path.c_str(), error, llvm::sys::fs::F_Binary);
 #endif
   if (!error.empty()) {
     if (f)