[libc-commits] [libc] [libc][newhdrgen] Remove redundant yaml prefixes (PR #99581)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Thu Jul 18 15:15:01 PDT 2024


https://github.com/michaelrj-google created https://github.com/llvm/llvm-project/pull/99581

Since the yaml files are already organized into folders, the name of the
file doesn't also need to be prefixed by what folder it's in.


>From 1bba11298468a968742464f041d4ffae5de8df07 Mon Sep 17 00:00:00 2001
From: Michael Jones <michaelrj at google.com>
Date: Thu, 18 Jul 2024 15:13:33 -0700
Subject: [PATCH] [libc][newhdrgen] Remove redundant yaml prefixes

Since the yaml files are already organized into folders, the name of the
file doesn't also need to be prefixed by what folder it's in.
---
 libc/include/CMakeLists.txt                   | 38 +++++++++----------
 .../yaml/arpa/{arpa_inet.yaml => inet.yaml}   |  0
 .../yaml/gpu/{gpu_rpc.yaml => rpc.yaml}       |  0
 .../yaml/sys/{sys_auxv.yaml => auxv.yaml}     |  0
 .../yaml/sys/{sys_epoll.yaml => epoll.yaml}   |  0
 .../yaml/sys/{sys_ioctl.yaml => ioctl.yaml}   |  0
 .../yaml/sys/{sys_mman.yaml => mman.yaml}     |  0
 .../yaml/sys/{sys_prctl.yaml => prctl.yaml}   |  0
 .../yaml/sys/{sys_random.yaml => random.yaml} |  0
 .../sys/{sys_resource.yaml => resource.yaml}  |  0
 .../yaml/sys/{sys_select.yaml => select.yaml} |  0
 .../sys/{sys_sendfile.yaml => sendfile.yaml}  |  0
 .../yaml/sys/{sys_socket.yaml => socket.yaml} |  0
 .../yaml/sys/{sys_stat.yaml => stat.yaml}     |  0
 .../sys/{sys_statvfs.yaml => statvfs.yaml}    |  0
 .../sys/{sys_syscall.yaml => syscall.yaml}    |  0
 .../yaml/sys/{sys_time.yaml => time.yaml}     |  0
 .../yaml/sys/{sys_types.yaml => types.yaml}   |  0
 .../sys/{sys_utsname.yaml => utsname.yaml}    |  0
 .../yaml/sys/{sys_wait.yaml => wait.yaml}     |  0
 20 files changed, 19 insertions(+), 19 deletions(-)
 rename libc/newhdrgen/yaml/arpa/{arpa_inet.yaml => inet.yaml} (100%)
 rename libc/newhdrgen/yaml/gpu/{gpu_rpc.yaml => rpc.yaml} (100%)
 rename libc/newhdrgen/yaml/sys/{sys_auxv.yaml => auxv.yaml} (100%)
 rename libc/newhdrgen/yaml/sys/{sys_epoll.yaml => epoll.yaml} (100%)
 rename libc/newhdrgen/yaml/sys/{sys_ioctl.yaml => ioctl.yaml} (100%)
 rename libc/newhdrgen/yaml/sys/{sys_mman.yaml => mman.yaml} (100%)
 rename libc/newhdrgen/yaml/sys/{sys_prctl.yaml => prctl.yaml} (100%)
 rename libc/newhdrgen/yaml/sys/{sys_random.yaml => random.yaml} (100%)
 rename libc/newhdrgen/yaml/sys/{sys_resource.yaml => resource.yaml} (100%)
 rename libc/newhdrgen/yaml/sys/{sys_select.yaml => select.yaml} (100%)
 rename libc/newhdrgen/yaml/sys/{sys_sendfile.yaml => sendfile.yaml} (100%)
 rename libc/newhdrgen/yaml/sys/{sys_socket.yaml => socket.yaml} (100%)
 rename libc/newhdrgen/yaml/sys/{sys_stat.yaml => stat.yaml} (100%)
 rename libc/newhdrgen/yaml/sys/{sys_statvfs.yaml => statvfs.yaml} (100%)
 rename libc/newhdrgen/yaml/sys/{sys_syscall.yaml => syscall.yaml} (100%)
 rename libc/newhdrgen/yaml/sys/{sys_time.yaml => time.yaml} (100%)
 rename libc/newhdrgen/yaml/sys/{sys_types.yaml => types.yaml} (100%)
 rename libc/newhdrgen/yaml/sys/{sys_utsname.yaml => utsname.yaml} (100%)
 rename libc/newhdrgen/yaml/sys/{sys_wait.yaml => wait.yaml} (100%)

diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index df01172854871..37cae19123318 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -174,7 +174,7 @@ file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/arpa)
 
 add_header_macro(
   arpa_inet
-  ../libc/newhdrgen/yaml/arpa/arpa_inet.yaml
+  ../libc/newhdrgen/yaml/arpa/inet.yaml
   arpa/inet.h.def
   arpa/inet.h
   DEPENDS
@@ -426,7 +426,7 @@ file(MAKE_DIRECTORY ${LIBC_INCLUDE_DIR}/sys)
 
 add_header_macro(
   sys_auxv
-  ../libc/newhdrgen/yaml/sys/sys_auxv.yaml
+  ../libc/newhdrgen/yaml/sys/auxv.yaml
   sys/auxv.h.def
   sys/auxv.h
   DEPENDS
@@ -436,7 +436,7 @@ add_header_macro(
 
 add_header_macro(
   sys_epoll
-  ../libc/newhdrgen/yaml/sys/sys_epoll.yaml
+  ../libc/newhdrgen/yaml/sys/epoll.yaml
   sys/epoll.h.def
   sys/epoll.h
   DEPENDS
@@ -449,7 +449,7 @@ add_header_macro(
 
 add_header_macro(
   sys_ioctl
-  ../libc/newhdrgen/yaml/sys/sys_ioctl.yaml
+  ../libc/newhdrgen/yaml/sys/ioctl.yaml
   sys/ioctl.h.def
   sys/ioctl.h
   DEPENDS
@@ -459,7 +459,7 @@ add_header_macro(
 
 add_header_macro(
   sys_mman
-  ../libc/newhdrgen/yaml/sys/sys_mman.yaml
+  ../libc/newhdrgen/yaml/sys/mman.yaml
   sys/mman.h.def
   sys/mman.h
   DEPENDS
@@ -472,7 +472,7 @@ add_header_macro(
 
 add_header_macro(
   sys_prctl
-  ../libc/newhdrgen/yaml/sys/sys_prctl.yaml
+  ../libc/newhdrgen/yaml/sys/prctl.yaml
   sys/prctl.h.def
   sys/prctl.h
   DEPENDS
@@ -489,7 +489,7 @@ add_header(
 
 add_header_macro(
   sys_random
-  ../libc/newhdrgen/yaml/sys/sys_random.yaml
+  ../libc/newhdrgen/yaml/sys/random.yaml
   sys/random.h.def
   sys/random.h
   DEPENDS
@@ -501,7 +501,7 @@ add_header_macro(
 
 add_header_macro(
   sys_resource
-  ../libc/newhdrgen/yaml/sys/sys_resource.yaml
+  ../libc/newhdrgen/yaml/sys/resource.yaml
   sys/resource.h.def
   sys/resource.h
   DEPENDS
@@ -513,7 +513,7 @@ add_header_macro(
 
 add_header_macro(
   sys_stat
-  ../libc/newhdrgen/yaml/sys/sys_stat.yaml
+  ../libc/newhdrgen/yaml/sys/stat.yaml
   sys/stat.h.def
   sys/stat.h
   DEPENDS
@@ -535,7 +535,7 @@ add_header_macro(
 
 add_header_macro(
   sys_select
-  ../libc/newhdrgen/yaml/sys/sys_select.yaml
+  ../libc/newhdrgen/yaml/sys/select.yaml
   sys/select.h.def
   sys/select.h
   DEPENDS
@@ -551,7 +551,7 @@ add_header_macro(
 
 add_header_macro(
   sys_sendfile
-  ../libc/newhdrgen/yaml/sys/sys_sendfile.yaml
+  ../libc/newhdrgen/yaml/sys/sendfile.yaml
   sys/sendfile.h.def
   sys/sendfile.h
   DEPENDS
@@ -563,7 +563,7 @@ add_header_macro(
 
 add_header_macro(
   sys_socket
-  ../libc/newhdrgen/yaml/sys/sys_socket.yaml
+  ../libc/newhdrgen/yaml/sys/socket.yaml
   sys/socket.h.def
   sys/socket.h
   DEPENDS
@@ -577,7 +577,7 @@ add_header_macro(
 
 add_header_macro(
   sys_statvfs
-  ../libc/newhdrgen/yaml/sys/sys_statvfs.yaml
+  ../libc/newhdrgen/yaml/sys/statvfs.yaml
   sys/statvfs.h.def
   sys/statvfs.h
   DEPENDS
@@ -587,7 +587,7 @@ add_header_macro(
 
 add_header_macro(
   sys_syscall
-  ../libc/newhdrgen/yaml/sys/sys_syscall.yaml
+  ../libc/newhdrgen/yaml/sys/syscall.yaml
   sys/syscall.h.def
   sys/syscall.h
   DEPENDS
@@ -595,7 +595,7 @@ add_header_macro(
 
 add_header_macro(
   sys_time
-  ../libc/newhdrgen/yaml/sys/sys_time.yaml
+  ../libc/newhdrgen/yaml/sys/time.yaml
   sys/time.h.def
   sys/time.h
   DEPENDS
@@ -606,7 +606,7 @@ add_header_macro(
 
 add_header_macro(
   sys_types
-  ../libc/newhdrgen/yaml/sys/sys_types.yaml
+  ../libc/newhdrgen/yaml/sys/types.yaml
   sys/types.h.def
   sys/types.h
   DEPENDS
@@ -636,7 +636,7 @@ add_header_macro(
 
 add_header_macro(
   sys_utsname
-  ../libc/newhdrgen/yaml/sys/sys_utsname.yaml
+  ../libc/newhdrgen/yaml/sys/utsname.yaml
   sys/utsname.h.def
   sys/utsname.h
   DEPENDS
@@ -646,7 +646,7 @@ add_header_macro(
 
 add_header_macro(
   sys_wait
-  ../libc/newhdrgen/yaml/sys/sys_wait.yaml
+  ../libc/newhdrgen/yaml/sys/wait.yaml
   sys/wait.h.def
   sys/wait.h
   DEPENDS
@@ -776,4 +776,4 @@ if(LLVM_LIBC_FULL_BUILD)
                             -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
   # Stripping is a no-op for headers
   add_custom_target(install-libc-headers-stripped DEPENDS install-libc-headers)
-endif()
\ No newline at end of file
+endif()
diff --git a/libc/newhdrgen/yaml/arpa/arpa_inet.yaml b/libc/newhdrgen/yaml/arpa/inet.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/arpa/arpa_inet.yaml
rename to libc/newhdrgen/yaml/arpa/inet.yaml
diff --git a/libc/newhdrgen/yaml/gpu/gpu_rpc.yaml b/libc/newhdrgen/yaml/gpu/rpc.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/gpu/gpu_rpc.yaml
rename to libc/newhdrgen/yaml/gpu/rpc.yaml
diff --git a/libc/newhdrgen/yaml/sys/sys_auxv.yaml b/libc/newhdrgen/yaml/sys/auxv.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/sys/sys_auxv.yaml
rename to libc/newhdrgen/yaml/sys/auxv.yaml
diff --git a/libc/newhdrgen/yaml/sys/sys_epoll.yaml b/libc/newhdrgen/yaml/sys/epoll.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/sys/sys_epoll.yaml
rename to libc/newhdrgen/yaml/sys/epoll.yaml
diff --git a/libc/newhdrgen/yaml/sys/sys_ioctl.yaml b/libc/newhdrgen/yaml/sys/ioctl.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/sys/sys_ioctl.yaml
rename to libc/newhdrgen/yaml/sys/ioctl.yaml
diff --git a/libc/newhdrgen/yaml/sys/sys_mman.yaml b/libc/newhdrgen/yaml/sys/mman.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/sys/sys_mman.yaml
rename to libc/newhdrgen/yaml/sys/mman.yaml
diff --git a/libc/newhdrgen/yaml/sys/sys_prctl.yaml b/libc/newhdrgen/yaml/sys/prctl.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/sys/sys_prctl.yaml
rename to libc/newhdrgen/yaml/sys/prctl.yaml
diff --git a/libc/newhdrgen/yaml/sys/sys_random.yaml b/libc/newhdrgen/yaml/sys/random.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/sys/sys_random.yaml
rename to libc/newhdrgen/yaml/sys/random.yaml
diff --git a/libc/newhdrgen/yaml/sys/sys_resource.yaml b/libc/newhdrgen/yaml/sys/resource.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/sys/sys_resource.yaml
rename to libc/newhdrgen/yaml/sys/resource.yaml
diff --git a/libc/newhdrgen/yaml/sys/sys_select.yaml b/libc/newhdrgen/yaml/sys/select.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/sys/sys_select.yaml
rename to libc/newhdrgen/yaml/sys/select.yaml
diff --git a/libc/newhdrgen/yaml/sys/sys_sendfile.yaml b/libc/newhdrgen/yaml/sys/sendfile.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/sys/sys_sendfile.yaml
rename to libc/newhdrgen/yaml/sys/sendfile.yaml
diff --git a/libc/newhdrgen/yaml/sys/sys_socket.yaml b/libc/newhdrgen/yaml/sys/socket.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/sys/sys_socket.yaml
rename to libc/newhdrgen/yaml/sys/socket.yaml
diff --git a/libc/newhdrgen/yaml/sys/sys_stat.yaml b/libc/newhdrgen/yaml/sys/stat.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/sys/sys_stat.yaml
rename to libc/newhdrgen/yaml/sys/stat.yaml
diff --git a/libc/newhdrgen/yaml/sys/sys_statvfs.yaml b/libc/newhdrgen/yaml/sys/statvfs.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/sys/sys_statvfs.yaml
rename to libc/newhdrgen/yaml/sys/statvfs.yaml
diff --git a/libc/newhdrgen/yaml/sys/sys_syscall.yaml b/libc/newhdrgen/yaml/sys/syscall.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/sys/sys_syscall.yaml
rename to libc/newhdrgen/yaml/sys/syscall.yaml
diff --git a/libc/newhdrgen/yaml/sys/sys_time.yaml b/libc/newhdrgen/yaml/sys/time.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/sys/sys_time.yaml
rename to libc/newhdrgen/yaml/sys/time.yaml
diff --git a/libc/newhdrgen/yaml/sys/sys_types.yaml b/libc/newhdrgen/yaml/sys/types.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/sys/sys_types.yaml
rename to libc/newhdrgen/yaml/sys/types.yaml
diff --git a/libc/newhdrgen/yaml/sys/sys_utsname.yaml b/libc/newhdrgen/yaml/sys/utsname.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/sys/sys_utsname.yaml
rename to libc/newhdrgen/yaml/sys/utsname.yaml
diff --git a/libc/newhdrgen/yaml/sys/sys_wait.yaml b/libc/newhdrgen/yaml/sys/wait.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/sys/sys_wait.yaml
rename to libc/newhdrgen/yaml/sys/wait.yaml



More information about the libc-commits mailing list