[libc-commits] [libc] [libc] Add `link.h` and `elf.h` (PR #97504)

via libc-commits libc-commits at lists.llvm.org
Tue Jul 2 18:20:50 PDT 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 3402a1a4d2d4c7ead69156c3d741fc9ae9c4d399 c140a00298b44d753537987d1a22c355d3937fdb -- libc/include/llvm-libc-macros/dlfcn-macros.h libc/include/llvm-libc-macros/elf-macros.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/dlfcn/dlclose.cpp libc/src/dlfcn/dlclose.h libc/src/dlfcn/dlerror.cpp libc/src/dlfcn/dlerror.h libc/src/dlfcn/dlopen.cpp libc/src/dlfcn/dlopen.h libc/src/dlfcn/dlsym.cpp libc/src/dlfcn/dlsym.h libc/src/link/dl_iterate_phdr.cpp libc/src/link/dl_iterate_phdr.h libc/include/llvm-libc-macros/link-macros.h
``````````

</details>

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

``````````diff
diff --git a/libc/include/llvm-libc-types/Dl_info.h b/libc/include/llvm-libc-types/Dl_info.h
index bee32015c4..613976a54b 100644
--- a/libc/include/llvm-libc-types/Dl_info.h
+++ b/libc/include/llvm-libc-types/Dl_info.h
@@ -10,10 +10,10 @@
 #define LLVM_LIBC_TYPES_DL_INFO_H
 
 typedef struct {
-	const char *dli_fname;
-	void *dli_fbase;
-	const char *dli_sname;
-	void *dli_saddr;
+  const char *dli_fname;
+  void *dli_fbase;
+  const char *dli_sname;
+  void *dli_saddr;
 } Dl_info;
 
 #endif // LLVM_LIBC_TYPES_DL_INFO_H
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 8bbd7811bb..66512b368e 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 "llvm-libc-types/size_t.h"
 #include "llvm-libc-macros/link-macros.h"
+#include "llvm-libc-types/size_t.h"
 
 struct dl_phdr_info {
   ElfW(Addr) dlpi_addr;
diff --git a/libc/src/dlfcn/dladdr.h b/libc/src/dlfcn/dladdr.h
index be9a7fec7a..b86f3fdea0 100644
--- a/libc/src/dlfcn/dladdr.h
+++ b/libc/src/dlfcn/dladdr.h
@@ -13,7 +13,7 @@ namespace LIBC_NAMESPACE {
 
 #include "include/llvm-libc-types/Dl_info.h"
 
-int dladdr(const void *,Dl_info *);
+int dladdr(const void *, Dl_info *);
 
 } // namespace LIBC_NAMESPACE
 

``````````

</details>


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


More information about the libc-commits mailing list