summaryrefslogtreecommitdiff
path: root/lib/Bitcode/Reader
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-02-24 21:27:30 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-02-24 21:27:30 +0000
commit0f8e52dfc671bf6e2c09c8a28062ec76237954ea (patch)
tree03012a05e4c16a3dd809c281777acd1d9fe4a127 /lib/Bitcode/Reader
parent3c315f3a8e8f326948fc789f146794ecd33cc540 (diff)
Diffstat (limited to 'lib/Bitcode/Reader')
-rw-r--r--lib/Bitcode/Reader/BitcodeReader.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp
index 95291a1caf9a5..945ac45153686 100644
--- a/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -1046,19 +1046,21 @@ static Comdat::SelectionKind getDecodedComdatSelectionKind(unsigned Val) {
static FastMathFlags getDecodedFastMathFlags(unsigned Val) {
FastMathFlags FMF;
- if (0 != (Val & FastMathFlags::AllowReassoc))
+ if (0 != (Val & bitc::UnsafeAlgebra))
+ FMF.setFast();
+ if (0 != (Val & bitc::AllowReassoc))
FMF.setAllowReassoc();
- if (0 != (Val & FastMathFlags::NoNaNs))
+ if (0 != (Val & bitc::NoNaNs))
FMF.setNoNaNs();
- if (0 != (Val & FastMathFlags::NoInfs))
+ if (0 != (Val & bitc::NoInfs))
FMF.setNoInfs();
- if (0 != (Val & FastMathFlags::NoSignedZeros))
+ if (0 != (Val & bitc::NoSignedZeros))
FMF.setNoSignedZeros();
- if (0 != (Val & FastMathFlags::AllowReciprocal))
+ if (0 != (Val & bitc::AllowReciprocal))
FMF.setAllowReciprocal();
- if (0 != (Val & FastMathFlags::AllowContract))
+ if (0 != (Val & bitc::AllowContract))
FMF.setAllowContract(true);
- if (0 != (Val & FastMathFlags::ApproxFunc))
+ if (0 != (Val & bitc::ApproxFunc))
FMF.setApproxFunc();
return FMF;
}