diff options
Diffstat (limited to 'lib/Module')
-rw-r--r-- | lib/Module/KModule.cpp | 10 | ||||
-rw-r--r-- | lib/Module/ModuleUtil.cpp | 4 | ||||
-rw-r--r-- | lib/Module/Optimize.cpp | 5 | ||||
-rw-r--r-- | lib/Module/RaiseAsm.cpp | 2 |
4 files changed, 19 insertions, 2 deletions
diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp index 8842febb..0364127d 100644 --- a/lib/Module/KModule.cpp +++ b/lib/Module/KModule.cpp @@ -34,7 +34,11 @@ #if !(LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 7) #include "llvm/Support/raw_os_ostream.h" #endif +#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 9) #include "llvm/System/Path.h" +#else +#include "llvm/Support/Path.h" +#endif #include "llvm/Target/TargetData.h" #include "llvm/Transforms/Scalar.h" @@ -226,7 +230,11 @@ void KModule::prepare(const Interpreter::ModuleOptions &opts, BasicBlock *exit = BasicBlock::Create(getGlobalContext(), "exit", f); PHINode *result = 0; if (f->getReturnType() != Type::getVoidTy(getGlobalContext())) - result = PHINode::Create(f->getReturnType(), "retval", exit); +#if (LLVM_VERSION_MAJOR > 2) + result = PHINode::Create(f->getReturnType(), 0, "retval", exit); +#else + result = PHINode::Create(f->getReturnType(), "retval", exit); +#endif CallInst::Create(mergeFn, "", exit); ReturnInst::Create(getGlobalContext(), result, exit); diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp index 935dfa62..11f2b2c5 100644 --- a/lib/Module/ModuleUtil.cpp +++ b/lib/Module/ModuleUtil.cpp @@ -25,7 +25,11 @@ #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) #include "llvm/System/Path.h" +#else +#include "llvm/Support/Path.h" +#endif #include <map> #include <iostream> diff --git a/lib/Module/Optimize.cpp b/lib/Module/Optimize.cpp index 1eadec26..633c21a1 100644 --- a/lib/Module/Optimize.cpp +++ b/lib/Module/Optimize.cpp @@ -15,13 +15,18 @@ // //===----------------------------------------------------------------------===// +#include "klee/Config/config.h" #include "llvm/Module.h" #include "llvm/PassManager.h" #include "llvm/Analysis/Passes.h" #include "llvm/Analysis/LoopPass.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Support/CommandLine.h" +#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 9) #include "llvm/System/DynamicLibrary.h" +#else +#include "llvm/Support/DynamicLibrary.h" +#endif #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Transforms/IPO.h" diff --git a/lib/Module/RaiseAsm.cpp b/lib/Module/RaiseAsm.cpp index 11c89009..76a4f242 100644 --- a/lib/Module/RaiseAsm.cpp +++ b/lib/Module/RaiseAsm.cpp @@ -16,7 +16,7 @@ #endif #if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR >= 9) #include "llvm/Support/raw_ostream.h" -#include "llvm/System/Host.h" +#include "llvm/Support/Host.h" #include "llvm/Target/TargetLowering.h" #include "llvm/Target/TargetRegistry.h" #endif |