mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
llvmpipe: never pass a NULL function name to LLVMAddFunction
LLVM seems to crash otherwise. Cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Acked-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41404>
This commit is contained in:
parent
4bad47e991
commit
75d9cb0b32
1 changed files with 2 additions and 1 deletions
|
|
@ -470,7 +470,8 @@ generate_compute(struct llvmpipe_context *lp,
|
|||
|
||||
LLVMTypeRef func_type = LLVMFunctionType(LLVMVoidTypeInContext(gallivm->context),
|
||||
args, num_args, 0);
|
||||
LLVMValueRef lfunc = LLVMAddFunction(gallivm->module, func->name, func_type);
|
||||
const char *func_name = func->name ? func->name : "";
|
||||
LLVMValueRef lfunc = LLVMAddFunction(gallivm->module, func_name, func_type);
|
||||
LLVMSetFunctionCallConv(lfunc, LLVMCCallConv);
|
||||
|
||||
struct lp_build_fn *new_fn = ralloc(fns, struct lp_build_fn);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue