Skip to content

Commit eb8e1bf

Browse files
author
Siva Chandra Reddy
committed
[libc][obvious] Fix build.
1 parent 6cb14ad commit eb8e1bf

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

libc/src/__support/FPUtil/ManipulationFunctions.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "src/__support/CPP/bit.h"
1818
#include "src/__support/CPP/type_traits.h"
1919
#include "src/__support/common.h"
20+
#include "src/__support/macros/attributes.h"
2021

2122
#include <limits.h>
2223
#include <math.h>
@@ -116,10 +117,10 @@ LIBC_INLINE T logb(T x) {
116117

117118
template <typename T, cpp::enable_if_t<cpp::is_floating_point_v<T>, int> = 0>
118119
LIBC_INLINE T ldexp(T x, int exp) {
119-
if (unlikely(exp == 0))
120+
if (LIBC_UNLIKELY(exp == 0))
120121
return x;
121122
FPBits<T> bits(x);
122-
if (unlikely(bits.is_zero() || bits.is_inf_or_nan()))
123+
if (LIBC_UNLIKELY(bits.is_zero() || bits.is_inf_or_nan()))
123124
return x;
124125

125126
// NormalFloat uses int32_t to store the true exponent value. We should ensure

libc/test/src/math/ScalbnTest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#define LLVM_LIBC_TEST_SRC_MATH_SCALBN_H
1111

1212
#include "LdExpTest.h"
13-
#include "utils/UnitTest/Test.h"
13+
#include "test/UnitTest/Test.h"
1414

1515
#define LIST_SCALBN_TESTS(T, func) \
1616
using LlvmLibcScalbnTest = LdExpTestTemplate<T>; \

0 commit comments

Comments
 (0)