[SE-0497] Implement @export attribute syntax

Implement the @export(implementation) and @export(interface) attributes
to replace @_alwaysEmitIntoClient and @_neverEmitIntoClient. Provide a
warning + Fix-It to start staging out the very-new
@_neverEmitIntoClient. We'll hold off on pushing folks toward
@_alwaysEmitIntoClient for a little longer.
This commit is contained in:
Doug Gregor
2025-11-07 16:20:43 -08:00
parent ed85a12b59
commit 020b69d4b6
40 changed files with 403 additions and 139 deletions

View File

@@ -3070,6 +3070,14 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
return;
}
case DeclAttrKind::Export: {
auto *theAttr = cast<ExportAttr>(DA);
auto abbrCode = S.DeclTypeAbbrCodes[ExportDeclAttrLayout::Code];
ExportDeclAttrLayout::emitRecord(S.Out, S.ScratchRecord, abbrCode,
(unsigned)theAttr->exportKind);
return;
}
case DeclAttrKind::NonSendable: {
auto *theAttr = cast<NonSendableAttr>(DA);
auto abbrCode = S.DeclTypeAbbrCodes[NonSendableDeclAttrLayout::Code];