diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-12-20 19:22:21 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-12-20 19:22:21 +0000 |
commit | ad017fa7a4df7389d245d02a49b3c79ed70bedb9 (patch) | |
tree | bcbd290037266bae92bfb10705c40e830ea71a07 /lib/Rewrite/Frontend/RewriteObjC.cpp | |
parent | a367a0236211dd2c81a363c4b47b40e0ac6a8797 (diff) |
Revert r170500. It over-zealously converted *ALL* things named Attributes, which is wrong here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170721 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite/Frontend/RewriteObjC.cpp')
-rw-r--r-- | lib/Rewrite/Frontend/RewriteObjC.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Rewrite/Frontend/RewriteObjC.cpp b/lib/Rewrite/Frontend/RewriteObjC.cpp index 3e5f6cc55b..abde3513e7 100644 --- a/lib/Rewrite/Frontend/RewriteObjC.cpp +++ b/lib/Rewrite/Frontend/RewriteObjC.cpp @@ -788,10 +788,10 @@ void RewriteObjC::RewritePropertyImplDecl(ObjCPropertyImplDecl *PID, if (!OID) return; - unsigned Attribute = PD->getPropertyAttributes(); + unsigned Attributes = PD->getPropertyAttributes(); if (!PD->getGetterMethodDecl()->isDefined()) { - bool GenGetProperty = !(Attribute & ObjCPropertyDecl::OBJC_PR_nonatomic) && - (Attribute & (ObjCPropertyDecl::OBJC_PR_retain | + bool GenGetProperty = !(Attributes & ObjCPropertyDecl::OBJC_PR_nonatomic) && + (Attributes & (ObjCPropertyDecl::OBJC_PR_retain | ObjCPropertyDecl::OBJC_PR_copy)); std::string Getr; if (GenGetProperty && !objcGetPropertyDefined) { @@ -849,7 +849,7 @@ void RewriteObjC::RewritePropertyImplDecl(ObjCPropertyImplDecl *PID, // Generate the 'setter' function. std::string Setr; - bool GenSetProperty = Attribute & (ObjCPropertyDecl::OBJC_PR_retain | + bool GenSetProperty = Attributes & (ObjCPropertyDecl::OBJC_PR_retain | ObjCPropertyDecl::OBJC_PR_copy); if (GenSetProperty && !objcSetPropertyDefined) { objcSetPropertyDefined = true; @@ -869,11 +869,11 @@ void RewriteObjC::RewritePropertyImplDecl(ObjCPropertyImplDecl *PID, Setr += ", (id)"; Setr += PD->getName(); Setr += ", "; - if (Attribute & ObjCPropertyDecl::OBJC_PR_nonatomic) + if (Attributes & ObjCPropertyDecl::OBJC_PR_nonatomic) Setr += "0, "; else Setr += "1, "; - if (Attribute & ObjCPropertyDecl::OBJC_PR_copy) + if (Attributes & ObjCPropertyDecl::OBJC_PR_copy) Setr += "1)"; else Setr += "0)"; |