Substituted LLVM-specific IsNAN() and IsInf() with their math.h versions

This commit is contained in:
Andrey Guskov
2015-03-11 18:33:49 +03:00
parent b43678b2e3
commit dba22837f6

View File

@@ -15,6 +15,7 @@
#include "ispc.h"
#include "module.h"
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <sstream>
@@ -1566,7 +1567,7 @@ void CWriter::printConstant(llvm::Constant *CPV, bool Static) {
V = Tmp.convertToDouble();
}
if (llvm::IsNAN(V)) {
if (isnan(V)) {
// The value is NaN
// FIXME the actual NaN bits should be emitted.
@@ -1590,7 +1591,7 @@ void CWriter::printConstant(llvm::Constant *CPV, bool Static) {
else
Out << "LLVM_NAN" << (Val == QuietNaN ? "" : "S") << "(\""
<< Buffer << "\") /*nan*/ ";
} else if (llvm::IsInf(V)) {
} else if (isinf(V)) {
// The value is Inf
if (V < 0) Out << '-';
Out << "LLVM_INF" <<