Files
llvm/libc/include/time.yaml
Roland McGrath a24a7548b8 [libc][hdrgen] Sort identifiers with leading underscores specially (#165745)
This makes the sorting behavior more uniform: functions and
macros are always sorted (separately), not only when merging.

This changes the sort order used for functions and other things
sorted by their symbol names.  Symbols are sorted alphabetically
without regard to leading underscores, and then for identifiers
that differ only in the number of leading underscores, the fewer
underscores the earlier in the sort order.  For the functions
declared in a generated header, adjacent names with and without
underscores will be grouped together without blank lines.

This is implemented by factoring the name field, equality, and
sorting support out of the various entity classes into a new
common superclass (hdrgen.Symbol).

This uncovered YAML's requirement to quote the string "NULL" to
avoid pyyaml parsing it as None (equivalent to Javascript null)
rather than a string.
2025-10-30 11:49:22 -07:00

142 lines
2.8 KiB
YAML

header: time.h
header_template: time.h.def
macros:
- macro_name: "NULL"
macro_header: null-macro.h
types:
- type_name: struct_timeval
- type_name: clockid_t
- type_name: struct_timespec
- type_name: struct_tm
- type_name: time_t
- type_name: clock_t
- type_name: size_t
- type_name: locale_t
enums: []
objects: []
functions:
- name: asctime
standard:
- stdc
return_type: char *
arguments:
- type: const struct tm *
- name: asctime_r
standard:
- stdc
return_type: char *
arguments:
- type: struct tm *
- type: char *
- name: ctime
standard:
- stdc
return_type: char *
arguments:
- type: const time_t *
- name: ctime_r
standard:
- stdc
return_type: char *
arguments:
- type: const time_t *
- type: char *
- name: localtime
standard:
- stdc
return_type: struct tm *
arguments:
- type: const time_t *
- name: localtime_r
standard:
- stdc
return_type: struct tm *
arguments:
- type: const time_t *
- type: struct tm *
- name: clock
standard:
- stdc
return_type: clock_t
arguments:
- type: void
- name: clock_gettime
standard:
- POSIX
return_type: int
arguments:
- type: clockid_t
- type: struct timespec *
- name: difftime
standard:
- stdc
return_type: double
arguments:
- type: time_t
- type: time_t
- name: gettimeofday
standard:
- POSIX
return_type: int
arguments:
- type: struct timeval *
- type: void *
- name: gmtime
standard:
- stdc
return_type: struct tm *
arguments:
- type: time_t *
- name: gmtime_r
standard:
- stdc
return_type: struct tm *
arguments:
- type: time_t *
- type: struct tm *
- name: mktime
standard:
- stdc
return_type: time_t
arguments:
- type: struct tm *
- name: nanosleep
standard:
- POSIX
return_type: int
arguments:
- type: const struct timespec *
- type: struct timespec *
- name: strftime
standard:
- stdc
return_type: size_t
arguments:
- type: char *__restrict
- type: size_t
- type: const char *__restrict
- type: const struct tm *__restrict
- name: strftime_l
standard:
- stdc
return_type: size_t
arguments:
- type: char *__restrict
- type: size_t
- type: const char *__restrict
- type: const struct tm *__restrict
- type: locale_t
- name: time
standard:
- stdc
return_type: time_t
arguments:
- type: time_t *
- name: timespec_get
standard:
- stdc
return_type: int
arguments:
- type: struct timespec *
- type: int