[libc-commits] [libc] [llvm] [libc][math] Refactor logf16 to header-only shared math (PR #175408)
Muhammad Bassiouni via libc-commits
libc-commits at lists.llvm.org
Sun Jan 11 15:16:18 PST 2026
================
@@ -0,0 +1,24 @@
+//===-- Shared logf16 function ------------------------------------*- 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_LOGF16_H
+#define LLVM_LIBC_SHARED_MATH_LOGF16_H
+
+#include "shared/libc_common.h"
+#include "src/__support/math/logf16.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::logf16;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
----------------
bassiounix wrote:
Please guard the code with `LIBC_TYPES_HAS_FLOAT16`.
`float16` is not available in each target so we need to make sure the code only exists on supported target.
https://github.com/llvm/llvm-project/pull/175408
More information about the libc-commits
mailing list