From 1e0ddda79679955f2a3ad9487ce4eab84b0ec7b1 Mon Sep 17 00:00:00 2001 From: Mihai Preda Date: Mon, 2 May 2022 15:53:10 +0300 Subject: [PATCH] gallivm: use LLVM opaque pointers in lp_bld_printf.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Acked-by: Marek Olšák Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_printf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_printf.c b/src/gallium/auxiliary/gallivm/lp_bld_printf.c index 4db2c094231..5e08a0c2fe6 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_printf.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_printf.c @@ -63,11 +63,11 @@ lp_build_print_args(struct gallivm_state* gallivm, args[i] = LLVMBuildFPExt(builder, args[i], LLVMDoubleTypeInContext(context), ""); } + LLVMTypeRef printf_type = LLVMFunctionType(LLVMInt32TypeInContext(context), NULL, 0, 1); if (!gallivm->debug_printf_hook) { - LLVMTypeRef printf_type = LLVMFunctionType(LLVMInt32TypeInContext(context), NULL, 0, 1); gallivm->debug_printf_hook = LLVMAddFunction(gallivm->module, "debug_printf", printf_type); } - return LLVMBuildCall(builder, gallivm->debug_printf_hook, args, argcount, ""); + return LLVMBuildCall2(builder, printf_type, gallivm->debug_printf_hook, args, argcount, ""); }