diff --git a/libc/src/__support/common.h b/libc/src/__support/common.h --- a/libc/src/__support/common.h +++ b/libc/src/__support/common.h @@ -36,16 +36,16 @@ LLVM_LIBC_FUNCTION_ATTR decltype(__llvm_libc::name) \ __##name##_impl__ __asm__(#name); \ LLVM_LIBC_DECLARE_DEVICE(__##name##_impl__) \ - type __##name##_impl__ arglist + type __##name##_impl__ arglist noexcept // MacOS needs to be excluded because it does not support aliasing. #elif defined(LLVM_LIBC_PUBLIC_PACKAGING) && (!defined(__APPLE__)) #define LLVM_LIBC_FUNCTION(type, name, arglist) \ LLVM_LIBC_FUNCTION_ATTR decltype(__llvm_libc::name) \ __##name##_impl__ __asm__(#name); \ decltype(__llvm_libc::name) name [[gnu::alias(#name)]]; \ - type __##name##_impl__ arglist + type __##name##_impl__ arglist noexcept #else -#define LLVM_LIBC_FUNCTION(type, name, arglist) type name arglist +#define LLVM_LIBC_FUNCTION(type, name, arglist) type name arglist noexcept #endif namespace __llvm_libc { diff --git a/libc/src/assert/__assert_fail.h b/libc/src/assert/__assert_fail.h --- a/libc/src/assert/__assert_fail.h +++ b/libc/src/assert/__assert_fail.h @@ -14,7 +14,7 @@ namespace __llvm_libc { [[noreturn]] void __assert_fail(const char *assertion, const char *file, - unsigned line, const char *function); + unsigned line, const char *function) noexcept; } // namespace __llvm_libc diff --git a/libc/src/ctype/isalnum.h b/libc/src/ctype/isalnum.h --- a/libc/src/ctype/isalnum.h +++ b/libc/src/ctype/isalnum.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int isalnum(int c); +int isalnum(int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/ctype/isalpha.h b/libc/src/ctype/isalpha.h --- a/libc/src/ctype/isalpha.h +++ b/libc/src/ctype/isalpha.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int isalpha(int c); +int isalpha(int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/ctype/isascii.h b/libc/src/ctype/isascii.h --- a/libc/src/ctype/isascii.h +++ b/libc/src/ctype/isascii.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int isascii(int c); +int isascii(int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/ctype/isblank.h b/libc/src/ctype/isblank.h --- a/libc/src/ctype/isblank.h +++ b/libc/src/ctype/isblank.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int isblank(int c); +int isblank(int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/ctype/iscntrl.h b/libc/src/ctype/iscntrl.h --- a/libc/src/ctype/iscntrl.h +++ b/libc/src/ctype/iscntrl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int iscntrl(int c); +int iscntrl(int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/ctype/isdigit.h b/libc/src/ctype/isdigit.h --- a/libc/src/ctype/isdigit.h +++ b/libc/src/ctype/isdigit.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int isdigit(int c); +int isdigit(int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/ctype/isgraph.h b/libc/src/ctype/isgraph.h --- a/libc/src/ctype/isgraph.h +++ b/libc/src/ctype/isgraph.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int isgraph(int c); +int isgraph(int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/ctype/islower.h b/libc/src/ctype/islower.h --- a/libc/src/ctype/islower.h +++ b/libc/src/ctype/islower.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int islower(int c); +int islower(int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/ctype/isprint.h b/libc/src/ctype/isprint.h --- a/libc/src/ctype/isprint.h +++ b/libc/src/ctype/isprint.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int isprint(int c); +int isprint(int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/ctype/ispunct.h b/libc/src/ctype/ispunct.h --- a/libc/src/ctype/ispunct.h +++ b/libc/src/ctype/ispunct.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int ispunct(int c); +int ispunct(int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/ctype/isspace.h b/libc/src/ctype/isspace.h --- a/libc/src/ctype/isspace.h +++ b/libc/src/ctype/isspace.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int isspace(int c); +int isspace(int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/ctype/isupper.h b/libc/src/ctype/isupper.h --- a/libc/src/ctype/isupper.h +++ b/libc/src/ctype/isupper.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int isupper(int c); +int isupper(int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/ctype/isxdigit.h b/libc/src/ctype/isxdigit.h --- a/libc/src/ctype/isxdigit.h +++ b/libc/src/ctype/isxdigit.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int isxdigit(int c); +int isxdigit(int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/ctype/toascii.h b/libc/src/ctype/toascii.h --- a/libc/src/ctype/toascii.h +++ b/libc/src/ctype/toascii.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int toascii(int c); +int toascii(int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/ctype/tolower.h b/libc/src/ctype/tolower.h --- a/libc/src/ctype/tolower.h +++ b/libc/src/ctype/tolower.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int tolower(int c); +int tolower(int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/ctype/toupper.h b/libc/src/ctype/toupper.h --- a/libc/src/ctype/toupper.h +++ b/libc/src/ctype/toupper.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int toupper(int c); +int toupper(int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/dirent/closedir.h b/libc/src/dirent/closedir.h --- a/libc/src/dirent/closedir.h +++ b/libc/src/dirent/closedir.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int closedir(::DIR *dir); +int closedir(::DIR *dir) noexcept; } // namespace __llvm_libc diff --git a/libc/src/dirent/dirfd.h b/libc/src/dirent/dirfd.h --- a/libc/src/dirent/dirfd.h +++ b/libc/src/dirent/dirfd.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int dirfd(::DIR *dir); +int dirfd(::DIR *dir) noexcept; } // namespace __llvm_libc diff --git a/libc/src/dirent/opendir.h b/libc/src/dirent/opendir.h --- a/libc/src/dirent/opendir.h +++ b/libc/src/dirent/opendir.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -::DIR *opendir(const char *name); +::DIR *opendir(const char *name) noexcept; } // namespace __llvm_libc diff --git a/libc/src/dirent/readdir.h b/libc/src/dirent/readdir.h --- a/libc/src/dirent/readdir.h +++ b/libc/src/dirent/readdir.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -struct ::dirent *readdir(DIR *dir); +struct ::dirent *readdir(DIR *dir) noexcept; } // namespace __llvm_libc diff --git a/libc/src/fcntl/creat.h b/libc/src/fcntl/creat.h --- a/libc/src/fcntl/creat.h +++ b/libc/src/fcntl/creat.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int creat(const char *path, int mode); +int creat(const char *path, int mode) noexcept; } // namespace __llvm_libc diff --git a/libc/src/fcntl/open.h b/libc/src/fcntl/open.h --- a/libc/src/fcntl/open.h +++ b/libc/src/fcntl/open.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int open(const char *path, int flags, ...); +int open(const char *path, int flags, ...) noexcept; } // namespace __llvm_libc diff --git a/libc/src/fcntl/openat.h b/libc/src/fcntl/openat.h --- a/libc/src/fcntl/openat.h +++ b/libc/src/fcntl/openat.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int openat(int dfd, const char *path, int flags, ...); +int openat(int dfd, const char *path, int flags, ...) noexcept; } // namespace __llvm_libc diff --git a/libc/src/fenv/feclearexcept.h b/libc/src/fenv/feclearexcept.h --- a/libc/src/fenv/feclearexcept.h +++ b/libc/src/fenv/feclearexcept.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int feclearexcept(int); +int feclearexcept(int) noexcept; } // namespace __llvm_libc diff --git a/libc/src/fenv/fedisableexcept.h b/libc/src/fenv/fedisableexcept.h --- a/libc/src/fenv/fedisableexcept.h +++ b/libc/src/fenv/fedisableexcept.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int fedisableexcept(int); +int fedisableexcept(int) noexcept; } // namespace __llvm_libc diff --git a/libc/src/fenv/feenableexcept.h b/libc/src/fenv/feenableexcept.h --- a/libc/src/fenv/feenableexcept.h +++ b/libc/src/fenv/feenableexcept.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int feenableexcept(int); +int feenableexcept(int) noexcept; } // namespace __llvm_libc diff --git a/libc/src/fenv/fegetenv.h b/libc/src/fenv/fegetenv.h --- a/libc/src/fenv/fegetenv.h +++ b/libc/src/fenv/fegetenv.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int fegetenv(fenv_t *); +int fegetenv(fenv_t *) noexcept; } // namespace __llvm_libc diff --git a/libc/src/fenv/fegetexcept.h b/libc/src/fenv/fegetexcept.h --- a/libc/src/fenv/fegetexcept.h +++ b/libc/src/fenv/fegetexcept.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int fegetexcept(); +int fegetexcept() noexcept; } // namespace __llvm_libc diff --git a/libc/src/fenv/fegetexceptflag.h b/libc/src/fenv/fegetexceptflag.h --- a/libc/src/fenv/fegetexceptflag.h +++ b/libc/src/fenv/fegetexceptflag.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int fegetexceptflag(fexcept_t *, int excepts); +int fegetexceptflag(fexcept_t *, int excepts) noexcept; } // namespace __llvm_libc diff --git a/libc/src/fenv/fegetround.h b/libc/src/fenv/fegetround.h --- a/libc/src/fenv/fegetround.h +++ b/libc/src/fenv/fegetround.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int fegetround(); +int fegetround() noexcept; } // namespace __llvm_libc diff --git a/libc/src/fenv/feholdexcept.h b/libc/src/fenv/feholdexcept.h --- a/libc/src/fenv/feholdexcept.h +++ b/libc/src/fenv/feholdexcept.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int feholdexcept(fenv_t *); +int feholdexcept(fenv_t *) noexcept; } // namespace __llvm_libc diff --git a/libc/src/fenv/feraiseexcept.h b/libc/src/fenv/feraiseexcept.h --- a/libc/src/fenv/feraiseexcept.h +++ b/libc/src/fenv/feraiseexcept.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int feraiseexcept(int); +int feraiseexcept(int) noexcept; } // namespace __llvm_libc diff --git a/libc/src/fenv/fesetenv.h b/libc/src/fenv/fesetenv.h --- a/libc/src/fenv/fesetenv.h +++ b/libc/src/fenv/fesetenv.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int fesetenv(const fenv_t *); +int fesetenv(const fenv_t *) noexcept; } // namespace __llvm_libc diff --git a/libc/src/fenv/fesetexceptflag.h b/libc/src/fenv/fesetexceptflag.h --- a/libc/src/fenv/fesetexceptflag.h +++ b/libc/src/fenv/fesetexceptflag.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int fesetexceptflag(const fexcept_t *, int excepts); +int fesetexceptflag(const fexcept_t *, int excepts) noexcept; } // namespace __llvm_libc diff --git a/libc/src/fenv/fesetround.h b/libc/src/fenv/fesetround.h --- a/libc/src/fenv/fesetround.h +++ b/libc/src/fenv/fesetround.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int fesetround(int); +int fesetround(int) noexcept; } // namespace __llvm_libc diff --git a/libc/src/fenv/fetestexcept.h b/libc/src/fenv/fetestexcept.h --- a/libc/src/fenv/fetestexcept.h +++ b/libc/src/fenv/fetestexcept.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int fetestexcept(int); +int fetestexcept(int) noexcept; } // namespace __llvm_libc diff --git a/libc/src/fenv/feupdateenv.h b/libc/src/fenv/feupdateenv.h --- a/libc/src/fenv/feupdateenv.h +++ b/libc/src/fenv/feupdateenv.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int feupdateenv(const fenv_t *); +int feupdateenv(const fenv_t *) noexcept; } // namespace __llvm_libc diff --git a/libc/src/inttypes/imaxabs.h b/libc/src/inttypes/imaxabs.h --- a/libc/src/inttypes/imaxabs.h +++ b/libc/src/inttypes/imaxabs.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -intmax_t imaxabs(intmax_t j); +intmax_t imaxabs(intmax_t j) noexcept; } // namespace __llvm_libc diff --git a/libc/src/inttypes/imaxdiv.h b/libc/src/inttypes/imaxdiv.h --- a/libc/src/inttypes/imaxdiv.h +++ b/libc/src/inttypes/imaxdiv.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -imaxdiv_t imaxdiv(intmax_t x, intmax_t y); +imaxdiv_t imaxdiv(intmax_t x, intmax_t y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/inttypes/strtoimax.h b/libc/src/inttypes/strtoimax.h --- a/libc/src/inttypes/strtoimax.h +++ b/libc/src/inttypes/strtoimax.h @@ -14,7 +14,7 @@ namespace __llvm_libc { intmax_t strtoimax(const char *__restrict str, char **__restrict str_end, - int base); + int base) noexcept; } // namespace __llvm_libc diff --git a/libc/src/inttypes/strtoumax.h b/libc/src/inttypes/strtoumax.h --- a/libc/src/inttypes/strtoumax.h +++ b/libc/src/inttypes/strtoumax.h @@ -14,7 +14,7 @@ namespace __llvm_libc { uintmax_t strtoumax(const char *__restrict str, char **__restrict str_end, - int base); + int base) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/acosf.h b/libc/src/math/acosf.h --- a/libc/src/math/acosf.h +++ b/libc/src/math/acosf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float acosf(float x); +float acosf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/asin.h b/libc/src/math/asin.h --- a/libc/src/math/asin.h +++ b/libc/src/math/asin.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double asin(double x); +double asin(double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/asinf.h b/libc/src/math/asinf.h --- a/libc/src/math/asinf.h +++ b/libc/src/math/asinf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float asinf(float x); +float asinf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/atanf.h b/libc/src/math/atanf.h --- a/libc/src/math/atanf.h +++ b/libc/src/math/atanf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float atanf(float x); +float atanf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/atanhf.h b/libc/src/math/atanhf.h --- a/libc/src/math/atanhf.h +++ b/libc/src/math/atanhf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float atanhf(float x); +float atanhf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/ceil.h b/libc/src/math/ceil.h --- a/libc/src/math/ceil.h +++ b/libc/src/math/ceil.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double ceil(double x); +double ceil(double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/ceilf.h b/libc/src/math/ceilf.h --- a/libc/src/math/ceilf.h +++ b/libc/src/math/ceilf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float ceilf(float x); +float ceilf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/ceill.h b/libc/src/math/ceill.h --- a/libc/src/math/ceill.h +++ b/libc/src/math/ceill.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double ceill(long double x); +long double ceill(long double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/copysign.h b/libc/src/math/copysign.h --- a/libc/src/math/copysign.h +++ b/libc/src/math/copysign.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double copysign(double x, double y); +double copysign(double x, double y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/copysignf.h b/libc/src/math/copysignf.h --- a/libc/src/math/copysignf.h +++ b/libc/src/math/copysignf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float copysignf(float x, float y); +float copysignf(float x, float y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/copysignl.h b/libc/src/math/copysignl.h --- a/libc/src/math/copysignl.h +++ b/libc/src/math/copysignl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double copysignl(long double x, long double y); +long double copysignl(long double x, long double y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/cos.h b/libc/src/math/cos.h --- a/libc/src/math/cos.h +++ b/libc/src/math/cos.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double cos(double x); +double cos(double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/cosf.h b/libc/src/math/cosf.h --- a/libc/src/math/cosf.h +++ b/libc/src/math/cosf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float cosf(float x); +float cosf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/coshf.h b/libc/src/math/coshf.h --- a/libc/src/math/coshf.h +++ b/libc/src/math/coshf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float coshf(float x); +float coshf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/exp10f.h b/libc/src/math/exp10f.h --- a/libc/src/math/exp10f.h +++ b/libc/src/math/exp10f.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float exp10f(float x); +float exp10f(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/exp2f.h b/libc/src/math/exp2f.h --- a/libc/src/math/exp2f.h +++ b/libc/src/math/exp2f.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float exp2f(float x); +float exp2f(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/expf.h b/libc/src/math/expf.h --- a/libc/src/math/expf.h +++ b/libc/src/math/expf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float expf(float x); +float expf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/expm1f.h b/libc/src/math/expm1f.h --- a/libc/src/math/expm1f.h +++ b/libc/src/math/expm1f.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float expm1f(float x); +float expm1f(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/fabs.h b/libc/src/math/fabs.h --- a/libc/src/math/fabs.h +++ b/libc/src/math/fabs.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double fabs(double x); +double fabs(double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/fabsf.h b/libc/src/math/fabsf.h --- a/libc/src/math/fabsf.h +++ b/libc/src/math/fabsf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float fabsf(float x); +float fabsf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/fabsl.h b/libc/src/math/fabsl.h --- a/libc/src/math/fabsl.h +++ b/libc/src/math/fabsl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double fabsl(long double x); +long double fabsl(long double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/fdim.h b/libc/src/math/fdim.h --- a/libc/src/math/fdim.h +++ b/libc/src/math/fdim.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double fdim(double x, double y); +double fdim(double x, double y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/fdimf.h b/libc/src/math/fdimf.h --- a/libc/src/math/fdimf.h +++ b/libc/src/math/fdimf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float fdimf(float x, float y); +float fdimf(float x, float y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/fdiml.h b/libc/src/math/fdiml.h --- a/libc/src/math/fdiml.h +++ b/libc/src/math/fdiml.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double fdiml(long double x, long double y); +long double fdiml(long double x, long double y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/floor.h b/libc/src/math/floor.h --- a/libc/src/math/floor.h +++ b/libc/src/math/floor.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double floor(double x); +double floor(double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/floorf.h b/libc/src/math/floorf.h --- a/libc/src/math/floorf.h +++ b/libc/src/math/floorf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float floorf(float x); +float floorf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/floorl.h b/libc/src/math/floorl.h --- a/libc/src/math/floorl.h +++ b/libc/src/math/floorl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double floorl(long double x); +long double floorl(long double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/fma.h b/libc/src/math/fma.h --- a/libc/src/math/fma.h +++ b/libc/src/math/fma.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double fma(double x, double y, double z); +double fma(double x, double y, double z) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/fmaf.h b/libc/src/math/fmaf.h --- a/libc/src/math/fmaf.h +++ b/libc/src/math/fmaf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float fmaf(float x, float y, float z); +float fmaf(float x, float y, float z) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/fmax.h b/libc/src/math/fmax.h --- a/libc/src/math/fmax.h +++ b/libc/src/math/fmax.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double fmax(double x, double y); +double fmax(double x, double y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/fmaxf.h b/libc/src/math/fmaxf.h --- a/libc/src/math/fmaxf.h +++ b/libc/src/math/fmaxf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float fmaxf(float x, float y); +float fmaxf(float x, float y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/fmaxl.h b/libc/src/math/fmaxl.h --- a/libc/src/math/fmaxl.h +++ b/libc/src/math/fmaxl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double fmaxl(long double x, long double y); +long double fmaxl(long double x, long double y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/fmin.h b/libc/src/math/fmin.h --- a/libc/src/math/fmin.h +++ b/libc/src/math/fmin.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double fmin(double x, double y); +double fmin(double x, double y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/fminf.h b/libc/src/math/fminf.h --- a/libc/src/math/fminf.h +++ b/libc/src/math/fminf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float fminf(float x, float y); +float fminf(float x, float y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/fminl.h b/libc/src/math/fminl.h --- a/libc/src/math/fminl.h +++ b/libc/src/math/fminl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double fminl(long double x, long double y); +long double fminl(long double x, long double y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/fmod.h b/libc/src/math/fmod.h --- a/libc/src/math/fmod.h +++ b/libc/src/math/fmod.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double fmod(double x, double y); +double fmod(double x, double y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/fmodf.h b/libc/src/math/fmodf.h --- a/libc/src/math/fmodf.h +++ b/libc/src/math/fmodf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float fmodf(float x, float y); +float fmodf(float x, float y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/frexp.h b/libc/src/math/frexp.h --- a/libc/src/math/frexp.h +++ b/libc/src/math/frexp.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double frexp(double x, int *exp); +double frexp(double x, int *exp) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/frexpf.h b/libc/src/math/frexpf.h --- a/libc/src/math/frexpf.h +++ b/libc/src/math/frexpf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float frexpf(float x, int *exp); +float frexpf(float x, int *exp) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/frexpl.h b/libc/src/math/frexpl.h --- a/libc/src/math/frexpl.h +++ b/libc/src/math/frexpl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double frexpl(long double x, int *exp); +long double frexpl(long double x, int *exp) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/hypot.h b/libc/src/math/hypot.h --- a/libc/src/math/hypot.h +++ b/libc/src/math/hypot.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double hypot(double x, double y); +double hypot(double x, double y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/hypotf.h b/libc/src/math/hypotf.h --- a/libc/src/math/hypotf.h +++ b/libc/src/math/hypotf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float hypotf(float x, float y); +float hypotf(float x, float y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/ilogb.h b/libc/src/math/ilogb.h --- a/libc/src/math/ilogb.h +++ b/libc/src/math/ilogb.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int ilogb(double x); +int ilogb(double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/ilogbf.h b/libc/src/math/ilogbf.h --- a/libc/src/math/ilogbf.h +++ b/libc/src/math/ilogbf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int ilogbf(float x); +int ilogbf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/ilogbl.h b/libc/src/math/ilogbl.h --- a/libc/src/math/ilogbl.h +++ b/libc/src/math/ilogbl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int ilogbl(long double x); +int ilogbl(long double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/ldexp.h b/libc/src/math/ldexp.h --- a/libc/src/math/ldexp.h +++ b/libc/src/math/ldexp.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double ldexp(double x, int exp); +double ldexp(double x, int exp) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/ldexpf.h b/libc/src/math/ldexpf.h --- a/libc/src/math/ldexpf.h +++ b/libc/src/math/ldexpf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float ldexpf(float x, int exp); +float ldexpf(float x, int exp) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/ldexpl.h b/libc/src/math/ldexpl.h --- a/libc/src/math/ldexpl.h +++ b/libc/src/math/ldexpl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double ldexpl(long double x, int exp); +long double ldexpl(long double x, int exp) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/llrint.h b/libc/src/math/llrint.h --- a/libc/src/math/llrint.h +++ b/libc/src/math/llrint.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long long llrint(double x); +long long llrint(double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/llrintf.h b/libc/src/math/llrintf.h --- a/libc/src/math/llrintf.h +++ b/libc/src/math/llrintf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long long llrintf(float x); +long long llrintf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/llrintl.h b/libc/src/math/llrintl.h --- a/libc/src/math/llrintl.h +++ b/libc/src/math/llrintl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long long llrintl(long double x); +long long llrintl(long double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/llround.h b/libc/src/math/llround.h --- a/libc/src/math/llround.h +++ b/libc/src/math/llround.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long long llround(double x); +long long llround(double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/llroundf.h b/libc/src/math/llroundf.h --- a/libc/src/math/llroundf.h +++ b/libc/src/math/llroundf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long long llroundf(float x); +long long llroundf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/llroundl.h b/libc/src/math/llroundl.h --- a/libc/src/math/llroundl.h +++ b/libc/src/math/llroundl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long long llroundl(long double x); +long long llroundl(long double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/log10f.h b/libc/src/math/log10f.h --- a/libc/src/math/log10f.h +++ b/libc/src/math/log10f.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float log10f(float x); +float log10f(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/log1pf.h b/libc/src/math/log1pf.h --- a/libc/src/math/log1pf.h +++ b/libc/src/math/log1pf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float log1pf(float x); +float log1pf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/log2f.h b/libc/src/math/log2f.h --- a/libc/src/math/log2f.h +++ b/libc/src/math/log2f.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float log2f(float x); +float log2f(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/logb.h b/libc/src/math/logb.h --- a/libc/src/math/logb.h +++ b/libc/src/math/logb.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double logb(double x); +double logb(double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/logbf.h b/libc/src/math/logbf.h --- a/libc/src/math/logbf.h +++ b/libc/src/math/logbf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float logbf(float x); +float logbf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/logbl.h b/libc/src/math/logbl.h --- a/libc/src/math/logbl.h +++ b/libc/src/math/logbl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double logbl(long double x); +long double logbl(long double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/logf.h b/libc/src/math/logf.h --- a/libc/src/math/logf.h +++ b/libc/src/math/logf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float logf(float x); +float logf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/lrint.h b/libc/src/math/lrint.h --- a/libc/src/math/lrint.h +++ b/libc/src/math/lrint.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long lrint(double x); +long lrint(double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/lrintf.h b/libc/src/math/lrintf.h --- a/libc/src/math/lrintf.h +++ b/libc/src/math/lrintf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long lrintf(float x); +long lrintf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/lrintl.h b/libc/src/math/lrintl.h --- a/libc/src/math/lrintl.h +++ b/libc/src/math/lrintl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long lrintl(long double x); +long lrintl(long double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/lround.h b/libc/src/math/lround.h --- a/libc/src/math/lround.h +++ b/libc/src/math/lround.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long lround(double x); +long lround(double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/lroundf.h b/libc/src/math/lroundf.h --- a/libc/src/math/lroundf.h +++ b/libc/src/math/lroundf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long lroundf(float x); +long lroundf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/lroundl.h b/libc/src/math/lroundl.h --- a/libc/src/math/lroundl.h +++ b/libc/src/math/lroundl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long lroundl(long double x); +long lroundl(long double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/modf.h b/libc/src/math/modf.h --- a/libc/src/math/modf.h +++ b/libc/src/math/modf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double modf(double x, double *iptr); +double modf(double x, double *iptr) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/modff.h b/libc/src/math/modff.h --- a/libc/src/math/modff.h +++ b/libc/src/math/modff.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float modff(float x, float *iptr); +float modff(float x, float *iptr) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/modfl.h b/libc/src/math/modfl.h --- a/libc/src/math/modfl.h +++ b/libc/src/math/modfl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double modfl(long double x, long double *iptr); +long double modfl(long double x, long double *iptr) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/nearbyint.h b/libc/src/math/nearbyint.h --- a/libc/src/math/nearbyint.h +++ b/libc/src/math/nearbyint.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double nearbyint(double x); +double nearbyint(double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/nearbyintf.h b/libc/src/math/nearbyintf.h --- a/libc/src/math/nearbyintf.h +++ b/libc/src/math/nearbyintf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float nearbyintf(float x); +float nearbyintf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/nearbyintl.h b/libc/src/math/nearbyintl.h --- a/libc/src/math/nearbyintl.h +++ b/libc/src/math/nearbyintl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double nearbyintl(long double x); +long double nearbyintl(long double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/nextafter.h b/libc/src/math/nextafter.h --- a/libc/src/math/nextafter.h +++ b/libc/src/math/nextafter.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double nextafter(double x, double y); +double nextafter(double x, double y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/nextafterf.h b/libc/src/math/nextafterf.h --- a/libc/src/math/nextafterf.h +++ b/libc/src/math/nextafterf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float nextafterf(float x, float y); +float nextafterf(float x, float y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/nextafterl.h b/libc/src/math/nextafterl.h --- a/libc/src/math/nextafterl.h +++ b/libc/src/math/nextafterl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double nextafterl(long double x, long double y); +long double nextafterl(long double x, long double y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/pow.h b/libc/src/math/pow.h --- a/libc/src/math/pow.h +++ b/libc/src/math/pow.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double pow(double x, double y); +double pow(double x, double y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/remainder.h b/libc/src/math/remainder.h --- a/libc/src/math/remainder.h +++ b/libc/src/math/remainder.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double remainder(double x, double y); +double remainder(double x, double y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/remainderf.h b/libc/src/math/remainderf.h --- a/libc/src/math/remainderf.h +++ b/libc/src/math/remainderf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float remainderf(float x, float y); +float remainderf(float x, float y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/remainderl.h b/libc/src/math/remainderl.h --- a/libc/src/math/remainderl.h +++ b/libc/src/math/remainderl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double remainderl(long double x, long double y); +long double remainderl(long double x, long double y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/remquo.h b/libc/src/math/remquo.h --- a/libc/src/math/remquo.h +++ b/libc/src/math/remquo.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double remquo(double x, double y, int *exp); +double remquo(double x, double y, int *exp) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/remquof.h b/libc/src/math/remquof.h --- a/libc/src/math/remquof.h +++ b/libc/src/math/remquof.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float remquof(float x, float y, int *exp); +float remquof(float x, float y, int *exp) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/remquol.h b/libc/src/math/remquol.h --- a/libc/src/math/remquol.h +++ b/libc/src/math/remquol.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double remquol(long double x, long double y, int *exp); +long double remquol(long double x, long double y, int *exp) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/rint.h b/libc/src/math/rint.h --- a/libc/src/math/rint.h +++ b/libc/src/math/rint.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double rint(double x); +double rint(double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/rintf.h b/libc/src/math/rintf.h --- a/libc/src/math/rintf.h +++ b/libc/src/math/rintf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float rintf(float x); +float rintf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/rintl.h b/libc/src/math/rintl.h --- a/libc/src/math/rintl.h +++ b/libc/src/math/rintl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double rintl(long double x); +long double rintl(long double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/round.h b/libc/src/math/round.h --- a/libc/src/math/round.h +++ b/libc/src/math/round.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double round(double x); +double round(double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/roundf.h b/libc/src/math/roundf.h --- a/libc/src/math/roundf.h +++ b/libc/src/math/roundf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float roundf(float x); +float roundf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/roundl.h b/libc/src/math/roundl.h --- a/libc/src/math/roundl.h +++ b/libc/src/math/roundl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double roundl(long double x); +long double roundl(long double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/sin.h b/libc/src/math/sin.h --- a/libc/src/math/sin.h +++ b/libc/src/math/sin.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double sin(double x); +double sin(double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/sincosf.h b/libc/src/math/sincosf.h --- a/libc/src/math/sincosf.h +++ b/libc/src/math/sincosf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -void sincosf(float x, float *sinx, float *cosx); +void sincosf(float x, float *sinx, float *cosx) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/sinf.h b/libc/src/math/sinf.h --- a/libc/src/math/sinf.h +++ b/libc/src/math/sinf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float sinf(float x); +float sinf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/sinhf.h b/libc/src/math/sinhf.h --- a/libc/src/math/sinhf.h +++ b/libc/src/math/sinhf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float sinhf(float x); +float sinhf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/sqrt.h b/libc/src/math/sqrt.h --- a/libc/src/math/sqrt.h +++ b/libc/src/math/sqrt.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double sqrt(double x); +double sqrt(double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/sqrtf.h b/libc/src/math/sqrtf.h --- a/libc/src/math/sqrtf.h +++ b/libc/src/math/sqrtf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float sqrtf(float x); +float sqrtf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/sqrtl.h b/libc/src/math/sqrtl.h --- a/libc/src/math/sqrtl.h +++ b/libc/src/math/sqrtl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double sqrtl(long double x); +long double sqrtl(long double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/tan.h b/libc/src/math/tan.h --- a/libc/src/math/tan.h +++ b/libc/src/math/tan.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double tan(double x); +double tan(double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/tanf.h b/libc/src/math/tanf.h --- a/libc/src/math/tanf.h +++ b/libc/src/math/tanf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float tanf(float x); +float tanf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/tanhf.h b/libc/src/math/tanhf.h --- a/libc/src/math/tanhf.h +++ b/libc/src/math/tanhf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float tanhf(float x); +float tanhf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/trunc.h b/libc/src/math/trunc.h --- a/libc/src/math/trunc.h +++ b/libc/src/math/trunc.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double trunc(double x); +double trunc(double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/truncf.h b/libc/src/math/truncf.h --- a/libc/src/math/truncf.h +++ b/libc/src/math/truncf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float truncf(float x); +float truncf(float x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/math/truncl.h b/libc/src/math/truncl.h --- a/libc/src/math/truncl.h +++ b/libc/src/math/truncl.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long double truncl(long double x); +long double truncl(long double x) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_atfork.h b/libc/src/pthread/pthread_atfork.h --- a/libc/src/pthread/pthread_atfork.h +++ b/libc/src/pthread/pthread_atfork.h @@ -14,7 +14,7 @@ namespace __llvm_libc { int pthread_atfork(__atfork_callback_t prepare, __atfork_callback_t parent, - __atfork_callback_t child); + __atfork_callback_t child) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_attr_destroy.h b/libc/src/pthread/pthread_attr_destroy.h --- a/libc/src/pthread/pthread_attr_destroy.h +++ b/libc/src/pthread/pthread_attr_destroy.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int pthread_attr_destroy(pthread_attr_t *attr); +int pthread_attr_destroy(pthread_attr_t *attr) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_attr_getdetachstate.h b/libc/src/pthread/pthread_attr_getdetachstate.h --- a/libc/src/pthread/pthread_attr_getdetachstate.h +++ b/libc/src/pthread/pthread_attr_getdetachstate.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detach_state); +int pthread_attr_getdetachstate(const pthread_attr_t *attr, + int *detach_state) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_attr_getguardsize.h b/libc/src/pthread/pthread_attr_getguardsize.h --- a/libc/src/pthread/pthread_attr_getguardsize.h +++ b/libc/src/pthread/pthread_attr_getguardsize.h @@ -14,7 +14,7 @@ namespace __llvm_libc { int pthread_attr_getguardsize(const pthread_attr_t *__restrict attr, - size_t *__restrict guardsize); + size_t *__restrict guardsize) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_attr_getstack.h b/libc/src/pthread/pthread_attr_getstack.h --- a/libc/src/pthread/pthread_attr_getstack.h +++ b/libc/src/pthread/pthread_attr_getstack.h @@ -15,7 +15,7 @@ int pthread_attr_getstack(const pthread_attr_t *__restrict attr, void **__restrict stack, - size_t *__restrict stacksize); + size_t *__restrict stacksize) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_attr_getstacksize.h b/libc/src/pthread/pthread_attr_getstacksize.h --- a/libc/src/pthread/pthread_attr_getstacksize.h +++ b/libc/src/pthread/pthread_attr_getstacksize.h @@ -14,7 +14,7 @@ namespace __llvm_libc { int pthread_attr_getstacksize(const pthread_attr_t *__restrict attr, - size_t *__restrict stacksize); + size_t *__restrict stacksize) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_attr_init.h b/libc/src/pthread/pthread_attr_init.h --- a/libc/src/pthread/pthread_attr_init.h +++ b/libc/src/pthread/pthread_attr_init.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int pthread_attr_init(pthread_attr_t *attr); +int pthread_attr_init(pthread_attr_t *attr) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_attr_setdetachstate.h b/libc/src/pthread/pthread_attr_setdetachstate.h --- a/libc/src/pthread/pthread_attr_setdetachstate.h +++ b/libc/src/pthread/pthread_attr_setdetachstate.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -int pthread_attr_setdetachstate(pthread_attr_t *attr, int detach_state); +int pthread_attr_setdetachstate(pthread_attr_t *attr, + int detach_state) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_attr_setguardsize.h b/libc/src/pthread/pthread_attr_setguardsize.h --- a/libc/src/pthread/pthread_attr_setguardsize.h +++ b/libc/src/pthread/pthread_attr_setguardsize.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize); +int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_attr_setstack.h b/libc/src/pthread/pthread_attr_setstack.h --- a/libc/src/pthread/pthread_attr_setstack.h +++ b/libc/src/pthread/pthread_attr_setstack.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -int pthread_attr_setstack(pthread_attr_t *attr, void *stack, size_t stacksize); +int pthread_attr_setstack(pthread_attr_t *attr, void *stack, + size_t stacksize) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_attr_setstacksize.h b/libc/src/pthread/pthread_attr_setstacksize.h --- a/libc/src/pthread/pthread_attr_setstacksize.h +++ b/libc/src/pthread/pthread_attr_setstacksize.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize); +int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_create.h b/libc/src/pthread/pthread_create.h --- a/libc/src/pthread/pthread_create.h +++ b/libc/src/pthread/pthread_create.h @@ -15,7 +15,7 @@ int pthread_create(pthread_t *__restrict thread, const pthread_attr_t *__restrict attr, - __pthread_start_t func, void *arg); + __pthread_start_t func, void *arg) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_detach.h b/libc/src/pthread/pthread_detach.h --- a/libc/src/pthread/pthread_detach.h +++ b/libc/src/pthread/pthread_detach.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int pthread_detach(pthread_t thread); +int pthread_detach(pthread_t thread) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_equal.h b/libc/src/pthread/pthread_equal.h --- a/libc/src/pthread/pthread_equal.h +++ b/libc/src/pthread/pthread_equal.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int pthread_equal(pthread_t lhs, pthread_t rhs); +int pthread_equal(pthread_t lhs, pthread_t rhs) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_exit.h b/libc/src/pthread/pthread_exit.h --- 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); +void pthread_exit(void *retval) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_getname_np.h b/libc/src/pthread/pthread_getname_np.h --- a/libc/src/pthread/pthread_getname_np.h +++ b/libc/src/pthread/pthread_getname_np.h @@ -14,7 +14,7 @@ namespace __llvm_libc { -int pthread_getname_np(pthread_t, char *, size_t); +int pthread_getname_np(pthread_t, char *, size_t) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_getspecific.h b/libc/src/pthread/pthread_getspecific.h --- a/libc/src/pthread/pthread_getspecific.h +++ b/libc/src/pthread/pthread_getspecific.h @@ -14,7 +14,7 @@ namespace __llvm_libc { -void *pthread_getspecific(pthread_key_t); +void *pthread_getspecific(pthread_key_t) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_join.h b/libc/src/pthread/pthread_join.h --- a/libc/src/pthread/pthread_join.h +++ b/libc/src/pthread/pthread_join.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int pthread_join(pthread_t thread, void **retval); +int pthread_join(pthread_t thread, void **retval) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_key_create.h b/libc/src/pthread/pthread_key_create.h --- a/libc/src/pthread/pthread_key_create.h +++ b/libc/src/pthread/pthread_key_create.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int pthread_key_create(pthread_key_t *key, __pthread_tss_dtor_t dtor); +int pthread_key_create(pthread_key_t *key, __pthread_tss_dtor_t dtor) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_key_delete.h b/libc/src/pthread/pthread_key_delete.h --- a/libc/src/pthread/pthread_key_delete.h +++ b/libc/src/pthread/pthread_key_delete.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int pthread_key_delete(pthread_key_t key); +int pthread_key_delete(pthread_key_t key) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_mutex_destroy.h b/libc/src/pthread/pthread_mutex_destroy.h --- a/libc/src/pthread/pthread_mutex_destroy.h +++ b/libc/src/pthread/pthread_mutex_destroy.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int pthread_mutex_destroy(pthread_mutex_t *mutex); +int pthread_mutex_destroy(pthread_mutex_t *mutex) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_mutex_init.h b/libc/src/pthread/pthread_mutex_init.h --- a/libc/src/pthread/pthread_mutex_init.h +++ b/libc/src/pthread/pthread_mutex_init.h @@ -14,7 +14,7 @@ namespace __llvm_libc { int pthread_mutex_init(pthread_mutex_t *mutex, - const pthread_mutexattr_t *__restrict attr); + const pthread_mutexattr_t *__restrict attr) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_mutex_lock.h b/libc/src/pthread/pthread_mutex_lock.h --- a/libc/src/pthread/pthread_mutex_lock.h +++ b/libc/src/pthread/pthread_mutex_lock.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int pthread_mutex_lock(pthread_mutex_t *mutex); +int pthread_mutex_lock(pthread_mutex_t *mutex) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_mutex_unlock.h b/libc/src/pthread/pthread_mutex_unlock.h --- a/libc/src/pthread/pthread_mutex_unlock.h +++ b/libc/src/pthread/pthread_mutex_unlock.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int pthread_mutex_unlock(pthread_mutex_t *mutex); +int pthread_mutex_unlock(pthread_mutex_t *mutex) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_mutexattr_destroy.h b/libc/src/pthread/pthread_mutexattr_destroy.h --- a/libc/src/pthread/pthread_mutexattr_destroy.h +++ b/libc/src/pthread/pthread_mutexattr_destroy.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int pthread_mutexattr_destroy(pthread_mutexattr_t *attr); +int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_mutexattr_getpshared.h b/libc/src/pthread/pthread_mutexattr_getpshared.h --- a/libc/src/pthread/pthread_mutexattr_getpshared.h +++ b/libc/src/pthread/pthread_mutexattr_getpshared.h @@ -14,7 +14,7 @@ namespace __llvm_libc { int pthread_mutexattr_getpshared(const pthread_mutexattr_t *__restrict attr, - int *__restrict pshared); + int *__restrict pshared) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_mutexattr_getrobust.h b/libc/src/pthread/pthread_mutexattr_getrobust.h --- a/libc/src/pthread/pthread_mutexattr_getrobust.h +++ b/libc/src/pthread/pthread_mutexattr_getrobust.h @@ -14,7 +14,7 @@ namespace __llvm_libc { int pthread_mutexattr_getrobust(const pthread_mutexattr_t *__restrict attr, - int *__restrict robust); + int *__restrict robust) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_mutexattr_gettype.h b/libc/src/pthread/pthread_mutexattr_gettype.h --- a/libc/src/pthread/pthread_mutexattr_gettype.h +++ b/libc/src/pthread/pthread_mutexattr_gettype.h @@ -14,7 +14,7 @@ namespace __llvm_libc { int pthread_mutexattr_gettype(const pthread_mutexattr_t *__restrict attr, - int *__restrict type); + int *__restrict type) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_mutexattr_init.h b/libc/src/pthread/pthread_mutexattr_init.h --- a/libc/src/pthread/pthread_mutexattr_init.h +++ b/libc/src/pthread/pthread_mutexattr_init.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int pthread_mutexattr_init(pthread_mutexattr_t *attr); +int pthread_mutexattr_init(pthread_mutexattr_t *attr) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_mutexattr_setpshared.h b/libc/src/pthread/pthread_mutexattr_setpshared.h --- a/libc/src/pthread/pthread_mutexattr_setpshared.h +++ b/libc/src/pthread/pthread_mutexattr_setpshared.h @@ -14,7 +14,7 @@ namespace __llvm_libc { int pthread_mutexattr_setpshared(pthread_mutexattr_t *__restrict attr, - int pshared); + int pshared) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_mutexattr_setrobust.h b/libc/src/pthread/pthread_mutexattr_setrobust.h --- a/libc/src/pthread/pthread_mutexattr_setrobust.h +++ b/libc/src/pthread/pthread_mutexattr_setrobust.h @@ -14,7 +14,7 @@ namespace __llvm_libc { int pthread_mutexattr_setrobust(pthread_mutexattr_t *__restrict attr, - int robust); + int robust) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_mutexattr_settype.h b/libc/src/pthread/pthread_mutexattr_settype.h --- a/libc/src/pthread/pthread_mutexattr_settype.h +++ b/libc/src/pthread/pthread_mutexattr_settype.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -int pthread_mutexattr_settype(pthread_mutexattr_t *__restrict attr, int type); +int pthread_mutexattr_settype(pthread_mutexattr_t *__restrict attr, + int type) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_once.h b/libc/src/pthread/pthread_once.h --- a/libc/src/pthread/pthread_once.h +++ b/libc/src/pthread/pthread_once.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int pthread_once(pthread_once_t *flag, __pthread_once_func_t func); +int pthread_once(pthread_once_t *flag, __pthread_once_func_t func) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_self.h b/libc/src/pthread/pthread_self.h --- a/libc/src/pthread/pthread_self.h +++ b/libc/src/pthread/pthread_self.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -pthread_t pthread_self(); +pthread_t pthread_self() noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_setname_np.h b/libc/src/pthread/pthread_setname_np.h --- a/libc/src/pthread/pthread_setname_np.h +++ b/libc/src/pthread/pthread_setname_np.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int pthread_setname_np(pthread_t, const char *name); +int pthread_setname_np(pthread_t, const char *name) noexcept; } // namespace __llvm_libc diff --git a/libc/src/pthread/pthread_setspecific.h b/libc/src/pthread/pthread_setspecific.h --- a/libc/src/pthread/pthread_setspecific.h +++ b/libc/src/pthread/pthread_setspecific.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int pthread_setspecific(pthread_key_t, const void *); +int pthread_setspecific(pthread_key_t, const void *) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sched/sched_getaffinity.h b/libc/src/sched/sched_getaffinity.h --- a/libc/src/sched/sched_getaffinity.h +++ b/libc/src/sched/sched_getaffinity.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int sched_getaffinity(pid_t tid, size_t cpuset_size, cpu_set_t *mask); +int sched_getaffinity(pid_t tid, size_t cpuset_size, cpu_set_t *mask) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sched/sched_getcpucount.h b/libc/src/sched/sched_getcpucount.h --- a/libc/src/sched/sched_getcpucount.h +++ b/libc/src/sched/sched_getcpucount.h @@ -16,7 +16,7 @@ // This function is for internal use in the CPU_COUNT macro, but since that's a // macro and will be applied to client files, this must be a public entrypoint. -int __sched_getcpucount(size_t cpuset_size, const cpu_set_t *mask); +int __sched_getcpucount(size_t cpuset_size, const cpu_set_t *mask) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sched/sched_setaffinity.h b/libc/src/sched/sched_setaffinity.h --- a/libc/src/sched/sched_setaffinity.h +++ b/libc/src/sched/sched_setaffinity.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -int sched_setaffinity(pid_t pid, size_t cpuset_size, const cpu_set_t *mask); +int sched_setaffinity(pid_t pid, size_t cpuset_size, + const cpu_set_t *mask) noexcept; } // namespace __llvm_libc diff --git a/libc/src/setjmp/longjmp.h b/libc/src/setjmp/longjmp.h --- a/libc/src/setjmp/longjmp.h +++ b/libc/src/setjmp/longjmp.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void longjmp(__jmp_buf *buf, int val); +void longjmp(__jmp_buf *buf, int val) noexcept; } // namespace __llvm_libc diff --git a/libc/src/setjmp/setjmp_impl.h b/libc/src/setjmp/setjmp_impl.h --- a/libc/src/setjmp/setjmp_impl.h +++ b/libc/src/setjmp/setjmp_impl.h @@ -15,7 +15,7 @@ namespace __llvm_libc { -int setjmp(__jmp_buf *buf); +int setjmp(__jmp_buf *buf) noexcept; } // namespace __llvm_libc diff --git a/libc/src/signal/kill.h b/libc/src/signal/kill.h --- a/libc/src/signal/kill.h +++ b/libc/src/signal/kill.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int kill(pid_t pid, int sig); +int kill(pid_t pid, int sig) noexcept; } // namespace __llvm_libc diff --git a/libc/src/signal/raise.h b/libc/src/signal/raise.h --- a/libc/src/signal/raise.h +++ b/libc/src/signal/raise.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int raise(int sig); +int raise(int sig) noexcept; } // namespace __llvm_libc diff --git a/libc/src/signal/sigaction.h b/libc/src/signal/sigaction.h --- a/libc/src/signal/sigaction.h +++ b/libc/src/signal/sigaction.h @@ -14,7 +14,7 @@ namespace __llvm_libc { int sigaction(int signal, const struct sigaction *__restrict libc_new, - struct sigaction *__restrict libc_old); + struct sigaction *__restrict libc_old) noexcept; } // namespace __llvm_libc diff --git a/libc/src/signal/sigaddset.h b/libc/src/signal/sigaddset.h --- a/libc/src/signal/sigaddset.h +++ b/libc/src/signal/sigaddset.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int sigaddset(sigset_t *set, int signum); +int sigaddset(sigset_t *set, int signum) noexcept; } // namespace __llvm_libc diff --git a/libc/src/signal/sigaltstack.h b/libc/src/signal/sigaltstack.h --- a/libc/src/signal/sigaltstack.h +++ b/libc/src/signal/sigaltstack.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int sigaltstack(const stack_t *__restrict ss, stack_t *__restrict oss); +int sigaltstack(const stack_t *__restrict ss, stack_t *__restrict oss) noexcept; } // namespace __llvm_libc diff --git a/libc/src/signal/sigdelset.h b/libc/src/signal/sigdelset.h --- a/libc/src/signal/sigdelset.h +++ b/libc/src/signal/sigdelset.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int sigdelset(sigset_t *set, int signum); +int sigdelset(sigset_t *set, int signum) noexcept; } // namespace __llvm_libc diff --git a/libc/src/signal/sigemptyset.h b/libc/src/signal/sigemptyset.h --- a/libc/src/signal/sigemptyset.h +++ b/libc/src/signal/sigemptyset.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int sigemptyset(sigset_t *set); +int sigemptyset(sigset_t *set) noexcept; } // namespace __llvm_libc diff --git a/libc/src/signal/sigfillset.h b/libc/src/signal/sigfillset.h --- a/libc/src/signal/sigfillset.h +++ b/libc/src/signal/sigfillset.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int sigfillset(sigset_t *set); +int sigfillset(sigset_t *set) noexcept; } // namespace __llvm_libc diff --git a/libc/src/signal/signal.h b/libc/src/signal/signal.h --- a/libc/src/signal/signal.h +++ b/libc/src/signal/signal.h @@ -15,7 +15,7 @@ using sighandler_t = __sighandler_t; -sighandler_t signal(int signum, sighandler_t handler); +sighandler_t signal(int signum, sighandler_t handler) noexcept; } // namespace __llvm_libc diff --git a/libc/src/signal/sigprocmask.h b/libc/src/signal/sigprocmask.h --- a/libc/src/signal/sigprocmask.h +++ b/libc/src/signal/sigprocmask.h @@ -14,7 +14,7 @@ namespace __llvm_libc { int sigprocmask(int how, const sigset_t *__restrict set, - sigset_t *__restrict oldset); + sigset_t *__restrict oldset) noexcept; } // namespace __llvm_libc diff --git a/libc/src/spawn/posix_spawn.h b/libc/src/spawn/posix_spawn.h --- a/libc/src/spawn/posix_spawn.h +++ b/libc/src/spawn/posix_spawn.h @@ -16,7 +16,8 @@ int posix_spawn(pid_t *__restrict pid, const char *__restrict path, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t *__restrict attr, - char *const *__restrict argv, char *const *__restrict envp); + char *const *__restrict argv, + char *const *__restrict envp) noexcept; } // namespace __llvm_libc diff --git a/libc/src/spawn/posix_spawn_file_actions_addclose.h b/libc/src/spawn/posix_spawn_file_actions_addclose.h --- a/libc/src/spawn/posix_spawn_file_actions_addclose.h +++ b/libc/src/spawn/posix_spawn_file_actions_addclose.h @@ -14,7 +14,7 @@ namespace __llvm_libc { int posix_spawn_file_actions_addclose( - posix_spawn_file_actions_t *__restrict actions, int fd); + posix_spawn_file_actions_t *__restrict actions, int fd) noexcept; } // namespace __llvm_libc diff --git a/libc/src/spawn/posix_spawn_file_actions_adddup2.h b/libc/src/spawn/posix_spawn_file_actions_adddup2.h --- a/libc/src/spawn/posix_spawn_file_actions_adddup2.h +++ b/libc/src/spawn/posix_spawn_file_actions_adddup2.h @@ -14,7 +14,7 @@ namespace __llvm_libc { int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *actions, - int fd, int newfd); + int fd, int newfd) noexcept; } // namespace __llvm_libc diff --git a/libc/src/spawn/posix_spawn_file_actions_addopen.h b/libc/src/spawn/posix_spawn_file_actions_addopen.h --- a/libc/src/spawn/posix_spawn_file_actions_addopen.h +++ b/libc/src/spawn/posix_spawn_file_actions_addopen.h @@ -15,7 +15,7 @@ int posix_spawn_file_actions_addopen( posix_spawn_file_actions_t *__restrict actions, int fd, - const char *__restrict path, int oflag, mode_t mode); + const char *__restrict path, int oflag, mode_t mode) noexcept; } // namespace __llvm_libc diff --git a/libc/src/spawn/posix_spawn_file_actions_destroy.h b/libc/src/spawn/posix_spawn_file_actions_destroy.h --- a/libc/src/spawn/posix_spawn_file_actions_destroy.h +++ b/libc/src/spawn/posix_spawn_file_actions_destroy.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *actions); +int posix_spawn_file_actions_destroy( + posix_spawn_file_actions_t *actions) noexcept; } // namespace __llvm_libc diff --git a/libc/src/spawn/posix_spawn_file_actions_init.h b/libc/src/spawn/posix_spawn_file_actions_init.h --- a/libc/src/spawn/posix_spawn_file_actions_init.h +++ b/libc/src/spawn/posix_spawn_file_actions_init.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int posix_spawn_file_actions_init(posix_spawn_file_actions_t *actions); +int posix_spawn_file_actions_init(posix_spawn_file_actions_t *actions) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/clearerr.h b/libc/src/stdio/clearerr.h --- a/libc/src/stdio/clearerr.h +++ b/libc/src/stdio/clearerr.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void clearerr(::FILE *stream); +void clearerr(::FILE *stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/clearerr_unlocked.h b/libc/src/stdio/clearerr_unlocked.h --- a/libc/src/stdio/clearerr_unlocked.h +++ b/libc/src/stdio/clearerr_unlocked.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void clearerr_unlocked(::FILE *stream); +void clearerr_unlocked(::FILE *stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/fclose.h b/libc/src/stdio/fclose.h --- a/libc/src/stdio/fclose.h +++ b/libc/src/stdio/fclose.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int fclose(::FILE *stream); +int fclose(::FILE *stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/feof.h b/libc/src/stdio/feof.h --- a/libc/src/stdio/feof.h +++ b/libc/src/stdio/feof.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int feof(::FILE *stream); +int feof(::FILE *stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/feof_unlocked.h b/libc/src/stdio/feof_unlocked.h --- a/libc/src/stdio/feof_unlocked.h +++ b/libc/src/stdio/feof_unlocked.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int feof_unlocked(::FILE *stream); +int feof_unlocked(::FILE *stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/ferror.h b/libc/src/stdio/ferror.h --- a/libc/src/stdio/ferror.h +++ b/libc/src/stdio/ferror.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int ferror(::FILE *stream); +int ferror(::FILE *stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/ferror_unlocked.h b/libc/src/stdio/ferror_unlocked.h --- a/libc/src/stdio/ferror_unlocked.h +++ b/libc/src/stdio/ferror_unlocked.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int ferror_unlocked(::FILE *stream); +int ferror_unlocked(::FILE *stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/fflush.h b/libc/src/stdio/fflush.h --- a/libc/src/stdio/fflush.h +++ b/libc/src/stdio/fflush.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int fflush(::FILE *stream); +int fflush(::FILE *stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/fgetc.h b/libc/src/stdio/fgetc.h --- a/libc/src/stdio/fgetc.h +++ b/libc/src/stdio/fgetc.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int fgetc(::FILE *f); +int fgetc(::FILE *f) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/fgetc_unlocked.h b/libc/src/stdio/fgetc_unlocked.h --- a/libc/src/stdio/fgetc_unlocked.h +++ b/libc/src/stdio/fgetc_unlocked.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int fgetc_unlocked(::FILE *f); +int fgetc_unlocked(::FILE *f) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/fgets.h b/libc/src/stdio/fgets.h --- a/libc/src/stdio/fgets.h +++ b/libc/src/stdio/fgets.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -char *fgets(char *__restrict str, int count, ::FILE *__restrict raw_stream); +char *fgets(char *__restrict str, int count, + ::FILE *__restrict raw_stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/flockfile.h b/libc/src/stdio/flockfile.h --- a/libc/src/stdio/flockfile.h +++ b/libc/src/stdio/flockfile.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void flockfile(::FILE *stream); +void flockfile(::FILE *stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/fopen.h b/libc/src/stdio/fopen.h --- a/libc/src/stdio/fopen.h +++ b/libc/src/stdio/fopen.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -::FILE *fopen(const char *__restrict name, const char *__restrict mode); +::FILE *fopen(const char *__restrict name, + const char *__restrict mode) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/fopencookie.h b/libc/src/stdio/fopencookie.h --- a/libc/src/stdio/fopencookie.h +++ b/libc/src/stdio/fopencookie.h @@ -14,7 +14,7 @@ namespace __llvm_libc { ::FILE *fopencookie(void *cookie, const char *__restrict mode, - cookie_io_functions_t desc); + cookie_io_functions_t desc) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/fprintf.h b/libc/src/stdio/fprintf.h --- a/libc/src/stdio/fprintf.h +++ b/libc/src/stdio/fprintf.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -int fprintf(::FILE *__restrict stream, const char *__restrict format, ...); +int fprintf(::FILE *__restrict stream, const char *__restrict format, + ...) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/fputc.h b/libc/src/stdio/fputc.h --- a/libc/src/stdio/fputc.h +++ b/libc/src/stdio/fputc.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int fputc(int c, ::FILE *stream); +int fputc(int c, ::FILE *stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/fputs.h b/libc/src/stdio/fputs.h --- a/libc/src/stdio/fputs.h +++ b/libc/src/stdio/fputs.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int fputs(const char *__restrict str, ::FILE *__restrict stream); +int fputs(const char *__restrict str, ::FILE *__restrict stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/fread.h b/libc/src/stdio/fread.h --- a/libc/src/stdio/fread.h +++ b/libc/src/stdio/fread.h @@ -14,7 +14,7 @@ namespace __llvm_libc { size_t fread(void *__restrict buffer, size_t size, size_t nmemb, - ::FILE *stream); + ::FILE *stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/fread_unlocked.h b/libc/src/stdio/fread_unlocked.h --- a/libc/src/stdio/fread_unlocked.h +++ b/libc/src/stdio/fread_unlocked.h @@ -14,7 +14,7 @@ namespace __llvm_libc { size_t fread_unlocked(void *__restrict buffer, size_t size, size_t nmemb, - ::FILE *stream); + ::FILE *stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/fscanf.h b/libc/src/stdio/fscanf.h --- a/libc/src/stdio/fscanf.h +++ b/libc/src/stdio/fscanf.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -int fscanf(::FILE *__restrict stream, const char *__restrict format, ...); +int fscanf(::FILE *__restrict stream, const char *__restrict format, + ...) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/fseek.h b/libc/src/stdio/fseek.h --- a/libc/src/stdio/fseek.h +++ b/libc/src/stdio/fseek.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int fseek(::FILE *stream, long offset, int whence); +int fseek(::FILE *stream, long offset, int whence) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/ftell.h b/libc/src/stdio/ftell.h --- a/libc/src/stdio/ftell.h +++ b/libc/src/stdio/ftell.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -long ftell(::FILE *f); +long ftell(::FILE *f) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/funlockfile.h b/libc/src/stdio/funlockfile.h --- a/libc/src/stdio/funlockfile.h +++ b/libc/src/stdio/funlockfile.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void funlockfile(::FILE *stream); +void funlockfile(::FILE *stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/fwrite.h b/libc/src/stdio/fwrite.h --- a/libc/src/stdio/fwrite.h +++ b/libc/src/stdio/fwrite.h @@ -14,7 +14,7 @@ namespace __llvm_libc { size_t fwrite(const void *__restrict ptr, size_t size, size_t nmemb, - ::FILE *__restrict stream); + ::FILE *__restrict stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/fwrite_unlocked.h b/libc/src/stdio/fwrite_unlocked.h --- a/libc/src/stdio/fwrite_unlocked.h +++ b/libc/src/stdio/fwrite_unlocked.h @@ -14,7 +14,7 @@ namespace __llvm_libc { size_t fwrite_unlocked(const void *__restrict ptr, size_t size, size_t nmemb, - ::FILE *__restrict stream); + ::FILE *__restrict stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/getc.h b/libc/src/stdio/getc.h --- a/libc/src/stdio/getc.h +++ b/libc/src/stdio/getc.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int getc(::FILE *f); +int getc(::FILE *f) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/getc_unlocked.h b/libc/src/stdio/getc_unlocked.h --- a/libc/src/stdio/getc_unlocked.h +++ b/libc/src/stdio/getc_unlocked.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int getc_unlocked(::FILE *f); +int getc_unlocked(::FILE *f) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/printf.h b/libc/src/stdio/printf.h --- a/libc/src/stdio/printf.h +++ b/libc/src/stdio/printf.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int printf(const char *__restrict format, ...); +int printf(const char *__restrict format, ...) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/putc.h b/libc/src/stdio/putc.h --- a/libc/src/stdio/putc.h +++ b/libc/src/stdio/putc.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int putc(int c, ::FILE *stream); +int putc(int c, ::FILE *stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/putchar.h b/libc/src/stdio/putchar.h --- a/libc/src/stdio/putchar.h +++ b/libc/src/stdio/putchar.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int putchar(int c); +int putchar(int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/puts.h b/libc/src/stdio/puts.h --- a/libc/src/stdio/puts.h +++ b/libc/src/stdio/puts.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int puts(const char *__restrict str); +int puts(const char *__restrict str) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/remove.h b/libc/src/stdio/remove.h --- a/libc/src/stdio/remove.h +++ b/libc/src/stdio/remove.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int remove(const char *path); +int remove(const char *path) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/scanf.h b/libc/src/stdio/scanf.h --- a/libc/src/stdio/scanf.h +++ b/libc/src/stdio/scanf.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int scanf(const char *__restrict format, ...); +int scanf(const char *__restrict format, ...) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/setbuf.h b/libc/src/stdio/setbuf.h --- a/libc/src/stdio/setbuf.h +++ b/libc/src/stdio/setbuf.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void setbuf(::FILE *__restrict stream, char *__restrict buf); +void setbuf(::FILE *__restrict stream, char *__restrict buf) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/setvbuf.h b/libc/src/stdio/setvbuf.h --- a/libc/src/stdio/setvbuf.h +++ b/libc/src/stdio/setvbuf.h @@ -14,7 +14,7 @@ namespace __llvm_libc { int setvbuf(::FILE *__restrict stream, char *__restrict buf, int type, - size_t size); + size_t size) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/snprintf.h b/libc/src/stdio/snprintf.h --- a/libc/src/stdio/snprintf.h +++ b/libc/src/stdio/snprintf.h @@ -14,7 +14,7 @@ namespace __llvm_libc { int snprintf(char *__restrict buffer, size_t buffsz, - const char *__restrict format, ...); + const char *__restrict format, ...) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/sprintf.h b/libc/src/stdio/sprintf.h --- a/libc/src/stdio/sprintf.h +++ b/libc/src/stdio/sprintf.h @@ -11,7 +11,8 @@ namespace __llvm_libc { -int sprintf(char *__restrict buffer, const char *__restrict format, ...); +int sprintf(char *__restrict buffer, const char *__restrict format, + ...) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/sscanf.h b/libc/src/stdio/sscanf.h --- a/libc/src/stdio/sscanf.h +++ b/libc/src/stdio/sscanf.h @@ -11,7 +11,8 @@ namespace __llvm_libc { -int sscanf(const char *__restrict buffer, const char *__restrict format, ...); +int sscanf(const char *__restrict buffer, const char *__restrict format, + ...) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdio/ungetc.h b/libc/src/stdio/ungetc.h --- a/libc/src/stdio/ungetc.h +++ b/libc/src/stdio/ungetc.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int ungetc(int c, ::FILE *stream); +int ungetc(int c, ::FILE *stream) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/_Exit.h b/libc/src/stdlib/_Exit.h --- a/libc/src/stdlib/_Exit.h +++ b/libc/src/stdlib/_Exit.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -[[noreturn]] void _Exit(int status); +[[noreturn]] void _Exit(int status) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/abort.h b/libc/src/stdlib/abort.h --- a/libc/src/stdlib/abort.h +++ b/libc/src/stdlib/abort.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -[[noreturn]] void abort(); +[[noreturn]] void abort() noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/abs.h b/libc/src/stdlib/abs.h --- a/libc/src/stdlib/abs.h +++ b/libc/src/stdlib/abs.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int abs(int n); +int abs(int n) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/atexit.h b/libc/src/stdlib/atexit.h --- a/libc/src/stdlib/atexit.h +++ b/libc/src/stdlib/atexit.h @@ -15,7 +15,7 @@ constexpr size_t CALLBACK_LIST_SIZE_FOR_TESTS = 1024; -int atexit(void (*function)()); +int atexit(void (*function)()) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/atof.h b/libc/src/stdlib/atof.h --- a/libc/src/stdlib/atof.h +++ b/libc/src/stdlib/atof.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double atof(const char *str); +double atof(const char *str) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/atoi.h b/libc/src/stdlib/atoi.h --- a/libc/src/stdlib/atoi.h +++ b/libc/src/stdlib/atoi.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int atoi(const char *str); +int atoi(const char *str) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/atol.h b/libc/src/stdlib/atol.h --- a/libc/src/stdlib/atol.h +++ b/libc/src/stdlib/atol.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long atol(const char *str); +long atol(const char *str) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/atoll.h b/libc/src/stdlib/atoll.h --- a/libc/src/stdlib/atoll.h +++ b/libc/src/stdlib/atoll.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long long atoll(const char *str); +long long atoll(const char *str) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/bsearch.h b/libc/src/stdlib/bsearch.h --- a/libc/src/stdlib/bsearch.h +++ b/libc/src/stdlib/bsearch.h @@ -11,6 +11,7 @@ namespace __llvm_libc { void *bsearch(const void *key, const void *array, size_t array_size, - size_t elem_size, int (*compare)(const void *, const void *)); + size_t elem_size, + int (*compare)(const void *, const void *)) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/div.h b/libc/src/stdlib/div.h --- a/libc/src/stdlib/div.h +++ b/libc/src/stdlib/div.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -div_t div(int x, int y); +div_t div(int x, int y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/exit.h b/libc/src/stdlib/exit.h --- a/libc/src/stdlib/exit.h +++ b/libc/src/stdlib/exit.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void exit(int status); +void exit(int status) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/getenv.h b/libc/src/stdlib/getenv.h --- a/libc/src/stdlib/getenv.h +++ b/libc/src/stdlib/getenv.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -char *getenv(const char *name); +char *getenv(const char *name) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/labs.h b/libc/src/stdlib/labs.h --- a/libc/src/stdlib/labs.h +++ b/libc/src/stdlib/labs.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long labs(long n); +long labs(long n) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/ldiv.h b/libc/src/stdlib/ldiv.h --- a/libc/src/stdlib/ldiv.h +++ b/libc/src/stdlib/ldiv.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -ldiv_t ldiv(long x, long y); +ldiv_t ldiv(long x, long y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/llabs.h b/libc/src/stdlib/llabs.h --- a/libc/src/stdlib/llabs.h +++ b/libc/src/stdlib/llabs.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -long long llabs(long long n); +long long llabs(long long n) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/lldiv.h b/libc/src/stdlib/lldiv.h --- a/libc/src/stdlib/lldiv.h +++ b/libc/src/stdlib/lldiv.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -lldiv_t lldiv(long long x, long long y); +lldiv_t lldiv(long long x, long long y) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/qsort.h b/libc/src/stdlib/qsort.h --- a/libc/src/stdlib/qsort.h +++ b/libc/src/stdlib/qsort.h @@ -14,7 +14,7 @@ namespace __llvm_libc { void qsort(void *array, size_t array_size, size_t elem_size, - int (*compare)(const void *, const void *)); + int (*compare)(const void *, const void *)) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/rand.h b/libc/src/stdlib/rand.h --- a/libc/src/stdlib/rand.h +++ b/libc/src/stdlib/rand.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int rand(void); +int rand(void) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/srand.h b/libc/src/stdlib/srand.h --- a/libc/src/stdlib/srand.h +++ b/libc/src/stdlib/srand.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void srand(unsigned int seed); +void srand(unsigned int seed) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/strtod.h b/libc/src/stdlib/strtod.h --- a/libc/src/stdlib/strtod.h +++ b/libc/src/stdlib/strtod.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -double strtod(const char *__restrict str, char **__restrict str_end); +double strtod(const char *__restrict str, char **__restrict str_end) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/strtof.h b/libc/src/stdlib/strtof.h --- a/libc/src/stdlib/strtof.h +++ b/libc/src/stdlib/strtof.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -float strtof(const char *__restrict str, char **__restrict str_end); +float strtof(const char *__restrict str, char **__restrict str_end) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/strtol.h b/libc/src/stdlib/strtol.h --- a/libc/src/stdlib/strtol.h +++ b/libc/src/stdlib/strtol.h @@ -11,7 +11,8 @@ namespace __llvm_libc { -long strtol(const char *__restrict str, char **__restrict str_end, int base); +long strtol(const char *__restrict str, char **__restrict str_end, + int base) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/strtold.h b/libc/src/stdlib/strtold.h --- a/libc/src/stdlib/strtold.h +++ b/libc/src/stdlib/strtold.h @@ -11,7 +11,8 @@ namespace __llvm_libc { -long double strtold(const char *__restrict str, char **__restrict str_end); +long double strtold(const char *__restrict str, + char **__restrict str_end) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/strtoll.h b/libc/src/stdlib/strtoll.h --- a/libc/src/stdlib/strtoll.h +++ b/libc/src/stdlib/strtoll.h @@ -12,7 +12,7 @@ namespace __llvm_libc { long long strtoll(const char *__restrict str, char **__restrict str_end, - int base); + int base) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/strtoul.h b/libc/src/stdlib/strtoul.h --- a/libc/src/stdlib/strtoul.h +++ b/libc/src/stdlib/strtoul.h @@ -12,7 +12,7 @@ namespace __llvm_libc { unsigned long strtoul(const char *__restrict str, char **__restrict str_end, - int base); + int base) noexcept; } // namespace __llvm_libc diff --git a/libc/src/stdlib/strtoull.h b/libc/src/stdlib/strtoull.h --- a/libc/src/stdlib/strtoull.h +++ b/libc/src/stdlib/strtoull.h @@ -12,7 +12,7 @@ namespace __llvm_libc { unsigned long long strtoull(const char *__restrict str, - char **__restrict str_end, int base); + char **__restrict str_end, int base) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/bcmp.h b/libc/src/string/bcmp.h --- a/libc/src/string/bcmp.h +++ b/libc/src/string/bcmp.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int bcmp(const void *lhs, const void *rhs, size_t count); +int bcmp(const void *lhs, const void *rhs, size_t count) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/bcopy.h b/libc/src/string/bcopy.h --- a/libc/src/string/bcopy.h +++ b/libc/src/string/bcopy.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void bcopy(const void *src, void *dest, size_t count); +void bcopy(const void *src, void *dest, size_t count) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/bzero.h b/libc/src/string/bzero.h --- a/libc/src/string/bzero.h +++ b/libc/src/string/bzero.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void bzero(void *ptr, size_t count); +void bzero(void *ptr, size_t count) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/memccpy.h b/libc/src/string/memccpy.h --- a/libc/src/string/memccpy.h +++ b/libc/src/string/memccpy.h @@ -14,7 +14,7 @@ namespace __llvm_libc { void *memccpy(void *__restrict dest, const void *__restrict src, int c, - size_t count); + size_t count) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/memchr.h b/libc/src/string/memchr.h --- a/libc/src/string/memchr.h +++ b/libc/src/string/memchr.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void *memchr(const void *src, int c, size_t n); +void *memchr(const void *src, int c, size_t n) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/memcmp.h b/libc/src/string/memcmp.h --- a/libc/src/string/memcmp.h +++ b/libc/src/string/memcmp.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int memcmp(const void *lhs, const void *rhs, size_t count); +int memcmp(const void *lhs, const void *rhs, size_t count) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/memcpy.h b/libc/src/string/memcpy.h --- a/libc/src/string/memcpy.h +++ b/libc/src/string/memcpy.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void *memcpy(void *__restrict, const void *__restrict, size_t); +void *memcpy(void *__restrict, const void *__restrict, size_t) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/memmove.h b/libc/src/string/memmove.h --- a/libc/src/string/memmove.h +++ b/libc/src/string/memmove.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void *memmove(void *dst, const void *src, size_t count); +void *memmove(void *dst, const void *src, size_t count) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/mempcpy.h b/libc/src/string/mempcpy.h --- a/libc/src/string/mempcpy.h +++ b/libc/src/string/mempcpy.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -void *mempcpy(void *__restrict dest, const void *__restrict src, size_t count); +void *mempcpy(void *__restrict dest, const void *__restrict src, + size_t count) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/memrchr.h b/libc/src/string/memrchr.h --- a/libc/src/string/memrchr.h +++ b/libc/src/string/memrchr.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void *memrchr(const void *src, int c, size_t n); +void *memrchr(const void *src, int c, size_t n) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/memset.h b/libc/src/string/memset.h --- a/libc/src/string/memset.h +++ b/libc/src/string/memset.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void *memset(void *ptr, int value, size_t count); +void *memset(void *ptr, int value, size_t count) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/stpcpy.h b/libc/src/string/stpcpy.h --- a/libc/src/string/stpcpy.h +++ b/libc/src/string/stpcpy.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -char *stpcpy(char *__restrict dest, const char *__restrict src); +char *stpcpy(char *__restrict dest, const char *__restrict src) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/stpncpy.h b/libc/src/string/stpncpy.h --- a/libc/src/string/stpncpy.h +++ b/libc/src/string/stpncpy.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -char *stpncpy(char *__restrict dest, const char *__restrict src, size_t n); +char *stpncpy(char *__restrict dest, const char *__restrict src, + size_t n) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strcat.h b/libc/src/string/strcat.h --- a/libc/src/string/strcat.h +++ b/libc/src/string/strcat.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -char *strcat(char *__restrict dest, const char *__restrict src); +char *strcat(char *__restrict dest, const char *__restrict src) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strchr.h b/libc/src/string/strchr.h --- a/libc/src/string/strchr.h +++ b/libc/src/string/strchr.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -char *strchr(const char *src, int c); +char *strchr(const char *src, int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strcmp.h b/libc/src/string/strcmp.h --- a/libc/src/string/strcmp.h +++ b/libc/src/string/strcmp.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int strcmp(const char *left, const char *right); +int strcmp(const char *left, const char *right) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strcoll.h b/libc/src/string/strcoll.h --- a/libc/src/string/strcoll.h +++ b/libc/src/string/strcoll.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int strcoll(const char *left, const char *right); +int strcoll(const char *left, const char *right) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strcpy.h b/libc/src/string/strcpy.h --- a/libc/src/string/strcpy.h +++ b/libc/src/string/strcpy.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -char *strcpy(char *__restrict dest, const char *__restrict src); +char *strcpy(char *__restrict dest, const char *__restrict src) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strcspn.h b/libc/src/string/strcspn.h --- a/libc/src/string/strcspn.h +++ b/libc/src/string/strcspn.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -size_t strcspn(const char *src, const char *segment); +size_t strcspn(const char *src, const char *segment) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strdup.h b/libc/src/string/strdup.h --- a/libc/src/string/strdup.h +++ b/libc/src/string/strdup.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -char *strdup(const char *src); +char *strdup(const char *src) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strerror.h b/libc/src/string/strerror.h --- a/libc/src/string/strerror.h +++ b/libc/src/string/strerror.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -char *strerror(int err_num); +char *strerror(int err_num) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strerror_r.h b/libc/src/string/strerror_r.h --- a/libc/src/string/strerror_r.h +++ b/libc/src/string/strerror_r.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -char *strerror_r(int err_num, char *buf, size_t buflen); +char *strerror_r(int err_num, char *buf, size_t buflen) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strlcat.h b/libc/src/string/strlcat.h --- a/libc/src/string/strlcat.h +++ b/libc/src/string/strlcat.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -size_t strlcat(char *__restrict dst, const char *__restrict src, size_t size); +size_t strlcat(char *__restrict dst, const char *__restrict src, + size_t size) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strlcpy.h b/libc/src/string/strlcpy.h --- a/libc/src/string/strlcpy.h +++ b/libc/src/string/strlcpy.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -size_t strlcpy(char *__restrict dst, const char *__restrict src, size_t size); +size_t strlcpy(char *__restrict dst, const char *__restrict src, + size_t size) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strlen.h b/libc/src/string/strlen.h --- a/libc/src/string/strlen.h +++ b/libc/src/string/strlen.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -size_t strlen(const char *src); +size_t strlen(const char *src) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strncat.h b/libc/src/string/strncat.h --- a/libc/src/string/strncat.h +++ b/libc/src/string/strncat.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -char *strncat(char *__restrict dest, const char *__restrict src, size_t count); +char *strncat(char *__restrict dest, const char *__restrict src, + size_t count) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strncmp.h b/libc/src/string/strncmp.h --- a/libc/src/string/strncmp.h +++ b/libc/src/string/strncmp.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int strncmp(const char *left, const char *right, size_t n); +int strncmp(const char *left, const char *right, size_t n) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strncpy.h b/libc/src/string/strncpy.h --- a/libc/src/string/strncpy.h +++ b/libc/src/string/strncpy.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -char *strncpy(char *__restrict dest, const char *__restrict src, size_t n); +char *strncpy(char *__restrict dest, const char *__restrict src, + size_t n) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strndup.h b/libc/src/string/strndup.h --- a/libc/src/string/strndup.h +++ b/libc/src/string/strndup.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -char *strndup(const char *src, size_t size); +char *strndup(const char *src, size_t size) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strnlen.h b/libc/src/string/strnlen.h --- a/libc/src/string/strnlen.h +++ b/libc/src/string/strnlen.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -size_t strnlen(const char *src, size_t n); +size_t strnlen(const char *src, size_t n) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strpbrk.h b/libc/src/string/strpbrk.h --- a/libc/src/string/strpbrk.h +++ b/libc/src/string/strpbrk.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -char *strpbrk(const char *src, const char *breakset); +char *strpbrk(const char *src, const char *breakset) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strrchr.h b/libc/src/string/strrchr.h --- a/libc/src/string/strrchr.h +++ b/libc/src/string/strrchr.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -char *strrchr(const char *src, int c); +char *strrchr(const char *src, int c) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strsignal.h b/libc/src/string/strsignal.h --- a/libc/src/string/strsignal.h +++ b/libc/src/string/strsignal.h @@ -12,7 +12,7 @@ namespace __llvm_libc { -char *strsignal(int sig_num); +char *strsignal(int sig_num) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strspn.h b/libc/src/string/strspn.h --- a/libc/src/string/strspn.h +++ b/libc/src/string/strspn.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -size_t strspn(const char *src, const char *segment); +size_t strspn(const char *src, const char *segment) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strstr.h b/libc/src/string/strstr.h --- a/libc/src/string/strstr.h +++ b/libc/src/string/strstr.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -char *strstr(const char *haystack, const char *needle); +char *strstr(const char *haystack, const char *needle) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strtok.h b/libc/src/string/strtok.h --- a/libc/src/string/strtok.h +++ b/libc/src/string/strtok.h @@ -11,7 +11,8 @@ namespace __llvm_libc { -char *strtok(char *__restrict src, const char *__restrict delimiter_string); +char *strtok(char *__restrict src, + const char *__restrict delimiter_string) noexcept; } // namespace __llvm_libc diff --git a/libc/src/string/strtok_r.h b/libc/src/string/strtok_r.h --- a/libc/src/string/strtok_r.h +++ b/libc/src/string/strtok_r.h @@ -12,7 +12,7 @@ namespace __llvm_libc { char *strtok_r(char *__restrict src, const char *__restrict delimiter_string, - char **__restrict saveptr); + char **__restrict saveptr) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/mman/madvise.h b/libc/src/sys/mman/madvise.h --- a/libc/src/sys/mman/madvise.h +++ b/libc/src/sys/mman/madvise.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int madvise(void *addr, size_t size, int advice); +int madvise(void *addr, size_t size, int advice) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/mman/mmap.h b/libc/src/sys/mman/mmap.h --- a/libc/src/sys/mman/mmap.h +++ b/libc/src/sys/mman/mmap.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -void *mmap(void *addr, size_t size, int prot, int flags, int fd, off_t offset); +void *mmap(void *addr, size_t size, int prot, int flags, int fd, + off_t offset) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/mman/mprotect.h b/libc/src/sys/mman/mprotect.h --- a/libc/src/sys/mman/mprotect.h +++ b/libc/src/sys/mman/mprotect.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int mprotect(void *addr, size_t size, int prot); +int mprotect(void *addr, size_t size, int prot) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/mman/munmap.h b/libc/src/sys/mman/munmap.h --- a/libc/src/sys/mman/munmap.h +++ b/libc/src/sys/mman/munmap.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int munmap(void *addr, size_t size); +int munmap(void *addr, size_t size) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/mman/posix_madvise.h b/libc/src/sys/mman/posix_madvise.h --- a/libc/src/sys/mman/posix_madvise.h +++ b/libc/src/sys/mman/posix_madvise.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int posix_madvise(void *addr, size_t size, int advice); +int posix_madvise(void *addr, size_t size, int advice) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/random/getrandom.h b/libc/src/sys/random/getrandom.h --- a/libc/src/sys/random/getrandom.h +++ b/libc/src/sys/random/getrandom.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -ssize_t getrandom(void *buf, size_t buflen, unsigned int flags); +ssize_t getrandom(void *buf, size_t buflen, unsigned int flags) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/resource/getrlimit.h b/libc/src/sys/resource/getrlimit.h --- a/libc/src/sys/resource/getrlimit.h +++ b/libc/src/sys/resource/getrlimit.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int getrlimit(int resource, struct rlimit *lim); +int getrlimit(int resource, struct rlimit *lim) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/resource/setrlimit.h b/libc/src/sys/resource/setrlimit.h --- a/libc/src/sys/resource/setrlimit.h +++ b/libc/src/sys/resource/setrlimit.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int setrlimit(int resource, const struct rlimit *lim); +int setrlimit(int resource, const struct rlimit *lim) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/select/select.h b/libc/src/sys/select/select.h --- a/libc/src/sys/select/select.h +++ b/libc/src/sys/select/select.h @@ -14,7 +14,8 @@ namespace __llvm_libc { int select(int nfds, fd_set *__restrict read_set, fd_set *__restrict write_set, - fd_set *__restrict error_set, struct timeval *__restrict timeout); + fd_set *__restrict error_set, + struct timeval *__restrict timeout) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/sendfile/sendfile.h b/libc/src/sys/sendfile/sendfile.h --- a/libc/src/sys/sendfile/sendfile.h +++ b/libc/src/sys/sendfile/sendfile.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -ssize_t sendfile(int, int, off_t *, size_t); +ssize_t sendfile(int, int, off_t *, size_t) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/stat/chmod.h b/libc/src/sys/stat/chmod.h --- a/libc/src/sys/stat/chmod.h +++ b/libc/src/sys/stat/chmod.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int chmod(const char *path, mode_t mode); +int chmod(const char *path, mode_t mode) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/stat/fchmod.h b/libc/src/sys/stat/fchmod.h --- a/libc/src/sys/stat/fchmod.h +++ b/libc/src/sys/stat/fchmod.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int fchmod(int fd, mode_t mode); +int fchmod(int fd, mode_t mode) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/stat/fchmodat.h b/libc/src/sys/stat/fchmodat.h --- a/libc/src/sys/stat/fchmodat.h +++ b/libc/src/sys/stat/fchmodat.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int fchmodat(int dirfd, const char *path, mode_t mode, int flags); +int fchmodat(int dirfd, const char *path, mode_t mode, int flags) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/stat/fstat.h b/libc/src/sys/stat/fstat.h --- a/libc/src/sys/stat/fstat.h +++ b/libc/src/sys/stat/fstat.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int fstat(int fd, struct stat *statbuf); +int fstat(int fd, struct stat *statbuf) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/stat/lstat.h b/libc/src/sys/stat/lstat.h --- a/libc/src/sys/stat/lstat.h +++ b/libc/src/sys/stat/lstat.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -int lstat(const char *__restrict path, struct stat *__restrict statbuf); +int lstat(const char *__restrict path, + struct stat *__restrict statbuf) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/stat/mkdir.h b/libc/src/sys/stat/mkdir.h --- a/libc/src/sys/stat/mkdir.h +++ b/libc/src/sys/stat/mkdir.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int mkdir(const char *path, mode_t mode); +int mkdir(const char *path, mode_t mode) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/stat/mkdirat.h b/libc/src/sys/stat/mkdirat.h --- a/libc/src/sys/stat/mkdirat.h +++ b/libc/src/sys/stat/mkdirat.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int mkdirat(int dfd, const char *path, mode_t mode); +int mkdirat(int dfd, const char *path, mode_t mode) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/stat/stat.h b/libc/src/sys/stat/stat.h --- a/libc/src/sys/stat/stat.h +++ b/libc/src/sys/stat/stat.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int stat(const char *__restrict path, struct stat *__restrict statbuf); +int stat(const char *__restrict path, struct stat *__restrict statbuf) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/utsname/uname.h b/libc/src/sys/utsname/uname.h --- a/libc/src/sys/utsname/uname.h +++ b/libc/src/sys/utsname/uname.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int uname(struct utsname *name); +int uname(struct utsname *name) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/wait/wait.h b/libc/src/sys/wait/wait.h --- a/libc/src/sys/wait/wait.h +++ b/libc/src/sys/wait/wait.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -pid_t wait(int *waitstatus); +pid_t wait(int *waitstatus) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/wait/wait4.h b/libc/src/sys/wait/wait4.h --- a/libc/src/sys/wait/wait4.h +++ b/libc/src/sys/wait/wait4.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -pid_t wait4(pid_t pid, int *waitstatus, int options, struct rusage *usage); +pid_t wait4(pid_t pid, int *waitstatus, int options, + struct rusage *usage) noexcept; } // namespace __llvm_libc diff --git a/libc/src/sys/wait/waitpid.h b/libc/src/sys/wait/waitpid.h --- a/libc/src/sys/wait/waitpid.h +++ b/libc/src/sys/wait/waitpid.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -pid_t waitpid(pid_t pid, int *waitstatus, int options); +pid_t waitpid(pid_t pid, int *waitstatus, int options) noexcept; } // namespace __llvm_libc diff --git a/libc/src/termios/cfgetispeed.h b/libc/src/termios/cfgetispeed.h --- a/libc/src/termios/cfgetispeed.h +++ b/libc/src/termios/cfgetispeed.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -speed_t cfgetispeed(const struct termios *t); +speed_t cfgetispeed(const struct termios *t) noexcept; } // namespace __llvm_libc diff --git a/libc/src/termios/cfgetospeed.h b/libc/src/termios/cfgetospeed.h --- a/libc/src/termios/cfgetospeed.h +++ b/libc/src/termios/cfgetospeed.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -speed_t cfgetospeed(const struct termios *t); +speed_t cfgetospeed(const struct termios *t) noexcept; } // namespace __llvm_libc diff --git a/libc/src/termios/cfsetispeed.h b/libc/src/termios/cfsetispeed.h --- a/libc/src/termios/cfsetispeed.h +++ b/libc/src/termios/cfsetispeed.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int cfsetispeed(struct termios *t, speed_t speed); +int cfsetispeed(struct termios *t, speed_t speed) noexcept; } // namespace __llvm_libc diff --git a/libc/src/termios/cfsetospeed.h b/libc/src/termios/cfsetospeed.h --- a/libc/src/termios/cfsetospeed.h +++ b/libc/src/termios/cfsetospeed.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int cfsetospeed(struct termios *t, speed_t speed); +int cfsetospeed(struct termios *t, speed_t speed) noexcept; } // namespace __llvm_libc diff --git a/libc/src/termios/tcdrain.h b/libc/src/termios/tcdrain.h --- a/libc/src/termios/tcdrain.h +++ b/libc/src/termios/tcdrain.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int tcdrain(int fd); +int tcdrain(int fd) noexcept; } // namespace __llvm_libc diff --git a/libc/src/termios/tcflow.h b/libc/src/termios/tcflow.h --- a/libc/src/termios/tcflow.h +++ b/libc/src/termios/tcflow.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int tcflow(int fd, int action); +int tcflow(int fd, int action) noexcept; } // namespace __llvm_libc diff --git a/libc/src/termios/tcflush.h b/libc/src/termios/tcflush.h --- a/libc/src/termios/tcflush.h +++ b/libc/src/termios/tcflush.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int tcflush(int fd, int queue_selector); +int tcflush(int fd, int queue_selector) noexcept; } // namespace __llvm_libc diff --git a/libc/src/termios/tcgetattr.h b/libc/src/termios/tcgetattr.h --- a/libc/src/termios/tcgetattr.h +++ b/libc/src/termios/tcgetattr.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int tcgetattr(int fd, struct termios *t); +int tcgetattr(int fd, struct termios *t) noexcept; } // namespace __llvm_libc diff --git a/libc/src/termios/tcgetsid.h b/libc/src/termios/tcgetsid.h --- a/libc/src/termios/tcgetsid.h +++ b/libc/src/termios/tcgetsid.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -pid_t tcgetsid(int fd); +pid_t tcgetsid(int fd) noexcept; } // namespace __llvm_libc diff --git a/libc/src/termios/tcsendbreak.h b/libc/src/termios/tcsendbreak.h --- a/libc/src/termios/tcsendbreak.h +++ b/libc/src/termios/tcsendbreak.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int tcsendbreak(int fd, int duration); +int tcsendbreak(int fd, int duration) noexcept; } // namespace __llvm_libc diff --git a/libc/src/termios/tcsetattr.h b/libc/src/termios/tcsetattr.h --- a/libc/src/termios/tcsetattr.h +++ b/libc/src/termios/tcsetattr.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int tcsetattr(int fd, int actions, const struct termios *t); +int tcsetattr(int fd, int actions, const struct termios *t) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/call_once.h b/libc/src/threads/call_once.h --- a/libc/src/threads/call_once.h +++ b/libc/src/threads/call_once.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void call_once(once_flag *flag, __call_once_func_t func); +void call_once(once_flag *flag, __call_once_func_t func) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/cnd_broadcast.h b/libc/src/threads/cnd_broadcast.h --- a/libc/src/threads/cnd_broadcast.h +++ b/libc/src/threads/cnd_broadcast.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int cnd_broadcast(cnd_t *cond); +int cnd_broadcast(cnd_t *cond) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/cnd_destroy.h b/libc/src/threads/cnd_destroy.h --- a/libc/src/threads/cnd_destroy.h +++ b/libc/src/threads/cnd_destroy.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void cnd_destroy(cnd_t *cond); +void cnd_destroy(cnd_t *cond) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/cnd_init.h b/libc/src/threads/cnd_init.h --- a/libc/src/threads/cnd_init.h +++ b/libc/src/threads/cnd_init.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int cnd_init(cnd_t *cond); +int cnd_init(cnd_t *cond) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/cnd_signal.h b/libc/src/threads/cnd_signal.h --- a/libc/src/threads/cnd_signal.h +++ b/libc/src/threads/cnd_signal.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int cnd_signal(cnd_t *cond); +int cnd_signal(cnd_t *cond) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/cnd_wait.h b/libc/src/threads/cnd_wait.h --- a/libc/src/threads/cnd_wait.h +++ b/libc/src/threads/cnd_wait.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int cnd_wait(cnd_t *cond, mtx_t *mutex); +int cnd_wait(cnd_t *cond, mtx_t *mutex) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/mtx_destroy.h b/libc/src/threads/mtx_destroy.h --- a/libc/src/threads/mtx_destroy.h +++ b/libc/src/threads/mtx_destroy.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void mtx_destroy(mtx_t *mutex); +void mtx_destroy(mtx_t *mutex) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/mtx_init.h b/libc/src/threads/mtx_init.h --- a/libc/src/threads/mtx_init.h +++ b/libc/src/threads/mtx_init.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int mtx_init(mtx_t *mutex, int type); +int mtx_init(mtx_t *mutex, int type) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/mtx_lock.h b/libc/src/threads/mtx_lock.h --- a/libc/src/threads/mtx_lock.h +++ b/libc/src/threads/mtx_lock.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int mtx_lock(mtx_t *mutex); +int mtx_lock(mtx_t *mutex) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/mtx_unlock.h b/libc/src/threads/mtx_unlock.h --- a/libc/src/threads/mtx_unlock.h +++ b/libc/src/threads/mtx_unlock.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int mtx_unlock(mtx_t *mutex); +int mtx_unlock(mtx_t *mutex) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/thrd_create.h b/libc/src/threads/thrd_create.h --- a/libc/src/threads/thrd_create.h +++ b/libc/src/threads/thrd_create.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int thrd_create(thrd_t *thread, thrd_start_t func, void *arg); +int thrd_create(thrd_t *thread, thrd_start_t func, void *arg) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/thrd_current.h b/libc/src/threads/thrd_current.h --- a/libc/src/threads/thrd_current.h +++ b/libc/src/threads/thrd_current.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -thrd_t thrd_current(); +thrd_t thrd_current() noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/thrd_detach.h b/libc/src/threads/thrd_detach.h --- a/libc/src/threads/thrd_detach.h +++ b/libc/src/threads/thrd_detach.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int thrd_detach(thrd_t thread); +int thrd_detach(thrd_t thread) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/thrd_equal.h b/libc/src/threads/thrd_equal.h --- a/libc/src/threads/thrd_equal.h +++ b/libc/src/threads/thrd_equal.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int thrd_equal(thrd_t lhs, thrd_t rhs); +int thrd_equal(thrd_t lhs, thrd_t rhs) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/thrd_exit.h b/libc/src/threads/thrd_exit.h --- a/libc/src/threads/thrd_exit.h +++ b/libc/src/threads/thrd_exit.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void thrd_exit(int retval); +void thrd_exit(int retval) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/thrd_join.h b/libc/src/threads/thrd_join.h --- a/libc/src/threads/thrd_join.h +++ b/libc/src/threads/thrd_join.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int thrd_join(thrd_t thread, int *retval); +int thrd_join(thrd_t thread, int *retval) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/tss_create.h b/libc/src/threads/tss_create.h --- a/libc/src/threads/tss_create.h +++ b/libc/src/threads/tss_create.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int tss_create(tss_t *key, tss_dtor_t dtor); +int tss_create(tss_t *key, tss_dtor_t dtor) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/tss_delete.h b/libc/src/threads/tss_delete.h --- a/libc/src/threads/tss_delete.h +++ b/libc/src/threads/tss_delete.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void tss_delete(tss_t key); +void tss_delete(tss_t key) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/tss_get.h b/libc/src/threads/tss_get.h --- a/libc/src/threads/tss_get.h +++ b/libc/src/threads/tss_get.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void *tss_get(pthread_key_t); +void *tss_get(pthread_key_t) noexcept; } // namespace __llvm_libc diff --git a/libc/src/threads/tss_set.h b/libc/src/threads/tss_set.h --- a/libc/src/threads/tss_set.h +++ b/libc/src/threads/tss_set.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int tss_set(tss_t, void *); +int tss_set(tss_t, void *) noexcept; } // namespace __llvm_libc diff --git a/libc/src/time/asctime.h b/libc/src/time/asctime.h --- a/libc/src/time/asctime.h +++ b/libc/src/time/asctime.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -char *asctime(const struct tm *timeptr); +char *asctime(const struct tm *timeptr) noexcept; } // namespace __llvm_libc diff --git a/libc/src/time/asctime_r.h b/libc/src/time/asctime_r.h --- a/libc/src/time/asctime_r.h +++ b/libc/src/time/asctime_r.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -char *asctime_r(const struct tm *timeptr, char *buffer); +char *asctime_r(const struct tm *timeptr, char *buffer) noexcept; } // namespace __llvm_libc diff --git a/libc/src/time/clock.h b/libc/src/time/clock.h --- a/libc/src/time/clock.h +++ b/libc/src/time/clock.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -clock_t clock(); +clock_t clock() noexcept; } // namespace __llvm_libc diff --git a/libc/src/time/clock_gettime.h b/libc/src/time/clock_gettime.h --- a/libc/src/time/clock_gettime.h +++ b/libc/src/time/clock_gettime.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int clock_gettime(clockid_t clockid, struct timespec *tp); +int clock_gettime(clockid_t clockid, struct timespec *tp) noexcept; } // namespace __llvm_libc diff --git a/libc/src/time/difftime.h b/libc/src/time/difftime.h --- a/libc/src/time/difftime.h +++ b/libc/src/time/difftime.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -double difftime(time_t end, time_t beginning); +double difftime(time_t end, time_t beginning) noexcept; } // namespace __llvm_libc diff --git a/libc/src/time/gettimeofday.h b/libc/src/time/gettimeofday.h --- a/libc/src/time/gettimeofday.h +++ b/libc/src/time/gettimeofday.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int gettimeofday(struct timeval *tv, void *tz); +int gettimeofday(struct timeval *tv, void *tz) noexcept; } // namespace __llvm_libc diff --git a/libc/src/time/gmtime.h b/libc/src/time/gmtime.h --- a/libc/src/time/gmtime.h +++ b/libc/src/time/gmtime.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -struct tm *gmtime(const time_t *timer); +struct tm *gmtime(const time_t *timer) noexcept; } // namespace __llvm_libc diff --git a/libc/src/time/gmtime_r.h b/libc/src/time/gmtime_r.h --- a/libc/src/time/gmtime_r.h +++ b/libc/src/time/gmtime_r.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -struct tm *gmtime_r(const time_t *timer, struct tm *result); +struct tm *gmtime_r(const time_t *timer, struct tm *result) noexcept; } // namespace __llvm_libc diff --git a/libc/src/time/mktime.h b/libc/src/time/mktime.h --- a/libc/src/time/mktime.h +++ b/libc/src/time/mktime.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -time_t mktime(struct tm *t1); +time_t mktime(struct tm *t1) noexcept; } // namespace __llvm_libc diff --git a/libc/src/time/nanosleep.h b/libc/src/time/nanosleep.h --- a/libc/src/time/nanosleep.h +++ b/libc/src/time/nanosleep.h @@ -14,7 +14,7 @@ namespace __llvm_libc { -int nanosleep(const struct timespec *req, struct timespec *rem); +int nanosleep(const struct timespec *req, struct timespec *rem) noexcept; } // namespace __llvm_libc diff --git a/libc/src/time/time_func.h b/libc/src/time/time_func.h --- a/libc/src/time/time_func.h +++ b/libc/src/time/time_func.h @@ -15,7 +15,7 @@ // public header file time.h. namespace __llvm_libc { -time_t time(time_t *tp); +time_t time(time_t *tp) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/access.h b/libc/src/unistd/access.h --- a/libc/src/unistd/access.h +++ b/libc/src/unistd/access.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int access(const char *path, int mode); +int access(const char *path, int mode) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/chdir.h b/libc/src/unistd/chdir.h --- a/libc/src/unistd/chdir.h +++ b/libc/src/unistd/chdir.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int chdir(const char *path); +int chdir(const char *path) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/close.h b/libc/src/unistd/close.h --- a/libc/src/unistd/close.h +++ b/libc/src/unistd/close.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int close(int fd); +int close(int fd) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/dup.h b/libc/src/unistd/dup.h --- a/libc/src/unistd/dup.h +++ b/libc/src/unistd/dup.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int dup(int fd); +int dup(int fd) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/dup2.h b/libc/src/unistd/dup2.h --- a/libc/src/unistd/dup2.h +++ b/libc/src/unistd/dup2.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int dup2(int oldfd, int newfd); +int dup2(int oldfd, int newfd) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/dup3.h b/libc/src/unistd/dup3.h --- a/libc/src/unistd/dup3.h +++ b/libc/src/unistd/dup3.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int dup3(int oldfd, int newfd, int flags); +int dup3(int oldfd, int newfd, int flags) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/execv.h b/libc/src/unistd/execv.h --- a/libc/src/unistd/execv.h +++ b/libc/src/unistd/execv.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int execv(const char *path, char *const argv[]); +int execv(const char *path, char *const argv[]) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/execve.h b/libc/src/unistd/execve.h --- a/libc/src/unistd/execve.h +++ b/libc/src/unistd/execve.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int execve(const char *path, char *const argv[], char *const envp[]); +int execve(const char *path, char *const argv[], char *const envp[]) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/fchdir.h b/libc/src/unistd/fchdir.h --- a/libc/src/unistd/fchdir.h +++ b/libc/src/unistd/fchdir.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int fchdir(int fd); +int fchdir(int fd) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/fork.h b/libc/src/unistd/fork.h --- a/libc/src/unistd/fork.h +++ b/libc/src/unistd/fork.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -pid_t fork(); +pid_t fork() noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/fsync.h b/libc/src/unistd/fsync.h --- a/libc/src/unistd/fsync.h +++ b/libc/src/unistd/fsync.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int fsync(int fd); +int fsync(int fd) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/ftruncate.h b/libc/src/unistd/ftruncate.h --- a/libc/src/unistd/ftruncate.h +++ b/libc/src/unistd/ftruncate.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int ftruncate(int, off_t); +int ftruncate(int, off_t) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/getcwd.h b/libc/src/unistd/getcwd.h --- a/libc/src/unistd/getcwd.h +++ b/libc/src/unistd/getcwd.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -char *getcwd(char *buf, size_t size); +char *getcwd(char *buf, size_t size) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/geteuid.h b/libc/src/unistd/geteuid.h --- a/libc/src/unistd/geteuid.h +++ b/libc/src/unistd/geteuid.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -uid_t geteuid(); +uid_t geteuid() noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/getopt.h b/libc/src/unistd/getopt.h --- a/libc/src/unistd/getopt.h +++ b/libc/src/unistd/getopt.h @@ -15,10 +15,10 @@ namespace __llvm_libc { namespace impl { -void set_getopt_state(char **, int *, int *, unsigned *, int, FILE *); +void set_getopt_state(char **, int *, int *, unsigned *, int, FILE *) noexcept; } -int getopt(int argc, char *const argv[], const char *optstring); +int getopt(int argc, char *const argv[], const char *optstring) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/getopt.cpp b/libc/src/unistd/getopt.cpp --- a/libc/src/unistd/getopt.cpp +++ b/libc/src/unistd/getopt.cpp @@ -185,7 +185,7 @@ #ifndef LLVM_LIBC_PUBLIC_PACKAGING // This is used exclusively in tests. void set_getopt_state(char **optarg, int *optind, int *optopt, unsigned *optpos, - int opterr, FILE *errstream) { + int opterr, FILE *errstream) noexcept { ctx = {optarg, optind, optopt, optpos, opterr, errstream}; } #endif diff --git a/libc/src/unistd/getpid.h b/libc/src/unistd/getpid.h --- a/libc/src/unistd/getpid.h +++ b/libc/src/unistd/getpid.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -pid_t getpid(); +pid_t getpid() noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/getppid.h b/libc/src/unistd/getppid.h --- a/libc/src/unistd/getppid.h +++ b/libc/src/unistd/getppid.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -pid_t getppid(); +pid_t getppid() noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/getuid.h b/libc/src/unistd/getuid.h --- a/libc/src/unistd/getuid.h +++ b/libc/src/unistd/getuid.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -uid_t getuid(); +uid_t getuid() noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/isatty.h b/libc/src/unistd/isatty.h --- a/libc/src/unistd/isatty.h +++ b/libc/src/unistd/isatty.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int isatty(int fd); +int isatty(int fd) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/link.h b/libc/src/unistd/link.h --- a/libc/src/unistd/link.h +++ b/libc/src/unistd/link.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int link(const char *, const char *); +int link(const char *, const char *) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/linkat.h b/libc/src/unistd/linkat.h --- a/libc/src/unistd/linkat.h +++ b/libc/src/unistd/linkat.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int linkat(int, const char *, int, const char *, int); +int linkat(int, const char *, int, const char *, int) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/lseek.h b/libc/src/unistd/lseek.h --- a/libc/src/unistd/lseek.h +++ b/libc/src/unistd/lseek.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -off_t lseek(int fd, off_t offset, int whence); +off_t lseek(int fd, off_t offset, int whence) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/pread.h b/libc/src/unistd/pread.h --- a/libc/src/unistd/pread.h +++ b/libc/src/unistd/pread.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -ssize_t pread(int fd, void *buf, size_t count, off_t offset); +ssize_t pread(int fd, void *buf, size_t count, off_t offset) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/pwrite.h b/libc/src/unistd/pwrite.h --- a/libc/src/unistd/pwrite.h +++ b/libc/src/unistd/pwrite.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset); +ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/read.h b/libc/src/unistd/read.h --- a/libc/src/unistd/read.h +++ b/libc/src/unistd/read.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -ssize_t read(int fd, void *buf, size_t count); +ssize_t read(int fd, void *buf, size_t count) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/readlink.h b/libc/src/unistd/readlink.h --- a/libc/src/unistd/readlink.h +++ b/libc/src/unistd/readlink.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -ssize_t readlink(const char *__restrict, char *__restrict, size_t); +ssize_t readlink(const char *__restrict, char *__restrict, size_t) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/readlinkat.h b/libc/src/unistd/readlinkat.h --- a/libc/src/unistd/readlinkat.h +++ b/libc/src/unistd/readlinkat.h @@ -13,7 +13,8 @@ namespace __llvm_libc { -ssize_t readlinkat(int, const char *__restrict, char *__restrict, size_t); +ssize_t readlinkat(int, const char *__restrict, char *__restrict, + size_t) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/rmdir.h b/libc/src/unistd/rmdir.h --- a/libc/src/unistd/rmdir.h +++ b/libc/src/unistd/rmdir.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int rmdir(const char *path); +int rmdir(const char *path) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/symlink.h b/libc/src/unistd/symlink.h --- a/libc/src/unistd/symlink.h +++ b/libc/src/unistd/symlink.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int symlink(const char *, const char *); +int symlink(const char *, const char *) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/symlinkat.h b/libc/src/unistd/symlinkat.h --- a/libc/src/unistd/symlinkat.h +++ b/libc/src/unistd/symlinkat.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int symlinkat(const char *, int, const char *); +int symlinkat(const char *, int, const char *) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/syscall.h b/libc/src/unistd/syscall.h --- a/libc/src/unistd/syscall.h +++ b/libc/src/unistd/syscall.h @@ -15,7 +15,7 @@ namespace __llvm_libc { long __llvm_libc_syscall(long number, long arg1, long arg2, long arg3, - long arg4, long arg5, long arg6); + long arg4, long arg5, long arg6) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/sysconf.h b/libc/src/unistd/sysconf.h --- a/libc/src/unistd/sysconf.h +++ b/libc/src/unistd/sysconf.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -long sysconf(int name); +long sysconf(int name) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/truncate.h b/libc/src/unistd/truncate.h --- a/libc/src/unistd/truncate.h +++ b/libc/src/unistd/truncate.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -int truncate(const char *, off_t); +int truncate(const char *, off_t) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/unlink.h b/libc/src/unistd/unlink.h --- a/libc/src/unistd/unlink.h +++ b/libc/src/unistd/unlink.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int unlink(const char *path); +int unlink(const char *path) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/unlinkat.h b/libc/src/unistd/unlinkat.h --- a/libc/src/unistd/unlinkat.h +++ b/libc/src/unistd/unlinkat.h @@ -11,7 +11,7 @@ namespace __llvm_libc { -int unlinkat(int dfd, const char *path, int flags); +int unlinkat(int dfd, const char *path, int flags) noexcept; } // namespace __llvm_libc diff --git a/libc/src/unistd/write.h b/libc/src/unistd/write.h --- a/libc/src/unistd/write.h +++ b/libc/src/unistd/write.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -ssize_t write(int fd, const void *buf, size_t count); +ssize_t write(int fd, const void *buf, size_t count) noexcept; } // namespace __llvm_libc