Commit Graph

12 Commits

Author SHA1 Message Date
Allan Shortlidge
3716e97d6d SymbolGraphGen: Adopt SemanticAvailableAttr. 2025-01-07 07:31:13 -08:00
Allan Shortlidge
36230cd9c6 AST: Use an accessor to get the PlatformKind from an AvailableAttr. 2024-11-21 09:10:36 -08:00
Tim Kientzle
1d961ba22d Add #include "swift/Basic/Assertions.h" to a lot of source files
Although I don't plan to bring over new assertions wholesale
into the current qualification branch, it's entirely possible
that various minor changes in main will use the new assertions;
having this basic support in the release branch will simplify that.
(This is why I'm adding the includes as a separate pass from
rewriting the individual assertions)
2024-06-05 19:37:30 -07:00
Artem Chikin
1f14158a1d Introduce VisionOS Platform
This change introduces a new compilation target platform to the Swift compiler - visionOS.

- Changes to the compiler build infrastrucuture to support building compiler-adjacent artifacts and test suites for the new target.
- Addition of the new platform kind definition.
- Support for the new platform in language constructs such as compile-time availability annotations or runtime OS version queries.
- Utilities to read out Darwin platform SDK info containing platform mapping data.
- Utilities to support re-mapping availability annotations from iOS to visionOS (e.g. 'updateIntroducedPlatformForFallback', 'updateDeprecatedPlatformForFallback', 'updateObsoletedPlatformForFallback').
- Additional tests exercising platform-specific availability handling and availability re-mapping fallback code-path.
- Changes to existing test suite to accomodate the new platform.
2024-04-10 09:38:02 -07:00
Erik Eckstein
ab1b343dad use new llvm::Optional API
`getValue` -> `value`
`getValueOr` -> `value_or`
`hasValue` -> `has_value`
`map` -> `transform`

The old API will be deprecated in the rebranch.
To avoid merge conflicts, use the new API already in the main branch.

rdar://102362022
2022-11-21 19:44:24 +01:00
Jager-yoo
3b8db192a0 [Gardening] fix typo "supercede" -> "supersede" 2022-05-29 03:35:24 +09:00
Evan Wilde
aa51bdf17a Add noasync availability kind to available attr
This patch adds the `noasync` availability kind to `@available`. The
spelling is `@available(*, noasync)`.
2022-03-22 15:12:51 -07:00
Saleem Abdulrasool
7c968c6ccf AST: support availability on Windows
Enable Windows specific availability annotations in Swift.
2020-11-09 20:03:52 -08:00
3405691582
b59910ef5b Add OpenBSD to PlatformKinds.def.
In #31686 changes were introduced to ensure that capacity was stored in
the ManagedBuffer allocation, and @lorentey sugested that as a stopgap
measure for addressing the lack of platform malloc introspection on
OpenBSD, we use Swift availability attributes instead on the relevant
parts of ManagedBuffer and friends.

Since platform availability symbols must be specifically set up to be
used, this commit does so in advance of the above change.
2020-09-09 18:57:26 -04:00
Nathan Hawes
244dc4a768 [AST] Rename PlatformKind::OSX to PlatformKind::macOS
Because the names are coming from a .def file used for printing too, this
simplifies the printing logic as well.
2020-07-08 16:29:31 -07:00
Ashley Garland
0a29ba8839 [SymbolGraph] Add back isUnconditionallyUnavailable
It turns out this needed to prevent automatically inheriting a
default introduced availability for a given module.

rdar://64536460
2020-06-19 11:16:54 -07:00
Ashley Garland
118e7c3cda [SymbolGraph] Inherit availability from parent contexts
Also be a little smarter about encountering duplicate `@available`
attributes on the same declaration.

rdar://63570830
2020-06-02 11:32:04 -07:00