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/Analysis/TargetLibraryInfo.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/Analysis/TargetLibraryInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/TargetLibraryInfo.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp index ffa6921..cae71d1 100644 --- a/llvm/lib/Analysis/TargetLibraryInfo.cpp +++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp @@ -69,11 +69,10 @@ static bool hasBcmp(const Triple &TT) { static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, ArrayRef<StringLiteral> StandardNames) { // Verify that the StandardNames array is in alphabetical order. - assert(std::is_sorted(StandardNames.begin(), StandardNames.end(), - [](StringRef LHS, StringRef RHS) { - return LHS < RHS; - }) && - "TargetLibraryInfoImpl function names must be sorted"); + assert( + llvm::is_sorted(StandardNames, + [](StringRef LHS, StringRef RHS) { return LHS < RHS; }) && + "TargetLibraryInfoImpl function names must be sorted"); // Set IO unlocked variants as unavailable // Set them as available per system below |