Use the `%target-swift-5.1-abi-triple` substitution to compile the tests for
deployment to the minimum OS versions required for use of _Concurrency APIs,
instead of disabling availability checking.
Repurpose mangling operator `Y` as an umbrella operator that covers new attributes on function types. Free up operators `J`, `j`, and `k`.
```
async ::= 'Ya' // 'async' annotation on function types
sendable ::= 'Yb' // @Sendable on function types
throws ::= 'K' // 'throws' annotation on function types
differentiable ::= 'Yjf' // @differentiable(_forward) on function type
differentiable ::= 'Yjr' // @differentiable(reverse) on function type
differentiable ::= 'Yjd' // @differentiable on function type
differentiable ::= 'Yjl' // @differentiable(_linear) on function type
```
Resolves rdar://76299796.
The Python build system always enables concurrency, but CMake has it
disable by default. Collaborators that do not use the Python build
system and use directly CMake will have it disable, unless they
explicitely enable it. If the tests are not marked as requiring the
concurrency features, the tests will fail to execute when concurrency is
disabled.
The changes add the `REQUIRES: concurrency` line to many tests that deal
with concurrency, but wasn't marked as such.
Previously, the "bare" linkage of a link entity was used to determine
whether to put an async function pointer into the tbd. That did not
match the mechanism by which the linkage was determined in IRGen.
There, the linkage is the "_effective_" linkage (i.e. the value returned
from SILFunction::getEffectiveSymbolLinkage).
Here, whether to put the async function pointer corresponding to a class
method is determined on the basis of that effective linkage.
rdar://problem/73203508
Previously, the suffix "AD" was used to mangle AsyncFunctionPointers.
That was incorrect because it was already used in the mangling scheme.
Here, that error is fixed by using 'u' under the thunk or specialization
operator 'T' to mangle AsyncFunctionPointers. Additionally, printing
and demangling support is added.
rdar://problem/72336407
Previously, an async function pointer symbol was being emitted into the
TBD for all AbstractFunctionDecls which returned true for
"hasAsynContext", i.e. both those that were async and those which were
asnycHandlers. That was not correct because the async function portion
of an asyncHandler is not ABI. Here, that mistake is fixed by only
emitting this symbol for functions which are annotated async (i.e. those
for which "hasAsync" returns true).
rdar://problem/72329062