Use std::is_sorted instead of manual loops. NFC
[oota-llvm.git] / include / llvm / MC / SubtargetFeature.h
index 02c9e82..40d4739 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);
+  }
 };
 
 //===----------------------------------------------------------------------===//