Skip to content

Commit d01192e

Browse files
committed
add __restrict qualifiers to source
1 parent f3ca4fa commit d01192e

File tree

6 files changed

+11
-6
lines changed

6 files changed

+11
-6
lines changed

libc/src/dlfcn/dladdr.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
namespace LIBC_NAMESPACE_DECL {
1515

1616
// TODO: https:// github.com/llvm/llvm-project/issues/97929
17-
LLVM_LIBC_FUNCTION(int, dladdr, (const void *addr, Dl_info *info)) {
17+
LLVM_LIBC_FUNCTION(int, dladdr,
18+
(const void *__restrict addr, Dl_info *__restrict info)) {
1819
return -1;
1920
}
2021

libc/src/dlfcn/dladdr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
namespace LIBC_NAMESPACE_DECL {
1515

16-
int dladdr(const void *, Dl_info *);
16+
int dladdr(const void *__restrict, Dl_info *__restrict);
1717

1818
} // namespace LIBC_NAMESPACE_DECL
1919

libc/src/dlfcn/dlinfo.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
namespace LIBC_NAMESPACE_DECL {
1616

1717
// TODO: https://github.com/llvm/llvm-project/issues/149911
18-
LLVM_LIBC_FUNCTION(int, dlinfo, (void *handle, int request, void *info)) {
18+
LLVM_LIBC_FUNCTION(int, dlinfo,
19+
(void *__restrict handle, int request,
20+
void *__restrict info)) {
1921
return -1;
2022
}
2123

libc/src/dlfcn/dlinfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
namespace LIBC_NAMESPACE_DECL {
1515

16-
int dlinfo(void *, int, void *);
16+
int dlinfo(void *__restrict, int, void *__restrict);
1717

1818
} // namespace LIBC_NAMESPACE_DECL
1919

libc/src/dlfcn/dlsym.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
namespace LIBC_NAMESPACE_DECL {
1515

1616
// TODO(@izaakschroeder): https://github.com/llvm/llvm-project/issues/97920
17-
LLVM_LIBC_FUNCTION(void *, dlsym, (void *, const char *)) { return nullptr; }
17+
LLVM_LIBC_FUNCTION(void *, dlsym, (void *__restrict, const char *__restrict)) {
18+
return nullptr;
19+
}
1820

1921
} // namespace LIBC_NAMESPACE_DECL

libc/src/dlfcn/dlsym.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
namespace LIBC_NAMESPACE_DECL {
1515

16-
void *dlsym(void *, const char *);
16+
void *dlsym(void *__restrict, const char *__restrict);
1717

1818
} // namespace LIBC_NAMESPACE_DECL
1919

0 commit comments

Comments
 (0)