Commit Graph

7 Commits

Author SHA1 Message Date
Allan Shortlidge
303f7d8452 AST: Build scopes for if #available queries on custom availability domains.
Resolves rdar://138441298 and rdar://138441307.
2025-04-01 09:03:41 -07:00
Allan Shortlidge
e943c4bffd AST: Build statement condition availability scopes using AvailabilityContext.
Preparation for building availability scopes for `if #available` statements
that query non-platform availability domains.
2025-04-01 07:46:46 -07:00
Allan Shortlidge
b64df7384e AST: Simplify AvailabilityRange construction.
Introduce a constructor that takes an `llvm::VersionTuple` directly, instead of
needing to spell out `VersionRange::allGTE(<tuple>)` which is unnecessarily
verbose.
2025-03-04 19:41:04 -08:00
Alex Martini
633f101e0a Fix double 'the the' in various places 2025-02-14 17:27:51 -08:00
Allan Shortlidge
fa44b9e0b4 AST: Introduce some AvailabilityDomain conveniences.
One to get the active domain for the compilation target and another to get the
ABI compatibility domain for a given domain. The ABI compatibility domain will
be needed for queries that compute whether an unavailable declaration is still
reachable at runtime.

NFC.
2025-02-09 09:39:33 -08:00
Allan Shortlidge
ddb5f23306 AST: Add AvailabilityContext::containsUnavailableDomain().
Replaces AvailabilityContext::getUnavailableDomain().
2025-02-06 09:50:07 -08:00
Allan Shortlidge
889bc3138d unittests: Add tests for AvailabilityContext. 2025-02-06 09:50:07 -08:00