[ELF] - Never use std::sort.
authorGeorge Rimar <grimar@accesssoftek.com>
Tue, 24 Apr 2018 09:55:39 +0000 (09:55 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Tue, 24 Apr 2018 09:55:39 +0000 (09:55 +0000)
commitde83cbf37e8ac59d405b4d3ea2ce389e619bc901
treef34e2247ddd4138d610c0a9fe7207c92a48af823
parent19f9b814ddb01f6922fd47aa6066446aff3b9575
[ELF] - Never use std::sort.

It turns out we should not use the std::sort anymore.
r327219 added a new wrapper llvm::sort (D39245).
When EXPENSIVE_CHECKS is defined, it shuffles the
input container and that helps to find non-deterministic
ordering.

Patch changes code to use llvm::sort and std::stable_sort
instead of std::sort

Differential revision: https://reviews.llvm.org/D45969

llvm-svn: 330702
lld/ELF/CallGraphSort.cpp
lld/ELF/MapFile.cpp
lld/ELF/SyntheticSections.cpp
lld/ELF/Writer.cpp