radeonsi: avoid a crash in gallivm_dispose_target_library_info
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Tested-by: Benedikt Schemmer <ben at besd.de> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
e75fc8d033
commit
3f0eaaf6d9
|
@ -164,8 +164,11 @@ static void si_destroy_compiler(struct si_compiler *compiler)
|
|||
LLVMDisposeMessage((char*)compiler->data_layout);
|
||||
if (compiler->passmgr)
|
||||
LLVMDisposePassManager(compiler->passmgr);
|
||||
#if HAVE_LLVM < 0x0500 || HAVE_LLVM >= 0x0700
|
||||
/* This crashes on LLVM 5.0 and 6.0 and Ubuntu 18.04, so leak it there. */
|
||||
if (compiler->target_library_info)
|
||||
gallivm_dispose_target_library_info(compiler->target_library_info);
|
||||
#endif
|
||||
if (compiler->tm)
|
||||
LLVMDisposeTargetMachine(compiler->tm);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue