[libc] [llvm] [libc][math] Refactor expf implementation to header-only in src/__support/math folder. (PR #143790)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 11 20:04:42 PDT 2025
================
@@ -0,0 +1,23 @@
+//===-- 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: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SHARED_MATH_H
+#define LLVM_LIBC_SHARED_MATH_H
+
+#include "libc_common.h"
+#include "src/__support/math/expf.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::expf;
----------------
lntue wrote:
I was thinking similar thing to help with build time, because there will be a lot of headers to parse if the users only need 1 or 2 functions. Probably we should provide both, single function option and all-in-one option. WDYT?
https://github.com/llvm/llvm-project/pull/143790
More information about the llvm-commits
mailing list