LLVM API Documentation

IsNAN.cpp

Go to the documentation of this file.
00001 //===-- IsNAN.cpp ---------------------------------------------------------===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file was developed by the LLVM research group and is distributed under
00006 // the University of Illinois Open Source License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // Platform-independent wrapper around C99 isnan().
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #include "llvm/Config/config.h"
00015 #include "llvm/System/IncludeFile.h"
00016 
00017 #if HAVE_ISNAN_IN_MATH_H
00018 # include <math.h>
00019 #elif HAVE_ISNAN_IN_CMATH
00020 # include <cmath>
00021 #elif HAVE_STD_ISNAN_IN_CMATH
00022 # include <cmath>
00023 using std::isnan;
00024 #elif defined(_MSC_VER)
00025 #include <float.h>
00026 #define isnan _isnan
00027 #else
00028 # error "Don't know how to get isnan()"
00029 #endif
00030 
00031 namespace llvm {
00032 
00033 int IsNAN (float f)  { return isnan (f); }
00034 int IsNAN (double d) { return isnan (d); }
00035 
00036 } // end namespace llvm;
00037 
00038 DEFINING_FILE_FOR(SupportIsNAN)