forked from OSchip/llvm-project
[lldb] Remove logging from Platform::~Platform
Platform instances are stored in a function-local static list. However, the logging code involves locking a function-local static mutex. This only works on some implementations where the Log mutex is by accident destroyed *after* the Platform list is destroyed. This fixes randomly failing tests due to `recursive_mutex lock failed: Invalid argument`. Reviewed By: kastiglione Differential Revision: https://reviews.llvm.org/D111816
This commit is contained in:
parent
59dd418e89
commit
e632e900ac
|
@ -73,11 +73,9 @@ public:
|
|||
/// Default Constructor
|
||||
Platform(bool is_host_platform);
|
||||
|
||||
/// Destructor.
|
||||
///
|
||||
/// The destructor is virtual since this class is designed to be inherited
|
||||
/// from by the plug-in instance.
|
||||
~Platform() override;
|
||||
~Platform() override = default;
|
||||
|
||||
static void Initialize();
|
||||
|
||||
|
|
|
@ -395,15 +395,6 @@ Platform::Platform(bool is_host)
|
|||
LLDB_LOGF(log, "%p Platform::Platform()", static_cast<void *>(this));
|
||||
}
|
||||
|
||||
/// Destructor.
|
||||
///
|
||||
/// The destructor is virtual since this class is designed to be
|
||||
/// inherited from by the plug-in instance.
|
||||
Platform::~Platform() {
|
||||
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
|
||||
LLDB_LOGF(log, "%p Platform::~Platform()", static_cast<void *>(this));
|
||||
}
|
||||
|
||||
void Platform::GetStatus(Stream &strm) {
|
||||
std::string s;
|
||||
strm.Printf(" Platform: %s\n", GetPluginName().GetCString());
|
||||
|
|
Loading…
Reference in New Issue