diff options
author | Kazu Hirata <kazu@google.com> | 2022-06-04 21:23:18 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-06-04 21:23:18 -0700 |
commit | 4969a6924dc1644d4fa6cf89a33b598e647f5513 (patch) | |
tree | 3dc3346c312ae3471a42a5ce87b5c070ca953e1f /llvm/lib/IR/Attributes.cpp | |
parent | 32ce076d780b914d048fc90dfdc49c950483e307 (diff) | |
download | llvm-4969a6924dc1644d4fa6cf89a33b598e647f5513.zip llvm-4969a6924dc1644d4fa6cf89a33b598e647f5513.tar.gz llvm-4969a6924dc1644d4fa6cf89a33b598e647f5513.tar.bz2 |
Use llvm::less_first (NFC)
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r-- | llvm/lib/IR/Attributes.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp index 11308c3..2006d2f 100644 --- a/llvm/lib/IR/Attributes.cpp +++ b/llvm/lib/IR/Attributes.cpp @@ -1054,11 +1054,7 @@ AttributeList::get(LLVMContext &C, if (Attrs.empty()) return {}; - assert(llvm::is_sorted(Attrs, - [](const std::pair<unsigned, Attribute> &LHS, - const std::pair<unsigned, Attribute> &RHS) { - return LHS.first < RHS.first; - }) && + assert(llvm::is_sorted(Attrs, llvm::less_first()) && "Misordered Attributes list!"); assert(llvm::all_of(Attrs, [](const std::pair<unsigned, Attribute> &Pair) { @@ -1091,11 +1087,7 @@ AttributeList::get(LLVMContext &C, if (Attrs.empty()) return {}; - assert(llvm::is_sorted(Attrs, - [](const std::pair<unsigned, AttributeSet> &LHS, - const std::pair<unsigned, AttributeSet> &RHS) { - return LHS.first < RHS.first; - }) && + assert(llvm::is_sorted(Attrs, llvm::less_first()) && "Misordered Attributes list!"); assert(llvm::none_of(Attrs, [](const std::pair<unsigned, AttributeSet> &Pair) { |