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();
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();
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits