about summary refs log tree commit diff homepage
path: root/lib/Module/ModuleUtil.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2011-07-20 13:35:52 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2011-07-20 13:35:52 +0000
commited9ea0cf9dc856920afc6813fa1bea0ec7660ba1 (patch)
tree46de7f5cae7ce4b8a7f5fee7f66f4d2f551b9a47 /lib/Module/ModuleUtil.cpp
parent384a6c5652ae815f33e2a6cd1013b1cf14caed63 (diff)
downloadklee-ed9ea0cf9dc856920afc6813fa1bea0ec7660ba1.tar.gz
Deprecate LLVM_VERSION_MAJOR and LLVM_VERSION_MINOR in favour of
version codes.  This makes the preprocessor-based version tests more
concise and less error prone.

Also, fix the version tests in lib/Expr/Parser.cpp (immutable zext
and trunc were introduced in LLVM 2.9); now 2.9 passes "make test".

git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@135583 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Module/ModuleUtil.cpp')
-rw-r--r--lib/Module/ModuleUtil.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
index 11f2b2c5..029540ae 100644
--- a/lib/Module/ModuleUtil.cpp
+++ b/lib/Module/ModuleUtil.cpp
@@ -8,14 +8,14 @@
 //===----------------------------------------------------------------------===//
 
 #include "klee/Internal/Support/ModuleUtil.h"
-#include "klee/Config/config.h"
+#include "klee/Config/Version.h"
 
 #include "llvm/Function.h"
 #include "llvm/Instructions.h"
 #include "llvm/IntrinsicInst.h"
 #include "llvm/Linker.h"
 #include "llvm/Module.h"
-#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 8)
+#if LLVM_VERSION_CODE < LLVM_VERSION(2, 8)
 #include "llvm/Assembly/AsmAnnotationWriter.h"
 #else
 #include "llvm/Assembly/AssemblyAnnotationWriter.h"
@@ -25,7 +25,7 @@
 #include "llvm/Support/InstIterator.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Analysis/ValueTracking.h"
-#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 9)
+#if LLVM_VERSION_CODE < LLVM_VERSION(2, 9)
 #include "llvm/System/Path.h"
 #else
 #include "llvm/Support/Path.h"
@@ -72,7 +72,7 @@ Function *klee::getDirectCallTarget(CallSite cs) {
 }
 
 static bool valueIsOnlyCalled(const Value *v) {
-#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 8)
+#if LLVM_VERSION_CODE < LLVM_VERSION(2, 8)
   for (Value::use_const_iterator it = v->use_begin(), ie = v->use_end();
        it != ie; ++it) {
 #else