aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Attributes.cpp
diff options
context:
space:
mode:
authorBalazs Benics <balazs.benics@sigmatechnology.se>2022-05-27 11:18:05 +0200
committerBalazs Benics <balazs.benics@sigmatechnology.se>2022-05-27 11:19:18 +0200
commita73b50ad0649d635433547ff51cd73d2ce9f085b (patch)
tree6ad38674ad8dcb028acebb70a6c7ec1b0c5d9184 /llvm/lib/IR/Attributes.cpp
parent3988bd13988aad72ec979beb2361e8738584926b (diff)
downloadllvm-a73b50ad0649d635433547ff51cd73d2ce9f085b.zip
llvm-a73b50ad0649d635433547ff51cd73d2ce9f085b.tar.gz
llvm-a73b50ad0649d635433547ff51cd73d2ce9f085b.tar.bz2
Revert "[llvm][clang][bolt][NFC] Use llvm::less_first() when applicable"
This reverts commit 3988bd13988aad72ec979beb2361e8738584926b. Did not build on this bot: https://lab.llvm.org/buildbot#builders/215/builds/6372 /usr/include/c++/9/bits/predefined_ops.h:177:11: error: no match for call to ‘(llvm::less_first) (std::pair<long unsigned int, llvm::bolt::BinaryBasicBlock*>&, const std::pair<long unsigned int, std::nullptr_t>&)’ 177 | { return bool(_M_comp(*__it, __val)); }
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r--llvm/lib/IR/Attributes.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp
index 31141cf..1aa2d44 100644
--- a/llvm/lib/IR/Attributes.cpp
+++ b/llvm/lib/IR/Attributes.cpp
@@ -1018,7 +1018,11 @@ AttributeList::get(LLVMContext &C,
if (Attrs.empty())
return {};
- assert(llvm::is_sorted(Attrs, llvm::less_first()) &&
+ assert(llvm::is_sorted(Attrs,
+ [](const std::pair<unsigned, Attribute> &LHS,
+ const std::pair<unsigned, Attribute> &RHS) {
+ return LHS.first < RHS.first;
+ }) &&
"Misordered Attributes list!");
assert(llvm::all_of(Attrs,
[](const std::pair<unsigned, Attribute> &Pair) {
@@ -1051,7 +1055,11 @@ AttributeList::get(LLVMContext &C,
if (Attrs.empty())
return {};
- assert(llvm::is_sorted(Attrs, llvm::less_first()) &&
+ assert(llvm::is_sorted(Attrs,
+ [](const std::pair<unsigned, AttributeSet> &LHS,
+ const std::pair<unsigned, AttributeSet> &RHS) {
+ return LHS.first < RHS.first;
+ }) &&
"Misordered Attributes list!");
assert(llvm::none_of(Attrs,
[](const std::pair<unsigned, AttributeSet> &Pair) {