Add basic Sema support for @_objcImplementation

Does not validate members yet; nor does it emit different metadata.
This commit is contained in:
Becca Royal-Gordon
2022-10-18 17:21:56 -07:00
parent 4682743ef7
commit f2a0ab79c7
17 changed files with 454 additions and 2 deletions

View File

@@ -2681,6 +2681,17 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
return;
}
case DAK_ObjCImplementation: {
auto *theAttr = cast<ObjCImplementationAttr>(DA);
auto categoryNameID = S.addDeclBaseNameRef(theAttr->CategoryName);
auto abbrCode =
S.DeclTypeAbbrCodes[ObjCImplementationDeclAttrLayout::Code];
ObjCImplementationDeclAttrLayout::emitRecord(S.Out, S.ScratchRecord,
abbrCode, theAttr->isImplicit(), theAttr->isCategoryNameInvalid(),
categoryNameID);
return;
}
case DAK_MainType: {
auto abbrCode = S.DeclTypeAbbrCodes[MainTypeDeclAttrLayout::Code];
MainTypeDeclAttrLayout::emitRecord(S.Out, S.ScratchRecord, abbrCode,