File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -836,6 +836,10 @@ struct LLVMRustThinLTOData {
836836 StringMap<FunctionImporter::ImportMapTy> ImportLists;
837837 StringMap<FunctionImporter::ExportSetTy> ExportLists;
838838 StringMap<GVSummaryMapTy> ModuleToDefinedGVSummaries;
839+
840+ #if LLVM_VERSION_GE(7, 0)
841+ LLVMRustThinLTOData () : Index(/* isPerformingAnalysis = */ false ) {}
842+ #endif
839843};
840844
841845// Just an argument to the `LLVMRustCreateThinLTOData` function below.
@@ -918,7 +922,14 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
918922 //
919923 // This is copied from `lib/LTO/ThinLTOCodeGenerator.cpp`
920924#if LLVM_VERSION_GE(5, 0)
925+ #if LLVM_VERSION_GE(7, 0)
926+ auto deadIsPrevailing = [&](GlobalValue::GUID G) {
927+ return PrevailingType::Unknown;
928+ };
929+ computeDeadSymbols (Ret->Index , Ret->GUIDPreservedSymbols , deadIsPrevailing);
930+ #else
921931 computeDeadSymbols (Ret->Index , Ret->GUIDPreservedSymbols );
932+ #endif
922933 ComputeCrossModuleImport (
923934 Ret->Index ,
924935 Ret->ModuleToDefinedGVSummaries ,
You can’t perform that action at this time.
0 commit comments