Skip to content

[libc][float_dec_converter_limited] Add missing LIBC_INLINE #125655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

statham-arm
Copy link
Collaborator

This caused a build failure in check-libc introduced by commit b53da77.

This caused a build failure in check-libc introduced by commit
b53da77.
@statham-arm statham-arm requested review from lntue and smithp35 February 4, 2025 09:16
@llvmbot llvmbot added the libc label Feb 4, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 4, 2025

@llvm/pr-subscribers-libc

Author: Simon Tatham (statham-arm)

Changes

This caused a build failure in check-libc introduced by commit b53da77.


Full diff: https://github.com/llvm/llvm-project/pull/125655.diff

1 Files Affected:

  • (modified) libc/src/stdio/printf_core/float_dec_converter_limited.h (+1-1)
diff --git a/libc/src/stdio/printf_core/float_dec_converter_limited.h b/libc/src/stdio/printf_core/float_dec_converter_limited.h
index 22803884526e25..a98e6cdaa0db7e 100644
--- a/libc/src/stdio/printf_core/float_dec_converter_limited.h
+++ b/libc/src/stdio/printf_core/float_dec_converter_limited.h
@@ -112,7 +112,7 @@ struct DigitsOutput {
 // 1292913986/2^32. That is a rounded-down approximation to log10(2), accurate
 // enough that for any binary exponent in the range of float128 it will give
 // the correct value of floor(log10(2^n)).
-int estimate_log10(int exponent_of_2) {
+LIBC_INLINE int estimate_log10(int exponent_of_2) {
   return (exponent_of_2 * 1292913986LL) >> 32;
 }
 

Copy link
Collaborator

@smithp35 smithp35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for build fix.

@statham-arm statham-arm merged commit 5afb31d into llvm:main Feb 4, 2025
13 of 16 checks passed
@statham-arm statham-arm deleted the libc-build-fix branch February 4, 2025 09:21
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
)

This caused a build failure in check-libc introduced by commit
b53da77.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants