@@ -404,48 +404,6 @@ DeclAttributes::findMostSpecificActivePlatform(const ASTContext &ctx,
404
404
return bestAttr;
405
405
}
406
406
407
- const AvailableAttr *DeclAttributes::getNoAsync (const ASTContext &ctx) const {
408
- const AvailableAttr *bestAttr = nullptr ;
409
- for (const DeclAttribute *attr : *this ) {
410
- if (const AvailableAttr *avAttr = dyn_cast<AvailableAttr>(attr)) {
411
- if (avAttr->isInvalid ())
412
- continue ;
413
-
414
- if (avAttr->getPlatformAgnosticAvailability () ==
415
- PlatformAgnosticAvailabilityKind::NoAsync) {
416
- // An API may only be unavailable on specific platforms.
417
- // If it doesn't have a platform associated with it, then it's
418
- // unavailable for all platforms, so we should include it. If it does
419
- // have a platform and we are not that platform, then it doesn't apply
420
- // to us.
421
- const bool isGoodForPlatform =
422
- (avAttr->hasPlatform () && avAttr->isActivePlatform (ctx)) ||
423
- !avAttr->hasPlatform ();
424
-
425
- if (!isGoodForPlatform)
426
- continue ;
427
-
428
- if (!bestAttr) {
429
- // If there is no best attr selected
430
- // and the attr either has an active platform, or doesn't have one at
431
- // all, select it.
432
- bestAttr = avAttr;
433
- } else if (bestAttr && avAttr->hasPlatform () &&
434
- bestAttr->hasPlatform () &&
435
- inheritsAvailabilityFromPlatform (avAttr->getPlatform (),
436
- bestAttr->getPlatform ())) {
437
- // if they both have a viable platform, use the better one
438
- bestAttr = avAttr;
439
- } else if (avAttr->hasPlatform () && !bestAttr->hasPlatform ()) {
440
- // Use the one more specific
441
- bestAttr = avAttr;
442
- }
443
- }
444
- }
445
- }
446
- return bestAttr;
447
- }
448
-
449
407
const BackDeployedAttr *
450
408
DeclAttributes::getBackDeployed (const ASTContext &ctx,
451
409
bool forTargetVariant) const {
0 commit comments