various: Fix missing DumpModule with recent LLVM.
Since LLVM revision 293359 DumpModule gets only implemented when either a debug build or LLVM_ENABLE_DUMP is set. This patch adds a direct replacement for the function for radv and radeonsi, However, as I don't know a good place to put common LLVM code for all three I inlined the implementation for LLVMPipe. v2: Use the new code for LLVM 3.4+ instead of LLVM 5+ & fixed indentation Signed-off-by: Bas Nieuwenhuizen <basni@google.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
@@ -504,3 +504,11 @@ ac_prepare_cube_coords(struct ac_llvm_context *ctx,
|
||||
|
||||
memcpy(coords_arg, coords, sizeof(coords));
|
||||
}
|
||||
|
||||
void
|
||||
ac_dump_module(LLVMModuleRef module)
|
||||
{
|
||||
char *str = LLVMPrintModuleToString(module);
|
||||
fprintf(stderr, "%s", str);
|
||||
LLVMDisposeMessage(str);
|
||||
}
|
||||
|
Reference in New Issue
Block a user