[libc-commits] [libc] [libc] Only declare float128 math functions in the generated math.h if float128 type is supported. (PR #81010)

via libc-commits libc-commits at lists.llvm.org
Wed Feb 7 10:32:05 PST 2024


================
@@ -11,6 +11,26 @@
 
 #include <__llvm-libc-common.h>
 #include <llvm-libc-macros/math-macros.h>
+#include <llvm-libc-types/float128.h>
+
+#ifdef LIBC_COMPILER_HAS_FLOAT128
+// Only declare float128 functions if float128 is supported.
+
+__BEGIN_C_DECLS
+
+float128 copysignf128(float128) __NOEXCEPT;
----------------
michaelrj-google wrote:

With the generated headers we shouldn't be defining function prototypes except through the generation. Is there a way we could do this with exclusions/inclusions for the entrypoints list? We could do something similar to `has_sys_random`.

https://github.com/llvm/llvm-project/pull/81010


More information about the libc-commits mailing list