gallivm: use LLVM opaque pointers in lp_bld_printf.c

Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
This commit is contained in:
Mihai Preda
2022-05-02 15:53:10 +03:00
committed by Mihai Preda
parent 2a6e9d13fb
commit 1e0ddda796
@@ -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, "");
}