Commit Graph

5 Commits

Author SHA1 Message Date
Allan Shortlidge
d09e117dc0 AST: Canonicalize platform versions for @backDeployed attrs.
Also, diagnose invalid platform versions.

Part of rdar://155558161.
2025-07-14 16:40:16 -07:00
Allan Shortlidge
4a84ddb230 AST: Print official spelling of @backDeployed attr in swiftinterfaces.
It's no longer necessary to support compilers that only parse the
`@_backDeploy` spelling.

Resolves rdar://104920183
2023-05-08 13:56:52 -07:00
Allan Shortlidge
f1a8740ba5 AST: Only treat @backDeployed functions as fragile on platforms with an active attribute.
Previously, typechecking and SILGen would treat a function body as fragile as long as the declaration had a `@backDeployed` attribute, regardless of the platform specified by the attribute. This was overly conservative since back deployed functions are only emitted into the client on specific platforms. Now a `@backDeployed` function can reference non-`public` declarations on the platforms it is resilient on:

```
@backDeployed(before: iOS 15)
public func foo() {
  #if os(iOS)
  // Fragile; this code may be emitted into the client.
  #else
  // Resilient; this code won't ever be exposed to clients.
  #endif
}
```

Resolves rdar://105298520
2023-02-23 10:39:42 -08:00
Allan Shortlidge
022abe4d3b NFC: Update tests to use accepted spelling for @backDeployed. 2023-02-01 22:04:33 -08:00
Allan Shortlidge
df1750d8b7 NFC: Rename files containing tests for the @backDeployed attribute to match the approved spelling. 2023-02-01 22:04:33 -08:00