[clang] [libc] [llvm] [clang] Make __builtin_expf constexpr. (PR #140841)

2025-05-21 Thread via cfe-commits
lntue wrote: > I think the `errno` change should be extracted into a separate PR since > that's related to libc internals and would make the actual change much > smaller and easier to review. Yes, I do plan to split the commits into their own PRs. But probably I should go ahead and do the li

[clang] [libc] [llvm] [clang] Make __builtin_expf constexpr. (PR #140841)

2025-05-21 Thread via cfe-commits
https://github.com/lntue edited https://github.com/llvm/llvm-project/pull/140841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [clang] Make __builtin_expf constexpr. (PR #140841)

2025-05-21 Thread Alexey Samsonov via cfe-commits
@@ -33,7 +33,7 @@ to learn about the defaults for your platform and target. * **"general" options** - ``LIBC_ADD_NULL_CHECKS``: Add nullptr checks in the library's implementations to some functions for which passing nullptr is undefined behavior. * **"math" options** -

[clang] [libc] [llvm] [clang] Make __builtin_expf constexpr. (PR #140841)

2025-05-20 Thread Petr Hosek via cfe-commits
petrhosek wrote: I think the `errno` change should be extracted into a separate PR since that's related to libc internals and would make the actual change much smaller and easier to review. https://github.com/llvm/llvm-project/pull/140841 ___ cfe-com

[clang] [libc] [llvm] [clang] Make __builtin_expf constexpr. (PR #140841)

2025-05-20 Thread Alexey Samsonov via cfe-commits
@@ -0,0 +1,22 @@ +//===-- Floating point math functions ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [libc] [llvm] [clang] Make __builtin_expf constexpr. (PR #140841)

2025-05-20 Thread Alexey Samsonov via cfe-commits
@@ -83,14 +45,11 @@ Errno::operator int() { return shared_errno; } void Errno::operator=(int a) { *__llvm_libc_errno() = a; } Errno::operator int() { return *__llvm_libc_errno(); } -#elif LIBC_ERRNO_MODE == LIBC_ERRNO_MODE_SYSTEM vonosmas wrote: I think it ma

[clang] [libc] [llvm] [clang] Make __builtin_expf constexpr. (PR #140841)

2025-05-20 Thread Alexey Samsonov via cfe-commits
@@ -117,7 +117,7 @@ followed: `ErrorOr `_ to return error values. -#. The header file ``src/errno/libc_errno.h`` is shipped as part of the target +#. The header file ``src/__support/libc_errno

[clang] [libc] [llvm] [clang] Make __builtin_expf constexpr. (PR #140841)

2025-05-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (lntue) Changes A draft PR to make `__builtin_expf` constexpr using LLVM libc math implementation. --- Patch is 244.33 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/140841.diff 429 Fil

[clang] [libc] [llvm] [clang] Make __builtin_expf constexpr. (PR #140841)

2025-05-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libc Author: None (lntue) Changes A draft PR to make `__builtin_expf` constexpr using LLVM libc math implementation. --- Patch is 244.33 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/140841.diff 429 File