Skip to content

[libc] Fix typo and amend restrict qualifier #152410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions libc/include/dlfcn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ enums:
standards:
- gnu
value: 2
- name: RTLD_DI_CONFIGADDR,
- name: RTLD_DI_CONFIGADDR
standards:
- gnu
value: 3
Expand Down Expand Up @@ -127,5 +127,5 @@ functions:
- POSIX
return_type: int
arguments:
- type: const void *
- type: Dl_info *
- type: const void *__restrict
- type: Dl_info *__restrict
3 changes: 2 additions & 1 deletion libc/src/dlfcn/dladdr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/dlfcn/dladdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion libc/src/dlfcn/dlinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion libc/src/dlfcn/dlinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion libc/src/dlfcn/dlsym.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion libc/src/dlfcn/dlsym.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace LIBC_NAMESPACE_DECL {

void *dlsym(void *, const char *);
void *dlsym(void *__restrict, const char *__restrict);

} // namespace LIBC_NAMESPACE_DECL

Expand Down
Loading