about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2013-08-29 14:00:23 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2013-08-29 14:00:23 +0100
commit73449518ce3420b3abf876a7cf8d8867741957e4 (patch)
tree05b3a43488a4ad973ffd63d9345b175cce7aee06
parentc7874f2ad92a9f26430038f7a9426dec1fe632ea (diff)
parent565b8567b616988d5f1269ac6fc8418c542563c4 (diff)
downloadklee-73449518ce3420b3abf876a7cf8d8867741957e4.tar.gz
Merge branch 'CompilerWarnings' of https://github.com/MartinNowack/klee into MartinNowack-CompilerWarnings
-rw-r--r--lib/Core/StatsTracker.cpp11
-rw-r--r--tools/klee/main.cpp6
2 files changed, 8 insertions, 9 deletions
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp
index c0028a05..ae9910e5 100644
--- a/lib/Core/StatsTracker.cpp
+++ b/lib/Core/StatsTracker.cpp
@@ -38,17 +38,12 @@
 #include "llvm/Support/CFG.h"
 #if LLVM_VERSION_CODE < LLVM_VERSION(2, 9)
 #include "llvm/System/Process.h"
-#else
-#include "llvm/Support/Process.h"
-#endif
-#if LLVM_VERSION_CODE < LLVM_VERSION(2, 9)
 #include "llvm/System/Path.h"
 #else
+#include "llvm/Support/Process.h"
 #include "llvm/Support/Path.h"
-#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 1)
 #include "llvm/Support/FileSystem.h"
 #endif
-#endif
 
 #include <iostream>
 #include <fstream>
@@ -180,14 +175,14 @@ StatsTracker::StatsTracker(Executor &_executor, std::string _objectFilename,
   KModule *km = executor.kmodule;
 
   sys::Path module(objectFilename);
-#if LLVM_VERSION_CODE < LLVM_VERSION(3, 1)
+#if LLVM_VERSION_CODE < LLVM_VERSION(2, 9)
   if (!sys::Path(objectFilename).isAbsolute()) {
 #else
   if (!sys::path::is_absolute(objectFilename)) {
 #endif
     sys::Path current = sys::Path::GetCurrentDirectory();
     current.appendComponent(objectFilename);
-#if LLVM_VERSION_CODE < LLVM_VERSION(3, 1)
+#if LLVM_VERSION_CODE < LLVM_VERSION(2, 9)
     if (current.exists())
 #else
     if (sys::fs::exists(current.c_str()))
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
index 0d899ae9..42c0c4ba 100644
--- a/tools/klee/main.cpp
+++ b/tools/klee/main.cpp
@@ -303,7 +303,7 @@ KleeHandler::KleeHandler(int argc, char **argv)
   }
   
   sys::Path p(theDir);
-#if LLVM_VERSION_CODE < LLVM_VERSION(3, 1)
+#if LLVM_VERSION_CODE < LLVM_VERSION(2, 9)
   if (!p.isAbsolute()) {
 #else
   if (!sys::path::is_absolute(p.c_str())) {
@@ -604,7 +604,11 @@ static void parseArguments(int argc, char **argv) {
     argArray[i] = arguments[i-1].c_str();
   }
 
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 2)
   cl::ParseCommandLineOptions(numArgs, (const char**) argArray, " klee\n");
+#else
+  cl::ParseCommandLineOptions(numArgs, (char**) argArray, " klee\n");
+#endif
   delete[] argArray;
 }