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 @@ -1408,13 +1408,18 @@ void IRGenModule::error(SourceLoc loc, const Twine &message) {
1408
1408
bool IRGenModule::useDllStorage () { return ::useDllStorage (Triple); }
1409
1409
1410
1410
bool IRGenModule::shouldPrespecializeGenericMetadata () {
1411
+ auto canPrespecializeTarget =
1412
+ (Triple.isOSDarwin () || Triple.isTvOS () || Triple.isOSLinux ());
1413
+ if (canPrespecializeTarget && isStandardLibrary ()) {
1414
+ return true ;
1415
+ }
1411
1416
auto &context = getSwiftModule ()->getASTContext ();
1412
1417
auto deploymentAvailability =
1413
1418
AvailabilityContext::forDeploymentTarget (context);
1414
- return IRGen.Opts .PrespecializeGenericMetadata &&
1415
- deploymentAvailability.isContainedIn (
1416
- context.getPrespecializedGenericMetadataAvailability ()) &&
1417
- (Triple. isOSDarwin () || Triple. isTvOS () || Triple. isOSLinux ()) ;
1419
+ return IRGen.Opts .PrespecializeGenericMetadata &&
1420
+ deploymentAvailability.isContainedIn (
1421
+ context.getPrespecializedGenericMetadataAvailability ()) &&
1422
+ canPrespecializeTarget ;
1418
1423
}
1419
1424
1420
1425
void IRGenerator::addGenModule (SourceFile *SF, IRGenModule *IGM) {
You can’t perform that action at this time.
0 commit comments