Revert "Replace bool operator== for VersionType in sanitizer_mac.h" (#135127)

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/
This commit is contained in:
Jonas Devlieghere
2025-04-09 21:09:27 -07:00
committed by GitHub
parent 0283bb3afc
commit 7f7f3d91a2

View File

@@ -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) {}
};