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