aboutsummaryrefslogtreecommitdiff
path: root/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
commit394d33f1f602f7681032a659dff5bb09061ee510 (patch)
tree18bcaef857fc9f869d324575b533a71c4c53e87c /lib/AST/DeclObjC.cpp
parent3216dcdebb8ae0f2993ac5f5249caa217444bacf (diff)
Add ObjCPropertyDecl::isReadOnly.
Respect isReadOnly when generating synthesized method decls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55364 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r--lib/AST/DeclObjC.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index 2e03802436..e74e21dbbc 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/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) {