mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge remote-tracking branch 'origin/master' into master-next
This commit is contained in:
@@ -2349,21 +2349,17 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
|
||||
DeclID origDeclID = S.addDeclRef(attr->getOriginalFunction());
|
||||
auto derivativeKind =
|
||||
getRawStableAutoDiffDerivativeFunctionKind(attr->getDerivativeKind());
|
||||
auto paramIndices = attr->getParameterIndices();
|
||||
// NOTE(TF-837): `@derivative` attribute serialization is blocked by
|
||||
// `@derivative` attribute type-checking (TF-829), which resolves
|
||||
// parameter indices (`IndexSubset *`).
|
||||
if (!paramIndices)
|
||||
return;
|
||||
assert(paramIndices && "Parameter indices must be resolved");
|
||||
auto *parameterIndices = attr->getParameterIndices();
|
||||
assert(parameterIndices && "Parameter indices must be resolved");
|
||||
SmallVector<bool, 4> indices;
|
||||
for (unsigned i : range(paramIndices->getCapacity()))
|
||||
indices.push_back(paramIndices->contains(i));
|
||||
for (unsigned i : range(parameterIndices->getCapacity()))
|
||||
indices.push_back(parameterIndices->contains(i));
|
||||
DerivativeDeclAttrLayout::emitRecord(
|
||||
S.Out, S.ScratchRecord, abbrCode, attr->isImplicit(), origNameId,
|
||||
origDeclID, derivativeKind, indices);
|
||||
return;
|
||||
}
|
||||
|
||||
case DAK_ImplicitlySynthesizesNestedRequirement: {
|
||||
auto *theAttr = cast<ImplicitlySynthesizesNestedRequirementAttr>(DA);
|
||||
auto abbrCode = S.DeclTypeAbbrCodes[ImplicitlySynthesizesNestedRequirementDeclAttrLayout::Code];
|
||||
|
||||
Reference in New Issue
Block a user