mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add support for marking a _specialize attribute as SPI
```
@_specialize(exported: true, spi: SPIGroupName, where T == Int)
public func myFunc() { }
```
The specialized entry point is only visible for modules that import
using `_spi(SPIGroupName) import ModuleDefiningMyFunc `.
rdar://64993425
This commit is contained in:
@@ -56,7 +56,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
|
||||
/// describe what change you made. The content of this comment isn't important;
|
||||
/// it just ensures a conflict if two people change the module format.
|
||||
/// Don't worry about adhering to the 80-column limit for this line.
|
||||
const uint16_t SWIFTMODULE_VERSION_MINOR = 581; // @_specialize target parameter
|
||||
const uint16_t SWIFTMODULE_VERSION_MINOR = 582; // sil specialize attribute module parameter
|
||||
|
||||
/// A standard hash seed used for all string hashes in a serialized module.
|
||||
///
|
||||
@@ -1850,8 +1850,9 @@ namespace decls_block {
|
||||
BCFixed<1>, // specialization kind
|
||||
GenericSignatureIDField, // specialized signature
|
||||
DeclIDField, // target function
|
||||
BCVBR<4>, // # of arguments (+1) or zero if no name
|
||||
BCArray<IdentifierIDField>
|
||||
BCVBR<4>, // # of arguments (+1) or 1 if simple decl name, 0 if no target
|
||||
BCVBR<4>, // # of SPI groups
|
||||
BCArray<IdentifierIDField> // target function pieces, spi groups
|
||||
>;
|
||||
|
||||
using DifferentiableDeclAttrLayout = BCRecordLayout<
|
||||
|
||||
Reference in New Issue
Block a user