summaryrefslogtreecommitdiff
path: root/libc/src/stdlib/exit.cpp
AgeCommit message (Collapse)Author
2024-07-12[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597)Petr Hosek
This is a part of #97655.
2024-07-12Revert "[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace ↵Mehdi Amini
declaration" (#98593) Reverts llvm/llvm-project#98075 bots are broken
2024-07-11[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98075)Petr Hosek
This is a part of #97655.
2024-07-09[libc] Move the internal extern "C" symbols inside the namespace (#98232)Petr Hosek
This ensures that these symbols inherit the namespace visibility.
2024-05-31[libc] added quick_exit function (#93620)RoseZhang03
- In /libc/src/__support/ OSUtil, changed quick_exit to just exit, and put in namespace LIBC_NAMESPACE::internal. - In /libc/src/stdlib added quick_exit - Added test files for quick_exit
2024-03-26[libc][OSUtil] refactor quick_exit to be an object library everywhere (#85955)Nick Desaulniers
The usage of __builtin_unreachable after calls to quick_exit were distressing. If a function is properly marked [[noreturn]] then __builtin_unreachable is not necessary. Looking into this further, we seem to have header only implementations for CPU targets. The inline nature of these functions is curious; we're going to exit, it doesn't matter if we need to pay the call of a function or not. If we just make these functions have distinct TUs rather than be header only, we can clean up the cmake rules for quick_exit which were different between CPU and GPU. Remove darwin support for quick_exit. This isn't being tested, and we can bring it back when necessary.
2024-03-22[libc][stdlib] initial support for __cxa_finalize (#85865)Nick Desaulniers
I'm trying to break up the pieces of supporting __cxa_finalize into smaller commits. Provide this symbol first, and make use of it from exit. Next will be to store __dso_handle, then finally to only run callbacks that were registered from a specific dso. Link: #85651 Link: https://itanium-cxx-abi.github.io/cxx-abi/abi.html#dso-dtor
2023-09-26[libc] Mass replace enclosing namespace (#67032)Guillaume Chatelet
This is step 4 of https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079
2023-06-07[libc] Silence warning about returning from noreturn functionJoseph Huber
The `exit` entrypoint calls into `quick_exit` which is marked noreturn in some cases. This will cause errors because we then have control flow externally. This warning can be silenced by using a `__builtin_unreachable` instruction accordingly. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D152323
2023-04-27[libc] Implement `exit` for the GPU partiallyJoseph Huber
This patch implements the `exit` function on the GPU. This required breaking the entrypoints calling eachother on `linux` since this doesn't work with a non-aliased target. This is only partial support because full support requires a malloc / free implementation for the exit callbacks array. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D149363
2022-03-10[libc] Add a resizable container with constexpr constructor and destructor.Siva Chandra Reddy
The new container is used to store atexit callbacks. This way, we avoid the possibility of the destructor of the container itself getting added as an at exit callback. Reviewed By: abrachet Differential Revision: https://reviews.llvm.org/D121350
2022-02-17[libc] Add exit and atexitAlex Brachet
Often atexit is implemented using __cxa_atexit. I have not implemented __cxa_atexit here because it potentially requires more discussion. It is unique for llvm-libc (I think) that it is an exported symbol that wouldn’t be defined in any spec file because it doesn’t have a header. Implementing it will be trivial given what is here already, but I figured it would be more contentious so it can be implemented later. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D119512