Skip to content

Commit

Permalink
Make the '==' operator inline.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184375 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
isanbard committed Jun 19, 2013
1 parent 8623ecb commit 3b6e067
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions include/llvm/Target/TargetOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,36 @@ namespace llvm {

// Comparison operators:

bool operator==(const TargetOptions &LHS, const TargetOptions &RHS);

static inline bool operator!=(const TargetOptions &LHS, const TargetOptions &RHS) {
static inline bool operator==(const TargetOptions &LHS,
const TargetOptions &RHS) {
#define ARE_EQUAL(X) LHS.X == RHS.X
return
ARE_EQUAL(UnsafeFPMath) &&
ARE_EQUAL(NoInfsFPMath) &&
ARE_EQUAL(NoNaNsFPMath) &&
ARE_EQUAL(HonorSignDependentRoundingFPMathOption) &&
ARE_EQUAL(UseSoftFloat) &&
ARE_EQUAL(NoZerosInBSS) &&
ARE_EQUAL(JITEmitDebugInfo) &&
ARE_EQUAL(JITEmitDebugInfoToDisk) &&
ARE_EQUAL(GuaranteedTailCallOpt) &&
ARE_EQUAL(DisableTailCalls) &&
ARE_EQUAL(StackAlignmentOverride) &&
ARE_EQUAL(RealignStack) &&
ARE_EQUAL(SSPBufferSize) &&
ARE_EQUAL(EnableFastISel) &&
ARE_EQUAL(PositionIndependentExecutable) &&
ARE_EQUAL(EnableSegmentedStacks) &&
ARE_EQUAL(UseInitArray) &&
ARE_EQUAL(TrapFuncName) &&
ARE_EQUAL(FloatABIType) &&
ARE_EQUAL(AllowFPOpFusion);
#undef ARE_EQUAL
}

static inline bool operator!=(const TargetOptions &LHS,
const TargetOptions &RHS) {
return !(LHS == RHS);
}

Expand Down

0 comments on commit 3b6e067

Please sign in to comment.