summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Operator.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Operator.h b/include/llvm/Operator.h
index beea034bca..289df4e848 100644
--- a/include/llvm/Operator.h
+++ b/include/llvm/Operator.h
@@ -176,10 +176,16 @@ struct FastMathFlags {
NoSignedZeros(false), AllowReciprocal(false)
{ }
+ /// Whether any flag is set
bool any() {
return UnsafeAlgebra || NoNaNs || NoInfs || NoSignedZeros ||
AllowReciprocal;
}
+
+ /// Set all the flags to false
+ void clear() {
+ UnsafeAlgebra = NoNaNs = NoInfs = NoSignedZeros = AllowReciprocal = false;
+ }
};