Skip to content

[libc] remove spurious LIBC_INLINE #74505

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
Dec 5, 2023

Conversation

nickdesaulniers
Copy link
Member

This function is marked noinline; the inline keyword (or whatever LIBC_INLINE
resolves to) will have no effect.

This function is marked noinline; the inline keyword (or whatever LIBC_INLINE
resolves to) will have no effect.
@llvmbot
Copy link
Member

llvmbot commented Dec 5, 2023

@llvm/pr-subscribers-libc

Author: Nick Desaulniers (nickdesaulniers)

Changes

This function is marked noinline; the inline keyword (or whatever LIBC_INLINE
resolves to) will have no effect.


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

1 Files Affected:

  • (modified) libc/src/__support/threads/linux/thread.cpp (+1-1)
diff --git a/libc/src/__support/threads/linux/thread.cpp b/libc/src/__support/threads/linux/thread.cpp
index 5c84266ee5d0e..fcf87cc587a50 100644
--- a/libc/src/__support/threads/linux/thread.cpp
+++ b/libc/src/__support/threads/linux/thread.cpp
@@ -176,7 +176,7 @@ cleanup_thread_resources(ThreadAttributes *attrib) {
 #endif
 }
 
-[[gnu::noinline]] LIBC_INLINE void start_thread() {
+[[gnu::noinline]] void start_thread() {
   auto *start_args = reinterpret_cast<StartArgs *>(get_start_args_addr());
   auto *attrib = start_args->thread_attrib;
   self.attrib = attrib;

Copy link
Contributor

@michaelrj-google michaelrj-google left a comment

Choose a reason for hiding this comment

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

LGTM, as far as I know the special LIBC_INLINE value is only relevant for header files.

@nickdesaulniers nickdesaulniers merged commit 9c2e544 into llvm:main Dec 5, 2023
@nickdesaulniers nickdesaulniers deleted the noinline branch December 5, 2023 18:53
@gchatelet
Copy link
Contributor

Cross-posting FYI #73659 (comment).
At this point I'm unsure if LIBC_INLINE is the right name for this macro.

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.

5 participants