Skip to content

Commit af656c5

Browse files
committed
some formatting errors
1 parent 604ff78 commit af656c5

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

libc/shared/math/bf16divf128.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//===-- Shared bf16divf128 function -------------------------------*- C++ -*-===//
1+
//===-- Shared bf16divf128 function -------------------------------*- C++
2+
//-*-===//
23
//
34
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
45
// See https://llvm.org/LICENSE.txt for license information.
@@ -15,7 +16,9 @@
1516
namespace LIBC_NAMESPACE_DECL {
1617
namespace shared {
1718

19+
#ifdef LIBC_TYPES_HAS_FLOAT128
1820
using math::bf16divf128;
21+
#endif // LIBC_TYPES_HAS_FLOAT128
1922

2023
} // namespace shared
2124
} // namespace LIBC_NAMESPACE_DECL

libc/src/__support/math/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,9 +457,11 @@ add_header_library(
457457
HDRS
458458
bf16divf128.h
459459
DEPENDS
460+
libc.include.llvm-libc-types.float128
460461
libc.src.__support.FPUtil.bfloat16
461462
libc.src.__support.FPUtil.generic.div
462463
libc.src.__support.macros.config
464+
libc.src.__support.macros.properties.types
463465
)
464466

465467
add_header_library(

libc/src/__support/math/bf16divf128.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
namespace LIBC_NAMESPACE_DECL {
1616
namespace math {
1717

18+
#ifdef LIBC_TYPES_HAS_FLOAT128
1819
LIBC_INLINE constexpr bfloat16 bf16divf128(float128 x, float128 y) {
1920
return fputil::generic::div<bfloat16>(x, y);
2021
}
22+
#endif // LIBC_TYPES_HAS_FLOAT128
2123

2224
} // namespace math
2325
} // namespace LIBC_NAMESPACE_DECL

utils/bazel/llvm-project-overlay/libc/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3182,9 +3182,10 @@ libc_support_library(
31823182
name = "__support_math_bf16divf128",
31833183
hdrs = ["src/__support/math/bf16divf128.h"],
31843184
deps = [
3185+
":__support_fputil_basic_operations",
31853186
":__support_fputil_bfloat16",
3186-
":__support_fputil_generic_div",
31873187
":__support_macros_config",
3188+
":llvm_libc_types_float128",
31883189
],
31893190
)
31903191

0 commit comments

Comments
 (0)