[libc-commits] [libc] 9ce5b38 - [libc] final edits to newheadergen yaml files (#98983)

via libc-commits libc-commits at lists.llvm.org
Wed Jul 17 16:34:57 PDT 2024


Author: RoseZhang03
Date: 2024-07-17T23:34:53Z
New Revision: 9ce5b38dc32a5f023e9824afe246978130b9080e

URL: https://github.com/llvm/llvm-project/commit/9ce5b38dc32a5f023e9824afe246978130b9080e
DIFF: https://github.com/llvm/llvm-project/commit/9ce5b38dc32a5f023e9824afe246978130b9080e.diff

LOG: [libc] final edits to newheadergen yaml files (#98983)

- final run of integration tests to deal with incorrect YAML input
(finished sys headers, will finish the rest today)
- add any new functions made in recent PRs

Added: 
    libc/newhdrgen/yaml/arpa/arpa_inet.yaml
    libc/newhdrgen/yaml/gpu/gpu_rpc.yaml

Modified: 
    libc/config/linux/x86_64/headers.txt
    libc/newhdrgen/yaml/assert.yaml
    libc/newhdrgen/yaml/math.yaml
    libc/newhdrgen/yaml/pthread.yaml
    libc/newhdrgen/yaml/search.yaml
    libc/newhdrgen/yaml/sys/sys_time.yaml
    libc/newhdrgen/yaml/wchar.yaml

Removed: 
    libc/newhdrgen/yaml/arpa_inet.yaml
    libc/newhdrgen/yaml/rpc.yaml


################################################################################
diff  --git a/libc/config/linux/x86_64/headers.txt b/libc/config/linux/x86_64/headers.txt
index df276894246c4..0294f62bc2f7a 100644
--- a/libc/config/linux/x86_64/headers.txt
+++ b/libc/config/linux/x86_64/headers.txt
@@ -45,6 +45,7 @@ set(TARGET_PUBLIC_HEADERS
     libc.include.sys_select
     libc.include.sys_socket
     libc.include.sys_stat
+    libc.include.sys_statvfs
     libc.include.sys_syscall
     libc.include.sys_time
     libc.include.sys_types

diff  --git a/libc/newhdrgen/yaml/arpa_inet.yaml b/libc/newhdrgen/yaml/arpa/arpa_inet.yaml
similarity index 86%
rename from libc/newhdrgen/yaml/arpa_inet.yaml
rename to libc/newhdrgen/yaml/arpa/arpa_inet.yaml
index 945a602705dba..c01235d4327a5 100644
--- a/libc/newhdrgen/yaml/arpa_inet.yaml
+++ b/libc/newhdrgen/yaml/arpa/arpa_inet.yaml
@@ -1,9 +1,6 @@
 header: arpa-inet.h
 macros: []
-types:
-  - type_name: uint32_t
-  - type_name: uint16_t
-  - type_name: inttypes.h
+types: []
 enums: []
 objects: []
 functions:

diff  --git a/libc/newhdrgen/yaml/assert.yaml b/libc/newhdrgen/yaml/assert.yaml
index 9ad0f0628274e..58d6c413cebdc 100644
--- a/libc/newhdrgen/yaml/assert.yaml
+++ b/libc/newhdrgen/yaml/assert.yaml
@@ -13,4 +13,3 @@ functions:
       - type: const char *
       - type: unsigned
       - type: const char *
-    guard: __cplusplus

diff  --git a/libc/newhdrgen/yaml/rpc.yaml b/libc/newhdrgen/yaml/gpu/gpu_rpc.yaml
similarity index 100%
rename from libc/newhdrgen/yaml/rpc.yaml
rename to libc/newhdrgen/yaml/gpu/gpu_rpc.yaml

diff  --git a/libc/newhdrgen/yaml/math.yaml b/libc/newhdrgen/yaml/math.yaml
index 5afde59b6b558..8588389bca4d2 100644
--- a/libc/newhdrgen/yaml/math.yaml
+++ b/libc/newhdrgen/yaml/math.yaml
@@ -7,6 +7,12 @@ types:
 enums: []
 objects: []
 functions:
+  - name: cbrt
+    standards:
+      - stdc
+    return_type: double
+    arguments:
+      - type: double
   - name: cbrtf
     standards:
       - stdc

diff  --git a/libc/newhdrgen/yaml/pthread.yaml b/libc/newhdrgen/yaml/pthread.yaml
index f22767eb1b752..292d91751e406 100644
--- a/libc/newhdrgen/yaml/pthread.yaml
+++ b/libc/newhdrgen/yaml/pthread.yaml
@@ -8,12 +8,12 @@ types:
   - type_name: pthread_key_t
   - type_name: pthread_condattr_t
   - type_name: __pthread_tss_dtor_t
+  - type_name: pthread_rwlock_t
   - type_name: pthread_rwlockattr_t
   - type_name: pthread_attr_t
   - type_name: __pthread_start_t
   - type_name: __pthread_once_func_t
   - type_name: __atfork_callback_t
-  - type_name: pthread_rwlock_t
 enums: []
 functions:
   - name: pthread_atfork
@@ -106,7 +106,7 @@ functions:
     return_type: int
     arguments:
       - type: const pthread_condattr_t *__restrict
-      - type: clockid_t * __restrict
+      - type: clockid_t *__restrict
   - name: pthread_condattr_getpshared
     standards: 
       - POSIX
@@ -200,7 +200,8 @@ functions:
     standards: 
       - POSIX
     return_type: pthread_t
-    arguments: []
+    arguments:
+      - type: void
   - name: pthread_setname_np
     standards:
       - GNUExtensions

diff  --git a/libc/newhdrgen/yaml/search.yaml b/libc/newhdrgen/yaml/search.yaml
index a7983a70bda73..b4fde14f771a2 100644
--- a/libc/newhdrgen/yaml/search.yaml
+++ b/libc/newhdrgen/yaml/search.yaml
@@ -1,7 +1,6 @@
 header: search.h
 macros: []
 types:
-  - type_name: size_t
   - type_name: struct_hsearch_data
   - type_name: ENTRY
   - type_name: ACTION

diff  --git a/libc/newhdrgen/yaml/sys/sys_time.yaml b/libc/newhdrgen/yaml/sys/sys_time.yaml
index a901cdafd26a1..eb3dd548389b3 100644
--- a/libc/newhdrgen/yaml/sys/sys_time.yaml
+++ b/libc/newhdrgen/yaml/sys/sys_time.yaml
@@ -1,8 +1,7 @@
 header: sys-time.h
 standards: Linux
 macros: []
-types:
-  - type_name: struct_timeval
+types: []
 enums: []
 functions: []
 objects: []

diff  --git a/libc/newhdrgen/yaml/wchar.yaml b/libc/newhdrgen/yaml/wchar.yaml
index 663267fb69d73..92ecdc26fbc73 100644
--- a/libc/newhdrgen/yaml/wchar.yaml
+++ b/libc/newhdrgen/yaml/wchar.yaml
@@ -4,6 +4,7 @@ types:
   - type_name: size_t
   - type_name: wint_t
   - type_name: wchar_t
+  - type_name: mbstate_t.h
 enums: []
 objects: []
 functions:


        


More information about the libc-commits mailing list