From dba22837f6a1d2ac141401a0a8c3004aeeb09de1 Mon Sep 17 00:00:00 2001 From: Andrey Guskov Date: Wed, 11 Mar 2015 18:33:49 +0300 Subject: [PATCH] Substituted LLVM-specific IsNAN() and IsInf() with their math.h versions --- cbackend.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cbackend.cpp b/cbackend.cpp index ebcdbc04..b641d5ad 100644 --- a/cbackend.cpp +++ b/cbackend.cpp @@ -15,6 +15,7 @@ #include "ispc.h" #include "module.h" +#include #include #include #include @@ -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" <<