[Lldb-commits] [lldb] [lldb] Remove Listener::SetShadow (PR #97555)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 3 10:19:53 PDT 2024


================
@@ -18,13 +18,10 @@
 using namespace lldb;
 using namespace lldb_private;
 
-Listener::Listener(const char *name)
-    : m_name(name), m_broadcasters(), m_broadcasters_mutex(), m_events(),
-      m_events_mutex(), m_is_shadow() {
+Listener::Listener(const char *name) : m_name(name) {
   Log *log = GetLog(LLDBLog::Object);
-  if (log != nullptr)
-    LLDB_LOGF(log, "%p Listener::Listener('%s')", static_cast<void *>(this),
-              m_name.c_str());
+  LLDB_LOGF(log, "%p Listener::Listener('%s')", static_cast<void *>(this),
+            m_name.c_str());
----------------
JDevlieghere wrote:

Nit: why not get rid of `log` altogether: 

```
LLDB_LOGF(GetLog(LLDBLog::Object), "%p Listener::Listener('%s')", static_cast<void *>(this),
             m_name.c_str());
```

https://github.com/llvm/llvm-project/pull/97555


More information about the lldb-commits mailing list