mirror of
https://github.com/apple/swift.git
synced 2026-11-01 23:11:50 +01:00
Behind the experimental feature `ExtendedSpecializedAttribute`, allow `@specialized` on generic structs, enums and classes. With `exported: true`, the type's module owns the specialization, e.g. `Box<Int>`: in both Embedded and regular Swift, its public members get exported specialized bodies, and in Embedded Swift its metadata, value witness tables and the witness tables of its conformances declared in that module are emitted once in the module and referenced by clients instead of being duplicated in each separately linked library. Without `exported`, the attribute adds the specialization to each member, like `@specialized` on a function. The exported form is currently only allowed when library evolution is disabled. rdar://176397056