Use instead of passing a lambda to std::is_sorted. This is more consistent with SubtargetFeatureKV.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355300
91177308-0d34-0410-b5e6-
96231b3b80d8
bool operator<(StringRef S) const {
return StringRef(Key) < S;
}
+
+ /// Compare routine for std::is_sorted.
+ bool operator<(const SubtargetInfoKV &Other) const {
+ return StringRef(Key) < StringRef(Other.Key);
+ }
};
//===----------------------------------------------------------------------===//
ArrayRef<SubtargetInfoKV> SchedModels(ProcSchedModels, ProcDesc.size());
- assert(std::is_sorted(SchedModels.begin(), SchedModels.end(),
- [](const SubtargetInfoKV &LHS, const SubtargetInfoKV &RHS) {
- return strcmp(LHS.Key, RHS.Key) < 0;
- }) &&
+ assert(std::is_sorted(SchedModels.begin(), SchedModels.end()) &&
"Processor machine model table is not sorted");
// Find entry