Commit Graph

8 Commits

Author SHA1 Message Date
Allan Shortlidge
e39c55023f AST: Add support for @_backDeploy on computed properties, subscripts, and accessors. 2022-03-01 13:29:09 -08:00
Allan Shortlidge
da2ae43b4f Sema: Diagnose invalid back deployed declarations. Back deployed declarations must:
- have public visibility
- have at most one back deployment version per-platform
- specify an introduced version for each platform with a back deployment version using @available
- have a back deployment version that is greater than the introduced version
- not have conflicting attributes like @_alwaysEmitIntoClient

Refactor to share code with type checking for @_originallyDefinedIn which has overlapping diagnostics.
2022-02-28 16:00:28 -08:00
Allan Shortlidge
20b454a037 NFC: Flip the OS versions for the @available attribute and the @_backDeploy attribute. Declarations should be marked available starting in the first OS they can be back deployed to and the @_backDeploy attribute should indicate which OS version the declaration first became ABI in. 2022-02-25 17:51:12 -08:00
Allan Shortlidge
123f953e31 NFC: Remove out of date FIXME in back-deploy-attr.swift test. 2022-02-18 16:30:27 -08:00
Allan Shortlidge
25b59cb8bc AST: Emit @_backDeploy function bodies into .swiftinterface files.
Resolves rdar://88650341
2022-02-11 14:47:32 -08:00
Allan Shortlidge
ab457959b1 Fix the back-deploy-attr.swift test case by using target-swiftc_driver instead of swiftc_driver. 2022-02-09 09:18:23 -08:00
Allan Shortlidge
2de28dfa75 AST: Use -verify-emitted-module-interface in test case the emits a swiftinterface containing a back-deployed decl. Also leave a FIXME to stop using -merge-modules in the future and fix a diagnostic typo. 2022-02-08 14:04:49 -08:00
Allan Shortlidge
b860e762b2 AST: Introduce the @_backDeploy function attribute:
- Parse the attribute and diagnose parsing issues
- Serialize the attribute
2022-02-08 10:11:04 -08:00