diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2011-07-20 13:35:52 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-07-20 13:35:52 +0000 |
commit | ed9ea0cf9dc856920afc6813fa1bea0ec7660ba1 (patch) | |
tree | 46de7f5cae7ce4b8a7f5fee7f66f4d2f551b9a47 /lib/Module/Passes.h | |
parent | 384a6c5652ae815f33e2a6cd1013b1cf14caed63 (diff) | |
download | klee-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/Passes.h')
-rw-r--r-- | lib/Module/Passes.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Module/Passes.h b/lib/Module/Passes.h index 2b1ea9bc..480fbde6 100644 --- a/lib/Module/Passes.h +++ b/lib/Module/Passes.h @@ -10,7 +10,7 @@ #ifndef KLEE_PASSES_H #define KLEE_PASSES_H -#include "klee/Config/config.h" +#include "klee/Config/Version.h" #include "llvm/Constants.h" #include "llvm/Instructions.h" @@ -34,7 +34,7 @@ namespace klee { class RaiseAsmPass : public llvm::ModulePass { static char ID; -#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR >= 9) +#if LLVM_VERSION_CODE >= LLVM_VERSION(2, 9) const llvm::TargetLowering *TLI; #endif @@ -51,7 +51,7 @@ class RaiseAsmPass : public llvm::ModulePass { bool runOnInstruction(llvm::Module &M, llvm::Instruction *I); public: -#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 8) +#if LLVM_VERSION_CODE < LLVM_VERSION(2, 8) RaiseAsmPass() : llvm::ModulePass((intptr_t) &ID) {} #else RaiseAsmPass() : llvm::ModulePass(ID) {} @@ -72,7 +72,7 @@ class IntrinsicCleanerPass : public llvm::ModulePass { public: IntrinsicCleanerPass(const llvm::TargetData &TD, bool LI=true) -#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 8) +#if LLVM_VERSION_CODE < LLVM_VERSION(2, 8) : llvm::ModulePass((intptr_t) &ID), #else : llvm::ModulePass(ID), @@ -101,7 +101,7 @@ class PhiCleanerPass : public llvm::FunctionPass { static char ID; public: -#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 8) +#if LLVM_VERSION_CODE < LLVM_VERSION(2, 8) PhiCleanerPass() : llvm::FunctionPass((intptr_t) &ID) {} #else PhiCleanerPass() : llvm::FunctionPass(ID) {} @@ -113,7 +113,7 @@ public: class DivCheckPass : public llvm::ModulePass { static char ID; public: -#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 8) +#if LLVM_VERSION_CODE < LLVM_VERSION(2, 8) DivCheckPass(): ModulePass((intptr_t) &ID) {} #else DivCheckPass(): ModulePass(ID) {} @@ -127,7 +127,7 @@ public: class LowerSwitchPass : public llvm::FunctionPass { public: static char ID; // Pass identification, replacement for typeid -#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 8) +#if LLVM_VERSION_CODE < LLVM_VERSION(2, 8) LowerSwitchPass() : FunctionPass((intptr_t) &ID) {} #else LowerSwitchPass() : FunctionPass(ID) {} |