Module: Mesa Branch: master Commit: c2a602d21a4dd7da9d3226a70cb83ab85ceb446a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c2a602d21a4dd7da9d3226a70cb83ab85ceb446a
Author: Marek Olšák <marek.ol...@amd.com> Date: Thu Oct 20 11:21:26 2016 +0200 gallivm: try to fix build with LLVM <= 3.4 due to missing CallSite.h Reviewed-by: Brian Paul <bri...@vmware.com> Tested-by: Brian Paul <bri...@vmware.com> --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index f4045ad..bd4d4d3 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -77,7 +77,9 @@ #include <llvm/Support/TargetSelect.h> +#if HAVE_LLVM >= 0x0305 #include <llvm/IR/CallSite.h> +#endif #include <llvm/IR/IRBuilder.h> #include <llvm/IR/Module.h> #include <llvm/Support/CBindingWrapping.h> @@ -715,8 +717,10 @@ lp_get_called_value(LLVMValueRef call) { #if HAVE_LLVM >= 0x0309 return LLVMGetCalledValue(call); -#else +#elif HAVE_LLVM >= 0x0305 return llvm::wrap(llvm::CallSite(llvm::unwrap<llvm::Instruction>(call)).getCalledValue()); +#else + return NULL; /* radeonsi doesn't support so old LLVM. */ #endif } _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit