diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-06-19 22:09:25 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-06-19 22:09:25 +0000 |
commit | 59aa54073848645cd20c828dfb1088127c541b36 (patch) | |
tree | d9138aa5ca0f28366e0436f56961231530621eb7 | |
parent | cc631588a96ef487814bd4a5b02120d25437aaff (diff) | |
download | external_llvm-59aa54073848645cd20c828dfb1088127c541b36.zip external_llvm-59aa54073848645cd20c828dfb1088127c541b36.tar.gz external_llvm-59aa54073848645cd20c828dfb1088127c541b36.tar.bz2 |
Make the comparison operators non-member functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184373 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Target/TargetOptions.h | 14 | ||||
-rw-r--r-- | lib/CodeGen/TargetOptionsImpl.cpp | 4 |
2 files changed, 11 insertions, 7 deletions
diff --git a/include/llvm/Target/TargetOptions.h b/include/llvm/Target/TargetOptions.h index fc68c9e..e4a4b87 100644 --- a/include/llvm/Target/TargetOptions.h +++ b/include/llvm/Target/TargetOptions.h @@ -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 diff --git a/lib/CodeGen/TargetOptionsImpl.cpp b/lib/CodeGen/TargetOptionsImpl.cpp index c9c88c1..2cc0d40 100644 --- a/lib/CodeGen/TargetOptionsImpl.cpp +++ b/lib/CodeGen/TargetOptionsImpl.cpp @@ -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) && |