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 -bool operator==(const VersionType &self, const VersionType &other) { - return self.major == other.major && self.minor == other.minor; -} - struct MacosVersion : VersionBase { MacosVersion(u16 major, u16 minor) : VersionBase(major, minor) {} };