From d7331f2acbc25557e5a7feca3fb59fae1505ad18 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Tue, 3 Jul 2012 20:52:00 +0000 Subject: [PATCH] Improved the name comparing logic a bit. llvm-svn: 159685 --- lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h index 85c97f1c68f2..accd3446317a 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h @@ -46,9 +46,11 @@ public: 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