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.
This commit is contained in:
parent
243d2ca4db
commit
fc32dd49cb
4 changed files with 5 additions and 17 deletions
|
@ -1389,20 +1389,14 @@ static bool clearDSOLocalOnDeclarations(Module &Mod, TargetMachine &TM) {
|
|||
return ClearDSOLocalOnDeclarations;
|
||||
}
|
||||
|
||||
extern "C" bool LLVMRustPrepareThinLTORename(const LLVMRustThinLTOData *Data,
|
||||
extern "C" void LLVMRustPrepareThinLTORename(const LLVMRustThinLTOData *Data,
|
||||
LLVMModuleRef M,
|
||||
LLVMTargetMachineRef TM) {
|
||||
Module &Mod = *unwrap(M);
|
||||
TargetMachine &Target = *unwrap(TM);
|
||||
|
||||
bool ClearDSOLocal = clearDSOLocalOnDeclarations(Mod, Target);
|
||||
bool error = renameModuleForThinLTO(Mod, Data->Index, ClearDSOLocal);
|
||||
|
||||
if (error) {
|
||||
LLVMRustSetLastError("renameModuleForThinLTO failed");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
renameModuleForThinLTO(Mod, Data->Index, ClearDSOLocal);
|
||||
}
|
||||
|
||||
extern "C" bool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue