[Lldb-commits] [lldb] r350163 - [TypeName] Simplify operator!=. NFCI.

Davide Italiano via lldb-commits lldb-commits at lists.llvm.org
Sun Dec 30 07:07:25 PST 2018


Author: davide
Date: Sun Dec 30 07:07:25 2018
New Revision: 350163

URL: http://llvm.org/viewvc/llvm-project?rev=350163&view=rev
Log:
[TypeName] Simplify operator!=. NFCI.

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

Modified: lldb/trunk/source/Symbol/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Type.cpp?rev=350163&r1=350162&r2=350163&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Type.cpp (original)
+++ lldb/trunk/source/Symbol/Type.cpp Sun Dec 30 07:07:25 2018
@@ -710,11 +710,7 @@ bool TypeAndOrName::operator==(const Typ
 }
 
 bool TypeAndOrName::operator!=(const TypeAndOrName &other) const {
-  if (m_type_pair != other.m_type_pair)
-    return true;
-  if (m_type_name != other.m_type_name)
-    return true;
-  return false;
+  return !(*this == other);
 }
 
 ConstString TypeAndOrName::GetName() const {




More information about the lldb-commits mailing list