[llvm] r184375 - Make the '==' operator inline.
Bill Wendling
isanbard at gmail.com
Wed Jun 19 15:16:12 PDT 2013
Author: void
Date: Wed Jun 19 17:16:11 2013
New Revision: 184375
URL: http://llvm.org/viewvc/llvm-project?rev=184375&view=rev
Log:
Make the '==' operator inline.
Modified:
llvm/trunk/include/llvm/Target/TargetOptions.h
Modified: llvm/trunk/include/llvm/Target/TargetOptions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetOptions.h?rev=184375&r1=184374&r2=184375&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetOptions.h (original)
+++ llvm/trunk/include/llvm/Target/TargetOptions.h Wed Jun 19 17:16:11 2013
@@ -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);
}
More information about the llvm-commits
mailing list