ac: use LLVMContextSetOpaquePointers if available

Disabling opaque pointers in LLVM doesn't fix all the issues but
it makes pointers non-opaque by default (eg LLVMPointerType()
returns a typed pointer).

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17361>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2022-07-04 16:14:21 +02:00 committed by Marge Bot
parent d9296dcbbf
commit 940734630d
1 changed files with 3 additions and 0 deletions

View File

@ -62,6 +62,9 @@ void ac_llvm_context_init(struct ac_llvm_context *ctx, struct ac_llvm_compiler *
unsigned ballot_mask_bits)
{
ctx->context = LLVMContextCreate();
#if LLVM_VERSION_MAJOR >= 15
LLVMContextSetOpaquePointers(ctx->context, false);
#endif
ctx->gfx_level = gfx_level;
ctx->family = family;