[llvm][TextAPI] Ignore deployment version in target comparator
authorCyndy Ishida <cyndy_ishida@apple.com>
Mon, 3 Apr 2023 14:29:25 +0000 (07:29 -0700)
committerCyndy Ishida <cyndy_ishida@apple.com>
Mon, 3 Apr 2023 15:12:30 +0000 (08:12 -0700)
llvm/include/llvm/TextAPI/Target.h

index c8a1c4f..edcc070 100644 (file)
@@ -54,8 +54,8 @@ inline bool operator!=(const Target &LHS, const Target &RHS) {
 }
 
 inline bool operator<(const Target &LHS, const Target &RHS) {
-  return std::tie(LHS.Arch, LHS.Platform, LHS.MinDeployment) <
-         std::tie(RHS.Arch, RHS.Platform, RHS.MinDeployment);
+  // In most cases the deployment version is not useful to compare.
+  return std::tie(LHS.Arch, LHS.Platform) < std::tie(RHS.Arch, RHS.Platform);
 }
 
 inline bool operator==(const Target &LHS, const Architecture &RHS) {