diff --git a/libc/include/dlfcn.yaml b/libc/include/dlfcn.yaml index db2893aaff5d9..bf17a11111050 100644 --- a/libc/include/dlfcn.yaml +++ b/libc/include/dlfcn.yaml @@ -46,7 +46,7 @@ enums: standards: - gnu value: 2 - - name: RTLD_DI_CONFIGADDR, + - name: RTLD_DI_CONFIGADDR standards: - gnu value: 3 @@ -127,5 +127,5 @@ functions: - POSIX return_type: int arguments: - - type: const void * - - type: Dl_info * + - type: const void *__restrict + - type: Dl_info *__restrict diff --git a/libc/src/dlfcn/dladdr.cpp b/libc/src/dlfcn/dladdr.cpp index 61490fd9a64b5..3db68b4a4c729 100644 --- a/libc/src/dlfcn/dladdr.cpp +++ b/libc/src/dlfcn/dladdr.cpp @@ -14,7 +14,8 @@ namespace LIBC_NAMESPACE_DECL { // TODO: https:// github.com/llvm/llvm-project/issues/97929 -LLVM_LIBC_FUNCTION(int, dladdr, (const void *addr, Dl_info *info)) { +LLVM_LIBC_FUNCTION(int, dladdr, + (const void *__restrict addr, Dl_info *__restrict info)) { return -1; } diff --git a/libc/src/dlfcn/dladdr.h b/libc/src/dlfcn/dladdr.h index 346fc8dc27aed..abbc9a9008d92 100644 --- a/libc/src/dlfcn/dladdr.h +++ b/libc/src/dlfcn/dladdr.h @@ -13,7 +13,7 @@ namespace LIBC_NAMESPACE_DECL { -int dladdr(const void *, Dl_info *); +int dladdr(const void *__restrict, Dl_info *__restrict); } // namespace LIBC_NAMESPACE_DECL diff --git a/libc/src/dlfcn/dlinfo.cpp b/libc/src/dlfcn/dlinfo.cpp index d78cade5ea593..e1938d19c9657 100644 --- a/libc/src/dlfcn/dlinfo.cpp +++ b/libc/src/dlfcn/dlinfo.cpp @@ -16,7 +16,8 @@ namespace LIBC_NAMESPACE_DECL { // TODO: https://github.com/llvm/llvm-project/issues/149911 LLVM_LIBC_FUNCTION(int, dlinfo, - (void *restrict handle, int request, void *restrict info)) { + (void *__restrict handle, int request, + void *__restrict info)) { return -1; } diff --git a/libc/src/dlfcn/dlinfo.h b/libc/src/dlfcn/dlinfo.h index c2c34f02bd6f1..bc13152e40f44 100644 --- a/libc/src/dlfcn/dlinfo.h +++ b/libc/src/dlfcn/dlinfo.h @@ -13,7 +13,7 @@ namespace LIBC_NAMESPACE_DECL { -int dlinfo(void *restrict, int, void *restrict); +int dlinfo(void *__restrict, int, void *__restrict); } // namespace LIBC_NAMESPACE_DECL diff --git a/libc/src/dlfcn/dlsym.cpp b/libc/src/dlfcn/dlsym.cpp index c075c203bd583..dc0da7d6d120f 100644 --- a/libc/src/dlfcn/dlsym.cpp +++ b/libc/src/dlfcn/dlsym.cpp @@ -14,6 +14,8 @@ namespace LIBC_NAMESPACE_DECL { // TODO(@izaakschroeder): https://github.com/llvm/llvm-project/issues/97920 -LLVM_LIBC_FUNCTION(void *, dlsym, (void *, const char *)) { return nullptr; } +LLVM_LIBC_FUNCTION(void *, dlsym, (void *__restrict, const char *__restrict)) { + return nullptr; +} } // namespace LIBC_NAMESPACE_DECL diff --git a/libc/src/dlfcn/dlsym.h b/libc/src/dlfcn/dlsym.h index 70c6ab3fbb143..f879792d3c5f6 100644 --- a/libc/src/dlfcn/dlsym.h +++ b/libc/src/dlfcn/dlsym.h @@ -13,7 +13,7 @@ namespace LIBC_NAMESPACE_DECL { -void *dlsym(void *, const char *); +void *dlsym(void *__restrict, const char *__restrict); } // namespace LIBC_NAMESPACE_DECL