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:
Bas Nieuwenhuizen
2017-01-28 17:32:05 +01:00
parent ce7a045fee
commit 0fca80b3db
5 changed files with 22 additions and 5 deletions

View File

@@ -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);
}