labath updated this revision to Diff 242974.
labath added a comment.

Remove the leftover mutex unlock in the ClusterManager destructor. Doing any
operation on the object while it is being destroyed is not safe, and the mutex
will not help there.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74153/new/

https://reviews.llvm.org/D74153

Files:
  lldb/cmake/modules/LLDBFramework.cmake
  lldb/include/lldb/Core/ValueObject.h
  lldb/include/lldb/Core/ValueObjectConstResult.h
  lldb/include/lldb/Core/ValueObjectDynamicValue.h
  lldb/include/lldb/Core/ValueObjectMemory.h
  lldb/include/lldb/Core/ValueObjectRegister.h
  lldb/include/lldb/Core/ValueObjectVariable.h
  lldb/include/lldb/Utility/SharedCluster.h
  lldb/include/lldb/Utility/SharingPtr.h
  lldb/include/lldb/lldb-forward.h
  lldb/source/Core/FormatEntity.cpp
  lldb/source/Core/ValueObject.cpp
  lldb/source/Core/ValueObjectConstResult.cpp
  lldb/source/Core/ValueObjectConstResultImpl.cpp
  lldb/source/Core/ValueObjectList.cpp
  lldb/source/Core/ValueObjectMemory.cpp
  lldb/source/Core/ValueObjectRegister.cpp
  lldb/source/Core/ValueObjectSyntheticFilter.cpp
  lldb/source/Core/ValueObjectVariable.cpp
  lldb/source/Expression/IRInterpreter.cpp
  lldb/source/Utility/CMakeLists.txt
  lldb/source/Utility/SharingPtr.cpp
  lldb/unittests/Utility/SharedClusterTest.cpp

Index: lldb/unittests/Utility/SharedClusterTest.cpp
===================================================================
--- lldb/unittests/Utility/SharedClusterTest.cpp
+++ lldb/unittests/Utility/SharedClusterTest.cpp
@@ -25,30 +25,33 @@
 
 TEST(SharedCluster, ClusterManager) {
   std::vector<int> Queue;
-  auto *CM = new ClusterManager<DestructNotifier>();
-  auto *One = new DestructNotifier(Queue, 1);
-  auto *Two = new DestructNotifier(Queue, 2);
-  CM->ManageObject(One);
-  CM->ManageObject(Two);
-
-  ASSERT_THAT(Queue, testing::IsEmpty());
   {
-    SharingPtr<DestructNotifier> OnePtr = CM->GetSharedPointer(One);
-    ASSERT_EQ(OnePtr->Key, 1);
-    ASSERT_THAT(Queue, testing::IsEmpty());
+    auto CM = ClusterManager<DestructNotifier>::Create();
+    auto *One = new DestructNotifier(Queue, 1);
+    auto *Two = new DestructNotifier(Queue, 2);
+    CM->ManageObject(One);
+    CM->ManageObject(Two);
 
+    ASSERT_THAT(Queue, testing::IsEmpty());
     {
-      SharingPtr<DestructNotifier> OnePtrCopy = OnePtr;
-      ASSERT_EQ(OnePtrCopy->Key, 1);
+      std::shared_ptr<DestructNotifier> OnePtr = CM->GetSharedPointer(One);
+      ASSERT_EQ(OnePtr->Key, 1);
       ASSERT_THAT(Queue, testing::IsEmpty());
-    }
 
-    {
-      SharingPtr<DestructNotifier> TwoPtr = CM->GetSharedPointer(Two);
-      ASSERT_EQ(TwoPtr->Key, 2);
+      {
+        std::shared_ptr<DestructNotifier> OnePtrCopy = OnePtr;
+        ASSERT_EQ(OnePtrCopy->Key, 1);
+        ASSERT_THAT(Queue, testing::IsEmpty());
+      }
+
+      {
+        std::shared_ptr<DestructNotifier> TwoPtr = CM->GetSharedPointer(Two);
+        ASSERT_EQ(TwoPtr->Key, 2);
+        ASSERT_THAT(Queue, testing::IsEmpty());
+      }
+
       ASSERT_THAT(Queue, testing::IsEmpty());
     }
-
     ASSERT_THAT(Queue, testing::IsEmpty());
   }
   ASSERT_THAT(Queue, testing::ElementsAre(1, 2));
Index: lldb/source/Utility/SharingPtr.cpp
===================================================================
--- lldb/source/Utility/SharingPtr.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-//===-- SharingPtr.cpp ----------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Utility/SharingPtr.h"
-
-#if defined(ENABLE_SP_LOGGING)
-
-// If ENABLE_SP_LOGGING is defined, then log all shared pointer assignments and
-// allow them to be queried using a pointer by a call to:
-#include <assert.h>
-#include <execinfo.h>
-
-#include "llvm/ADT/STLExtras.h"
-
-#include <map>
-#include <mutex>
-#include <vector>
-
-class Backtrace {
-public:
-  Backtrace();
-
-  ~Backtrace();
-
-  void GetFrames();
-
-  void Dump() const;
-
-private:
-  void *m_sp_this;
-  std::vector<void *> m_frames;
-};
-
-Backtrace::Backtrace() : m_frames() {}
-
-Backtrace::~Backtrace() {}
-
-void Backtrace::GetFrames() {
-  void *frames[1024];
-  const int count = ::backtrace(frames, llvm::array_lengthof(frames));
-  if (count > 2)
-    m_frames.assign(frames + 2, frames + (count - 2));
-}
-
-void Backtrace::Dump() const {
-  if (!m_frames.empty())
-    ::backtrace_symbols_fd(m_frames.data(), m_frames.size(), STDOUT_FILENO);
-  write(STDOUT_FILENO, "\n\n", 2);
-}
-
-extern "C" void track_sp(void *sp_this, void *ptr, long use_count) {
-  typedef std::pair<void *, Backtrace> PtrBacktracePair;
-  typedef std::map<void *, PtrBacktracePair> PtrToBacktraceMap;
-  static std::mutex g_mutex;
-  std::lock_guard<std::mutex> guard(g_mutex);
-  static PtrToBacktraceMap g_map;
-
-  if (sp_this) {
-    printf("sp(%p) -> %p %lu\n", sp_this, ptr, use_count);
-
-    if (ptr) {
-      Backtrace bt;
-      bt.GetFrames();
-      g_map[sp_this] = std::make_pair(ptr, bt);
-    } else {
-      g_map.erase(sp_this);
-    }
-  } else {
-    if (ptr)
-      printf("Searching for shared pointers that are tracking %p: ", ptr);
-    else
-      printf("Dump all live shared pointres: ");
-
-    uint32_t matches = 0;
-    PtrToBacktraceMap::iterator pos, end = g_map.end();
-    for (pos = g_map.begin(); pos != end; ++pos) {
-      if (ptr == NULL || pos->second.first == ptr) {
-        ++matches;
-        printf("\nsp(%p): %p\n", pos->first, pos->second.first);
-        pos->second.second.Dump();
-      }
-    }
-    if (matches == 0) {
-      printf("none.\n");
-    }
-  }
-}
-// Put dump_sp_refs in the lldb namespace to it gets through our exports lists
-// filter in the LLDB.framework or lldb.so
-namespace lldb {
-
-void dump_sp_refs(void *ptr) {
-  // Use a specially crafted call to "track_sp" which will dump info on all
-  // live shared pointers that reference "ptr"
-  track_sp(NULL, ptr, 0);
-}
-}
-
-#endif
-
-namespace lldb_private {
-
-namespace imp {
-
-shared_count::~shared_count() {}
-
-void shared_count::add_shared() {
-#ifdef _MSC_VER
-  _InterlockedIncrement(&shared_owners_);
-#else
-  ++shared_owners_;
-#endif
-}
-
-void shared_count::release_shared() {
-#ifdef _MSC_VER
-  if (_InterlockedDecrement(&shared_owners_) == -1)
-#else
-  if (--shared_owners_ == -1)
-#endif
-  {
-    on_zero_shared();
-    delete this;
-  }
-}
-
-} // imp
-
-} // namespace lldb
Index: lldb/source/Utility/CMakeLists.txt
===================================================================
--- lldb/source/Utility/CMakeLists.txt
+++ lldb/source/Utility/CMakeLists.txt
@@ -39,7 +39,6 @@
   ReproducerInstrumentation.cpp
   Scalar.cpp
   SelectHelper.cpp
-  SharingPtr.cpp
   State.cpp
   Status.cpp
   Stream.cpp
Index: lldb/source/Expression/IRInterpreter.cpp
===================================================================
--- lldb/source/Expression/IRInterpreter.cpp
+++ lldb/source/Expression/IRInterpreter.cpp
@@ -1510,7 +1510,7 @@
         lldb_private::ValueObject *vobj = retVal.get();
 
         // Check if the return value is valid
-        if (vobj == nullptr || retVal.empty()) {
+        if (vobj == nullptr || !retVal) {
           error.SetErrorToGenericError();
           error.SetErrorStringWithFormat("unable to get the return value");
           return false;
Index: lldb/source/Core/ValueObjectVariable.cpp
===================================================================
--- lldb/source/Core/ValueObjectVariable.cpp
+++ lldb/source/Core/ValueObjectVariable.cpp
@@ -50,12 +50,14 @@
 lldb::ValueObjectSP
 ValueObjectVariable::Create(ExecutionContextScope *exe_scope,
                             const lldb::VariableSP &var_sp) {
-  return (new ValueObjectVariable(exe_scope, var_sp))->GetSP();
+  auto manager_sp = ValueObjectManager::Create();
+  return (new ValueObjectVariable(exe_scope, *manager_sp, var_sp))->GetSP();
 }
 
 ValueObjectVariable::ValueObjectVariable(ExecutionContextScope *exe_scope,
+                                         ValueObjectManager &manager,
                                          const lldb::VariableSP &var_sp)
-    : ValueObject(exe_scope), m_variable_sp(var_sp) {
+    : ValueObject(exe_scope, manager), m_variable_sp(var_sp) {
   // Do not attempt to construct one of these objects with no variable!
   assert(m_variable_sp.get() != nullptr);
   m_name = var_sp->GetName();
Index: lldb/source/Core/ValueObjectSyntheticFilter.cpp
===================================================================
--- lldb/source/Core/ValueObjectSyntheticFilter.cpp
+++ lldb/source/Core/ValueObjectSyntheticFilter.cpp
@@ -14,7 +14,6 @@
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/Logging.h"
-#include "lldb/Utility/SharingPtr.h"
 #include "lldb/Utility/Status.h"
 
 #include "llvm/ADT/STLExtras.h"
Index: lldb/source/Core/ValueObjectRegister.cpp
===================================================================
--- lldb/source/Core/ValueObjectRegister.cpp
+++ lldb/source/Core/ValueObjectRegister.cpp
@@ -93,8 +93,9 @@
   const size_t num_children = GetNumChildren();
   if (idx < num_children) {
     ExecutionContext exe_ctx(GetExecutionContextRef());
+    auto manager_sp = ValueObjectManager::Create();
     new_valobj = new ValueObjectRegisterSet(
-        exe_ctx.GetBestExecutionContextScope(), m_reg_ctx_sp, idx);
+        exe_ctx.GetBestExecutionContextScope(), *manager_sp, m_reg_ctx_sp, idx);
   }
 
   return new_valobj;
@@ -107,14 +108,18 @@
 ValueObjectRegisterSet::Create(ExecutionContextScope *exe_scope,
                                lldb::RegisterContextSP &reg_ctx_sp,
                                uint32_t set_idx) {
-  return (new ValueObjectRegisterSet(exe_scope, reg_ctx_sp, set_idx))->GetSP();
+  auto manager_sp = ValueObjectManager::Create();
+  return (new ValueObjectRegisterSet(exe_scope, *manager_sp, reg_ctx_sp,
+                                     set_idx))
+      ->GetSP();
 }
 
 ValueObjectRegisterSet::ValueObjectRegisterSet(ExecutionContextScope *exe_scope,
+                                               ValueObjectManager &manager,
                                                lldb::RegisterContextSP &reg_ctx,
                                                uint32_t reg_set_idx)
-    : ValueObject(exe_scope), m_reg_ctx_sp(reg_ctx), m_reg_set(nullptr),
-      m_reg_set_idx(reg_set_idx) {
+    : ValueObject(exe_scope, manager), m_reg_ctx_sp(reg_ctx),
+      m_reg_set(nullptr), m_reg_set_idx(reg_set_idx) {
   assert(reg_ctx);
   m_reg_set = reg_ctx->GetRegisterSet(m_reg_set_idx);
   if (m_reg_set) {
@@ -240,13 +245,16 @@
 ValueObjectSP ValueObjectRegister::Create(ExecutionContextScope *exe_scope,
                                           lldb::RegisterContextSP &reg_ctx_sp,
                                           uint32_t reg_num) {
-  return (new ValueObjectRegister(exe_scope, reg_ctx_sp, reg_num))->GetSP();
+  auto manager_sp = ValueObjectManager::Create();
+  return (new ValueObjectRegister(exe_scope, *manager_sp, reg_ctx_sp, reg_num))
+      ->GetSP();
 }
 
 ValueObjectRegister::ValueObjectRegister(ExecutionContextScope *exe_scope,
+                                         ValueObjectManager &manager,
                                          lldb::RegisterContextSP &reg_ctx,
                                          uint32_t reg_num)
-    : ValueObject(exe_scope), m_reg_ctx_sp(reg_ctx), m_reg_info(),
+    : ValueObject(exe_scope, manager), m_reg_ctx_sp(reg_ctx), m_reg_info(),
       m_reg_value(), m_type_name(), m_compiler_type() {
   assert(reg_ctx);
   ConstructObject(reg_num);
Index: lldb/source/Core/ValueObjectMemory.cpp
===================================================================
--- lldb/source/Core/ValueObjectMemory.cpp
+++ lldb/source/Core/ValueObjectMemory.cpp
@@ -32,21 +32,27 @@
                                         llvm::StringRef name,
                                         const Address &address,
                                         lldb::TypeSP &type_sp) {
-  return (new ValueObjectMemory(exe_scope, name, address, type_sp))->GetSP();
+  auto manager_sp = ValueObjectManager::Create();
+  return (new ValueObjectMemory(exe_scope, *manager_sp, name, address, type_sp))
+      ->GetSP();
 }
 
 ValueObjectSP ValueObjectMemory::Create(ExecutionContextScope *exe_scope,
                                         llvm::StringRef name,
                                         const Address &address,
                                         const CompilerType &ast_type) {
-  return (new ValueObjectMemory(exe_scope, name, address, ast_type))->GetSP();
+  auto manager_sp = ValueObjectManager::Create();
+  return (new ValueObjectMemory(exe_scope, *manager_sp, name, address,
+                                ast_type))
+      ->GetSP();
 }
 
 ValueObjectMemory::ValueObjectMemory(ExecutionContextScope *exe_scope,
+                                     ValueObjectManager &manager,
                                      llvm::StringRef name,
                                      const Address &address,
                                      lldb::TypeSP &type_sp)
-    : ValueObject(exe_scope), m_address(address), m_type_sp(type_sp),
+    : ValueObject(exe_scope, manager), m_address(address), m_type_sp(type_sp),
       m_compiler_type() {
   // Do not attempt to construct one of these objects with no variable!
   assert(m_type_sp.get() != nullptr);
@@ -70,10 +76,11 @@
 }
 
 ValueObjectMemory::ValueObjectMemory(ExecutionContextScope *exe_scope,
+                                     ValueObjectManager &manager,
                                      llvm::StringRef name,
                                      const Address &address,
                                      const CompilerType &ast_type)
-    : ValueObject(exe_scope), m_address(address), m_type_sp(),
+    : ValueObject(exe_scope, manager), m_address(address), m_type_sp(),
       m_compiler_type(ast_type) {
   // Do not attempt to construct one of these objects with no variable!
   assert(m_compiler_type.GetTypeSystem());
Index: lldb/source/Core/ValueObjectList.cpp
===================================================================
--- lldb/source/Core/ValueObjectList.cpp
+++ lldb/source/Core/ValueObjectList.cpp
@@ -10,7 +10,6 @@
 
 #include "lldb/Core/ValueObject.h"
 #include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/SharingPtr.h"
 
 #include <utility>
 
Index: lldb/source/Core/ValueObjectConstResultImpl.cpp
===================================================================
--- lldb/source/Core/ValueObjectConstResultImpl.cpp
+++ lldb/source/Core/ValueObjectConstResultImpl.cpp
@@ -18,7 +18,6 @@
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/Endian.h"
 #include "lldb/Utility/Scalar.h"
-#include "lldb/Utility/SharingPtr.h"
 
 #include <string>
 
Index: lldb/source/Core/ValueObjectConstResult.cpp
===================================================================
--- lldb/source/Core/ValueObjectConstResult.cpp
+++ lldb/source/Core/ValueObjectConstResult.cpp
@@ -29,16 +29,18 @@
                                              ByteOrder byte_order,
                                              uint32_t addr_byte_size,
                                              lldb::addr_t address) {
-  return (new ValueObjectConstResult(exe_scope, byte_order, addr_byte_size,
-                                     address))
+  auto manager_sp = ValueObjectManager::Create();
+  return (new ValueObjectConstResult(exe_scope, *manager_sp, byte_order,
+                                     addr_byte_size, address))
       ->GetSP();
 }
 
 ValueObjectConstResult::ValueObjectConstResult(ExecutionContextScope *exe_scope,
+                                               ValueObjectManager &manager,
                                                ByteOrder byte_order,
                                                uint32_t addr_byte_size,
                                                lldb::addr_t address)
-    : ValueObject(exe_scope), m_type_name(), m_byte_size(0),
+    : ValueObject(exe_scope, manager), m_type_name(), m_byte_size(0),
       m_impl(this, address) {
   SetIsConstant();
   SetValueIsValid(true);
@@ -52,15 +54,17 @@
                                              ConstString name,
                                              const DataExtractor &data,
                                              lldb::addr_t address) {
-  return (new ValueObjectConstResult(exe_scope, compiler_type, name, data,
-                                     address))
+  auto manager_sp = ValueObjectManager::Create();
+  return (new ValueObjectConstResult(exe_scope, *manager_sp, compiler_type,
+                                     name, data, address))
       ->GetSP();
 }
 
 ValueObjectConstResult::ValueObjectConstResult(
-    ExecutionContextScope *exe_scope, const CompilerType &compiler_type,
-    ConstString name, const DataExtractor &data, lldb::addr_t address)
-    : ValueObject(exe_scope), m_type_name(), m_byte_size(0),
+    ExecutionContextScope *exe_scope, ValueObjectManager &manager,
+    const CompilerType &compiler_type, ConstString name,
+    const DataExtractor &data, lldb::addr_t address)
+    : ValueObject(exe_scope, manager), m_type_name(), m_byte_size(0),
       m_impl(this, address) {
   m_data = data;
 
@@ -86,8 +90,10 @@
                                              lldb::ByteOrder data_byte_order,
                                              uint32_t data_addr_size,
                                              lldb::addr_t address) {
-  return (new ValueObjectConstResult(exe_scope, compiler_type, name, data_sp,
-                                     data_byte_order, data_addr_size, address))
+  auto manager_sp = ValueObjectManager::Create();
+  return (new ValueObjectConstResult(exe_scope, *manager_sp, compiler_type,
+                                     name, data_sp, data_byte_order,
+                                     data_addr_size, address))
       ->GetSP();
 }
 
@@ -95,15 +101,18 @@
                                              Value &value,
                                              ConstString name,
                                              Module *module) {
-  return (new ValueObjectConstResult(exe_scope, value, name, module))->GetSP();
+  auto manager_sp = ValueObjectManager::Create();
+  return (new ValueObjectConstResult(exe_scope, *manager_sp, value, name,
+                                     module))
+      ->GetSP();
 }
 
 ValueObjectConstResult::ValueObjectConstResult(
-    ExecutionContextScope *exe_scope, const CompilerType &compiler_type,
-    ConstString name, const lldb::DataBufferSP &data_sp,
-    lldb::ByteOrder data_byte_order, uint32_t data_addr_size,
-    lldb::addr_t address)
-    : ValueObject(exe_scope), m_type_name(), m_byte_size(0),
+    ExecutionContextScope *exe_scope, ValueObjectManager &manager,
+    const CompilerType &compiler_type, ConstString name,
+    const lldb::DataBufferSP &data_sp, lldb::ByteOrder data_byte_order,
+    uint32_t data_addr_size, lldb::addr_t address)
+    : ValueObject(exe_scope, manager), m_type_name(), m_byte_size(0),
       m_impl(this, address) {
   m_data.SetByteOrder(data_byte_order);
   m_data.SetAddressByteSize(data_addr_size);
@@ -123,16 +132,18 @@
                                              lldb::addr_t address,
                                              AddressType address_type,
                                              uint32_t addr_byte_size) {
-  return (new ValueObjectConstResult(exe_scope, compiler_type, name, address,
-                                     address_type, addr_byte_size))
+  auto manager_sp = ValueObjectManager::Create();
+  return (new ValueObjectConstResult(exe_scope, *manager_sp, compiler_type,
+                                     name, address, address_type,
+                                     addr_byte_size))
       ->GetSP();
 }
 
 ValueObjectConstResult::ValueObjectConstResult(
-    ExecutionContextScope *exe_scope, const CompilerType &compiler_type,
-    ConstString name, lldb::addr_t address, AddressType address_type,
-    uint32_t addr_byte_size)
-    : ValueObject(exe_scope), m_type_name(), m_byte_size(0),
+    ExecutionContextScope *exe_scope, ValueObjectManager &manager,
+    const CompilerType &compiler_type, ConstString name, lldb::addr_t address,
+    AddressType address_type, uint32_t addr_byte_size)
+    : ValueObject(exe_scope, manager), m_type_name(), m_byte_size(0),
       m_impl(this, address) {
   m_value.GetScalar() = address;
   m_data.SetAddressByteSize(addr_byte_size);
@@ -161,21 +172,25 @@
 
 ValueObjectSP ValueObjectConstResult::Create(ExecutionContextScope *exe_scope,
                                              const Status &error) {
-  return (new ValueObjectConstResult(exe_scope, error))->GetSP();
+  auto manager_sp = ValueObjectManager::Create();
+  return (new ValueObjectConstResult(exe_scope, *manager_sp, error))->GetSP();
 }
 
 ValueObjectConstResult::ValueObjectConstResult(ExecutionContextScope *exe_scope,
+                                               ValueObjectManager &manager,
                                                const Status &error)
-    : ValueObject(exe_scope), m_type_name(), m_byte_size(0), m_impl(this) {
+    : ValueObject(exe_scope, manager), m_type_name(), m_byte_size(0),
+      m_impl(this) {
   m_error = error;
   SetIsConstant();
 }
 
 ValueObjectConstResult::ValueObjectConstResult(ExecutionContextScope *exe_scope,
+                                               ValueObjectManager &manager,
                                                const Value &value,
-                                               ConstString name,
-                                               Module *module)
-    : ValueObject(exe_scope), m_type_name(), m_byte_size(0), m_impl(this) {
+                                               ConstString name, Module *module)
+    : ValueObject(exe_scope, manager), m_type_name(), m_byte_size(0),
+      m_impl(this) {
   m_value = value;
   m_name = name;
   ExecutionContext exe_ctx;
Index: lldb/source/Core/ValueObject.cpp
===================================================================
--- lldb/source/Core/ValueObject.cpp
+++ lldb/source/Core/ValueObject.cpp
@@ -45,7 +45,6 @@
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/Logging.h"
 #include "lldb/Utility/Scalar.h"
-#include "lldb/Utility/SharingPtr.h"
 #include "lldb/Utility/Stream.h"
 #include "lldb/Utility/StreamString.h"
 #include "lldb/lldb-private-types.h"
@@ -105,12 +104,13 @@
 
 // ValueObject constructor
 ValueObject::ValueObject(ExecutionContextScope *exe_scope,
+                         ValueObjectManager &manager,
                          AddressType child_ptr_or_ref_addr_type)
     : UserID(++g_value_obj_uid), // Unique identifier for every value object
       m_parent(nullptr), m_root(nullptr), m_update_point(exe_scope), m_name(),
       m_data(), m_value(), m_error(), m_value_str(), m_old_value_str(),
       m_location_str(), m_summary_str(), m_object_desc_str(),
-      m_manager(), m_children(), m_synthetic_children(),
+      m_manager(&manager), m_children(), m_synthetic_children(),
       m_dynamic_value(nullptr), m_synthetic_value(nullptr),
       m_deref_valobj(nullptr), m_format(eFormatDefault),
       m_last_format(eFormatDefault), m_last_format_mgr_revision(0),
@@ -134,7 +134,6 @@
       m_data.SetAddressByteSize(arch.GetAddressByteSize());
     }
   }
-  m_manager = new ValueObjectManager();
   m_manager->ManageObject(this);
 }
 
Index: lldb/source/Core/FormatEntity.cpp
===================================================================
--- lldb/source/Core/FormatEntity.cpp
+++ lldb/source/Core/FormatEntity.cpp
@@ -46,7 +46,6 @@
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/Logging.h"
 #include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/SharingPtr.h"
 #include "lldb/Utility/Stream.h"
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/StringList.h"
Index: lldb/include/lldb/lldb-forward.h
===================================================================
--- lldb/include/lldb/lldb-forward.h
+++ lldb/include/lldb/lldb-forward.h
@@ -11,7 +11,7 @@
 
 #if defined(__cplusplus)
 
-#include "lldb/Utility/SharingPtr.h"
+#include <memory>
 
 // lldb forward declarations
 namespace lldb_private {
@@ -452,7 +452,7 @@
 typedef std::shared_ptr<lldb_private::UnwindAssembly> UnwindAssemblySP;
 typedef std::shared_ptr<lldb_private::UnwindPlan> UnwindPlanSP;
 typedef std::shared_ptr<lldb_private::UtilityFunction> UtilityFunctionSP;
-typedef lldb_private::SharingPtr<lldb_private::ValueObject> ValueObjectSP;
+typedef std::shared_ptr<lldb_private::ValueObject> ValueObjectSP;
 typedef std::shared_ptr<lldb_private::Value> ValueSP;
 typedef std::shared_ptr<lldb_private::ValueList> ValueListSP;
 typedef std::shared_ptr<lldb_private::Variable> VariableSP;
Index: lldb/include/lldb/Utility/SharingPtr.h
===================================================================
--- lldb/include/lldb/Utility/SharingPtr.h
+++ /dev/null
@@ -1,359 +0,0 @@
-//===---------------------SharingPtr.h --------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef utility_SharingPtr_h_
-#define utility_SharingPtr_h_
-
-#include <memory>
-
-// Microsoft Visual C++ currently does not enable std::atomic to work in CLR
-// mode - as such we need to "hack around it" for MSVC++ builds only using
-// Windows specific intrinsics instead of the C++11 atomic support
-#ifdef _MSC_VER
-#include <intrin.h>
-#else
-#include <atomic>
-#endif
-
-#include <stddef.h>
-
-
-//#define ENABLE_SP_LOGGING 1 // DON'T CHECK THIS LINE IN UNLESS COMMENTED OUT
-#if defined(ENABLE_SP_LOGGING)
-
-extern "C" void track_sp(void *sp_this, void *ptr, long count);
-
-#endif
-
-namespace lldb_private {
-
-namespace imp {
-
-class shared_count {
-  shared_count(const shared_count &) = delete;
-  shared_count &operator=(const shared_count &) = delete;
-
-public:
-  explicit shared_count(long refs = 0) : shared_owners_(refs) {}
-
-  void add_shared();
-  void release_shared();
-  long use_count() const { return shared_owners_ + 1; }
-
-protected:
-#ifdef _MSC_VER
-  long shared_owners_;
-#else
-  std::atomic<long> shared_owners_;
-#endif
-  virtual ~shared_count();
-
-private:
-  virtual void on_zero_shared() = 0;
-};
-
-template <class T> class shared_ptr_pointer : public shared_count {
-  T data_;
-
-public:
-  shared_ptr_pointer(T p) : data_(p) {}
-
-private:
-  void on_zero_shared() override;
-
-  shared_ptr_pointer(const shared_ptr_pointer &) = delete;
-  shared_ptr_pointer &operator=(const shared_ptr_pointer &) = delete;
-};
-
-template <class T> void shared_ptr_pointer<T>::on_zero_shared() {
-  delete data_;
-}
-
-template <class T> class shared_ptr_emplace : public shared_count {
-  T data_;
-
-public:
-  shared_ptr_emplace() : data_() {}
-
-  template <class A0> shared_ptr_emplace(A0 &a0) : data_(a0) {}
-
-  template <class A0, class A1>
-  shared_ptr_emplace(A0 &a0, A1 &a1) : data_(a0, a1) {}
-
-  template <class A0, class A1, class A2>
-  shared_ptr_emplace(A0 &a0, A1 &a1, A2 &a2) : data_(a0, a1, a2) {}
-
-  template <class A0, class A1, class A2, class A3>
-  shared_ptr_emplace(A0 &a0, A1 &a1, A2 &a2, A3 &a3) : data_(a0, a1, a2, a3) {}
-
-  template <class A0, class A1, class A2, class A3, class A4>
-  shared_ptr_emplace(A0 &a0, A1 &a1, A2 &a2, A3 &a3, A4 &a4)
-      : data_(a0, a1, a2, a3, a4) {}
-
-private:
-  void on_zero_shared() override;
-
-public:
-  T *get() { return &data_; }
-};
-
-template <class T> void shared_ptr_emplace<T>::on_zero_shared() {}
-
-} // namespace imp
-
-template <class T> class SharingPtr {
-public:
-  typedef T element_type;
-
-private:
-  element_type *ptr_;
-  imp::shared_count *cntrl_;
-
-  struct nat {
-    int for_bool_;
-  };
-
-public:
-  SharingPtr();
-  SharingPtr(std::nullptr_t);
-  template <class Y> explicit SharingPtr(Y *p);
-  template <class Y> explicit SharingPtr(Y *p, imp::shared_count *ctrl_block);
-  template <class Y> SharingPtr(const SharingPtr<Y> &r, element_type *p);
-  SharingPtr(const SharingPtr &r);
-  template <class Y> SharingPtr(const SharingPtr<Y> &r);
-
-  ~SharingPtr();
-
-  SharingPtr &operator=(const SharingPtr &r);
-  template <class Y> SharingPtr &operator=(const SharingPtr<Y> &r);
-
-  void swap(SharingPtr &r);
-  void reset();
-  template <class Y> void reset(Y *p);
-
-  element_type *get() const { return ptr_; }
-  element_type &operator*() const { return *ptr_; }
-  element_type *operator->() const { return ptr_; }
-  long use_count() const { return cntrl_ ? cntrl_->use_count() : 0; }
-  bool unique() const { return use_count() == 1; }
-  bool empty() const { return cntrl_ == nullptr; }
-  operator nat *() const { return (nat *)get(); }
-
-  static SharingPtr<T> make_shared();
-
-  template <class A0> static SharingPtr<T> make_shared(A0 &);
-
-  template <class A0, class A1> static SharingPtr<T> make_shared(A0 &, A1 &);
-
-  template <class A0, class A1, class A2>
-  static SharingPtr<T> make_shared(A0 &, A1 &, A2 &);
-
-  template <class A0, class A1, class A2, class A3>
-  static SharingPtr<T> make_shared(A0 &, A1 &, A2 &, A3 &);
-
-  template <class A0, class A1, class A2, class A3, class A4>
-  static SharingPtr<T> make_shared(A0 &, A1 &, A2 &, A3 &, A4 &);
-
-private:
-  template <class U> friend class SharingPtr;
-};
-
-template <class T>
-inline SharingPtr<T>::SharingPtr() : ptr_(nullptr), cntrl_(nullptr) {}
-
-template <class T>
-inline SharingPtr<T>::SharingPtr(std::nullptr_t)
-    : ptr_(nullptr), cntrl_(nullptr) {}
-
-template <class T>
-template <class Y>
-SharingPtr<T>::SharingPtr(Y *p) : ptr_(p), cntrl_(nullptr) {
-  std::unique_ptr<Y> hold(p);
-  typedef imp::shared_ptr_pointer<Y *> _CntrlBlk;
-  cntrl_ = new _CntrlBlk(p);
-  hold.release();
-}
-
-template <class T>
-template <class Y>
-SharingPtr<T>::SharingPtr(Y *p, imp::shared_count *cntrl_block)
-    : ptr_(p), cntrl_(cntrl_block) {}
-
-template <class T>
-template <class Y>
-inline SharingPtr<T>::SharingPtr(const SharingPtr<Y> &r, element_type *p)
-    : ptr_(p), cntrl_(r.cntrl_) {
-  if (cntrl_)
-    cntrl_->add_shared();
-}
-
-template <class T>
-inline SharingPtr<T>::SharingPtr(const SharingPtr &r)
-    : ptr_(r.ptr_), cntrl_(r.cntrl_) {
-  if (cntrl_)
-    cntrl_->add_shared();
-}
-
-template <class T>
-template <class Y>
-inline SharingPtr<T>::SharingPtr(const SharingPtr<Y> &r)
-    : ptr_(r.ptr_), cntrl_(r.cntrl_) {
-  if (cntrl_)
-    cntrl_->add_shared();
-}
-
-template <class T> SharingPtr<T>::~SharingPtr() {
-  if (cntrl_)
-    cntrl_->release_shared();
-}
-
-template <class T>
-inline SharingPtr<T> &SharingPtr<T>::operator=(const SharingPtr &r) {
-  SharingPtr(r).swap(*this);
-  return *this;
-}
-
-template <class T>
-template <class Y>
-inline SharingPtr<T> &SharingPtr<T>::operator=(const SharingPtr<Y> &r) {
-  SharingPtr(r).swap(*this);
-  return *this;
-}
-
-template <class T> inline void SharingPtr<T>::swap(SharingPtr &r) {
-  std::swap(ptr_, r.ptr_);
-  std::swap(cntrl_, r.cntrl_);
-}
-
-template <class T> inline void SharingPtr<T>::reset() {
-  SharingPtr().swap(*this);
-}
-
-template <class T> template <class Y> inline void SharingPtr<T>::reset(Y *p) {
-  SharingPtr(p).swap(*this);
-}
-
-template <class T> SharingPtr<T> SharingPtr<T>::make_shared() {
-  typedef imp::shared_ptr_emplace<T> CntrlBlk;
-  SharingPtr<T> r;
-  r.cntrl_ = new CntrlBlk();
-  r.ptr_ = static_cast<CntrlBlk *>(r.cntrl_)->get();
-  return r;
-}
-
-template <class T>
-template <class A0>
-SharingPtr<T> SharingPtr<T>::make_shared(A0 &a0) {
-  typedef imp::shared_ptr_emplace<T> CntrlBlk;
-  SharingPtr<T> r;
-  r.cntrl_ = new CntrlBlk(a0);
-  r.ptr_ = static_cast<CntrlBlk *>(r.cntrl_)->get();
-  return r;
-}
-
-template <class T>
-template <class A0, class A1>
-SharingPtr<T> SharingPtr<T>::make_shared(A0 &a0, A1 &a1) {
-  typedef imp::shared_ptr_emplace<T> CntrlBlk;
-  SharingPtr<T> r;
-  r.cntrl_ = new CntrlBlk(a0, a1);
-  r.ptr_ = static_cast<CntrlBlk *>(r.cntrl_)->get();
-  return r;
-}
-
-template <class T>
-template <class A0, class A1, class A2>
-SharingPtr<T> SharingPtr<T>::make_shared(A0 &a0, A1 &a1, A2 &a2) {
-  typedef imp::shared_ptr_emplace<T> CntrlBlk;
-  SharingPtr<T> r;
-  r.cntrl_ = new CntrlBlk(a0, a1, a2);
-  r.ptr_ = static_cast<CntrlBlk *>(r.cntrl_)->get();
-  return r;
-}
-
-template <class T>
-template <class A0, class A1, class A2, class A3>
-SharingPtr<T> SharingPtr<T>::make_shared(A0 &a0, A1 &a1, A2 &a2, A3 &a3) {
-  typedef imp::shared_ptr_emplace<T> CntrlBlk;
-  SharingPtr<T> r;
-  r.cntrl_ = new CntrlBlk(a0, a1, a2, a3);
-  r.ptr_ = static_cast<CntrlBlk *>(r.cntrl_)->get();
-  return r;
-}
-
-template <class T>
-template <class A0, class A1, class A2, class A3, class A4>
-SharingPtr<T> SharingPtr<T>::make_shared(A0 &a0, A1 &a1, A2 &a2, A3 &a3,
-                                         A4 &a4) {
-  typedef imp::shared_ptr_emplace<T> CntrlBlk;
-  SharingPtr<T> r;
-  r.cntrl_ = new CntrlBlk(a0, a1, a2, a3, a4);
-  r.ptr_ = static_cast<CntrlBlk *>(r.cntrl_)->get();
-  return r;
-}
-
-template <class T> inline SharingPtr<T> make_shared() {
-  return SharingPtr<T>::make_shared();
-}
-
-template <class T, class A0> inline SharingPtr<T> make_shared(A0 &a0) {
-  return SharingPtr<T>::make_shared(a0);
-}
-
-template <class T, class A0, class A1>
-inline SharingPtr<T> make_shared(A0 &a0, A1 &a1) {
-  return SharingPtr<T>::make_shared(a0, a1);
-}
-
-template <class T, class A0, class A1, class A2>
-inline SharingPtr<T> make_shared(A0 &a0, A1 &a1, A2 &a2) {
-  return SharingPtr<T>::make_shared(a0, a1, a2);
-}
-
-template <class T, class A0, class A1, class A2, class A3>
-inline SharingPtr<T> make_shared(A0 &a0, A1 &a1, A2 &a2, A3 &a3) {
-  return SharingPtr<T>::make_shared(a0, a1, a2, a3);
-}
-
-template <class T, class A0, class A1, class A2, class A3, class A4>
-inline SharingPtr<T> make_shared(A0 &a0, A1 &a1, A2 &a2, A3 &a3, A4 &a4) {
-  return SharingPtr<T>::make_shared(a0, a1, a2, a3, a4);
-}
-
-template <class T, class U>
-inline bool operator==(const SharingPtr<T> &__x, const SharingPtr<U> &__y) {
-  return __x.get() == __y.get();
-}
-
-template <class T, class U>
-inline bool operator!=(const SharingPtr<T> &__x, const SharingPtr<U> &__y) {
-  return !(__x == __y);
-}
-
-template <class T, class U>
-inline bool operator<(const SharingPtr<T> &__x, const SharingPtr<U> &__y) {
-  return __x.get() < __y.get();
-}
-
-template <class T> inline void swap(SharingPtr<T> &__x, SharingPtr<T> &__y) {
-  __x.swap(__y);
-}
-
-template <class T, class U>
-inline SharingPtr<T> static_pointer_cast(const SharingPtr<U> &r) {
-  return SharingPtr<T>(r, static_cast<T *>(r.get()));
-}
-
-template <class T, class U>
-SharingPtr<T> const_pointer_cast(const SharingPtr<U> &r) {
-  return SharingPtr<T>(r, const_cast<T *>(r.get()));
-}
-
-} // namespace lldb_private
-
-#endif // utility_SharingPtr_h_
Index: lldb/include/lldb/Utility/SharedCluster.h
===================================================================
--- lldb/include/lldb/Utility/SharedCluster.h
+++ lldb/include/lldb/Utility/SharedCluster.h
@@ -10,46 +10,24 @@
 #define utility_SharedCluster_h_
 
 #include "lldb/Utility/LLDBAssert.h"
-#include "lldb/Utility/SharingPtr.h"
-
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallVector.h"
 
+#include <memory>
 #include <mutex>
 
 namespace lldb_private {
 
-namespace imp {
-template <typename T>
-class shared_ptr_refcount : public lldb_private::imp::shared_count {
+template <class T>
+class ClusterManager : public std::enable_shared_from_this<ClusterManager<T>> {
 public:
-  template <class Y>
-  shared_ptr_refcount(Y *in) : shared_count(0), manager(in) {}
-
-  shared_ptr_refcount() : shared_count(0) {}
-
-  ~shared_ptr_refcount() override {}
-
-  void on_zero_shared() override { manager->DecrementRefCount(); }
-
-private:
-  T *manager;
-};
-
-} // namespace imp
-
-template <class T> class ClusterManager {
-public:
-  ClusterManager() : m_objects(), m_external_ref(0), m_mutex() {}
+  static std::shared_ptr<ClusterManager> Create() {
+    return std::shared_ptr<ClusterManager>(new ClusterManager());
+  }
 
   ~ClusterManager() {
     for (T *obj : m_objects)
       delete obj;
-
-    // Decrement refcount should have been called on this ClusterManager, and
-    // it should have locked the mutex, now we will unlock it before we destroy
-    // it...
-    m_mutex.unlock();
   }
 
   void ManageObject(T *new_object) {
@@ -59,33 +37,20 @@
     m_objects.push_back(new_object);
   }
 
-  typename lldb_private::SharingPtr<T> GetSharedPointer(T *desired_object) {
-    {
-      std::lock_guard<std::mutex> guard(m_mutex);
-      m_external_ref++;
-      if (!llvm::is_contained(m_objects, desired_object)) {
-        lldbassert(false && "object not found in shared cluster when expected");
-        desired_object = nullptr;
-      }
+  std::shared_ptr<T> GetSharedPointer(T *desired_object) {
+    std::lock_guard<std::mutex> guard(m_mutex);
+    auto this_sp = this->shared_from_this();
+    if (!llvm::is_contained(m_objects, desired_object)) {
+      lldbassert(false && "object not found in shared cluster when expected");
+      desired_object = nullptr;
     }
-    return typename lldb_private::SharingPtr<T>(
-        desired_object, new imp::shared_ptr_refcount<ClusterManager>(this));
+    return {std::move(this_sp), desired_object};
   }
 
 private:
-  void DecrementRefCount() {
-    m_mutex.lock();
-    m_external_ref--;
-    if (m_external_ref == 0)
-      delete this;
-    else
-      m_mutex.unlock();
-  }
-
-  friend class imp::shared_ptr_refcount<ClusterManager>;
+  ClusterManager() : m_objects(), m_mutex() {}
 
   llvm::SmallVector<T *, 16> m_objects;
-  int m_external_ref;
   std::mutex m_mutex;
 };
 
Index: lldb/include/lldb/Core/ValueObjectVariable.h
===================================================================
--- lldb/include/lldb/Core/ValueObjectVariable.h
+++ lldb/include/lldb/Core/ValueObjectVariable.h
@@ -77,6 +77,7 @@
 
 private:
   ValueObjectVariable(ExecutionContextScope *exe_scope,
+                      ValueObjectManager &manager,
                       const lldb::VariableSP &var_sp);
   // For ValueObject only
   DISALLOW_COPY_AND_ASSIGN(ValueObjectVariable);
Index: lldb/include/lldb/Core/ValueObjectRegister.h
===================================================================
--- lldb/include/lldb/Core/ValueObjectRegister.h
+++ lldb/include/lldb/Core/ValueObjectRegister.h
@@ -106,6 +106,7 @@
   friend class ValueObjectRegisterContext;
 
   ValueObjectRegisterSet(ExecutionContextScope *exe_scope,
+                         ValueObjectManager &manager,
                          lldb::RegisterContextSP &reg_ctx_sp, uint32_t set_idx);
 
   // For ValueObject only
@@ -160,6 +161,7 @@
   ValueObjectRegister(ValueObject &parent, lldb::RegisterContextSP &reg_ctx_sp,
                       uint32_t reg_num);
   ValueObjectRegister(ExecutionContextScope *exe_scope,
+                      ValueObjectManager &manager,
                       lldb::RegisterContextSP &reg_ctx_sp, uint32_t reg_num);
 
   // For ValueObject only
Index: lldb/include/lldb/Core/ValueObjectMemory.h
===================================================================
--- lldb/include/lldb/Core/ValueObjectMemory.h
+++ lldb/include/lldb/Core/ValueObjectMemory.h
@@ -64,10 +64,12 @@
   CompilerType m_compiler_type;
 
 private:
-  ValueObjectMemory(ExecutionContextScope *exe_scope, llvm::StringRef name,
+  ValueObjectMemory(ExecutionContextScope *exe_scope,
+                    ValueObjectManager &manager, llvm::StringRef name,
                     const Address &address, lldb::TypeSP &type_sp);
 
-  ValueObjectMemory(ExecutionContextScope *exe_scope, llvm::StringRef name,
+  ValueObjectMemory(ExecutionContextScope *exe_scope,
+                    ValueObjectManager &manager, llvm::StringRef name,
                     const Address &address, const CompilerType &ast_type);
   // For ValueObject only
   DISALLOW_COPY_AND_ASSIGN(ValueObjectMemory);
Index: lldb/include/lldb/Core/ValueObjectDynamicValue.h
===================================================================
--- lldb/include/lldb/Core/ValueObjectDynamicValue.h
+++ lldb/include/lldb/Core/ValueObjectDynamicValue.h
@@ -14,7 +14,6 @@
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Symbol/Type.h"
 #include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/SharingPtr.h"
 #include "lldb/lldb-defines.h"
 #include "lldb/lldb-enumerations.h"
 #include "lldb/lldb-forward.h"
Index: lldb/include/lldb/Core/ValueObjectConstResult.h
===================================================================
--- lldb/include/lldb/Core/ValueObjectConstResult.h
+++ lldb/include/lldb/Core/ValueObjectConstResult.h
@@ -121,30 +121,34 @@
   friend class ValueObjectConstResultImpl;
 
   ValueObjectConstResult(ExecutionContextScope *exe_scope,
+                         ValueObjectManager &manager,
                          lldb::ByteOrder byte_order, uint32_t addr_byte_size,
                          lldb::addr_t address);
 
   ValueObjectConstResult(ExecutionContextScope *exe_scope,
-                         const CompilerType &compiler_type,
-                         ConstString name, const DataExtractor &data,
-                         lldb::addr_t address);
+                         ValueObjectManager &manager,
+                         const CompilerType &compiler_type, ConstString name,
+                         const DataExtractor &data, lldb::addr_t address);
 
   ValueObjectConstResult(ExecutionContextScope *exe_scope,
-                         const CompilerType &compiler_type,
-                         ConstString name,
+                         ValueObjectManager &manager,
+                         const CompilerType &compiler_type, ConstString name,
                          const lldb::DataBufferSP &result_data_sp,
                          lldb::ByteOrder byte_order, uint32_t addr_size,
                          lldb::addr_t address);
 
   ValueObjectConstResult(ExecutionContextScope *exe_scope,
-                         const CompilerType &compiler_type,
-                         ConstString name, lldb::addr_t address,
-                         AddressType address_type, uint32_t addr_byte_size);
+                         ValueObjectManager &manager,
+                         const CompilerType &compiler_type, ConstString name,
+                         lldb::addr_t address, AddressType address_type,
+                         uint32_t addr_byte_size);
 
-  ValueObjectConstResult(ExecutionContextScope *exe_scope, const Value &value,
+  ValueObjectConstResult(ExecutionContextScope *exe_scope,
+                         ValueObjectManager &manager, const Value &value,
                          ConstString name, Module *module = nullptr);
 
-  ValueObjectConstResult(ExecutionContextScope *exe_scope, const Status &error);
+  ValueObjectConstResult(ExecutionContextScope *exe_scope,
+                         ValueObjectManager &manager, const Status &error);
 
   DISALLOW_COPY_AND_ASSIGN(ValueObjectConstResult);
 };
Index: lldb/include/lldb/Core/ValueObject.h
===================================================================
--- lldb/include/lldb/Core/ValueObject.h
+++ lldb/include/lldb/Core/ValueObject.h
@@ -902,7 +902,7 @@
   // Use this constructor to create a "root variable object".  The ValueObject
   // will be locked to this context through-out its lifespan.
 
-  ValueObject(ExecutionContextScope *exe_scope,
+  ValueObject(ExecutionContextScope *exe_scope, ValueObjectManager &manager,
               AddressType child_ptr_or_ref_addr_type = eAddressTypeLoad);
 
   // Use this constructor to create a ValueObject owned by another ValueObject.
Index: lldb/cmake/modules/LLDBFramework.cmake
===================================================================
--- lldb/cmake/modules/LLDBFramework.cmake
+++ lldb/cmake/modules/LLDBFramework.cmake
@@ -59,8 +59,7 @@
 set(lldb_header_staging ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders)
 foreach(header
     ${public_headers}
-    ${root_public_headers}
-    ${LLDB_SOURCE_DIR}/include/lldb/Utility/SharingPtr.h)
+    ${root_public_headers})
 
   get_filename_component(basename ${header} NAME)
   set(staged_header ${lldb_header_staging}/${basename})
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to