[PATCH] D86763: RedeclarePropertyAccessor (clang/lib/Sema/SemaObjCProperty.cpp shipped with https://reviews.llvm.org/rG2073dd2da702baca447efaf1879cb6151e8c6100) create a synthesized property accessor stub inside the @implementation, so we don't need produce...
酷酷的哀殿 via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 27 22:52:51 PDT 2020
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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86763.288532.patch
Type: text/x-patch
Size: 1437 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200828/3dc34b8d/attachment.bin>
More information about the cfe-commits
mailing list