From 8ef9d62a07b23ce07c07f18347e6f486b33bb31e Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sun, 14 Sep 2014 16:19:49 -0700 Subject: [LLVM3.5] Update for more random headers moving around. --- lib/Module/InstructionInfoTable.cpp | 18 +++++++++++++++--- lib/Module/KModule.cpp | 1 - lib/Module/ModuleUtil.cpp | 7 ++++++- lib/Module/Optimize.cpp | 7 ++++++- 4 files changed, 27 insertions(+), 6 deletions(-) (limited to 'lib/Module') 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 -#include #include 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" -- cgit 1.4.1