Merge remote-tracking branch 'origin/main' into rebranch

This commit is contained in:
swift-ci
2023-10-07 09:34:00 -07:00
25 changed files with 258 additions and 14 deletions

View File

@@ -1968,6 +1968,16 @@ bool IRGenModule::shouldPrespecializeGenericMetadata() {
canPrespecializeTarget;
}
bool IRGenModule::canUseObjCSymbolicReferences() {
if (!IRGen.Opts.EnableObjectiveCProtocolSymbolicReferences)
return false;
auto &context = getSwiftModule()->getASTContext();
auto deploymentAvailability =
AvailabilityContext::forDeploymentTarget(context);
return deploymentAvailability.isContainedIn(
context.getObjCSymbolicReferencesAvailability());
}
bool IRGenModule::canMakeStaticObjectsReadOnly() {
// Unconditionally disable this until we can fix the metadata.
// The trick of using the Empty array metadata for static arrays