about summary refs log tree commit diff homepage
path: root/tools
diff options
context:
space:
mode:
authorJulian Büning <julian.buening@rwth-aachen.de>2019-03-20 22:01:00 +0100
committerMartinNowack <martin.nowack@gmail.com>2019-03-21 12:46:01 +0000
commit9767a37f9e8a743fa81629510346cb0a5a3a7900 (patch)
treebc49e16925582e41ee51cacc35c4f7bcafd8860f /tools
parenteee440835b857a7cb68b72f4af4d22eaf19e1d76 (diff)
downloadklee-9767a37f9e8a743fa81629510346cb0a5a3a7900.tar.gz
drop support for LLVM <= 3.7
Diffstat (limited to 'tools')
-rw-r--r--tools/kleaver/main.cpp14
-rw-r--r--tools/klee/main.cpp18
2 files changed, 1 insertions, 31 deletions
diff --git a/tools/kleaver/main.cpp b/tools/kleaver/main.cpp
index f5b5e13a..9033a2b4 100644
--- a/tools/kleaver/main.cpp
+++ b/tools/kleaver/main.cpp
@@ -37,11 +37,6 @@
 
 #include "llvm/Support/Signals.h"
 
-#if LLVM_VERSION_CODE < LLVM_VERSION(3, 5)
-#include "llvm/ADT/OwningPtr.h"
-#include "llvm/Support/system_error.h"
-#endif
-
 using namespace llvm;
 using namespace klee;
 using namespace klee::expr;
@@ -409,14 +404,6 @@ int main(int argc, char **argv) {
 
   std::string ErrorStr;
   
-#if LLVM_VERSION_CODE < LLVM_VERSION(3,5)
-  OwningPtr<MemoryBuffer> MB;
-  error_code ec=MemoryBuffer::getFileOrSTDIN(InputFile.c_str(), MB);
-  if (ec) {
-    llvm::errs() << argv[0] << ": error: " << ec.message() << "\n";
-    return 1;
-  }
-#else
   auto MBResult = MemoryBuffer::getFileOrSTDIN(InputFile.c_str());
   if (!MBResult) {
     llvm::errs() << argv[0] << ": error: " << MBResult.getError().message()
@@ -424,7 +411,6 @@ int main(int argc, char **argv) {
     return 1;
   }
   std::unique_ptr<MemoryBuffer> &MB = *MBResult;
-#endif
   
   ExprBuilder *Builder = 0;
   switch (BuilderKind) {
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
index ee115de3..be90548e 100644
--- a/tools/klee/main.cpp
+++ b/tools/klee/main.cpp
@@ -43,10 +43,6 @@
 #include "llvm/Support/TargetSelect.h"
 #include "llvm/Support/Signals.h"
 
-#if LLVM_VERSION_CODE < LLVM_VERSION(3, 5)
-#include "llvm/Support/system_error.h"
-#endif
-
 #if LLVM_VERSION_CODE >= LLVM_VERSION(4, 0)
 #include <llvm/Bitcode/BitcodeReader.h>
 #else
@@ -358,12 +354,7 @@ KleeHandler::KleeHandler(int argc, char **argv)
   SmallString<128> directory(dir_given ? OutputDir : InputFile);
 
   if (!dir_given) sys::path::remove_filename(directory);
-#if LLVM_VERSION_CODE < LLVM_VERSION(3, 5)
-  error_code ec;
-  if ((ec = sys::fs::make_absolute(directory)) != errc::success) {
-#else
   if (auto ec = sys::fs::make_absolute(directory)) {
-#endif
     klee_error("unable to determine absolute path: %s", ec.message().c_str());
   }
 
@@ -381,10 +372,7 @@ KleeHandler::KleeHandler(int argc, char **argv)
       llvm::sys::path::append(d, "klee-out-");
       raw_svector_ostream ds(d);
       ds << i;
-// SmallString is always up-to-date, no need to flush. See Support/raw_ostream.h
-#if LLVM_VERSION_CODE < LLVM_VERSION(3, 8)
-      ds.flush();
-#endif
+      // SmallString is always up-to-date, no need to flush. See Support/raw_ostream.h
 
       // create directory and try to link klee-last
       if (mkdir(d.c_str(), 0775) == 0) {
@@ -630,11 +618,7 @@ void KleeHandler::loadPathFile(std::string name,
 
 void KleeHandler::getKTestFilesInDir(std::string directoryPath,
                                      std::vector<std::string> &results) {
-#if LLVM_VERSION_CODE < LLVM_VERSION(3, 5)
-  error_code ec;
-#else
   std::error_code ec;
-#endif
   llvm::sys::fs::directory_iterator i(directoryPath, ec), e;
   for (; i != e && !ec; i.increment(ec)) {
     auto f = i->path();