Fast-math comments and convenience method
authorMichael Ilseman <milseman@apple.com>
Wed, 28 Nov 2012 21:11:25 +0000 (21:11 +0000)
committerMichael Ilseman <milseman@apple.com>
Wed, 28 Nov 2012 21:11:25 +0000 (21:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168811 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Operator.h

index beea034bcaa4253db5c26a30192024d2fa6af968..289df4e8480a2f030f4f50ad3bd5176cf3f97344 100644 (file)
@@ -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;
+  }
 };