Skip to content

Commit fe014fd

Browse files
committed
fixed noreturn and no_stack_protector brackets and other formatting and includes issues
1 parent 0b9ef4f commit fe014fd

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

libc/src/__support/OSUtil/linux/exit.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ namespace LIBC_NAMESPACE::internal {
1515
// mark as no_stack_protector for x86 since TLS can be torn down before calling
1616
// exit so that the stack protector canary cannot be loaded.
1717
#ifdef LIBC_TARGET_ARCH_IS_X86
18-
__attribute__((no_stack_protector))
18+
[[clang::no_stack_protector]]
1919
#endif
20-
__attribute__((noreturn)) void
21-
exit(int status) {
20+
[[noreturn]] void exit(int status) {
2221
for (;;) {
2322
LIBC_NAMESPACE::syscall_impl<long>(SYS_exit_group, status);
2423
LIBC_NAMESPACE::syscall_impl<long>(SYS_exit, status);

libc/src/stdlib/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ add_entrypoint_object(
4949
HDRS
5050
quick_exit.h
5151
DEPENDS
52-
libc.src.errno.errno
5352
libc.src.__support.OSUtil.osutil
5453
)
5554

libc/src/stdlib/quick_exit.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#ifndef LLVM_LIBC_SRC_STDLIB_QUICK_EXIT_H
1010
#define LLVM_LIBC_SRC_STDLIB_QUICK_EXIT_H
1111

12-
#include <stdlib.h>
1312

1413
namespace LIBC_NAMESPACE {
1514

libc/test/src/stdlib/quick_exit_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
TEST(LlvmLibcStdlib, quick_exit) {
1414
EXPECT_EXITS([] { LIBC_NAMESPACE::quick_exit(1); }, 1);
1515
EXPECT_EXITS([] { LIBC_NAMESPACE::quick_exit(65); }, 65);
16-
}
16+
}

0 commit comments

Comments
 (0)