File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -836,6 +836,10 @@ struct LLVMRustThinLTOData {
836
836
StringMap<FunctionImporter::ImportMapTy> ImportLists;
837
837
StringMap<FunctionImporter::ExportSetTy> ExportLists;
838
838
StringMap<GVSummaryMapTy> ModuleToDefinedGVSummaries;
839
+
840
+ #if LLVM_VERSION_GE(7, 0)
841
+ LLVMRustThinLTOData () : Index(/* isPerformingAnalysis = */ false ) {}
842
+ #endif
839
843
};
840
844
841
845
// Just an argument to the `LLVMRustCreateThinLTOData` function below.
@@ -918,7 +922,14 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
918
922
//
919
923
// This is copied from `lib/LTO/ThinLTOCodeGenerator.cpp`
920
924
#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
921
931
computeDeadSymbols (Ret->Index , Ret->GUIDPreservedSymbols );
932
+ #endif
922
933
ComputeCrossModuleImport (
923
934
Ret->Index ,
924
935
Ret->ModuleToDefinedGVSummaries ,
You can’t perform that action at this time.
0 commit comments