Skip to content

Conversation

tshortli
Copy link

@tshortli tshortli commented Aug 23, 2025

Cherry-pick of #11253.

Also, replace feature-availability.h with availability_domain.h to better align the header/module name with the name of the compiler feature.

Resolves rdar://157689733.

Also, replace feature-availability.h with availability_domain.h to better align
the header/module name with the name of the compiler feature.

Resolves rdar://157689733.
@tshortli tshortli requested a review from ahatanaka August 23, 2025 01:13
@tshortli tshortli requested a review from a team as a code owner August 23, 2025 01:13
@tshortli
Copy link
Author

@swift-ci please test

@@ -927,6 +927,8 @@ ASTContext::getFeatureAvailInfo(Decl *D) const {
auto *Attr = VD->getAttr<AvailabilityDomainAttr>();
if (!Attr)
return {};
if (!VD->getInit())
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a drive-by fix for a compiler crash I encountered when testing an earlier version of this PR.

@tshortli
Copy link
Author

@swift-ci please test Windows

@@ -10,24 +10,8 @@
#ifndef __FEATURE_AVAILABILITY_H
#define __FEATURE_AVAILABILITY_H

#include <stdint.h>
// feature-availability.h is deprecated - use availability_domain.h instead.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we turn this comment into a real warning using #warning?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather have a chance to move adopters off of it before it becomes a warning (although once adopters move off of it we should probably remove it entirely).

@tshortli tshortli changed the title Expose macros for availability domain definitions [stable/20240723] Expose macros for availability domain definitions Aug 25, 2025
@tshortli tshortli merged commit af731cf into swiftlang:stable/20240723 Aug 25, 2025
3 checks passed
@tshortli tshortli deleted the availability-domains-update-20240723 branch August 25, 2025 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants