summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-06-19 22:16:11 +0000
committerBill Wendling <isanbard@gmail.com>2013-06-19 22:16:11 +0000
commit3b6e067f56db88509d9254ecc70951d77d51a2d7 (patch)
treec491fc556207cd43c77732a8c6de1cb8377f465a /include
parent8623ecb263ef2b2e13e34608d90dca52f21fd6db (diff)
downloadllvm-3b6e067f56db88509d9254ecc70951d77d51a2d7.tar.gz
llvm-3b6e067f56db88509d9254ecc70951d77d51a2d7.tar.bz2
llvm-3b6e067f56db88509d9254ecc70951d77d51a2d7.tar.xz
Make the '==' operator inline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Target/TargetOptions.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/include/llvm/Target/TargetOptions.h b/include/llvm/Target/TargetOptions.h
index 037a5f2fad..54d5ae45c8 100644
--- a/include/llvm/Target/TargetOptions.h
+++ b/include/llvm/Target/TargetOptions.h
@@ -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);
}