[libc-commits] [libc] [libc] add dl_iterate_phdr and dladdr (PR #121179)

via libc-commits libc-commits at lists.llvm.org
Thu Dec 26 20:57:07 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 6e8a1a45a783c13e4cd19bfd20b7a56cab6f7d81 e04358569951c5e0e172bdbaf489d6b57c99f2c1 --extensions cpp,h -- libc/include/llvm-libc-types/Dl_info.h libc/include/llvm-libc-types/__dl_iterate_phdr_callback_t.h libc/include/llvm-libc-types/struct_dl_phdr_info.h libc/src/dlfcn/dladdr.cpp libc/src/dlfcn/dladdr.h libc/src/link/dl_iterate_phdr.cpp libc/src/link/dl_iterate_phdr.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/include/llvm-libc-types/struct_dl_phdr_info.h b/libc/include/llvm-libc-types/struct_dl_phdr_info.h
index cc568a96fc..fc407e3e95 100644
--- a/libc/include/llvm-libc-types/struct_dl_phdr_info.h
+++ b/libc/include/llvm-libc-types/struct_dl_phdr_info.h
@@ -9,8 +9,8 @@
 #ifndef LLVM_LIBC_TYPES_STRUCT_DL_PHDR_INFO_H
 #define LLVM_LIBC_TYPES_STRUCT_DL_PHDR_INFO_H
 
-#include "size_t.h"
 #include "../llvm-libc-macros/link-macros.h"
+#include "size_t.h"
 
 struct dl_phdr_info {
   ElfW(Addr) dlpi_addr;
diff --git a/libc/src/link/dl_iterate_phdr.cpp b/libc/src/link/dl_iterate_phdr.cpp
index b8bceab07c..40fbc7fde9 100644
--- a/libc/src/link/dl_iterate_phdr.cpp
+++ b/libc/src/link/dl_iterate_phdr.cpp
@@ -12,7 +12,8 @@
 
 namespace LIBC_NAMESPACE_DECL {
 
-LLVM_LIBC_FUNCTION(int, dl_iterate_phdr, (__dl_iterate_phdr_callback_t callback, void* data)) {
+LLVM_LIBC_FUNCTION(int, dl_iterate_phdr,
+                   (__dl_iterate_phdr_callback_t callback, void *data)) {
   (void)callback;
   (void)data;
   return 0;
diff --git a/libc/src/link/dl_iterate_phdr.h b/libc/src/link/dl_iterate_phdr.h
index 906adf1820..9ef12839b4 100644
--- a/libc/src/link/dl_iterate_phdr.h
+++ b/libc/src/link/dl_iterate_phdr.h
@@ -9,12 +9,12 @@
 #ifndef LLVM_LIBC_SRC_LINK_DL_ITERATE_PHDR_H
 #define LLVM_LIBC_SRC_LINK_DL_ITERATE_PHDR_H
 
-#include "src/__support/macros/config.h"
 #include "include/llvm-libc-types/__dl_iterate_phdr_callback_t.h"
+#include "src/__support/macros/config.h"
 
 namespace LIBC_NAMESPACE_DECL {
 
-int dl_iterate_phdr(__dl_iterate_phdr_callback_t callback, void* data);
+int dl_iterate_phdr(__dl_iterate_phdr_callback_t callback, void *data);
 
 } // namespace LIBC_NAMESPACE_DECL
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/121179


More information about the libc-commits mailing list