Skip to content

Commit

Permalink
[libc][newhdrgen]sorted function names in yaml (llvm#102544)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaryanshukla authored Aug 9, 2024
1 parent 6b77531 commit b6cbd01
Show file tree
Hide file tree
Showing 25 changed files with 2,102 additions and 2,061 deletions.
2 changes: 2 additions & 0 deletions libc/docs/dev/header_generation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ To add through the command line:
generated header file with the new addition in the newhdrgen directory to
examine.

If you want to sort the functions alphabetically you can check out libc/newhdrgen/yaml_functions_sorted.py.


Testing
-------
Expand Down
24 changes: 12 additions & 12 deletions libc/newhdrgen/yaml/ctype.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ functions:
return_type: int
arguments:
- type: int
- name: isascii
standards:
- POSIX
return_type: int
arguments:
- type: int
- name: isblank
standards:
- stdc
Expand Down Expand Up @@ -76,28 +82,22 @@ functions:
return_type: int
arguments:
- type: int
- name: tolower
- name: toascii
standards:
- stdc
- GNUExtensions
return_type: int
arguments:
- type: int
- name: toupper
- name: tolower
standards:
- stdc
return_type: int
arguments:
- type: int
functions:
- name: isascii
standards:
- POSIX
return_type: int
arguments:
- type: int
- name: toascii
- name: toupper
standards:
- GNUExtensions
- stdc
return_type: int
arguments:
- type: int
functions: null
6 changes: 3 additions & 3 deletions libc/newhdrgen/yaml/fcntl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ functions:
arguments:
- type: int
- type: int
- type: ...
- type: '...'
- name: open
standards:
- POSIX
return_type: int
arguments:
- type: const char *
- type: int
- type: ...
- type: '...'
- name: openat
standards:
- POSIX
Expand All @@ -37,4 +37,4 @@ functions:
- type: int
- type: const char *
- type: int
- type: ...
- type: '...'
60 changes: 30 additions & 30 deletions libc/newhdrgen/yaml/fenv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,55 +12,61 @@ functions:
return_type: int
arguments:
- type: int
- name: fetestexcept
- name: fedisableexcept
standards:
- stdc
- GNUExtensions
return_type: int
arguments:
- type: int
- name: fetestexceptflag
guard: null
- name: feenableexcept
standards:
- stdc
- GNUExtensions
return_type: int
arguments:
- type: const fexcept_t *
- type: int
- name: feraiseexcept
attributes: []
- name: fegetenv
standards:
- stdc
return_type: int
arguments:
- type: int
- name: fesetround
- type: fenv_t *
- name: fegetexcept
standards:
- GNUExtensions
return_type: int
arguments: []
- name: fegetexceptflag
standards:
- stdc
return_type: int
arguments:
- type: fexcept_t *
- type: int
- name: fegetround
standards:
- stdc
return_type: int
arguments: []
- name: fegetenv
- name: feholdexcept
standards:
- stdc
return_type: int
arguments:
- type: fenv_t *
- name: fesetenv
- name: feraiseexcept
standards:
- stdc
return_type: int
arguments:
- type: const fenv_t *
- name: fegetexceptflag
- type: int
- name: fesetenv
standards:
- stdc
return_type: int
arguments:
- type: fexcept_t *
- type: int
- type: const fenv_t *
- name: fesetexcept
standards:
- stdc
Expand All @@ -74,34 +80,28 @@ functions:
arguments:
- type: const fexcept_t *
- type: int
- name: feholdexcept
- name: fesetround
standards:
- stdc
return_type: int
arguments:
- type: fenv_t *
- name: feupdateenv
- type: int
- name: fetestexcept
standards:
- stdc
return_type: int
arguments:
- type: const fenv_t *
- name: fedisableexcept
standards:
- GNUExtensions
return_type: int
arguments:
- type: int
guard: null
- name: feenableexcept
- name: fetestexceptflag
standards:
- GNUExtensions
- stdc
return_type: int
arguments:
- type: const fexcept_t *
- type: int
attributes: []
- name: fegetexcept
- name: feupdateenv
standards:
- GNUExtensions
- stdc
return_type: int
arguments: []
arguments:
- type: const fenv_t *
14 changes: 7 additions & 7 deletions libc/newhdrgen/yaml/gpu/rpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ types: []
enums: []
objects: []
functions:
- name: rpc_host_call
- name: rpc_fprintf
standards:
- GPUExtensions
return_type: void
return_type: int
arguments:
- type: void *
- type: ::FILE *__restrict
- type: const char *__restrict
- type: void *
- type: size_t
- name: rpc_fprintf
- name: rpc_host_call
standards:
- GPUExtensions
return_type: int
return_type: void
arguments:
- type: ::FILE *__restrict
- type: const char *__restrict
- type: void *
- type: void *
- type: size_t
Loading

0 comments on commit b6cbd01

Please sign in to comment.