@@ -2068,7 +2068,7 @@ void TypeChecker::diagnosePotentialUnavailability(
2068
2068
{
2069
2069
auto Err = Context.Diags .diagnose (
2070
2070
ReferenceRange.Start , Diag,
2071
- prettyPlatformString ( targetPlatform ( Context.LangOpts ) ),
2071
+ Context.getTargetPlatformStringForDiagnostics ( ),
2072
2072
Availability.getRawMinimumVersion ());
2073
2073
2074
2074
// Direct a fixit to the error if an existing guard is nearly-correct
@@ -2122,7 +2122,7 @@ static Diagnostic getPotentialUnavailabilityDiagnostic(
2122
2122
const AvailabilityContext &Availability, bool WarnBeforeDeploymentTarget,
2123
2123
bool &IsError) {
2124
2124
ASTContext &Context = ReferenceDC->getASTContext ();
2125
- auto Platform = prettyPlatformString ( targetPlatform ( Context.LangOpts ) );
2125
+ auto Platform = Context.getTargetPlatformStringForDiagnostics ( );
2126
2126
2127
2127
if (requiresDeploymentTargetOrEarlier (Availability, Context)) {
2128
2128
// The required OS version is at or before the deployment target so this
@@ -2179,7 +2179,7 @@ void TypeChecker::diagnosePotentialAccessorUnavailability(
2179
2179
{
2180
2180
auto Err = Context.Diags .diagnose (
2181
2181
ReferenceRange.Start , diag, Accessor,
2182
- prettyPlatformString ( targetPlatform ( Context.LangOpts ) ),
2182
+ Context.getTargetPlatformStringForDiagnostics ( ),
2183
2183
Availability.getRawMinimumVersion ());
2184
2184
2185
2185
// Direct a fixit to the error if an existing guard is nearly-correct
@@ -2221,7 +2221,7 @@ void TypeChecker::diagnosePotentialUnavailability(
2221
2221
auto proto = rootConf->getProtocol ()->getDeclaredInterfaceType ();
2222
2222
auto err = ctx.Diags .diagnose (
2223
2223
loc, diag::conformance_availability_only_version_newer, type, proto,
2224
- prettyPlatformString ( targetPlatform ( ctx.LangOpts ) ),
2224
+ ctx.getTargetPlatformStringForDiagnostics ( ),
2225
2225
availability.getRawMinimumVersion ());
2226
2226
2227
2227
err.warnUntilSwiftVersion (6 );
0 commit comments