[NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.
This is a code clean up of the PropertyAttributeKind and
ObjCPropertyAttributeKind enums in ObjCPropertyDecl and ObjCDeclSpec that are
exactly identical. This non-functional change consolidates these enums
into one. The changes are to many files across clang (and comments in LLVM) so
that everything refers to the new consolidated enum in DeclObjCCommon.h.
2nd Landing Attempt...
Differential Revision: https://reviews.llvm.org/D77233
diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp
index 3dbb3be..bb9c494 100644
--- a/clang/lib/CodeGen/CGObjCGNU.cpp
+++ b/clang/lib/CodeGen/CGObjCGNU.cpp
@@ -255,11 +255,11 @@
isDynamic=true) {
int attrs = property->getPropertyAttributes();
// For read-only properties, clear the copy and retain flags
- if (attrs & ObjCPropertyDecl::OBJC_PR_readonly) {
- attrs &= ~ObjCPropertyDecl::OBJC_PR_copy;
- attrs &= ~ObjCPropertyDecl::OBJC_PR_retain;
- attrs &= ~ObjCPropertyDecl::OBJC_PR_weak;
- attrs &= ~ObjCPropertyDecl::OBJC_PR_strong;
+ if (attrs & ObjCPropertyAttribute::kind_readonly) {
+ attrs &= ~ObjCPropertyAttribute::kind_copy;
+ attrs &= ~ObjCPropertyAttribute::kind_retain;
+ attrs &= ~ObjCPropertyAttribute::kind_weak;
+ attrs &= ~ObjCPropertyAttribute::kind_strong;
}
// The first flags field has the same attribute values as clang uses internally
Fields.addInt(Int8Ty, attrs & 0xff);