[mach-o]: make sure custom sort method is irreflexive.
authorTim Northover <tnorthover@apple.com>
Wed, 25 Jun 2014 15:12:55 +0000 (15:12 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 25 Jun 2014 15:12:55 +0000 (15:12 +0000)
commit1565e56785c84af6ae59f950f367a7963481456b
tree513d97e716a4988828e8948e39da3c9663e290e8
parenta9b7ec18f120e3570c5e41ce485cc12845c80d2b
[mach-o]: make sure custom sort method is irreflexive.

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
lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp