aboutsummaryrefslogtreecommitdiff
path: root/lib/ARCMigrate/TransGCAttrs.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-11-28 00:23:12 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-11-28 00:23:12 +0000
commit6d7d16d45c1d601483e46a77bd2fa1d199219721 (patch)
treed95a8e77fac2d31785d7ceb9cb1957767aa5a384 /lib/ARCMigrate/TransGCAttrs.cpp
parent3fb91f6abd15b117dbd2c930f626fa87fe7a3b10 (diff)
[arcmt] Don't add __weak if there is already a GC __weak and make sure to clear
__weak from a readonly property. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145210 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ARCMigrate/TransGCAttrs.cpp')
-rw-r--r--lib/ARCMigrate/TransGCAttrs.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ARCMigrate/TransGCAttrs.cpp b/lib/ARCMigrate/TransGCAttrs.cpp
index dc22375048..607e5a0f3d 100644
--- a/lib/ARCMigrate/TransGCAttrs.cpp
+++ b/lib/ARCMigrate/TransGCAttrs.cpp
@@ -326,7 +326,8 @@ static void checkAllProps(MigrationContext &MigrateCtx,
for (unsigned i = 0, e = AllProps.size(); i != e; ++i) {
ObjCPropertyDecl *PD = AllProps[i];
if (PD->getPropertyAttributesAsWritten() &
- ObjCPropertyDecl::OBJC_PR_assign) {
+ (ObjCPropertyDecl::OBJC_PR_assign |
+ ObjCPropertyDecl::OBJC_PR_readonly)) {
SourceLocation AtLoc = PD->getAtLoc();
if (AtLoc.isInvalid())
continue;