diff options
| author | Mandeep Singh Grang <mgrang@codeaurora.org> | 2018-04-13 19:47:01 +0000 |
|---|---|---|
| committer | Mandeep Singh Grang <mgrang@codeaurora.org> | 2018-04-13 19:47:01 +0000 |
| commit | db456efc8ed89c3534398f37fb364180e328d966 (patch) | |
| tree | 5c50f4210d7622be2cc0b34c499152e8bd0d2ba7 /llvm/lib/MC/WinCOFFObjectWriter.cpp | |
| parent | 8547f913fc4cea9e06f7ae6f42d76cb7a40f171f (diff) | |
| download | bcm5719-llvm-db456efc8ed89c3534398f37fb364180e328d966.tar.gz bcm5719-llvm-db456efc8ed89c3534398f37fb364180e328d966.zip | |
[MC] Change std::sort to llvm::sort in response to r327219
Summary:
r327219 added wrappers to std::sort which randomly shuffle the container before sorting.
This will help in uncovering non-determinism caused due to undefined sorting
order of objects having the same key.
To make use of that infrastructure we need to invoke llvm::sort instead of std::sort.
Note: This patch is one of a series of patches to replace *all* std::sort to llvm::sort.
Refer the comments section in D44363 for a list of all the required patches.
Reviewers: grosbach, void, ruiu
Reviewed By: ruiu
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D45138
llvm-svn: 330058
Diffstat (limited to 'llvm/lib/MC/WinCOFFObjectWriter.cpp')
| -rw-r--r-- | llvm/lib/MC/WinCOFFObjectWriter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/MC/WinCOFFObjectWriter.cpp b/llvm/lib/MC/WinCOFFObjectWriter.cpp index 25584100a3a..b58902751b8 100644 --- a/llvm/lib/MC/WinCOFFObjectWriter.cpp +++ b/llvm/lib/MC/WinCOFFObjectWriter.cpp @@ -567,10 +567,10 @@ void WinCOFFObjectWriter::writeSectionHeaders() { std::vector<COFFSection *> Arr; for (auto &Section : Sections) Arr.push_back(Section.get()); - std::sort(Arr.begin(), Arr.end(), - [](const COFFSection *A, const COFFSection *B) { - return A->Number < B->Number; - }); + llvm::sort(Arr.begin(), Arr.end(), + [](const COFFSection *A, const COFFSection *B) { + return A->Number < B->Number; + }); for (auto &Section : Arr) { if (Section->Number == -1) |

