LLVM < 3.5 is unsupported since bb18a3c

This commit is contained in:
Tamir Duberstein
2015-04-20 10:19:02 -07:00
parent 77acda1c8e
commit ba276adab5
9 changed files with 18 additions and 91 deletions

View File

@@ -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)