Merge pull request #63075 from hborla/macro-attribute-serialization

[Serialization] Don't serialize macro custom attributes.
This commit is contained in:
Holly Borla
2023-01-17 21:23:24 -08:00
committed by GitHub
6 changed files with 77 additions and 7 deletions

View File

@@ -2855,6 +2855,11 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
case DAK_Custom: {
auto abbrCode = S.DeclTypeAbbrCodes[CustomDeclAttrLayout::Code];
auto theAttr = cast<CustomAttr>(DA);
// Macro attributes are not serialized.
if (theAttr->isAttachedMacro(D))
return;
auto typeID = S.addTypeRef(theAttr->getType());
if (!typeID && !S.allowCompilerErrors()) {
llvm::PrettyStackTraceString message("CustomAttr has no type");