[Lldb-commits] [PATCH] D67589: Fix crash on SBCommandReturnObject & assignment

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 17 08:51:49 PDT 2019


clayborg added inline comments.


================
Comment at: lldb/include/lldb/API/SBCommandReturnObject.h:22-27
+namespace lldb_private {
+// Wrap SBCommandReturnObject::ref() so that any LLDB internal function can
+// call it but still no SB API users can call it.
+CommandReturnObject &
+SBCommandReturnObject_ref(lldb::SBCommandReturnObject &sb_cmd);
+} // namespace lldb_private
----------------
Easier to just make SBCommandReturnObject::ref() protected and friend any users or just make it public?


================
Comment at: lldb/include/lldb/API/SBCommandReturnObject.h:99-100
   friend class SBOptions;
+  friend lldb_private::CommandReturnObject &
+  lldb_private::SBCommandReturnObject_ref(SBCommandReturnObject &sb_cmd);
 
----------------
Remove if we make SBCommandReturnObject::ref() protected and friend any users or just make it public?


================
Comment at: lldb/include/lldb/API/SBCommandReturnObject.h:108
 
   lldb_private::CommandReturnObject &ref() const;
 
----------------
Easier to just make SBCommandReturnObject::ref() protected and friend any users or just make it public?


================
Comment at: lldb/source/API/SBCommandReturnObject.cpp:21-24
+lldb_private::CommandReturnObject &
+lldb_private::SBCommandReturnObject_ref(SBCommandReturnObject &sb_cmd) {
+  return sb_cmd.ref();
+}
----------------
Easier to just make SBCommandReturnObject::ref() protected and friend any users or just make it public?


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D67589





More information about the lldb-commits mailing list