[Lldb-commits] [lldb] r350146 - [SymbolContext] Rewrite operator== to be more concise.

Davide Italiano via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 28 20:57:01 PST 2018


Author: davide
Date: Fri Dec 28 20:57:00 2018
New Revision: 350146

URL: http://llvm.org/viewvc/llvm-project?rev=350146&view=rev
Log:
[SymbolContext] Rewrite operator== to be more concise.

And probably, less error prone. NFCI.

Modified:
    lldb/trunk/source/Symbol/SymbolContext.cpp

Modified: lldb/trunk/source/Symbol/SymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=350146&r1=350145&r2=350146&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolContext.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolContext.cpp Fri Dec 28 20:57:00 2018
@@ -393,12 +393,7 @@ bool lldb_private::operator==(const Symb
 
 bool lldb_private::operator!=(const SymbolContext &lhs,
                               const SymbolContext &rhs) {
-  return lhs.function != rhs.function || lhs.symbol != rhs.symbol ||
-         lhs.module_sp.get() != rhs.module_sp.get() ||
-         lhs.comp_unit != rhs.comp_unit ||
-         lhs.target_sp.get() != rhs.target_sp.get() ||
-         LineEntry::Compare(lhs.line_entry, rhs.line_entry) != 0 ||
-         lhs.variable != rhs.variable;
+  return !(lhs == rhs);
 }
 
 bool SymbolContext::GetAddressRange(uint32_t scope, uint32_t range_idx,




More information about the lldb-commits mailing list