[all-commits] [llvm/llvm-project] 7f4cb2: [lldb] Make the order in which ClusterManager call...

Raphael Isemann via All-commits all-commits at lists.llvm.org
Mon Feb 3 04:34:04 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7f4cb2e7b67afd177cf8f8939d4bf5dcff33f20b
      https://github.com/llvm/llvm-project/commit/7f4cb2e7b67afd177cf8f8939d4bf5dcff33f20b
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2020-02-03 (Mon, 03 Feb 2020)

  Changed paths:
    M lldb/include/lldb/Utility/SharedCluster.h

  Log Message:
  -----------
  [lldb] Make the order in which ClusterManager calls destructors deterministic

Summary:
ClusterManager is using a SmallPtrSet to store the objects in it. We always only add every object once so using a set is not necessary.
Furthermore having a set means that iterating over it is nondeterministic (at least with more than 16 objects in it), so the order in
which the destructors for the managed objects are called is currently also non-deterministic.

This just replaces the SmallPtrSet with a SmallVector.

Reviewers: labath, JDevlieghere

Reviewed By: labath

Subscribers: mgrang, abidh, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D73871




More information about the All-commits mailing list