File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,6 @@ class AvailabilityInference {
47
47
// / Returns the range of platform versions in which the decl is available.
48
48
static AvailabilityRange availableRange (const Decl *D);
49
49
50
- // / Returns true is the declaration is `@_spi_available`.
51
- static bool isAvailableAsSPI (const Decl *D);
52
-
53
50
// / Returns the context for which the declaration
54
51
// / is annotated as available, or None if the declaration
55
52
// / has no availability annotation.
Original file line number Diff line number Diff line change @@ -408,7 +408,10 @@ AvailabilityInference::annotatedAvailableRange(const Decl *D) {
408
408
}
409
409
410
410
bool Decl::isAvailableAsSPI () const {
411
- return AvailabilityInference::isAvailableAsSPI (this );
411
+ if (auto attr = getAvailableAttrForPlatformIntroduction ())
412
+ return attr->isSPI ();
413
+
414
+ return false ;
412
415
}
413
416
414
417
SemanticAvailableAttributes
@@ -804,13 +807,6 @@ AvailabilityRange AvailabilityInference::availableRange(const Decl *D) {
804
807
return AvailabilityRange::alwaysAvailable ();
805
808
}
806
809
807
- bool AvailabilityInference::isAvailableAsSPI (const Decl *D) {
808
- if (auto attr = D->getAvailableAttrForPlatformIntroduction ())
809
- return attr->isSPI ();
810
-
811
- return false ;
812
- }
813
-
814
810
std::optional<SemanticAvailableAttr>
815
811
SemanticAvailableAttrRequest::evaluate (swift::Evaluator &evaluator,
816
812
const AvailableAttr *attr,
You can’t perform that action at this time.
0 commit comments