about summary refs log tree commit diff homepage
path: root/tools/kleaver/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/kleaver/main.cpp')
-rw-r--r--tools/kleaver/main.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/kleaver/main.cpp b/tools/kleaver/main.cpp
index 0581ea27..0c4a78f7 100644
--- a/tools/kleaver/main.cpp
+++ b/tools/kleaver/main.cpp
@@ -3,6 +3,7 @@
 #include "expr/Lexer.h"
 #include "expr/Parser.h"
 
+#include "klee/Config/Version.h"
 #include "klee/Constraints.h"
 #include "klee/Expr.h"
 #include "klee/ExprBuilder.h"
@@ -25,7 +26,7 @@
 #undef PACKAGE_TARNAME
 #undef PACKAGE_VERSION
 
-#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 9)
+#if LLVM_VERSION_CODE < LLVM_VERSION(2, 9)
 #include "llvm/System/Signals.h"
 #else
 #include "llvm/Support/Signals.h"
@@ -283,7 +284,7 @@ int main(int argc, char **argv) {
 
   std::string ErrorStr;
   
-#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 9)
+#if LLVM_VERSION_CODE < LLVM_VERSION(2, 9)
   MemoryBuffer *MB = MemoryBuffer::getFileOrSTDIN(InputFile.c_str(), &ErrorStr);
   if (!MB) {
     std::cerr << argv[0] << ": error: " << ErrorStr << "\n";
@@ -316,14 +317,14 @@ int main(int argc, char **argv) {
 
   switch (ToolAction) {
   case PrintTokens:
-#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 9)
+#if LLVM_VERSION_CODE < LLVM_VERSION(2, 9)
     PrintInputTokens(MB);
 #else
     PrintInputTokens(MB.get());
 #endif
     break;
   case PrintAST:
-#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 9)
+#if LLVM_VERSION_CODE < LLVM_VERSION(2, 9)
     success = PrintInputAST(InputFile=="-" ? "<stdin>" : InputFile.c_str(), MB,
                             Builder);
 #else
@@ -332,7 +333,7 @@ int main(int argc, char **argv) {
 #endif
     break;
   case Evaluate:
-#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 9)
+#if LLVM_VERSION_CODE < LLVM_VERSION(2, 9)
     success = EvaluateInputAST(InputFile=="-" ? "<stdin>" : InputFile.c_str(),
                                MB, Builder);
 #else
@@ -345,7 +346,7 @@ int main(int argc, char **argv) {
   }
 
   delete Builder;
-#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 9)
+#if LLVM_VERSION_CODE < LLVM_VERSION(2, 9)
   delete MB;
 #endif
   llvm::llvm_shutdown();