summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclObjC.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-08-26 07:16:44 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-08-26 07:16:44 +0000
commit5e558bcf260404de0b4e0b73c09dd0b1bf0d38e7 (patch)
tree0760cd954fa2453e9d9a8ced8be74298443f0152 /clang/lib/AST/DeclObjC.cpp
parent491a930ea31d47f20416914d44f5055556cb2ef9 (diff)
downloadbcm5719-llvm-5e558bcf260404de0b4e0b73c09dd0b1bf0d38e7.tar.gz
bcm5719-llvm-5e558bcf260404de0b4e0b73c09dd0b1bf0d38e7.zip
Add ObjCPropertyDecl::isReadOnly.
Respect isReadOnly when generating synthesized method decls. llvm-svn: 55364
Diffstat (limited to 'clang/lib/AST/DeclObjC.cpp')
-rw-r--r--clang/lib/AST/DeclObjC.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp
index 2e038024363..e74e21dbbca 100644
--- a/clang/lib/AST/DeclObjC.cpp
+++ b/clang/lib/AST/DeclObjC.cpp
@@ -433,6 +433,10 @@ void ObjCInterfaceDecl::addPropertyMethods(
}
property->setGetterMethodDecl(GetterDecl);
+ // Skip setter if property is read-only.
+ if (property->isReadOnly())
+ return;
+
// Find the default setter and if one not found, add one.
ObjCMethodDecl *SetterDecl = getInstanceMethod(property->getSetterName());
if (!SetterDecl) {
OpenPOWER on IntegriCloud