[Lldb-commits] [lldb] r159685 - /lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h

Greg Clayton gclayton at apple.com
Tue Jul 3 13:52:00 PDT 2012


Author: gclayton
Date: Tue Jul  3 15:52:00 2012
New Revision: 159685

URL: http://llvm.org/viewvc/llvm-project?rev=159685&view=rev
Log:
Improved the name comparing logic a bit.


Modified:
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h?rev=159685&r1=159684&r2=159685&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h Tue Jul  3 15:52:00 2012
@@ -46,9 +46,11 @@
         bool
         NameMatches (const Entry& rhs) const
         {
-            if (name && rhs.name)
+            if (name == rhs.name)
+                return true;
+            else if (name && rhs.name)
                 return strcmp(name, rhs.name) == 0;
-            return name == NULL && rhs.name == NULL;
+            return false;
         }
 
         // Test operator





More information about the lldb-commits mailing list