diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2014-03-05 17:09:51 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2014-03-05 17:09:51 +0000 |
| commit | f2c10e1340a09d888afcd5c56aa394a20a3ed6d4 (patch) | |
| tree | 7cf89c4ac92587312bc9b844b401346ea4bd66fd | |
| parent | 8f1439bd0ca0c5ee7eb496d072ebc8684629491d (diff) | |
| download | bcm5719-llvm-f2c10e1340a09d888afcd5c56aa394a20a3ed6d4.tar.gz bcm5719-llvm-f2c10e1340a09d888afcd5c56aa394a20a3ed6d4.zip | |
Remove definition of std::fmaf from libc++. Fixes bug #18910. This function should come from the C standard library. As a drive-by fix, update the tests to remove a warning from -Wabsolute-value
llvm-svn: 202990
| -rw-r--r-- | libcxx/include/cmath | 6 | ||||
| -rw-r--r-- | libcxx/test/numerics/c.math/cmath.pass.cpp | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/libcxx/include/cmath b/libcxx/include/cmath index def49c0bfcb..964c6729c16 100644 --- a/libcxx/include/cmath +++ b/libcxx/include/cmath @@ -1208,11 +1208,7 @@ fdim(_A1 __x, _A2 __y) _NOEXCEPT // fma -inline _LIBCPP_INLINE_VISIBILITY float fmaf(float __x, float __y, float __z) _NOEXCEPT {return (float)((double)__x*__y + __z);} -#ifndef FP_FAST_FMAF -#define FP_FAST_FMAF -#endif - +using ::fmaf; using ::fma; inline _LIBCPP_INLINE_VISIBILITY float fma(float __x, float __y, float __z) _NOEXCEPT {return fmaf(__x, __y, __z);} diff --git a/libcxx/test/numerics/c.math/cmath.pass.cpp b/libcxx/test/numerics/c.math/cmath.pass.cpp index 5db9fd14bbe..7c74d5b5b0b 100644 --- a/libcxx/test/numerics/c.math/cmath.pass.cpp +++ b/libcxx/test/numerics/c.math/cmath.pass.cpp @@ -190,8 +190,8 @@ void test_fabs() static_assert((std::is_same<decltype(std::fabs((unsigned long long)0)), double>::value), ""); static_assert((std::is_same<decltype(std::fabs((double)0)), double>::value), ""); static_assert((std::is_same<decltype(std::fabs((long double)0)), long double>::value), ""); - static_assert((std::is_same<decltype(std::fabsf(0)), float>::value), ""); - static_assert((std::is_same<decltype(std::fabsl(0)), long double>::value), ""); + static_assert((std::is_same<decltype(std::fabsf(0.0f)), float>::value), ""); + static_assert((std::is_same<decltype(std::fabsl(0.0L)), long double>::value), ""); assert(std::fabs(-1) == 1); } |

