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 @@ -958,13 +958,23 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
958
958
ExportedGUIDs.insert (GUID);
959
959
}
960
960
}
961
+ #if LLVM_VERSION_GE(10, 0)
962
+ auto isExported = [&](StringRef ModuleIdentifier, ValueInfo VI) {
963
+ const auto &ExportList = Ret->ExportLists .find (ModuleIdentifier);
964
+ return (ExportList != Ret->ExportLists .end () &&
965
+ ExportList->second .count (VI)) ||
966
+ ExportedGUIDs.count (VI.getGUID ());
967
+ };
968
+ thinLTOInternalizeAndPromoteInIndex (Ret->Index , isExported, isPrevailing);
969
+ #else
961
970
auto isExported = [&](StringRef ModuleIdentifier, GlobalValue::GUID GUID) {
962
971
const auto &ExportList = Ret->ExportLists .find (ModuleIdentifier);
963
972
return (ExportList != Ret->ExportLists .end () &&
964
973
ExportList->second .count (GUID)) ||
965
974
ExportedGUIDs.count (GUID);
966
975
};
967
976
thinLTOInternalizeAndPromoteInIndex (Ret->Index , isExported);
977
+ #endif
968
978
969
979
return Ret.release ();
970
980
}
You can’t perform that action at this time.
0 commit comments