[Lldb-commits] [PATCH] D59217: Fix/unify SBType comparison

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 13 06:46:19 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL356048: Fix/unify SBType comparison (authored by labath, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

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

https://reviews.llvm.org/D59217

Files:
  lldb/trunk/include/lldb/Symbol/Type.h
  lldb/trunk/scripts/Python/modify-python-lldb.py
  lldb/trunk/scripts/interface/SBType.i


Index: lldb/trunk/scripts/Python/modify-python-lldb.py
===================================================================
--- lldb/trunk/scripts/Python/modify-python-lldb.py
+++ lldb/trunk/scripts/Python/modify-python-lldb.py
@@ -143,7 +143,6 @@
      'SBWatchpoint': ['GetID'],
      'SBFileSpec': ['GetFilename', 'GetDirectory'],
      'SBModule': ['GetFileSpec', 'GetUUIDString'],
-     'SBType': ['GetByteSize', 'GetName']
      }
 
 
Index: lldb/trunk/scripts/interface/SBType.i
===================================================================
--- lldb/trunk/scripts/interface/SBType.i
+++ lldb/trunk/scripts/interface/SBType.i
@@ -322,6 +322,10 @@
     uint32_t
     GetTypeFlags ();
 
+    bool operator==(lldb::SBType &rhs);
+
+    bool operator!=(lldb::SBType &rhs);
+
     %pythoncode %{
         def template_arg_array(self):
             num_args = self.num_template_args
Index: lldb/trunk/include/lldb/Symbol/Type.h
===================================================================
--- lldb/trunk/include/lldb/Symbol/Type.h
+++ lldb/trunk/include/lldb/Symbol/Type.h
@@ -256,14 +256,10 @@
   explicit operator bool() const { return IsValid(); }
 
   bool operator==(const TypePair &rhs) const {
-    return compiler_type == rhs.compiler_type &&
-           type_sp.get() == rhs.type_sp.get();
+    return compiler_type == rhs.compiler_type;
   }
 
-  bool operator!=(const TypePair &rhs) const {
-    return compiler_type != rhs.compiler_type ||
-           type_sp.get() != rhs.type_sp.get();
-  }
+  bool operator!=(const TypePair &rhs) const { return !(*this == rhs); }
 
   void Clear() {
     compiler_type.Clear();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59217.190404.patch
Type: text/x-patch
Size: 1639 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190313/10c18c50/attachment-0001.bin>


More information about the lldb-commits mailing list