[Lldb-commits] [PATCH] D99315: [lldb] Support lazily named classes in the Objective-C classes

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 25 15:33:18 PDT 2021


aprantl added inline comments.


================
Comment at: lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h:305
+  /// named classes.
+  class GetClassInfo {
+  public:
----------------
GetClassInfo is an odd name for a class. It sounds more like a function. I'm also not suggesting ClassInfoFactory :-p


================
Comment at: lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h:309
+
+    UtilityFunction *GetClassInfoUtilityFunction(ExecutionContext &exe_ctx,
+                                                 Helper helper);
----------------
Can this return a nullptr? If not, then this should return a reference.


================
Comment at: lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h:317
+    /// gdb_objc_realized_classes otherwise.
+    static Helper ComputeHelper(AppleObjCRuntimeV2 &runtime);
+
----------------
Why does this need to be public? I thought the idea of the helper class was to hide the actual implementation?


================
Comment at: lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h:331
+    /// Utility function to read class info using objc_copyRealizedClassList.
+    std::unique_ptr<UtilityFunction> m_get_class_info2_code;
+    lldb::addr_t m_get_class_info2_args = LLDB_INVALID_ADDRESS;
----------------
Any better naming ideas?


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

https://reviews.llvm.org/D99315



More information about the lldb-commits mailing list