The previous function returned true for "s < s", which could completely mess up
the sorting of symbols within a section.
Unfortunately, I don't think there's a robust way to write a test for this.
Anything I come up with will be making assumptions about the particular
implementation of std::sort.
llvm-svn: 211704
Atom::Scope rScope = atomScope(rhs->scope);
if (lScope != rScope)
return lScope < rScope;
- // If same address and scope, sort by name.
- return (lhs->name.compare(rhs->name) < 1);
+ // If same address and scope, sort by name.
+ return lhs->name < rhs->name;
});
// Debug logging of symbols.