[TargetList] Delete the destructor
authorVedant Kumar <vsk@apple.com>
Fri, 6 Nov 2020 00:41:31 +0000 (16:41 -0800)
committerVedant Kumar <vsk@apple.com>
Fri, 6 Nov 2020 00:56:37 +0000 (16:56 -0800)
commit65d15fefe3392b1db2f679b3df029d43d8d26d2d
tree62d71fd9e027c02f4a5eb4cd8e8ca88d56c2d54f
parent4fcdfc4398bdf9295cd0259d6416a7dc1d2da47f
[TargetList] Delete the destructor

AFAICT, ~TargetList simply implements the default destructor, plus some
locking.

The history is murky, so I'm not sure why we do this locking. Perhaps,
at some point, it was possible to delete the same TargetList instance
from two different threads, setting up a race. If that were true, then
the locking would protect against the race.

Since TargetList is uniquely owned by Debugger (m_target_list), no such
race is possible today.

Testing: check-lldb

Differential Revision: https://reviews.llvm.org/D90895
lldb/include/lldb/Target/TargetList.h
lldb/source/Target/TargetList.cpp