File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -962,13 +962,23 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
962
962
ExportedGUIDs.insert (GUID);
963
963
}
964
964
}
965
+ #if LLVM_VERSION_GE(10, 0)
966
+ auto isExported = [&](StringRef ModuleIdentifier, ValueInfo VI) {
967
+ const auto &ExportList = Ret->ExportLists .find (ModuleIdentifier);
968
+ return (ExportList != Ret->ExportLists .end () &&
969
+ ExportList->second .count (VI)) ||
970
+ ExportedGUIDs.count (VI.getGUID ());
971
+ };
972
+ thinLTOInternalizeAndPromoteInIndex (Ret->Index , isExported, isPrevailing);
973
+ #else
965
974
auto isExported = [&](StringRef ModuleIdentifier, GlobalValue::GUID GUID) {
966
975
const auto &ExportList = Ret->ExportLists .find (ModuleIdentifier);
967
976
return (ExportList != Ret->ExportLists .end () &&
968
977
ExportList->second .count (GUID)) ||
969
978
ExportedGUIDs.count (GUID);
970
979
};
971
980
thinLTOInternalizeAndPromoteInIndex (Ret->Index , isExported);
981
+ #endif
972
982
973
983
return Ret.release ();
974
984
}
You can’t perform that action at this time.
0 commit comments