diff options
Diffstat (limited to 'lib/Module/KModule.cpp')
-rw-r--r-- | lib/Module/KModule.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp index 108adabd..76291cdc 100644 --- a/lib/Module/KModule.cpp +++ b/lib/Module/KModule.cpp @@ -22,12 +22,15 @@ #include "llvm/Bitcode/ReaderWriter.h" #include "llvm/Instructions.h" +#if !(LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 7) +#include "llvm/LLVMContext.h" +#endif #include "llvm/Module.h" #include "llvm/PassManager.h" #include "llvm/ValueSymbolTable.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/raw_ostream.h" -#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR == 6) +#if !(LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 7) #include "llvm/Support/raw_os_ostream.h" #endif #include "llvm/System/Path.h" @@ -329,7 +332,7 @@ void KModule::prepare(const Interpreter::ModuleOptions &opts, std::ostream *os = ih->openOutputFile("assembly.ll"); assert(os && os->good() && "unable to open source output"); -#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR == 6) +#if (LLVM_VERSION_MAJOR == 2 && LLVM_VERSION_MINOR < 6) // We have an option for this in case the user wants a .ll they // can compile. if (NoTruncateSourceLines) { |