From 423989c4af2a2e436ed5c8b5a826f784367525ce Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 30 Sep 2010 04:52:17 +0000 Subject: Update for LLVM API changes, patch by nobled, in PR8232. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@115138 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Module/Passes.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lib/Module') diff --git a/lib/Module/Passes.h b/lib/Module/Passes.h index 37a9ac8b..2b57cfa3 100644 --- a/lib/Module/Passes.h +++ b/lib/Module/Passes.h @@ -44,7 +44,11 @@ class RaiseAsmPass : public llvm::ModulePass { bool runOnInstruction(llvm::Module &M, llvm::Instruction *I); public: +#if (LLVM_MAJOR_VERSION == 2 && LLVM_MINOR_VERSION < 8) RaiseAsmPass() : llvm::ModulePass((intptr_t) &ID) {} +#else + RaiseAsmPass() : llvm::ModulePass(ID) {} +#endif virtual bool runOnModule(llvm::Module &M); }; @@ -61,7 +65,11 @@ class IntrinsicCleanerPass : public llvm::ModulePass { public: IntrinsicCleanerPass(const llvm::TargetData &TD, bool LI=true) +#if (LLVM_MAJOR_VERSION == 2 && LLVM_MINOR_VERSION < 8) : llvm::ModulePass((intptr_t) &ID), +#else + : llvm::ModulePass(ID), +#endif TargetData(TD), IL(new llvm::IntrinsicLowering(TD)), LowerIntrinsics(LI) {} @@ -86,7 +94,11 @@ class PhiCleanerPass : public llvm::FunctionPass { static char ID; public: +#if (LLVM_MAJOR_VERSION == 2 && LLVM_MINOR_VERSION < 8) PhiCleanerPass() : llvm::FunctionPass((intptr_t) &ID) {} +#else + PhiCleanerPass() : llvm::FunctionPass(ID) {} +#endif virtual bool runOnFunction(llvm::Function &f); }; @@ -94,7 +106,11 @@ public: class DivCheckPass : public llvm::ModulePass { static char ID; public: +#if (LLVM_MAJOR_VERSION == 2 && LLVM_MINOR_VERSION < 8) DivCheckPass(): ModulePass((intptr_t) &ID) {} +#else + DivCheckPass(): ModulePass(ID) {} +#endif virtual bool runOnModule(llvm::Module &M); }; @@ -104,7 +120,11 @@ public: class LowerSwitchPass : public llvm::FunctionPass { public: static char ID; // Pass identification, replacement for typeid +#if (LLVM_MAJOR_VERSION == 2 && LLVM_MINOR_VERSION < 8) LowerSwitchPass() : FunctionPass((intptr_t) &ID) {} +#else + LowerSwitchPass() : FunctionPass(ID) {} +#endif virtual bool runOnFunction(llvm::Function &F); -- cgit 1.4.1