Improved the name comparing logic a bit.

llvm-svn: 159685
This commit is contained in:
Greg Clayton 2012-07-03 20:52:00 +00:00
parent b601c96892
commit d7331f2acb
1 changed files with 4 additions and 2 deletions

View File

@ -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