mirror of
https://github.com/apple/swift.git
synced 2026-02-27 18:26:24 +01:00
Given that we implicitly expanded Copyable & Escapable conformance requirements for suppressed primary associated types, we now need this function to do the opposite; filtering Copyable & Escapable requirements on such primary associated types and adding inverses if those requirements are missing. This function plays a crucial role in emitting the interface files accurately for functions and types, in addition to how we mangle generic signatures into function symbols. The mangling for generic signatures under the -WithDefaults version of suppressed associated types goes like this: - primary associated type T.A has an inverse `Rj` or `RJ` mangled into the generic signature if it lacks the conformance, or nothing is mangled into it. - non-primary associated type T.B has either a `T.B: Copyable` requirement mangled into it, or nothing is mangled into it. For the legacy SuppressedAssociatedTypes feature, where there's no defaults, it uses the "non-primary assocated type" mangling strategy for all generic signatures.
53 KiB
53 KiB