diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2022-07-23 15:14:14 +0200 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2022-07-23 15:19:05 +0200 |
commit | aba43035bdf89c08409f0efccaf5408165abed9e (patch) | |
tree | ae91c3b453964fe779d5dc8562b90507f59abe86 /llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | |
parent | e82880e6b8cd2f01ee18e99c4c7b6ec71b764e13 (diff) | |
download | llvm-aba43035bdf89c08409f0efccaf5408165abed9e.zip llvm-aba43035bdf89c08409f0efccaf5408165abed9e.tar.gz llvm-aba43035bdf89c08409f0efccaf5408165abed9e.tar.bz2 |
Use llvm::sort instead of std::sort where possible
llvm::sort is beneficial even when we use the iterator-based overload,
since it can optionally shuffle the elements (to detect
non-determinism). However llvm::sort is not usable everywhere, for
example, in compiler-rt.
Reviewed By: nhaehnle
Differential Revision: https://reviews.llvm.org/D130406
Diffstat (limited to 'llvm/lib/Bitcode/Writer/ValueEnumerator.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp index 727ec2e..998f629 100644 --- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp @@ -802,7 +802,7 @@ void ValueEnumerator::organizeMetadata() { // - by function, then // - by isa<MDString> // and then sort by the original/current ID. Since the IDs are guaranteed to - // be unique, the result of std::sort will be deterministic. There's no need + // be unique, the result of llvm::sort will be deterministic. There's no need // for std::stable_sort. llvm::sort(Order, [this](MDIndex LHS, MDIndex RHS) { return std::make_tuple(LHS.F, getMetadataTypeOrder(LHS.get(MDs)), LHS.ID) < |