-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
[libc] add an _Exit declaration to the _Exit proxy func header #114904
base: main
Are you sure you want to change the base?
Conversation
@llvm/pr-subscribers-libc Author: Job Henandez Lara (Jobhdez) ChangesThis improves/fixes this pr #114718. In this pr we added an _Exit declaration to Full diff: https://github.com/llvm/llvm-project/pull/114904.diff 1 Files Affected:
diff --git a/libc/hdr/func/_Exit.h b/libc/hdr/func/_Exit.h
index e024a651a50bcf..b8160e9af3e4e3 100644
--- a/libc/hdr/func/_Exit.h
+++ b/libc/hdr/func/_Exit.h
@@ -10,8 +10,7 @@
#define LLVM_LIBC_HDR_FUNC_EXIT_H
#ifdef LIBC_FULL_BUILD
-// We will use the `_Exit` declaration from our generated stdlib.h
-#include <stdlib.h>
+extern "C" [[noreturn]] void _Exit(int) noexcept;
#else // Overlay mode
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need a proxy header for _Exit
at all? Why don't we just call our internal _Exit
in the atexit
and atquickexit
tests?
Yeah this makes sense. I will update the PR to remove the |
Yes that sounds like the correct thing to do. Thank you! |
No problem! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, please update the title and description
ok I will. do you want me to merge after I change the title? or do you want to merge yourself? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fine to merge as-is. I'd recommend waiting until the morning to merge it (so that people can help troubleshoot if necessary), but it's up to you.
ok ill wait until tomorrow morning. thanks. can you please suggest a new title for the pr? thanks |
This improves/fixes this pr #114718. In this pr we added an _Exit declaration to
hdr/func/_Exit.h
instead of the stdlib.h header based on comments from @nickdesaulniers.