@@ -114,7 +114,9 @@ SDKNodeDecl::SDKNodeDecl(SDKNodeInitInfo Info, SDKNodeKind Kind)
114114 : SDKNode(Info, Kind), DKind(Info.DKind), Usr(Info.Usr),
115115 MangledName(Info.MangledName), Loc(Info.Loc),
116116 Location(Info.Location), ModuleName(Info.ModuleName),
117- DeclAttributes(Info.DeclAttrs), IsImplicit(Info.IsImplicit),
117+ DeclAttributes(Info.DeclAttrs),
118+ SPIGroups(Info.SPIGroups),
119+ IsImplicit(Info.IsImplicit),
118120 IsStatic(Info.IsStatic), IsDeprecated(Info.IsDeprecated),
119121 IsProtocolReq(Info.IsProtocolReq),
120122 IsOverriding(Info.IsOverriding),
@@ -1436,7 +1438,12 @@ SDKNodeInitInfo::SDKNodeInitInfo(SDKContext &Ctx, Decl *D):
14361438 IsDeprecated(D->getAttrs ().getDeprecated(D->getASTContext ())),
14371439 IsABIPlaceholder(isABIPlaceholderRecursive(D)),
14381440 IsFromExtension(isDeclaredInExtension(D)),
1439- DeclAttrs(collectDeclAttributes(D)) {}
1441+ DeclAttrs(collectDeclAttributes(D)) {
1442+ // Keep track of SPI group names
1443+ for (auto id: D->getSPIGroups ()) {
1444+ SPIGroups.push_back (id.str ());
1445+ }
1446+ }
14401447
14411448SDKNodeInitInfo::SDKNodeInitInfo (SDKContext &Ctx, OperatorDecl *OD):
14421449 SDKNodeInitInfo(Ctx, cast<Decl>(OD)) {
@@ -2083,6 +2090,7 @@ void SDKNodeDecl::jsonize(json::Output &out) {
20832090 out.mapRequired (getKeyContent (Ctx, KeyKind::KK_ownership).data (), Raw);
20842091 }
20852092 output (out, KeyKind::KK_isFromExtension, IsFromExtension);
2093+ out.mapOptional (getKeyContent (Ctx, KeyKind::KK_spi_group_names).data (), SPIGroups);
20862094}
20872095
20882096void SDKNodeDeclAbstractFunc::jsonize (json::Output &out) {
0 commit comments