[libc-commits] [libc] [libc] Create a separate proxy header for math-function-macros.h (PR #98430)
via libc-commits
libc-commits at lists.llvm.org
Fri Jul 12 06:52:38 PDT 2024
lntue wrote:
When building the current PR's head in full build mode, some of the tests that rely on math function macros failed to build. You should update those tests to use `isnan` and `isinf` directly from `FPBits` class instead.
To reproduce:
```
$ cmake ../llvm -GNinja -DLLVM_ENABLE_PROJECTS="llvm;clang;compiler-rt;libc" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_LIBC_FULL_BUILD=ON -DLLVM_LIBC_INCLUDE_SCUDO=ON
$ ninja libc
$ ninja check-libc
```
Some of the failures:
```
In file included from /usr/local/google/home/lntue/experiment/llvm-project/libc/test/src/math/fminf_test.cpp:9:
/usr/local/google/home/lntue/experiment/llvm-project/libc/test/src/math/FMinTest.h:68:11: error: use of undeclared identifier 'isnan'
if (isnan(x) || isinf(x))
^
/usr/local/google/home/lntue/experiment/llvm-project/libc/test/src/math/fminf_test.cpp:13:1: note: in instantiation of member function 'FMinTest<float>::testRange' requested here
LIST_FMIN_TESTS(float, LIBC_NAMESPACE::fminf)
^
/usr/local/google/home/lntue/experiment/llvm-project/libc/test/src/math/FMinTest.h:90:37: note: expanded from macro 'LIST_FMIN_TESTS'
TEST_F(LlvmLibcFMinTest, Range) { testRange(&func); }
^
/usr/local/google/home/lntue/experiment/llvm-project/libc/test/src/math/FMinTest.h:70:11: error: use of undeclared identifier 'isnan'
if (isnan(y) || isinf(y))
^
```
https://github.com/llvm/llvm-project/pull/98430
More information about the libc-commits
mailing list