From 940734630de229d98630e4398fd68e95c105177a Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Mon, 4 Jul 2022 16:14:21 +0200 Subject: [PATCH] ac: use LLVMContextSetOpaquePointers if available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Marek Olšák Part-of: --- src/amd/llvm/ac_llvm_build.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/amd/llvm/ac_llvm_build.c b/src/amd/llvm/ac_llvm_build.c index ecc2b63303b..9bb6e6a183b 100644 --- a/src/amd/llvm/ac_llvm_build.c +++ b/src/amd/llvm/ac_llvm_build.c @@ -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;