Make the comparison operators non-member functions.
authorBill Wendling <isanbard@gmail.com>
Wed, 19 Jun 2013 22:09:25 +0000 (22:09 +0000)
committerBill Wendling <isanbard@gmail.com>
Wed, 19 Jun 2013 22:09:25 +0000 (22:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184373 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetOptions.h
lib/CodeGen/TargetOptionsImpl.cpp

index fc68c9ef2c90f15068282083961ae2ca283a9248..e4a4b8797a22067d77b90644fce699b8b9c4e3ea 100644 (file)
@@ -203,12 +203,16 @@ namespace llvm {
     /// via the llvm.fma.* intrinsic) will always be honored, regardless of
     /// the value of this option.
     FPOpFusion::FPOpFusionMode AllowFPOpFusion;
-
-    bool operator==(const TargetOptions &TM);
-    bool operator!=(const TargetOptions &TM) {
-      return !(*this == TM);
-    }
   };
+
+// Comparison operators:
+
+bool operator==(const TargetOptions &LHS, const TargetOptions &RHS);
+
+bool operator!=(const TargetOptions &LHS, const TargetOptions &RHS) {
+  return !(LHS == RHS);
+}
+
 } // End llvm namespace
 
 #endif
index c9c88c183a1b5f560a261bdac6f2c80d9c37be19..2cc0d4002d70342dae97567af2ae4f59b6acb9b9 100644 (file)
@@ -50,8 +50,8 @@ StringRef TargetOptions::getTrapFunctionName() const {
   return TrapFuncName;
 }
 
-bool TargetOptions::operator==(const TargetOptions &TO) {
-#define ARE_EQUAL(X) X == TO.X
+bool operator==(const TargetOptions &LHS, const TargetOptions &RHS) {
+#define ARE_EQUAL(X) LHS.X == RHS.X
   return
     ARE_EQUAL(UnsafeFPMath) &&
     ARE_EQUAL(NoInfsFPMath) &&