Allan Shortlidge
454689a399
ModuleInterface: Adopt swiftinterface verification lit substitutions in back-deploy-attr.swift. Simplify the test now that another test exercises deserialization of the attribute from a module.
2022-04-15 15:50:59 -07:00
Allan Shortlidge
59b62c2cc9
NFC: Update tests to include "before: " label in the @_backDeploy attribute.
2022-03-18 11:24:47 -07:00
Allan Shortlidge
c1e326cbb0
SILGen: Fix SILGen for accessor functions with @_backDeploy. Previously, the @_backDeploy attribute was ignored when generating SIL for accessors on declarations with the attribute since the accessor decls themselves were not directly annotated.
...
Also, emit an error when `@_backDeploy` is applied to coroutine accessors since they are not supported yet.
Resolves rdar://90112441
2022-03-11 11:07:04 -08:00
Allan Shortlidge
b29251219a
Parse: Add availability macro support to @_backDeploy attribute parsing. Consolidate parsing code shared between @_originallyDefinedIn and @_backDeploy.
2022-03-08 14:13:10 -08:00
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