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,
962962 ExportedGUIDs.insert (GUID);
963963 }
964964 }
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
965974 auto isExported = [&](StringRef ModuleIdentifier, GlobalValue::GUID GUID) {
966975 const auto &ExportList = Ret->ExportLists .find (ModuleIdentifier);
967976 return (ExportList != Ret->ExportLists .end () &&
968977 ExportList->second .count (GUID)) ||
969978 ExportedGUIDs.count (GUID);
970979 };
971980 thinLTOInternalizeAndPromoteInIndex (Ret->Index , isExported);
981+ #endif
972982
973983 return Ret.release ();
974984}
You can’t perform that action at this time.
0 commit comments