This is an archive of the discontinued LLVM Phabricator instance.

[TargetList] Delete the destructor
ClosedPublic

Authored by vsk on Nov 5 2020, 4:49 PM.

Details

Summary

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

Diff Detail

Event Timeline

vsk created this revision.Nov 5 2020, 4:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 5 2020, 4:49 PM
vsk requested review of this revision.Nov 5 2020, 4:49 PM
This revision is now accepted and ready to land.Nov 5 2020, 4:55 PM
This revision was landed with ongoing or failed builds.Nov 5 2020, 4:56 PM
This revision was automatically updated to reflect the committed changes.