about summary refs log tree commit diff
path: root/src/rustllvm/ExecutionEngineWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-04-22 03:38:20 +0000
committerbors <bors@rust-lang.org>2015-04-22 03:38:20 +0000
commitc0eb9384af9f623563df59a9ae454ffedea1f4f8 (patch)
treeaaa36f5462dfe299902c6829795a8a8988f3061e /src/rustllvm/ExecutionEngineWrapper.cpp
parent2baf3482537f5a245a9c17ca730398f1a8b001d7 (diff)
parent58150640254e939519e57bf643af841cc60c1ac3 (diff)
downloadrust-c0eb9384af9f623563df59a9ae454ffedea1f4f8.tar.gz
rust-c0eb9384af9f623563df59a9ae454ffedea1f4f8.zip
Auto merge of #24674 - alexcrichton:rollup, r=alexcrichton
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
-rw-r--r--src/rustllvm/ExecutionEngineWrapper.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rustllvm/ExecutionEngineWrapper.cpp b/src/rustllvm/ExecutionEngineWrapper.cpp
index 8ca81ab3d68..7e0630fd242 100644
--- a/src/rustllvm/ExecutionEngineWrapper.cpp
+++ b/src/rustllvm/ExecutionEngineWrapper.cpp
@@ -89,12 +89,12 @@ extern "C" LLVMExecutionEngineRef LLVMBuildExecutionEngine(
     options.NoFramePointerElim = true;
 
     ExecutionEngine *ee =
-    #if LLVM_VERSION_MINOR <= 5
-        EngineBuilder(unwrap(mod))
-            .setMCJITMemoryManager(unwrap(mref))
-    #else
+    #if LLVM_VERSION_MINOR >= 6
         EngineBuilder(std::unique_ptr<Module>(unwrap(mod)))
             .setMCJITMemoryManager(std::unique_ptr<RustJITMemoryManager>(unwrap(mref)))
+    #else
+        EngineBuilder(unwrap(mod))
+            .setMCJITMemoryManager(unwrap(mref))
     #endif
             .setEngineKind(EngineKind::JIT)
             .setErrorStr(&error_str)