diff options
author | Georgii Rymar <grimar@accesssoftek.com> | 2020-04-13 14:46:41 +0300 |
---|---|---|
committer | Georgii Rymar <grimar@accesssoftek.com> | 2020-04-14 14:11:02 +0300 |
commit | 1647ff6e2753026f8a1e21c60d37b83602520b64 (patch) | |
tree | 9bef856966e757bd7468c1e48f709ce38287e414 /llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | |
parent | 58516718fc66de01f1221c7d30b06c297296a264 (diff) | |
download | llvm-1647ff6e2753026f8a1e21c60d37b83602520b64.zip llvm-1647ff6e2753026f8a1e21c60d37b83602520b64.tar.gz llvm-1647ff6e2753026f8a1e21c60d37b83602520b64.tar.bz2 |
[ADT/STLExtras.h] - Add llvm::is_sorted wrapper and update callers.
It can be used to avoid passing the begin and end of a range.
This makes the code shorter and it is consistent with another
wrappers we already have.
Differential revision: https://reviews.llvm.org/D78016
Diffstat (limited to 'llvm/lib/Bitcode/Writer/ValueEnumerator.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp index 7419c46..8bdddc2 100644 --- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp @@ -231,9 +231,9 @@ static void predictValueUseListOrderImpl(const Value *V, const Function *F, return LU->getOperandNo() > RU->getOperandNo(); }); - if (std::is_sorted( - List.begin(), List.end(), - [](const Entry &L, const Entry &R) { return L.second < R.second; })) + if (llvm::is_sorted(List, [](const Entry &L, const Entry &R) { + return L.second < R.second; + })) // Order is already correct. return; |