From: Fariborz Jahanian Date: Mon, 22 Dec 2008 20:41:58 +0000 (+0000) Subject: Fixed a bug showed up the meta-data for protocol X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=669e8d3c6a89c1ff45500d36dde7011b3cf7af7c;p=clang 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 --- 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