diff options
author | Marek Olšák <[email protected]> | 2018-04-09 19:55:10 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-04-27 17:56:04 -0400 |
commit | 3f0eaaf6d96bf627b6594ea2045ba1c0268dbac2 (patch) | |
tree | 785fc9c649937881fc877d786473b5de8893b359 /src | |
parent | e75fc8d03396ea47506cc044cb1c11a7352ea283 (diff) |
radeonsi: avoid a crash in gallivm_dispose_target_library_info
Reviewed-by: Timothy Arceri <[email protected]>
Tested-by: Benedikt Schemmer <ben at besd.de>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index aa92f889e6e..c7f1e27f6ba 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -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); } |