Use std::is_sorted instead of manual loops. NFC
[oota-llvm.git] / include / llvm / MC / SubtargetFeature.h
index 02c9e82ad3a618e427416c81a8a2d5e5350f8e28..40d4739fe9cba413472f68077dad9d8c23905637 100644 (file)
@@ -59,6 +59,11 @@ struct SubtargetFeatureKV {
   bool operator<(StringRef S) const {
     return StringRef(Key) < S;
   }
+
+  // Compare routine for std::is_sorted.
+  bool operator<(const SubtargetFeatureKV &Other) const {
+    return StringRef(Key) < StringRef(Other.Key);
+  }
 };
 
 //===----------------------------------------------------------------------===//