diff options
-rw-r--r-- | Driver/ASTConsumers.cpp | 3 | ||||
-rw-r--r-- | include/clang/AST/DeclObjC.h | 24 | ||||
-rw-r--r-- | lib/AST/DeclObjC.cpp | 4 | ||||
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 6 |
4 files changed, 18 insertions, 19 deletions
diff --git a/Driver/ASTConsumers.cpp b/Driver/ASTConsumers.cpp index 97c0b7f60e..ec809ab69b 100644 --- a/Driver/ASTConsumers.cpp +++ b/Driver/ASTConsumers.cpp @@ -407,8 +407,7 @@ void DeclPrinter::PrintObjCPropertyDecl(ObjCPropertyDecl *PDecl) { /// declaration syntax. /// void DeclPrinter::PrintObjCPropertyImplDecl(ObjCPropertyImplDecl *PID) { - if (PID->getPropertyImplementation() == - ObjCPropertyImplDecl::OBJC_PR_IMPL_SYNTHSIZE) + if (PID->getPropertyImplementation() == ObjCPropertyImplDecl::Synthesize) Out << "\n@synthesize "; else Out << "\n@dynamic "; diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index 7dc874b5c6..7d16b54f63 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -1230,9 +1230,9 @@ public: /// class ObjCPropertyImplDecl : public Decl { public: - enum PropertyImplKind { - OBJC_PR_IMPL_SYNTHSIZE, - OBJC_PR_IMPL_DYNAMIC + enum Kind { + Synthesize, + Dynamic }; private: SourceLocation AtLoc; // location of @synthesize or @dynamic @@ -1242,28 +1242,28 @@ private: /// Null for @dynamic. Required for @synthesize. ObjCIvarDecl *PropertyIvarDecl; -public: ObjCPropertyImplDecl(SourceLocation atLoc, SourceLocation L, ObjCPropertyDecl *property, - PropertyImplKind propertyKind, + Kind PK, ObjCIvarDecl *ivarDecl) - : Decl(ObjCPropertyImpl, L), AtLoc(atLoc), PropertyDecl(property), - PropertyIvarDecl(ivarDecl) { - assert (propertyKind == OBJC_PR_IMPL_DYNAMIC || PropertyIvarDecl); - } + : Decl(ObjCPropertyImpl, L), AtLoc(atLoc), PropertyDecl(property), + PropertyIvarDecl(ivarDecl) { + assert (PK == Dynamic || PropertyIvarDecl); + } +public: static ObjCPropertyImplDecl *Create(ASTContext &C, SourceLocation atLoc, SourceLocation L, ObjCPropertyDecl *property, - PropertyImplKind propertyKind, + Kind PK, ObjCIvarDecl *ivarDecl); ObjCPropertyDecl *getPropertyDecl() const { return PropertyDecl; } - PropertyImplKind getPropertyImplementation() const { - return PropertyDecl ? OBJC_PR_IMPL_SYNTHSIZE : OBJC_PR_IMPL_DYNAMIC; + Kind getPropertyImplementation() const { + return PropertyIvarDecl ? Synthesize : Dynamic; } ObjCIvarDecl *getPropertyIvarDecl() { diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index 857224f2b8..a7805f376c 100644 --- a/lib/AST/DeclObjC.cpp +++ b/lib/AST/DeclObjC.cpp @@ -705,10 +705,10 @@ ObjCPropertyImplDecl *ObjCPropertyImplDecl::Create(ASTContext &C, SourceLocation atLoc, SourceLocation L, ObjCPropertyDecl *property, - PropertyImplKind kind, + Kind PK, ObjCIvarDecl *ivar) { void *Mem = C.getAllocator().Allocate<ObjCPropertyImplDecl>(); - return new (Mem) ObjCPropertyImplDecl(atLoc, L, property, kind, ivar); + return new (Mem) ObjCPropertyImplDecl(atLoc, L, property, PK, ivar); } diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 872156ee25..b02df056c8 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -1172,9 +1172,9 @@ Sema::DeclTy *Sema::ActOnPropertyImplDecl(SourceLocation AtLoc, ObjCPropertyImplDecl *PIDecl = ObjCPropertyImplDecl::Create(Context, AtLoc, PropertyLoc, property, (Synthesize ? - ObjCPropertyImplDecl::OBJC_PR_IMPL_SYNTHSIZE - : ObjCPropertyImplDecl::OBJC_PR_IMPL_DYNAMIC), - Ivar); + ObjCPropertyImplDecl::Synthesize + : ObjCPropertyImplDecl::Dynamic), + Ivar); if (IC) IC->addPropertyImplementation(PIDecl); else |