[libc-commits] [libc] Add _exit() according to _Exit() implementation (PR #87184)
via libc-commits
libc-commits at lists.llvm.org
Sun Mar 31 00:14:09 PDT 2024
https://github.com/maebex created https://github.com/llvm/llvm-project/pull/87184
Fixes llvm/llvm-project#86671
>From 4bc2422f403e1ea5c9dcfc13c527a0388bed9aeb Mon Sep 17 00:00:00 2001
From: maebex <maximilian.berndt11 at web.de>
Date: Sun, 31 Mar 2024 09:12:19 +0200
Subject: [PATCH] Add _exit() according to _Exit() implementation
---
libc/src/stdlib/_Exit.cpp | 4 ++++
libc/src/stdlib/_Exit.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/libc/src/stdlib/_Exit.cpp b/libc/src/stdlib/_Exit.cpp
index 233af209739244..f7ac84a1a77dd1 100644
--- a/libc/src/stdlib/_Exit.cpp
+++ b/libc/src/stdlib/_Exit.cpp
@@ -17,4 +17,8 @@ namespace LIBC_NAMESPACE {
quick_exit(status);
}
+[[noreturn]] LLVM_LIBC_FUNCTION(void, _exit, (int status)) {
+ quick_exit(status);
+}
+
} // namespace LIBC_NAMESPACE
diff --git a/libc/src/stdlib/_Exit.h b/libc/src/stdlib/_Exit.h
index bc05fafeb766b2..c0aea82ccdc5d8 100644
--- a/libc/src/stdlib/_Exit.h
+++ b/libc/src/stdlib/_Exit.h
@@ -13,6 +13,8 @@ namespace LIBC_NAMESPACE {
[[noreturn]] void _Exit(int status);
+[[noreturn]] void _exit(int status);
+
} // namespace LIBC_NAMESPACE
#endif // LLVM_LIBC_SRC_STDLIB__EXIT_H
More information about the libc-commits
mailing list