ExportTrie nodes need to be visisted in order.
authorPete Cooper <peter_cooper@apple.com>
Fri, 5 Aug 2016 21:37:12 +0000 (21:37 +0000)
committerPete Cooper <peter_cooper@apple.com>
Fri, 5 Aug 2016 21:37:12 +0000 (21:37 +0000)
commitd0de3683ecb7e0484f298f8926ae9f97c51c5898
tree4033e3bb620dfb7dd68cb2a81ba3ae0b7ae16236
parentf7e452491052ba0de2c71afb979d6af2a2f260a9
ExportTrie nodes need to be visisted in order.

The export trie was being emitted in the order the nodes were
added to the vector, but instead needs to be visited in the order
that the nodes are traversed.  This matches the behaviour of ld64.

llvm-svn: 277869
lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
lld/test/mach-o/export-trie-order.yaml [new file with mode: 0644]