aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2008-12-22 20:41:58 +0000
committerFariborz Jahanian <fjahanian@apple.com>2008-12-22 20:41:58 +0000
commit669e8d3c6a89c1ff45500d36dde7011b3cf7af7c (patch)
tree607aa55a24d131b05ff1f2933307b8b7c8e7b5a0 /lib/AST/DeclObjC.cpp
parent4b07b2968f87f3cd5a3d8c76145f1cbfd718d42d (diff)
Fixed a bug showed up the meta-data for protocol
instance methods by building print-class-info.m, whose output is now identical to what gcc puts out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61339 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r--lib/AST/DeclObjC.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index 6045fa20c1..a14e3ba068 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -468,7 +468,11 @@ addPropertyMethods(Decl *D,
property->getGetterName(),
property->getType(),
D,
- true, false, true, ObjCMethodDecl::Required);
+ true, false, true,
+ (property->getPropertyImplementation() ==
+ ObjCPropertyDecl::Optional) ?
+ ObjCMethodDecl::Optional :
+ ObjCMethodDecl::Required);
insMethods.push_back(GetterDecl);
InsMap[property->getGetterName()] = GetterDecl;
}
@@ -493,7 +497,11 @@ addPropertyMethods(Decl *D,
property->getSetterName(),
Context.VoidTy,
D,
- true, false, true, ObjCMethodDecl::Required);
+ true, false, true,
+ (property->getPropertyImplementation() ==
+ ObjCPropertyDecl::Optional) ?
+ ObjCMethodDecl::Optional :
+ ObjCMethodDecl::Required);
insMethods.push_back(SetterDecl);
InsMap[property->getSetterName()] = SetterDecl;
// Invent the arguments for the setter. We don't bother making a