[libc-commits] [libc] eb8e1bf - [libc][obvious] Fix build.
Siva Chandra Reddy via libc-commits
libc-commits at lists.llvm.org
Wed Feb 8 22:08:38 PST 2023
Author: Siva Chandra Reddy
Date: 2023-02-09T06:07:44Z
New Revision: eb8e1bf92b49af911d069cee4fd948faf1de102c
URL: https://github.com/llvm/llvm-project/commit/eb8e1bf92b49af911d069cee4fd948faf1de102c
DIFF: https://github.com/llvm/llvm-project/commit/eb8e1bf92b49af911d069cee4fd948faf1de102c.diff
LOG: [libc][obvious] Fix build.
Added:
Modified:
libc/src/__support/FPUtil/ManipulationFunctions.h
libc/test/src/math/ScalbnTest.h
Removed:
################################################################################
diff --git a/libc/src/__support/FPUtil/ManipulationFunctions.h b/libc/src/__support/FPUtil/ManipulationFunctions.h
index 5d29f5445a0d..61909cf7e137 100644
--- a/libc/src/__support/FPUtil/ManipulationFunctions.h
+++ b/libc/src/__support/FPUtil/ManipulationFunctions.h
@@ -17,6 +17,7 @@
#include "src/__support/CPP/bit.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/common.h"
+#include "src/__support/macros/attributes.h"
#include <limits.h>
#include <math.h>
@@ -116,10 +117,10 @@ LIBC_INLINE T logb(T x) {
template <typename T, cpp::enable_if_t<cpp::is_floating_point_v<T>, int> = 0>
LIBC_INLINE T ldexp(T x, int exp) {
- if (unlikely(exp == 0))
+ if (LIBC_UNLIKELY(exp == 0))
return x;
FPBits<T> bits(x);
- if (unlikely(bits.is_zero() || bits.is_inf_or_nan()))
+ if (LIBC_UNLIKELY(bits.is_zero() || bits.is_inf_or_nan()))
return x;
// NormalFloat uses int32_t to store the true exponent value. We should ensure
diff --git a/libc/test/src/math/ScalbnTest.h b/libc/test/src/math/ScalbnTest.h
index 8a078fc1e237..e1d035c4ea3a 100644
--- a/libc/test/src/math/ScalbnTest.h
+++ b/libc/test/src/math/ScalbnTest.h
@@ -10,7 +10,7 @@
#define LLVM_LIBC_TEST_SRC_MATH_SCALBN_H
#include "LdExpTest.h"
-#include "utils/UnitTest/Test.h"
+#include "test/UnitTest/Test.h"
#define LIST_SCALBN_TESTS(T, func) \
using LlvmLibcScalbnTest = LdExpTestTemplate<T>; \
More information about the libc-commits
mailing list