File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -1398,13 +1398,18 @@ void IRGenModule::error(SourceLoc loc, const Twine &message) {
1398
1398
bool IRGenModule::useDllStorage () { return ::useDllStorage (Triple); }
1399
1399
1400
1400
bool IRGenModule::shouldPrespecializeGenericMetadata () {
1401
+ auto canPrespecializeTarget =
1402
+ (Triple.isOSDarwin () || Triple.isTvOS () || Triple.isOSLinux ());
1403
+ if (canPrespecializeTarget && isStandardLibrary ()) {
1404
+ return true ;
1405
+ }
1401
1406
auto &context = getSwiftModule ()->getASTContext ();
1402
1407
auto deploymentAvailability =
1403
1408
AvailabilityContext::forDeploymentTarget (context);
1404
- return IRGen.Opts .PrespecializeGenericMetadata &&
1405
- deploymentAvailability.isContainedIn (
1406
- context.getPrespecializedGenericMetadataAvailability ()) &&
1407
- (Triple. isOSDarwin () || Triple. isTvOS () || Triple. isOSLinux ()) ;
1409
+ return IRGen.Opts .PrespecializeGenericMetadata &&
1410
+ deploymentAvailability.isContainedIn (
1411
+ context.getPrespecializedGenericMetadataAvailability ()) &&
1412
+ canPrespecializeTarget ;
1408
1413
}
1409
1414
1410
1415
void IRGenerator::addGenModule (SourceFile *SF, IRGenModule *IGM) {
You can’t perform that action at this time.
0 commit comments