diff options
Diffstat (limited to 'llvm/lib/IR/Operator.cpp')
-rw-r--r-- | llvm/lib/IR/Operator.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/lib/IR/Operator.cpp b/llvm/lib/IR/Operator.cpp index cf309ffd6212..d15fcfbc5b9f 100644 --- a/llvm/lib/IR/Operator.cpp +++ b/llvm/lib/IR/Operator.cpp @@ -226,4 +226,25 @@ bool GEPOperator::collectOffset( } return true; } + +void FastMathFlags::print(raw_ostream &O) const { + if (all()) + O << " fast"; + else { + if (allowReassoc()) + O << " reassoc"; + if (noNaNs()) + O << " nnan"; + if (noInfs()) + O << " ninf"; + if (noSignedZeros()) + O << " nsz"; + if (allowReciprocal()) + O << " arcp"; + if (allowContract()) + O << " contract"; + if (approxFunc()) + O << " afn"; + } +} } // namespace llvm |