From f19f71830bb342ff10019fca30dc5f1fd5755202 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 20 Oct 2016 00:11:48 +0200 Subject: [PATCH] radeonsi: fix build of si_eliminate_const_vs_outputs on LLVM <= 3.8 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_shader.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 3a842532ec3..25449ecaf94 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -6609,10 +6609,9 @@ static void si_eliminate_const_vs_outputs(struct si_shader_context *ctx) if (LLVMGetInstructionOpcode(cur) != LLVMCall) continue; - LLVMValueRef callee = LLVMGetCalledValue(cur); - LLVMValueKind kind = LLVMGetValueKind(callee); + LLVMValueRef callee = lp_get_called_value(cur); - if (kind != LLVMFunctionValueKind) + if (!lp_is_function(callee)) continue; const char *name = LLVMGetValueName(callee); -- 2.30.2