Fast-math comments and convenience method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168811 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael Ilseman 2012-11-28 21:11:25 +00:00
parent 61c654ce5c
commit 0d38424bbe

View 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;
}
};