@@ -5079,15 +5079,12 @@ namespace {
5079
5079
bool hasKnownSwiftName, ModuleDecl *module ,
5080
5080
bool allowObjCMismatchFallback,
5081
5081
bool cacheResult) {
5082
- const auto &languageVersion =
5083
- Impl.SwiftContext .LangOpts .EffectiveLanguageVersion ;
5084
-
5085
5082
auto isMatch = [&](const T *singleResult, bool baseNameMatches,
5086
5083
bool allowObjCMismatch) -> bool {
5087
5084
const DeclAttributes &attrs = singleResult->getAttrs ();
5088
5085
5089
5086
// Skip versioned variants.
5090
- if (attrs. isUnavailableInSwiftVersion (languageVersion ))
5087
+ if (singleResult-> isUnavailableInCurrentSwiftVersion ( ))
5091
5088
return false ;
5092
5089
5093
5090
// If Clang decl has a custom Swift name, then we know that the name we
@@ -7692,11 +7689,9 @@ void SwiftDeclConverter::importMirroredProtocolMembers(
7692
7689
if (classImplementsProtocol (superInterface, clangProto, true ))
7693
7690
continue ;
7694
7691
7695
- const auto &languageVersion =
7696
- Impl.SwiftContext .LangOpts .EffectiveLanguageVersion ;
7697
7692
auto importProtocolRequirement = [&](Decl *member) {
7698
7693
// Skip compatibility stubs; there's no reason to mirror them.
7699
- if (member->getAttrs (). isUnavailableInSwiftVersion (languageVersion ))
7694
+ if (member->isUnavailableInCurrentSwiftVersion ( ))
7700
7695
return ;
7701
7696
7702
7697
if (auto prop = dyn_cast<VarDecl>(member)) {
@@ -8002,9 +7997,6 @@ void SwiftDeclConverter::importInheritedConstructors(
8002
7997
if (curObjCClass->hasDesignatedInitializers ())
8003
7998
kind = CtorInitializerKind::Convenience;
8004
7999
8005
- const auto &languageVersion =
8006
- Impl.SwiftContext .LangOpts .EffectiveLanguageVersion ;
8007
-
8008
8000
auto members = superclassDecl->lookupDirect (
8009
8001
DeclBaseName::createConstructor ());
8010
8002
@@ -8014,7 +8006,7 @@ void SwiftDeclConverter::importInheritedConstructors(
8014
8006
continue ;
8015
8007
8016
8008
// Don't inherit compatibility stubs.
8017
- if (ctor->getAttrs (). isUnavailableInSwiftVersion (languageVersion ))
8009
+ if (ctor->isUnavailableInCurrentSwiftVersion ( ))
8018
8010
continue ;
8019
8011
8020
8012
// Don't inherit (non-convenience) factory initializers.
0 commit comments