[all-commits] [llvm/llvm-project] 65d15f: [TargetList] Delete the destructor

Vedant Kumar via All-commits all-commits at lists.llvm.org
Thu Nov 5 16:57:02 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 65d15fefe3392b1db2f679b3df029d43d8d26d2d
      https://github.com/llvm/llvm-project/commit/65d15fefe3392b1db2f679b3df029d43d8d26d2d
  Author: Vedant Kumar <vsk at apple.com>
  Date:   2020-11-05 (Thu, 05 Nov 2020)

  Changed paths:
    M lldb/include/lldb/Target/TargetList.h
    M lldb/source/Target/TargetList.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list