1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/lib/Support/IsNAN.cpp
Reid Spencer 10b9edbb69 For PR780:
1. Move IncludeFile.h to System library
2. Move IncludeFile.cpp to System library
3. #1 and #2 required to prevent cyclic library dependencies for libSystem
4. Convert all existing uses of Support/IncludeFile.h to System/IncludeFile.h
5. Add IncludeFile support to various lib/System classes.
6. Add new lib/System classes to LinkAllVMCore.h
All this in an attempt to pull in lib/System to what's required for VMCore

llvm-svn: 29287
2006-07-26 16:18:00 +00:00

39 lines
1.0 KiB
C++

//===-- IsNAN.cpp ---------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// Platform-independent wrapper around C99 isnan().
//
//===----------------------------------------------------------------------===//
#include "llvm/Config/config.h"
#include "llvm/System/IncludeFile.h"
#if HAVE_ISNAN_IN_MATH_H
# include <math.h>
#elif HAVE_ISNAN_IN_CMATH
# include <cmath>
#elif HAVE_STD_ISNAN_IN_CMATH
# include <cmath>
using std::isnan;
#elif defined(_MSC_VER)
#include <float.h>
#define isnan _isnan
#else
# error "Don't know how to get isnan()"
#endif
namespace llvm {
int IsNAN (float f) { return isnan (f); }
int IsNAN (double d) { return isnan (d); }
} // end namespace llvm;
DEFINING_FILE_FOR(SupportIsNAN)