Skip to content

Commit 3323e5a

Browse files
committed
llvm: Ignore error value that is always false
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.
1 parent 7991f17 commit 3323e5a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/back/lto.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -660,9 +660,7 @@ pub unsafe fn optimize_thin_module(
660660
{
661661
let _timer =
662662
cgcx.prof.generic_activity_with_arg("LLVM_thin_lto_rename", thin_module.name());
663-
if !llvm::LLVMRustPrepareThinLTORename(thin_module.shared.data.0, llmod, target) {
664-
return Err(write::llvm_err(&dcx, LlvmError::PrepareThinLtoModule));
665-
}
663+
unsafe { llvm::LLVMRustPrepareThinLTORename(thin_module.shared.data.0, llmod, target) };
666664
save_temp_bitcode(cgcx, &module, "thin-lto-after-rename");
667665
}
668666

0 commit comments

Comments
 (0)