summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Ilseman <milseman@apple.com>2012-11-28 21:11:25 +0000
committerMichael Ilseman <milseman@apple.com>2012-11-28 21:11:25 +0000
commit0d38424bbebf2b52cb4ed93eff08e1085c859e91 (patch)
tree2dd170484b4ac469067c5ed0a506c92990d3178a /include
parent61c654ce5c86a7a9f8d81057979aa5b0eaab07b9 (diff)
downloadllvm-0d38424bbebf2b52cb4ed93eff08e1085c859e91.tar.gz
llvm-0d38424bbebf2b52cb4ed93eff08e1085c859e91.tar.bz2
llvm-0d38424bbebf2b52cb4ed93eff08e1085c859e91.tar.xz
Fast-math comments and convenience method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168811 91177308-0d34-0410-b5e6-96231b3b80d8
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;
+ }
};