|
24 | 24 |
|
25 | 25 | namespace swift {
|
26 | 26 | class ASTContext;
|
| 27 | +class AvailabilityDomain; |
27 | 28 | class BackDeployedAttr;
|
28 | 29 | class Decl;
|
29 | 30 | class SemanticAvailableAttr;
|
@@ -62,35 +63,35 @@ class AvailabilityInference {
|
62 | 63 | /// For the attribute's introduction version, update the platform and version
|
63 | 64 | /// values to the re-mapped platform's, if using a fallback platform.
|
64 | 65 | /// Returns `true` if a remap occured.
|
65 |
| - static bool updateIntroducedPlatformForFallback( |
66 |
| - const SemanticAvailableAttr &attr, const ASTContext &Ctx, |
67 |
| - llvm::StringRef &Platform, llvm::VersionTuple &PlatformVer); |
| 66 | + static bool updateIntroducedAvailabilityDomainForFallback( |
| 67 | + const SemanticAvailableAttr &attr, const ASTContext &ctx, |
| 68 | + AvailabilityDomain &domain, llvm::VersionTuple &platformVer); |
68 | 69 |
|
69 | 70 | /// For the attribute's deprecation version, update the platform and version
|
70 | 71 | /// values to the re-mapped platform's, if using a fallback platform.
|
71 | 72 | /// Returns `true` if a remap occured.
|
72 |
| - static bool updateDeprecatedPlatformForFallback( |
73 |
| - const SemanticAvailableAttr &attr, const ASTContext &Ctx, |
74 |
| - llvm::StringRef &Platform, llvm::VersionTuple &PlatformVer); |
| 73 | + static bool updateDeprecatedAvailabilityDomainForFallback( |
| 74 | + const SemanticAvailableAttr &attr, const ASTContext &ctx, |
| 75 | + AvailabilityDomain &domain, llvm::VersionTuple &platformVer); |
75 | 76 |
|
76 | 77 | /// For the attribute's obsoletion version, update the platform and version
|
77 | 78 | /// values to the re-mapped platform's, if using a fallback platform.
|
78 | 79 | /// Returns `true` if a remap occured.
|
79 |
| - static bool updateObsoletedPlatformForFallback( |
80 |
| - const SemanticAvailableAttr &attr, const ASTContext &Ctx, |
81 |
| - llvm::StringRef &Platform, llvm::VersionTuple &PlatformVer); |
| 80 | + static bool updateObsoletedAvailabilityDomainForFallback( |
| 81 | + const SemanticAvailableAttr &attr, const ASTContext &ctx, |
| 82 | + AvailabilityDomain &domain, llvm::VersionTuple &platformVer); |
82 | 83 |
|
83 |
| - static void updatePlatformStringForFallback(const SemanticAvailableAttr &attr, |
84 |
| - const ASTContext &Ctx, |
85 |
| - llvm::StringRef &Platform); |
| 84 | + static void |
| 85 | + updateAvailabilityDomainForFallback(const SemanticAvailableAttr &attr, |
| 86 | + const ASTContext &ctx, |
| 87 | + AvailabilityDomain &domain); |
86 | 88 |
|
87 | 89 | /// For the attribute's before version, update the platform and version
|
88 | 90 | /// values to the re-mapped platform's, if using a fallback platform.
|
89 | 91 | /// Returns `true` if a remap occured.
|
90 |
| - static bool updateBeforePlatformForFallback(const BackDeployedAttr *attr, |
91 |
| - const ASTContext &Ctx, |
92 |
| - llvm::StringRef &Platform, |
93 |
| - llvm::VersionTuple &PlatformVer); |
| 92 | + static bool updateBeforeAvailabilityDomainForFallback( |
| 93 | + const BackDeployedAttr *attr, const ASTContext &ctx, |
| 94 | + AvailabilityDomain &domain, llvm::VersionTuple &platformVer); |
94 | 95 | };
|
95 | 96 |
|
96 | 97 | // FIXME: This should become a utility on Decl.
|
|
0 commit comments