AST: Retire PlatformVersionConstraintAvailabilitySpec.

This commit is contained in:
Allan Shortlidge
2025-02-12 21:02:49 -08:00
parent 0722efe97e
commit 670084a9ac
18 changed files with 121 additions and 200 deletions

View File

@@ -1001,7 +1001,7 @@ getResultBuilderElementFromASTNode(const ASTNode node) {
BuilderValue::ConditionalMember
getConditionalMemberFromIfStmt(const IfStmt *ifStmt) {
std::vector<PlatformVersionConstraintAvailabilitySpec> AvailabilityAttributes;
std::vector<AvailabilitySpec> AvailabilityAttributes;
std::vector<std::shared_ptr<BuilderValue::BuilderMember>> IfElements;
std::vector<std::shared_ptr<BuilderValue::BuilderMember>> ElseElements;
if (auto thenBraceStmt = ifStmt->getThenStmt()) {
@@ -1034,9 +1034,8 @@ getConditionalMemberFromIfStmt(const IfStmt *ifStmt) {
for (auto elt : ifStmt->getCond()) {
if (elt.getKind() == StmtConditionElement::CK_Availability) {
for (auto *Q : elt.getAvailability()->getQueries()) {
if (auto *availability =
dyn_cast<PlatformVersionConstraintAvailabilitySpec>(Q)) {
AvailabilityAttributes.push_back(*availability);
if (Q->getPlatform() != PlatformKind::none) {
AvailabilityAttributes.push_back(*Q);
}
}
memberKind = BuilderValue::LimitedAvailability;