From e0b8f98b1f488f56ff383de37edb97e1909acbbd Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Mon, 22 May 2023 15:43:37 -0500 Subject: [PATCH] Add some missing [[noreturn]] attributes Missing in header for `pthread_exit` and `exit`. Missing in spec file for `pthread_exit`. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D151143 --- libc/spec/posix.td | 2 +- libc/src/pthread/pthread_exit.h | 2 +- libc/src/stdlib/exit.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libc/spec/posix.td b/libc/spec/posix.td index b1aa2fb..ee17de8 100644 --- a/libc/spec/posix.td +++ b/libc/spec/posix.td @@ -984,7 +984,7 @@ def POSIX : StandardSpec<"POSIX"> { >, FunctionSpec< "pthread_exit", - RetValSpec, + RetValSpec, [ArgSpec] >, FunctionSpec< diff --git a/libc/src/pthread/pthread_exit.h b/libc/src/pthread/pthread_exit.h index dd22c57..d8bdbb3 100644 --- a/libc/src/pthread/pthread_exit.h +++ b/libc/src/pthread/pthread_exit.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void pthread_exit(void *retval); +[[noreturn]] void pthread_exit(void *retval); } // namespace __llvm_libc diff --git a/libc/src/stdlib/exit.h b/libc/src/stdlib/exit.h index 7c015e3..fb3b20d 100644 --- a/libc/src/stdlib/exit.h +++ b/libc/src/stdlib/exit.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void exit(int status); +[[noreturn]] void exit(int status); } // namespace __llvm_libc -- 2.7.4