llvm-6502/lib/Support/IsNAN.cpp
Reid Spencer 7107c3badf 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29287 91177308-0d34-0410-b5e6-96231b3b80d8
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)