|
33 | 33 | namespace swift { |
34 | 34 | class ASTContext; |
35 | 35 | class CustomAvailabilityDomain; |
36 | | -class Decl; |
37 | 36 | class DeclContext; |
38 | 37 | class FuncDecl; |
39 | 38 | class ModuleDecl; |
| 39 | +class ValueDecl; |
40 | 40 |
|
41 | 41 | /// Represents a dimension of availability (e.g. macOS platform or Swift |
42 | 42 | /// language mode). |
@@ -153,7 +153,7 @@ class AvailabilityDomain final { |
153 | 153 |
|
154 | 154 | /// If `decl` represents an availability domain, returns the corresponding |
155 | 155 | /// `AvailabilityDomain` value. Otherwise, returns `std::nullopt`. |
156 | | - static std::optional<AvailabilityDomain> forCustom(Decl *decl, |
| 156 | + static std::optional<AvailabilityDomain> forCustom(ValueDecl *decl, |
157 | 157 | const ASTContext &ctx); |
158 | 158 |
|
159 | 159 | static AvailabilityDomain forCustom(const CustomAvailabilityDomain *domain) { |
@@ -250,7 +250,7 @@ class AvailabilityDomain final { |
250 | 250 |
|
251 | 251 | /// Returns the decl that represents the domain, or `nullptr` if the domain |
252 | 252 | /// does not have a decl. |
253 | | - Decl *getDecl() const; |
| 253 | + ValueDecl *getDecl() const; |
254 | 254 |
|
255 | 255 | /// Returns the module that the domain belongs to, if it is a custom domain. |
256 | 256 | ModuleDecl *getModule() const; |
@@ -343,22 +343,22 @@ class CustomAvailabilityDomain : public llvm::FoldingSetNode { |
343 | 343 | Identifier name; |
344 | 344 | Kind kind; |
345 | 345 | ModuleDecl *mod; |
346 | | - Decl *decl; |
| 346 | + ValueDecl *decl; |
347 | 347 | FuncDecl *predicateFunc; |
348 | 348 |
|
349 | 349 | CustomAvailabilityDomain(Identifier name, Kind kind, ModuleDecl *mod, |
350 | | - Decl *decl, FuncDecl *predicateFunc); |
| 350 | + ValueDecl *decl, FuncDecl *predicateFunc); |
351 | 351 |
|
352 | 352 | public: |
353 | 353 | static const CustomAvailabilityDomain *get(StringRef name, Kind kind, |
354 | | - ModuleDecl *mod, Decl *decl, |
| 354 | + ModuleDecl *mod, ValueDecl *decl, |
355 | 355 | FuncDecl *predicateFunc, |
356 | 356 | const ASTContext &ctx); |
357 | 357 |
|
358 | 358 | Identifier getName() const { return name; } |
359 | 359 | Kind getKind() const { return kind; } |
360 | 360 | ModuleDecl *getModule() const { return mod; } |
361 | | - Decl *getDecl() const { return decl; } |
| 361 | + ValueDecl *getDecl() const { return decl; } |
362 | 362 |
|
363 | 363 | /// Returns the function that should be called at runtime to determine whether |
364 | 364 | /// the domain is available, or `nullptr` if the domain's availability is not |
|
0 commit comments