forked from OSchip/llvm-project
Fix logging in Listener.cpp
Clear() log message was claiming it was the destructor, which had me very confused when looking at the log messages. Fix the message, and add a log message to the real destructor. Also noticed that the destructor was needlessly locking the broadcaster mutex (as Clear was locking it again anyway), so remove that as well. llvm-svn: 269058
This commit is contained in:
parent
d86bc2af27
commit
7189b0fdb2
|
@ -56,9 +56,12 @@ Listener::Listener(const char *name) :
|
|||
|
||||
Listener::~Listener()
|
||||
{
|
||||
Mutex::Locker locker (m_broadcasters_mutex);
|
||||
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
|
||||
|
||||
Clear();
|
||||
|
||||
if (log)
|
||||
log->Printf("%p Listener::%s('%s')", this, __FUNCTION__, m_name.c_str());
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -87,9 +90,8 @@ Listener::Clear()
|
|||
manager_sp->RemoveListener(this);
|
||||
}
|
||||
|
||||
if (log != nullptr)
|
||||
log->Printf ("%p Listener::~Listener('%s')",
|
||||
static_cast<void*>(this), m_name.c_str());
|
||||
if (log)
|
||||
log->Printf("%p Listener::%s('%s')", this, __FUNCTION__, m_name.c_str());
|
||||
}
|
||||
|
||||
uint32_t
|
||||
|
|
Loading…
Reference in New Issue