summaryrefslogtreecommitdiffstats
path: root/clang/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
commit3fc3dcd80f34cc6750be06fa546c08df0d03652c (patch)
treebf7de9ddbbecc24b40d6b58580cfe94ce7225a7e /clang/lib/ARCMigrate/TransGCAttrs.cpp
parent1424b308c3c82acce5e23a1bcd0efbfa6dbd0349 (diff)
downloadbcm5719-llvm-3fc3dcd80f34cc6750be06fa546c08df0d03652c.tar.gz
bcm5719-llvm-3fc3dcd80f34cc6750be06fa546c08df0d03652c.zip
[arcmt] Don't add __weak if there is already a GC __weak and make sure to clear
__weak from a readonly property. llvm-svn: 145210
Diffstat (limited to 'clang/lib/ARCMigrate/TransGCAttrs.cpp')
-rw-r--r--clang/lib/ARCMigrate/TransGCAttrs.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/ARCMigrate/TransGCAttrs.cpp b/clang/lib/ARCMigrate/TransGCAttrs.cpp
index dc223750483..607e5a0f3d9 100644
--- a/clang/lib/ARCMigrate/TransGCAttrs.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud