1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

Make the comparison operators non-member functions.

llvm-svn: 184373
This commit is contained in:
Bill Wendling 2013-06-19 22:09:25 +00:00
parent abcbbb38cb
commit 3cff8f16d4
2 changed files with 11 additions and 7 deletions

View 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

View 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) &&