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 {
4747 // / Returns the range of platform versions in which the decl is available.
4848 static AvailabilityRange availableRange (const Decl *D);
4949
50- // / Returns true is the declaration is `@_spi_available`.
51- static bool isAvailableAsSPI (const Decl *D);
52-
5350 // / Returns the context for which the declaration
5451 // / is annotated as available, or None if the declaration
5552 // / has no availability annotation.
Original file line number Diff line number Diff line change @@ -408,7 +408,10 @@ AvailabilityInference::annotatedAvailableRange(const Decl *D) {
408408}
409409
410410bool Decl::isAvailableAsSPI () const {
411- return AvailabilityInference::isAvailableAsSPI (this );
411+ if (auto attr = getAvailableAttrForPlatformIntroduction ())
412+ return attr->isSPI ();
413+
414+ return false ;
412415}
413416
414417SemanticAvailableAttributes
@@ -804,13 +807,6 @@ AvailabilityRange AvailabilityInference::availableRange(const Decl *D) {
804807 return AvailabilityRange::alwaysAvailable ();
805808}
806809
807- bool AvailabilityInference::isAvailableAsSPI (const Decl *D) {
808- if (auto attr = D->getAvailableAttrForPlatformIntroduction ())
809- return attr->isSPI ();
810-
811- return false ;
812- }
813-
814810std::optional<SemanticAvailableAttr>
815811SemanticAvailableAttrRequest::evaluate (swift::Evaluator &evaluator,
816812 const AvailableAttr *attr,
You can’t perform that action at this time.
0 commit comments