From: Marek Olšák Date: Thu, 20 Oct 2016 09:21:26 +0000 (+0200) Subject: gallivm: try to fix build with LLVM <= 3.4 due to missing CallSite.h X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c2a602d21a4dd7da9d3226a70cb83ab85ceb446a;p=mesa.git gallivm: try to fix build with LLVM <= 3.4 due to missing CallSite.h Reviewed-by: Brian Paul Tested-by: Brian Paul --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index f4045ad1d89..bd4d4d3c094 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -77,7 +77,9 @@ #include +#if HAVE_LLVM >= 0x0305 #include +#endif #include #include #include @@ -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(call)).getCalledValue()); +#else + return NULL; /* radeonsi doesn't support so old LLVM. */ #endif }