Skip to content

Conversation

@JDevlieghere
Copy link
Member

@JDevlieghere JDevlieghere requested a review from itf April 10, 2025 04:09
@JDevlieghere JDevlieghere merged commit 7f7f3d9 into main Apr 10, 2025
6 of 10 checks passed
@JDevlieghere JDevlieghere deleted the revert-135068-VersionType_operator_sanitizer_mac branch April 10, 2025 04:09
@llvmbot
Copy link
Member

llvmbot commented Apr 10, 2025

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Jonas Devlieghere (JDevlieghere)

Changes

Reverts llvm/llvm-project#135068 because it breaks building compiler-rt on Darwin.

https://green.lab.llvm.org/job/clang-stage1-RA/
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake/


Full diff: https://github.com/llvm/llvm-project/pull/135127.diff

1 Files Affected:

  • (modified) compiler-rt/lib/sanitizer_common/sanitizer_mac.h (+3-5)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_mac.h b/compiler-rt/lib/sanitizer_common/sanitizer_mac.h
index 4de0605e18f03..f0a97d098eea0 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_mac.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_mac.h
@@ -37,6 +37,9 @@ struct VersionBase {
 
   VersionBase(u16 major, u16 minor) : major(major), minor(minor) {}
 
+  bool operator==(const VersionType &other) const {
+    return major == other.major && minor == other.minor;
+  }
   bool operator>=(const VersionType &other) const {
     return major > other.major ||
            (major == other.major && minor >= other.minor);
@@ -44,11 +47,6 @@ struct VersionBase {
   bool operator<(const VersionType &other) const { return !(*this >= other); }
 };
 
-template <typename VersionType>
-bool operator==(const VersionType &self, const VersionType &other) {
-  return self.major == other.major && self.minor == other.minor;
-}
-
 struct MacosVersion : VersionBase<MacosVersion> {
   MacosVersion(u16 major, u16 minor) : VersionBase(major, minor) {}
 };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants