sunbohong created this revision. Herald added subscribers: cfe-commits, yaxunl. Herald added a project: clang. sunbohong requested review of this revision.
...metadata in RewriteModernObjC.cpp. This commit will fix https://bugs.llvm.org/show_bug.cgi?id=47330 . Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D86763 Files: clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp Index: clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp =================================================================== --- clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp +++ clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp @@ -7024,27 +7024,6 @@ // Build _objc_method_list for class's instance methods if needed SmallVector<ObjCMethodDecl *, 32> InstanceMethods(IDecl->instance_methods()); - - // If any of our property implementations have associated getters or - // setters, produce metadata for them as well. - for (const auto *Prop : IDecl->property_impls()) { - if (Prop->getPropertyImplementation() == ObjCPropertyImplDecl::Dynamic) - continue; - if (!Prop->getPropertyIvarDecl()) - continue; - ObjCPropertyDecl *PD = Prop->getPropertyDecl(); - if (!PD) - continue; - if (ObjCMethodDecl *Getter = Prop->getGetterMethodDecl()) - if (mustSynthesizeSetterGetterMethod(IDecl, PD, true /*getter*/)) - InstanceMethods.push_back(Getter); - if (PD->isReadOnly()) - continue; - if (ObjCMethodDecl *Setter = Prop->getSetterMethodDecl()) - if (mustSynthesizeSetterGetterMethod(IDecl, PD, false /*setter*/)) - InstanceMethods.push_back(Setter); - } - Write_method_list_t_initializer(*this, Context, Result, InstanceMethods, "_OBJC_$_INSTANCE_METHODS_", IDecl->getNameAsString(), true);
Index: clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp =================================================================== --- clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp +++ clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp @@ -7024,27 +7024,6 @@ // Build _objc_method_list for class's instance methods if needed SmallVector<ObjCMethodDecl *, 32> InstanceMethods(IDecl->instance_methods()); - - // If any of our property implementations have associated getters or - // setters, produce metadata for them as well. - for (const auto *Prop : IDecl->property_impls()) { - if (Prop->getPropertyImplementation() == ObjCPropertyImplDecl::Dynamic) - continue; - if (!Prop->getPropertyIvarDecl()) - continue; - ObjCPropertyDecl *PD = Prop->getPropertyDecl(); - if (!PD) - continue; - if (ObjCMethodDecl *Getter = Prop->getGetterMethodDecl()) - if (mustSynthesizeSetterGetterMethod(IDecl, PD, true /*getter*/)) - InstanceMethods.push_back(Getter); - if (PD->isReadOnly()) - continue; - if (ObjCMethodDecl *Setter = Prop->getSetterMethodDecl()) - if (mustSynthesizeSetterGetterMethod(IDecl, PD, false /*setter*/)) - InstanceMethods.push_back(Setter); - } - Write_method_list_t_initializer(*this, Context, Result, InstanceMethods, "_OBJC_$_INSTANCE_METHODS_", IDecl->getNameAsString(), true);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits