aboutsummaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorRoseZhang03 <rosezhang@google.com>2024-05-31 18:36:46 +0000
committerGitHub <noreply@github.com>2024-05-31 11:36:46 -0700
commit435e5c10b0ea6cf2a9674760ef2f4977412386eb (patch)
tree2b7f248cb010b16e32fe1ab52d8b2557b2cb54e8 /libc
parente79c0806552880aa802c83f1edf59a3ffd39bdcc (diff)
downloadllvm-435e5c10b0ea6cf2a9674760ef2f4977412386eb.zip
llvm-435e5c10b0ea6cf2a9674760ef2f4977412386eb.tar.gz
llvm-435e5c10b0ea6cf2a9674760ef2f4977412386eb.tar.bz2
[libc] restored original no_stack_protector syntax (#94005)
forward fix for #93620 -GCC doesn't recognize [[clang:: ']] prefix, so restored the original __attribute__ syntax
Diffstat (limited to 'libc')
-rw-r--r--libc/src/__support/OSUtil/linux/exit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/src/__support/OSUtil/linux/exit.cpp b/libc/src/__support/OSUtil/linux/exit.cpp
index ee90415..4a1d56a 100644
--- a/libc/src/__support/OSUtil/linux/exit.cpp
+++ b/libc/src/__support/OSUtil/linux/exit.cpp
@@ -15,9 +15,9 @@ namespace LIBC_NAMESPACE::internal {
// mark as no_stack_protector for x86 since TLS can be torn down before calling
// exit so that the stack protector canary cannot be loaded.
#ifdef LIBC_TARGET_ARCH_IS_X86
-[[clang::no_stack_protector]]
+__attribute__((no_stack_protector))
#endif
-[[noreturn]] void
+__attribute__((noreturn)) void
exit(int status) {
for (;;) {
LIBC_NAMESPACE::syscall_impl<long>(SYS_exit_group, status);