about summary refs log tree commit diff
path: root/src/rustllvm/rustllvm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rustllvm/rustllvm.h')
-rw-r--r--src/rustllvm/rustllvm.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rustllvm/rustllvm.h b/src/rustllvm/rustllvm.h
index e45a910fc8c..f046587052a 100644
--- a/src/rustllvm/rustllvm.h
+++ b/src/rustllvm/rustllvm.h
@@ -16,7 +16,6 @@
 #include "llvm/PassManager.h"
 #include "llvm/IR/InlineAsm.h"
 #include "llvm/IR/LLVMContext.h"
-#include "llvm/IR/IRPrintingPasses.h"
 #include "llvm/Analysis/Passes.h"
 #include "llvm/Analysis/Lint.h"
 #include "llvm/ADT/ArrayRef.h"
@@ -52,6 +51,12 @@
 #include "llvm-c/ExecutionEngine.h"
 #include "llvm-c/Object.h"
 
+#if LLVM_VERSION_MINOR >= 5
+#include "llvm/IR/IRPrintingPasses.h"
+#else
+#include "llvm/Assembly/PrintModulePass.h"
+#endif
+
 // Used by RustMCJITMemoryManager::getPointerToNamedFunction()
 // to get around glibc issues. See the function for more information.
 #ifdef __linux__