@@ -2670,24 +2670,25 @@ RequiresOpaqueAccessorsRequest::evaluate(Evaluator &evaluator,
2670
2670
// /
2671
2671
// / The underscored accessor could, however, still be required for ABI
2672
2672
// / stability.
2673
- bool AbstractStorageDecl::requiresCorrespondingUnderscoredCoroutineAccessor (
2674
- AccessorKind kind, AccessorDecl const *decl) const {
2675
- auto &ctx = getASTContext ();
2673
+ static bool requiresCorrespondingUnderscoredCoroutineAccessorImpl (
2674
+ AbstractStorageDecl const *storage, AccessorKind kind,
2675
+ AccessorDecl const *decl) {
2676
+ auto &ctx = storage->getASTContext ();
2676
2677
assert (ctx.LangOpts .hasFeature (Feature::CoroutineAccessors));
2677
2678
assert (kind == AccessorKind::Modify2 || kind == AccessorKind::Read2);
2678
2679
2679
2680
// Non-stable modules have no ABI to keep stable.
2680
- if (getModuleContext ()->getResilienceStrategy () !=
2681
+ if (storage-> getModuleContext ()->getResilienceStrategy () !=
2681
2682
ResilienceStrategy::Resilient)
2682
2683
return false ;
2683
2684
2684
2685
// Non-exported storage has no ABI to keep stable.
2685
- if (!isExported (this ))
2686
+ if (!isExported (storage ))
2686
2687
return false ;
2687
2688
2688
2689
// The non-underscored accessor is not present, the underscored accessor
2689
2690
// won't be either.
2690
- auto *accessor = decl ? decl : getOpaqueAccessor (kind);
2691
+ auto *accessor = decl ? decl : storage-> getOpaqueAccessor (kind);
2691
2692
if (!accessor)
2692
2693
return false ;
2693
2694
@@ -2709,6 +2710,12 @@ bool AbstractStorageDecl::requiresCorrespondingUnderscoredCoroutineAccessor(
2709
2710
return true ;
2710
2711
}
2711
2712
2713
+ bool AbstractStorageDecl::requiresCorrespondingUnderscoredCoroutineAccessor (
2714
+ AccessorKind kind, AccessorDecl const *decl) const {
2715
+ return requiresCorrespondingUnderscoredCoroutineAccessorImpl (this , kind,
2716
+ decl);
2717
+ }
2718
+
2712
2719
bool RequiresOpaqueModifyCoroutineRequest::evaluate (
2713
2720
Evaluator &evaluator, AbstractStorageDecl *storage,
2714
2721
bool isUnderscored) const {
0 commit comments