After further discussion, rename attribute 'objc_disable_automatic_synthesis' to 'objc_requires_property_definitions'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147622 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/AttributeList.cpp b/lib/Sema/AttributeList.cpp
index 6892ce2..c184676 100644
--- a/lib/Sema/AttributeList.cpp
+++ b/lib/Sema/AttributeList.cpp
@@ -108,7 +108,7 @@
.Case("weak", AT_weak)
.Case("weakref", AT_weakref)
.Case("objc_arc_weak_reference_unavailable", AT_arc_weakref_unavailable)
- .Case("objc_disable_automatic_synthesis", AT_objc_disable_automatic_synthesis)
+ .Case("objc_requires_property_definitions", AT_objc_requires_property_definitions)
.Case("pure", AT_pure)
.Case("mode", AT_mode)
.Case("used", AT_used)
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index 8431076..0b8e9fa 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -1579,7 +1579,7 @@
Attr.getRange(), S.Context));
}
-static void handleObjCSuppressAutosynthesisAttr(Sema &S, Decl *D,
+static void handleObjCRequiresPropertyDefsAttr(Sema &S, Decl *D,
const AttributeList &Attr) {
if (!isa<ObjCInterfaceDecl>(D)) {
S.Diag(Attr.getLoc(), diag::err_suppress_autosynthesis);
@@ -1592,7 +1592,7 @@
return;
}
- D->addAttr(::new (S.Context) ObjCSuppressAutosynthesisAttr(
+ D->addAttr(::new (S.Context) ObjCRequiresPropertyDefsAttr(
Attr.getRange(), S.Context));
}
@@ -3620,8 +3620,8 @@
case AttributeList::AT_arc_weakref_unavailable:
handleArcWeakrefUnavailableAttr (S, D, Attr);
break;
- case AttributeList::AT_objc_disable_automatic_synthesis:
- handleObjCSuppressAutosynthesisAttr (S, D, Attr);
+ case AttributeList::AT_objc_requires_property_definitions:
+ handleObjCRequiresPropertyDefsAttr (S, D, Attr);
break;
case AttributeList::AT_unused: handleUnusedAttr (S, D, Attr); break;
case AttributeList::AT_returns_twice:
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index ad230b4..6a55de0 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -1667,7 +1667,7 @@
// of the property in the @implementation.
if (const ObjCInterfaceDecl *IDecl = dyn_cast<ObjCInterfaceDecl>(CDecl))
if (!(LangOpts.ObjCDefaultSynthProperties && LangOpts.ObjCNonFragileABI2) ||
- IDecl->isObjCSuppressAutosynthesis())
+ IDecl->isObjCRequiresPropertyDefs())
DiagnoseUnimplementedProperties(S, IMPDecl, CDecl, InsMap);
llvm::DenseSet<Selector> ClsMap;
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp
index 45c4775..6379c92 100644
--- a/lib/Sema/SemaObjCProperty.cpp
+++ b/lib/Sema/SemaObjCProperty.cpp
@@ -857,7 +857,7 @@
IC->addPropertyImplementation(PIDecl);
if (getLangOptions().ObjCDefaultSynthProperties &&
getLangOptions().ObjCNonFragileABI2 &&
- !IDecl->isObjCSuppressAutosynthesis()) {
+ !IDecl->isObjCRequiresPropertyDefs()) {
// Diagnose if an ivar was lazily synthesdized due to a previous
// use and if 1) property is @dynamic or 2) property is synthesized
// but it requires an ivar of different name.
@@ -1356,7 +1356,7 @@
if (!IC)
return;
if (ObjCInterfaceDecl* IDecl = IC->getClassInterface())
- if (!IDecl->isObjCSuppressAutosynthesis())
+ if (!IDecl->isObjCRequiresPropertyDefs())
DefaultSynthesizeProperties(S, IC, IDecl);
}
@@ -1396,7 +1396,7 @@
diag::note_property_declare);
if (LangOpts.ObjCDefaultSynthProperties && LangOpts.ObjCNonFragileABI2)
if (ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(CDecl))
- if (const ObjCInterfaceDecl *RID = ID->isObjCSuppressAutosynthesis())
+ if (const ObjCInterfaceDecl *RID = ID->isObjCRequiresPropertyDefs())
Diag(RID->getLocation(), diag::note_suppressed_class_declare);
}
@@ -1411,7 +1411,7 @@
diag::note_property_declare);
if (LangOpts.ObjCDefaultSynthProperties && LangOpts.ObjCNonFragileABI2)
if (ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(CDecl))
- if (const ObjCInterfaceDecl *RID = ID->isObjCSuppressAutosynthesis())
+ if (const ObjCInterfaceDecl *RID = ID->isObjCRequiresPropertyDefs())
Diag(RID->getLocation(), diag::note_suppressed_class_declare);
}
}