Skip to content

Commit af95484

Browse files
committed
llvm-wrapper: adapt to function signature change of thinLTOResolvePrevailingInIndex
This changed in 54fb3ca - I'm not entirely sure it's correct that we're leaving config empty, but the one case in LLVM that looked similar did that.
1 parent 1d6754d commit af95484

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1437,9 +1437,14 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
14371437
Ret->ResolvedODR[ModuleIdentifier][GUID] = NewLinkage;
14381438
};
14391439

1440+
#if LLVM_VERSION_GE(12,0)
1441+
lto::Config conf;
1442+
thinLTOResolvePrevailingInIndex(conf, Ret->Index, isPrevailing, recordNewLinkage,
1443+
Ret->GUIDPreservedSymbols);
1444+
#else
14401445
thinLTOResolvePrevailingInIndex(Ret->Index, isPrevailing, recordNewLinkage,
14411446
Ret->GUIDPreservedSymbols);
1442-
1447+
#endif
14431448
// Here we calculate an `ExportedGUIDs` set for use in the `isExported`
14441449
// callback below. This callback below will dictate the linkage for all
14451450
// summaries in the index, and we basically just only want to ensure that dead

0 commit comments

Comments
 (0)