LLVM
20.0.0git
lib
Support
MathExtras.cpp
Go to the documentation of this file.
1
//===-- MathExtras.cpp - Implement the MathExtras header --------------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file implements the MathExtras.h header
10
//
11
//===----------------------------------------------------------------------===//
12
13
#include "
llvm/Support/MathExtras.h
"
14
15
#ifdef _MSC_VER
16
#include <limits>
17
#else
18
#include <cmath>
19
#endif
20
21
namespace
llvm
{
22
23
#if defined(_MSC_VER)
24
// Visual Studio defines the HUGE_VAL class of macros using purposeful
25
// constant arithmetic overflow, which it then warns on when encountered.
26
const
float
huge_valf
= std::numeric_limits<float>::infinity();
27
#else
28
const
float
huge_valf
= HUGE_VALF;
29
#endif
30
31
}
// namespace llvm
MathExtras.h
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
llvm::huge_valf
const float huge_valf
Use this rather than HUGE_VALF; the latter causes warnings on MSVC.
Definition:
MathExtras.cpp:28
Generated on Sat Dec 21 2024 01:51:20 for LLVM by
1.9.6