[Lldb-commits] [lldb] [llvm] [lldb]Implement LLDB Telemetry (PR #98528)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 11 00:25:17 PDT 2024
================
@@ -754,6 +760,7 @@ class Debugger : public std::enable_shared_from_this<Debugger>,
uint32_t m_interrupt_requested = 0; ///< Tracks interrupt requests
std::mutex m_interrupt_mutex;
+ std::shared_ptr<LldbTelemeter> m_telemeter;
----------------
labath wrote:
Yes, please. If the pointer is non-null (I don't remember if you create a dummy object when telemetry is disabled, or if you keep this null), then also make this a reference.
shared_ptr is for sharing the *ownership* of an object. There's nothing wrong with handing out a non-owning reference/pointer to other code (if we can ensure that object is not destroyed in the mean time, which usually means that the other code should not persist that pointer anywhere).
https://github.com/llvm/llvm-project/pull/98528
More information about the lldb-commits
mailing list