diff options
Diffstat (limited to 'src/amd/common/ac_llvm_util.c')
-rw-r--r-- | src/amd/common/ac_llvm_util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/amd/common/ac_llvm_util.c b/src/amd/common/ac_llvm_util.c index b25f9e3e6dd..01852dbff46 100644 --- a/src/amd/common/ac_llvm_util.c +++ b/src/amd/common/ac_llvm_util.c @@ -172,8 +172,9 @@ LLVMPassManagerRef ac_create_passmgr(LLVMTargetLibraryInfoRef target_library_inf if (!passmgr) return NULL; - LLVMAddTargetLibraryInfo(target_library_info, - passmgr); + if (target_library_info) + LLVMAddTargetLibraryInfo(target_library_info, + passmgr); if (check_ir) LLVMAddVerifierPass(passmgr); |