summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_misc.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index 2fd85a82090..1c42e8fdd5e 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -143,6 +143,7 @@ lp_set_store_alignment(LLVMValueRef Inst,
llvm::unwrap<llvm::StoreInst>(Inst)->setAlignment(Align);
}
+#if HAVE_LLVM < 0x0306
/*
* Delegating is tedious but the default manager class is hidden in an
@@ -398,6 +399,7 @@ class ShaderMemoryManager : public DelegatingJITMemoryManager {
llvm::JITMemoryManager *ShaderMemoryManager::TheMM = 0;
unsigned ShaderMemoryManager::NumUsers = 0;
+#endif
/**
* Same as LLVMCreateJITCompilerForModule, but:
@@ -420,6 +422,11 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
{
using namespace llvm;
+#if HAVE_LLVM >= 0x0306
+ *OutError = strdup("MCJIT not supported");
+ return 1;
+#else
+
std::string Error;
#if HAVE_LLVM >= 0x0306
EngineBuilder builder(std::unique_ptr<Module>(unwrap(M)));
@@ -528,6 +535,7 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
delete MM;
*OutError = strdup(Error.c_str());
return 1;
+#endif
}
@@ -535,5 +543,7 @@ extern "C"
void
lp_free_generated_code(struct lp_generated_code *code)
{
+#if HAVE_LLVM < 0x0306
ShaderMemoryManager::freeGeneratedCode(code);
+#endif
}