[lldb] Remove logging from Platform::~Platform
authorRaphael Isemann <teemperor@gmail.com>
Thu, 14 Oct 2021 18:41:58 +0000 (20:41 +0200)
committerRaphael Isemann <teemperor@gmail.com>
Thu, 14 Oct 2021 18:42:45 +0000 (20:42 +0200)
commite632e900ac1092f581b42fb93662613db9977b5a
treeb1b2bf10a266dbfd62958031afceba5ff0dd7194
parent59dd418e8941434a65fbace26dcd405a88b3775c
[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
lldb/include/lldb/Target/Platform.h
lldb/source/Target/Platform.cpp