[Lldb-commits] [PATCH] D78333: Add Objective-C property accessors loaded from Clang module DWARF to lookup

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 20 10:48:21 PDT 2020


aprantl added a comment.

> I'm not sure I understand why are we not adding the property to the lookup ptr? I would assume we would call addDecl to it which should make it visible and I don't see any ObjCPropertyDecl (?) check in that code?

Thanks! This sounds like exactly the kind of feedback I was hoping for, just to be sure, could you please clarify what you mean specifically? The problem is that the ObjCMethodDecl for the getter that comes from the `@synthesize` declaration is missing in the LookupPtr and therefore this check:

  clang::ObjCMethodDecl *getter = nullptr;
  if (!getter_sel.isNull())
    getter = isInstance ? class_interface_decl->lookupInstanceMethod(getter_sel)
                        : class_interface_decl->lookupClassMethod(getter_sel);

fails and so `TypeSystemClang::AddObjCClassProperty()` synthesizes a second getter. Where are you suggesting to add the ObjCPropertyDecl to the lookup ptr and how would that help?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78333/new/

https://reviews.llvm.org/D78333





More information about the lldb-commits mailing list