Skip to content

Commit

Permalink
llvm: Ignore error value that is always false
Browse files Browse the repository at this point in the history
See llvm/llvm-project#121851

For LLVM 20+, this function (`renameModuleForThinLTO`) has no return
value. For prior versions of LLVM, this never failed, but had a
signature which allowed an error value people were handling.
  • Loading branch information
maurer committed Jan 7, 2025
1 parent 7991f17 commit 3323e5a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,7 @@ pub unsafe fn optimize_thin_module(
{
let _timer =
cgcx.prof.generic_activity_with_arg("LLVM_thin_lto_rename", thin_module.name());
if !llvm::LLVMRustPrepareThinLTORename(thin_module.shared.data.0, llmod, target) {
return Err(write::llvm_err(&dcx, LlvmError::PrepareThinLtoModule));
}
unsafe { llvm::LLVMRustPrepareThinLTORename(thin_module.shared.data.0, llmod, target) };
save_temp_bitcode(cgcx, &module, "thin-lto-after-rename");
}
Expand Down

0 comments on commit 3323e5a

Please sign in to comment.