diff options
-rw-r--r-- | lib/Module/InstructionInfoTable.cpp | 18 | ||||
-rw-r--r-- | lib/Module/KModule.cpp | 1 | ||||
-rw-r--r-- | lib/Module/ModuleUtil.cpp | 7 | ||||
-rw-r--r-- | lib/Module/Optimize.cpp | 7 |
4 files changed, 27 insertions, 6 deletions
diff --git a/lib/Module/InstructionInfoTable.cpp b/lib/Module/InstructionInfoTable.cpp index 932bc671..7e9a9e26 100644 --- a/lib/Module/InstructionInfoTable.cpp +++ b/lib/Module/InstructionInfoTable.cpp @@ -21,16 +21,28 @@ #include "llvm/IntrinsicInst.h" #include "llvm/Module.h" #endif -#include "llvm/Linker.h" + +# if LLVM_VERSION_CODE < LLVM_VERSION(3,5) #include "llvm/Assembly/AssemblyAnnotationWriter.h" -#include "llvm/Support/FormattedStream.h" #include "llvm/Support/InstIterator.h" +#include "llvm/Linker.h" +#else +#include "llvm/IR/AssemblyAnnotationWriter.h" +#include "llvm/IR/InstIterator.h" +#include "llvm/Linker/Linker.h" +#endif + +#include "llvm/Support/FormattedStream.h" #include "llvm/Support/raw_ostream.h" -#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 2) + +#if LLVM_VERSION_CODE >= LLVM_VERSION(3,5) +#include "llvm/IR/DebugInfo.h" +#elif LLVM_VERSION_CODE >= LLVM_VERSION(3, 2) #include "llvm/DebugInfo.h" #else #include "llvm/Analysis/DebugInfo.h" #endif + #include "llvm/Analysis/ValueTracking.h" #include "llvm/Support/ErrorHandling.h" diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp index 1eaa8c92..428acbc8 100644 --- a/lib/Module/KModule.cpp +++ b/lib/Module/KModule.cpp @@ -57,7 +57,6 @@ #include "llvm/Transforms/Scalar.h" #include <llvm/Transforms/Utils/Cloning.h> -#include <llvm/Support/InstIterator.h> #include <sstream> diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp index f6dfbbdf..3811003e 100644 --- a/lib/Module/ModuleUtil.cpp +++ b/lib/Module/ModuleUtil.cpp @@ -41,9 +41,14 @@ #include "llvm/Module.h" #endif +#if LLVM_VERSION_CODE < LLVM_VERSION(3, 5) #include "llvm/Linker.h" #include "llvm/Assembly/AssemblyAnnotationWriter.h" -#include "llvm/Support/InstIterator.h" +#else +#include "llvm/Linker/Linker.h" +#include "llvm/IR/AssemblyAnnotationWriter.h" +#endif + #include "llvm/Support/raw_ostream.h" #include "llvm/Analysis/ValueTracking.h" #include "llvm/Support/Path.h" diff --git a/lib/Module/Optimize.cpp b/lib/Module/Optimize.cpp index ed1e0e34..f3d58000 100644 --- a/lib/Module/Optimize.cpp +++ b/lib/Module/Optimize.cpp @@ -19,7 +19,6 @@ #include "llvm/PassManager.h" #include "llvm/Analysis/Passes.h" #include "llvm/Analysis/LoopPass.h" -#include "llvm/Analysis/Verifier.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/DynamicLibrary.h" @@ -35,6 +34,12 @@ #endif #endif +#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 5) +#include "llvm/IR/Verifier.h" +#else +#include "llvm/Analysis/Verifier.h" +#endif + #include "llvm/Target/TargetMachine.h" #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/Scalar.h" |