From c2a602d21a4dd7da9d3226a70cb83ab85ceb446a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 20 Oct 2016 11:21:26 +0200 Subject: [PATCH] gallivm: try to fix build with LLVM <= 3.4 due to missing CallSite.h Reviewed-by: Brian Paul Tested-by: Brian Paul --- 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 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 } -- 2.30.2