[Lldb-commits] [lldb] b8f4e0a - [lldb] Remove reset(nullptr_t) overload from SharingPtr

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 6 10:07:15 PST 2020


Author: Pavel Labath
Date: 2020-02-06T10:07:06-08:00
New Revision: b8f4e0a8234377cdac8740addfdabee339b12d2a

URL: https://github.com/llvm/llvm-project/commit/b8f4e0a8234377cdac8740addfdabee339b12d2a
DIFF: https://github.com/llvm/llvm-project/commit/b8f4e0a8234377cdac8740addfdabee339b12d2a.diff

LOG: [lldb] Remove reset(nullptr_t) overload from SharingPtr

std::shared_ptr has no such method. This makes the two more similar.

Added: 
    

Modified: 
    lldb/include/lldb/Breakpoint/Watchpoint.h
    lldb/include/lldb/Utility/SharingPtr.h

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Breakpoint/Watchpoint.h b/lldb/include/lldb/Breakpoint/Watchpoint.h
index 2cc74bb4c632..27b0d36b4308 100644
--- a/lldb/include/lldb/Breakpoint/Watchpoint.h
+++ b/lldb/include/lldb/Breakpoint/Watchpoint.h
@@ -160,8 +160,8 @@ class Watchpoint : public std::enable_shared_from_this<Watchpoint>,
   void ResetHitCount() { m_hit_count = 0; }
 
   void ResetHistoricValues() {
-    m_old_value_sp.reset(nullptr);
-    m_new_value_sp.reset(nullptr);
+    m_old_value_sp.reset();
+    m_new_value_sp.reset();
   }
 
   Target &m_target;

diff  --git a/lldb/include/lldb/Utility/SharingPtr.h b/lldb/include/lldb/Utility/SharingPtr.h
index ddd55a00d384..76e340a3ae66 100644
--- a/lldb/include/lldb/Utility/SharingPtr.h
+++ b/lldb/include/lldb/Utility/SharingPtr.h
@@ -135,7 +135,6 @@ template <class T> class SharingPtr {
   void swap(SharingPtr &r);
   void reset();
   template <class Y> void reset(Y *p);
-  void reset(std::nullptr_t);
 
   element_type *get() const { return ptr_; }
   element_type &operator*() const { return *ptr_; }
@@ -235,10 +234,6 @@ template <class T> inline void SharingPtr<T>::reset() {
   SharingPtr().swap(*this);
 }
 
-template <class T> inline void SharingPtr<T>::reset(std::nullptr_t p) {
-  reset();
-}
-
 template <class T> template <class Y> inline void SharingPtr<T>::reset(Y *p) {
   SharingPtr(p).swap(*this);
 }


        


More information about the lldb-commits mailing list