[libc] Remove yet another batch of header template files (#191067)

This follows up on ae63230c23 and remove
header templates from more C/POSIX standard headers, where templates
only used to `#include` files with macro definitions. We add this logic
to YAML instead - add entries to the `macros` list that point to the
correct `macro_header` to ensure it would be included.
This commit is contained in:
Alexey Samsonov 2026-04-08 15:56:41 -07:00 committed by GitHub
parent 59bafb5fdd
commit d03e8f4fac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 498 additions and 328 deletions

View file

@ -1,18 +0,0 @@
//===-- C standard library header network.h -------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_ARPA_INET_H
#define LLVM_LIBC_ARPA_INET_H
#include "__llvm-libc-common.h"
#include <inttypes.h>
%%public_api()
#endif // LLVM_LIBC_ARPA_INET_H

View file

@ -1,5 +1,6 @@
header: arpa/inet.h
header_template: inet.h.def
standards:
- posix
macros: []
types:
- type_name: in_addr

View file

@ -1,17 +0,0 @@
//===-- C standard library header complex.h -------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_COMPLEX_H
#define LLVM_LIBC_COMPLEX_H
#include "__llvm-libc-common.h"
#include "llvm-libc-macros/complex-macros.h"
%%public_api()
#endif // LLVM_LIBC_COMPLEX_H

View file

@ -1,6 +1,19 @@
header: complex.h
header_template: complex.h.def
macros: []
standards:
- stdc
macros:
- macro_name: complex
macro_header: complex-macros.h
- macro_name: _Complex_I
macro_header: complex-macros.h
- macro_name: I
macro_header: complex-macros.h
- macro_name: CMPLX
macro_header: complex-macros.h
- macro_name: CMPLXF
macro_header: complex-macros.h
- macro_name: CMPLXL
macro_header: complex-macros.h
types:
- type_name: cfloat16
- type_name: cfloat128

View file

@ -1,17 +0,0 @@
//===-- System V header elf.h ---------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_ELF_H
#define LLVM_LIBC_ELF_H
#include "__llvm-libc-common.h"
#include "llvm-libc-macros/elf-macros.h"
%%public_api()
#endif // LLVM_LIBC_ELF_H

View file

@ -1,5 +1,4 @@
header: elf.h
header_template: elf.h.def
standards:
- svid
macros:
@ -485,6 +484,34 @@ macros:
macro_value: 58
- macro_name: R_X86_64_IRELATIVE
macro_value: 37
- macro_name: ELF32_ST_BIND
macro_header: elf-macros.h
- macro_name: ELF32_ST_TYPE
macro_header: elf-macros.h
- macro_name: ELF32_ST_INFO
macro_header: elf-macros.h
- macro_name: ELF64_ST_BIND
macro_header: elf-macros.h
- macro_name: ELF64_ST_TYPE
macro_header: elf-macros.h
- macro_name: ELF64_ST_INFO
macro_header: elf-macros.h
- macro_name: ELF32_ST_VISIBILITY
macro_header: elf-macros.h
- macro_name: ELF64_ST_VISIBILITY
macro_header: elf-macros.h
- macro_name: ELF32_R_SYM
macro_header: elf-macros.h
- macro_name: ELF32_R_TYPE
macro_header: elf-macros.h
- macro_name: ELF32_R_INFO
macro_header: elf-macros.h
- macro_name: ELF64_R_SYM
macro_header: elf-macros.h
- macro_name: ELF64_R_TYPE
macro_header: elf-macros.h
- macro_name: ELF64_R_INFO
macro_header: elf-macros.h
types:
- type_name: Elf32_Addr
- type_name: Elf32_Chdr

View file

@ -1,17 +0,0 @@
//===-- C standard library header fcntl.h ---------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_FCNTL_H
#define LLVM_LIBC_FCNTL_H
#include "__llvm-libc-common.h"
#include "llvm-libc-macros/fcntl-macros.h"
%%public_api()
#endif // LLVM_LIBC_FCNTL_H

View file

@ -1,6 +1,15 @@
header: fcntl.h
header_template: fcntl.h.def
macros: []
standards:
- posix
macros:
- macro_name: AT_FDCWD
macro_header: fcntl-macros.h
- macro_name: AT_REMOVEDIR
macro_header: fcntl-macros.h
- macro_name: AT_SYMLINK_NOFOLLOW
macro_header: fcntl-macros.h
- macro_name: AT_EACCESS
macro_header: fcntl-macros.h
types:
- type_name: off_t
- type_name: mode_t

View file

@ -1,18 +0,0 @@
//===-- C standard library header inttypes.h ------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_INTTYPES_H
#define LLVM_LIBC_INTTYPES_H
#include "__llvm-libc-common.h"
#include "llvm-libc-macros/inttypes-macros.h"
#include <stdint.h>
%%public_api()
#endif // LLVM_LIBC_INTTYPES_H

View file

@ -1,6 +1,316 @@
header: inttypes.h
header_template: inttypes.h.def
macros: []
standards:
- stdc
macros:
- macro_name: PRId8
macro_header: inttypes-macros.h
- macro_name: PRId16
macro_header: inttypes-macros.h
- macro_name: PRId32
macro_header: inttypes-macros.h
- macro_name: PRId64
macro_header: inttypes-macros.h
- macro_name: PRIdLEAST8
macro_header: inttypes-macros.h
- macro_name: PRIdLEAST16
macro_header: inttypes-macros.h
- macro_name: PRIdLEAST32
macro_header: inttypes-macros.h
- macro_name: PRIdLEAST64
macro_header: inttypes-macros.h
- macro_name: PRIdFAST8
macro_header: inttypes-macros.h
- macro_name: PRIdFAST16
macro_header: inttypes-macros.h
- macro_name: PRIdFAST32
macro_header: inttypes-macros.h
- macro_name: PRIdFAST64
macro_header: inttypes-macros.h
- macro_name: PRIdMAX
macro_header: inttypes-macros.h
- macro_name: PRIdPTR
macro_header: inttypes-macros.h
- macro_name: PRIi8
macro_header: inttypes-macros.h
- macro_name: PRIi16
macro_header: inttypes-macros.h
- macro_name: PRIi32
macro_header: inttypes-macros.h
- macro_name: PRIi64
macro_header: inttypes-macros.h
- macro_name: PRIiLEAST8
macro_header: inttypes-macros.h
- macro_name: PRIiLEAST16
macro_header: inttypes-macros.h
- macro_name: PRIiLEAST32
macro_header: inttypes-macros.h
- macro_name: PRIiLEAST64
macro_header: inttypes-macros.h
- macro_name: PRIiFAST8
macro_header: inttypes-macros.h
- macro_name: PRIiFAST16
macro_header: inttypes-macros.h
- macro_name: PRIiFAST32
macro_header: inttypes-macros.h
- macro_name: PRIiFAST64
macro_header: inttypes-macros.h
- macro_name: PRIiMAX
macro_header: inttypes-macros.h
- macro_name: PRIiPTR
macro_header: inttypes-macros.h
- macro_name: PRIo8
macro_header: inttypes-macros.h
- macro_name: PRIo16
macro_header: inttypes-macros.h
- macro_name: PRIo32
macro_header: inttypes-macros.h
- macro_name: PRIo64
macro_header: inttypes-macros.h
- macro_name: PRIoLEAST8
macro_header: inttypes-macros.h
- macro_name: PRIoLEAST16
macro_header: inttypes-macros.h
- macro_name: PRIoLEAST32
macro_header: inttypes-macros.h
- macro_name: PRIoLEAST64
macro_header: inttypes-macros.h
- macro_name: PRIoFAST8
macro_header: inttypes-macros.h
- macro_name: PRIoFAST16
macro_header: inttypes-macros.h
- macro_name: PRIoFAST32
macro_header: inttypes-macros.h
- macro_name: PRIoFAST64
macro_header: inttypes-macros.h
- macro_name: PRIoMAX
macro_header: inttypes-macros.h
- macro_name: PRIoPTR
macro_header: inttypes-macros.h
- macro_name: PRIu8
macro_header: inttypes-macros.h
- macro_name: PRIu16
macro_header: inttypes-macros.h
- macro_name: PRIu32
macro_header: inttypes-macros.h
- macro_name: PRIu64
macro_header: inttypes-macros.h
- macro_name: PRIuLEAST8
macro_header: inttypes-macros.h
- macro_name: PRIuLEAST16
macro_header: inttypes-macros.h
- macro_name: PRIuLEAST32
macro_header: inttypes-macros.h
- macro_name: PRIuLEAST64
macro_header: inttypes-macros.h
- macro_name: PRIuFAST8
macro_header: inttypes-macros.h
- macro_name: PRIuFAST16
macro_header: inttypes-macros.h
- macro_name: PRIuFAST32
macro_header: inttypes-macros.h
- macro_name: PRIuFAST64
macro_header: inttypes-macros.h
- macro_name: PRIuMAX
macro_header: inttypes-macros.h
macro_header: inttypes-macros.h
- macro_name: PRIuPTR
macro_header: inttypes-macros.h
- macro_name: PRIx8
macro_header: inttypes-macros.h
- macro_name: PRIx16
macro_header: inttypes-macros.h
- macro_name: PRIx32
macro_header: inttypes-macros.h
- macro_name: PRIx64
macro_header: inttypes-macros.h
- macro_name: PRIxLEAST8
macro_header: inttypes-macros.h
- macro_name: PRIxLEAST16
macro_header: inttypes-macros.h
- macro_name: PRIxLEAST32
macro_header: inttypes-macros.h
- macro_name: PRIxLEAST64
macro_header: inttypes-macros.h
- macro_name: PRIxFAST8
macro_header: inttypes-macros.h
- macro_name: PRIxFAST16
macro_header: inttypes-macros.h
- macro_name: PRIxFAST32
macro_header: inttypes-macros.h
- macro_name: PRIxFAST64
macro_header: inttypes-macros.h
- macro_name: PRIxMAX
macro_header: inttypes-macros.h
- macro_name: PRIxPTR
macro_header: inttypes-macros.h
- macro_name: PRIX8
macro_header: inttypes-macros.h
- macro_name: PRIX16
macro_header: inttypes-macros.h
- macro_name: PRIX32
macro_header: inttypes-macros.h
- macro_name: PRIX64
macro_header: inttypes-macros.h
- macro_name: PRIXLEAST8
macro_header: inttypes-macros.h
- macro_name: PRIXLEAST16
macro_header: inttypes-macros.h
- macro_name: PRIXLEAST32
macro_header: inttypes-macros.h
- macro_name: PRIXLEAST64
macro_header: inttypes-macros.h
- macro_name: PRIXFAST8
macro_header: inttypes-macros.h
- macro_name: PRIXFAST16
macro_header: inttypes-macros.h
- macro_name: PRIXFAST32
macro_header: inttypes-macros.h
- macro_name: PRIXFAST64
macro_header: inttypes-macros.h
- macro_name: PRIXMAX
macro_header: inttypes-macros.h
- macro_name: PRIXPTR
macro_header: inttypes-macros.h
- macro_name: SCNd8
macro_header: inttypes-macros.h
- macro_name: SCNd16
macro_header: inttypes-macros.h
- macro_name: SCNd32
macro_header: inttypes-macros.h
- macro_name: SCNd64
macro_header: inttypes-macros.h
- macro_name: SCNdLEAST8
macro_header: inttypes-macros.h
- macro_name: SCNdLEAST16
macro_header: inttypes-macros.h
- macro_name: SCNdLEAST32
macro_header: inttypes-macros.h
- macro_name: SCNdLEAST64
macro_header: inttypes-macros.h
- macro_name: SCNdFAST8
macro_header: inttypes-macros.h
- macro_name: SCNdFAST16
macro_header: inttypes-macros.h
- macro_name: SCNdFAST32
macro_header: inttypes-macros.h
- macro_name: SCNdFAST64
macro_header: inttypes-macros.h
- macro_name: SCNdMAX
macro_header: inttypes-macros.h
- macro_name: SCNdPTR
macro_header: inttypes-macros.h
- macro_name: SCNi8
macro_header: inttypes-macros.h
- macro_name: SCNi16
macro_header: inttypes-macros.h
- macro_name: SCNi32
macro_header: inttypes-macros.h
- macro_name: SCNi64
macro_header: inttypes-macros.h
- macro_name: SCNiLEAST8
macro_header: inttypes-macros.h
- macro_name: SCNiLEAST16
macro_header: inttypes-macros.h
- macro_name: SCNiLEAST32
macro_header: inttypes-macros.h
- macro_name: SCNiLEAST64
macro_header: inttypes-macros.h
- macro_name: SCNiFAST8
macro_header: inttypes-macros.h
- macro_name: SCNiFAST16
macro_header: inttypes-macros.h
- macro_name: SCNiFAST32
macro_header: inttypes-macros.h
- macro_name: SCNiFAST64
macro_header: inttypes-macros.h
- macro_name: SCNiMAX
macro_header: inttypes-macros.h
- macro_name: SCNiPTR
macro_header: inttypes-macros.h
- macro_name: SCNo8
macro_header: inttypes-macros.h
- macro_name: SCNo16
macro_header: inttypes-macros.h
- macro_name: SCNo32
macro_header: inttypes-macros.h
- macro_name: SCNo64
macro_header: inttypes-macros.h
- macro_name: SCNoLEAST8
macro_header: inttypes-macros.h
- macro_name: SCNoLEAST16
macro_header: inttypes-macros.h
- macro_name: SCNoLEAST32
macro_header: inttypes-macros.h
- macro_name: SCNoLEAST64
macro_header: inttypes-macros.h
- macro_name: SCNoFAST8
macro_header: inttypes-macros.h
- macro_name: SCNoFAST16
macro_header: inttypes-macros.h
- macro_name: SCNoFAST32
macro_header: inttypes-macros.h
- macro_name: SCNoFAST64
macro_header: inttypes-macros.h
- macro_name: SCNoMAX
macro_header: inttypes-macros.h
- macro_name: SCNoPTR
macro_header: inttypes-macros.h
- macro_name: SCNu8
macro_header: inttypes-macros.h
- macro_name: SCNu16
macro_header: inttypes-macros.h
- macro_name: SCNu32
macro_header: inttypes-macros.h
- macro_name: SCNu64
macro_header: inttypes-macros.h
- macro_name: SCNuLEAST8
macro_header: inttypes-macros.h
- macro_name: SCNuLEAST16
macro_header: inttypes-macros.h
- macro_name: SCNuLEAST32
macro_header: inttypes-macros.h
- macro_name: SCNuLEAST64
macro_header: inttypes-macros.h
- macro_name: SCNuFAST8
macro_header: inttypes-macros.h
- macro_name: SCNuFAST16
macro_header: inttypes-macros.h
- macro_name: SCNuFAST32
macro_header: inttypes-macros.h
- macro_name: SCNuFAST64
macro_header: inttypes-macros.h
- macro_name: SCNuMAX
macro_header: inttypes-macros.h
- macro_name: SCNuPTR
macro_header: inttypes-macros.h
- macro_name: SCNx8
macro_header: inttypes-macros.h
- macro_name: SCNx16
macro_header: inttypes-macros.h
- macro_name: SCNx32
macro_header: inttypes-macros.h
- macro_name: SCNx64
macro_header: inttypes-macros.h
- macro_name: SCNxLEAST8
macro_header: inttypes-macros.h
- macro_name: SCNxLEAST16
macro_header: inttypes-macros.h
- macro_name: SCNxLEAST32
macro_header: inttypes-macros.h
- macro_name: SCNxLEAST64
macro_header: inttypes-macros.h
- macro_name: SCNxFAST8
macro_header: inttypes-macros.h
- macro_name: SCNxFAST16
macro_header: inttypes-macros.h
- macro_name: SCNxFAST32
macro_header: inttypes-macros.h
- macro_name: SCNxFAST64
macro_header: inttypes-macros.h
- macro_name: SCNxMAX
macro_header: inttypes-macros.h
- macro_name: SCNxPTR
macro_header: inttypes-macros.h
types:
- type_name: imaxdiv_t
enums: []

View file

@ -9,6 +9,8 @@
#ifndef __LLVM_LIBC_TYPES_IMAXDIV_T_H__
#define __LLVM_LIBC_TYPES_IMAXDIV_T_H__
#include <stdint.h>
typedef struct {
intmax_t quot;
intmax_t rem;

View file

@ -1,18 +0,0 @@
//===-- C standard library header in.h ------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_NETINET_IN_H
#define LLVM_LIBC_NETINET_IN_H
#include "__llvm-libc-common.h"
#include "../llvm-libc-macros/netinet-in-macros.h"
%%public_api()
#endif // LLVM_LIBC_NETINET_IN_H

View file

@ -1,6 +1,19 @@
header: netinet/in.h
header_template: in.h.def
macros: []
standards:
- posix
macros:
- macro_name: IPPROTO_IP
macro_header: netinet-in-macros.h
- macro_name: IPPROTO_ICMP
macro_header: netinet-in-macros.h
- macro_name: IPPROTO_TCP
macro_header: netinet-in-macros.h
- macro_name: IPPROTO_UDP
macro_header: netinet-in-macros.h
- macro_name: IPPROTO_IPV6
macro_header: netinet-in-macros.h
- macro_name: IPPROTO_RAW
macro_header: netinet-in-macros.h
types: []
enums: []
objects: []

View file

@ -1,17 +0,0 @@
//===-- C standard library header poll.h ----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_POLL_H
#define LLVM_LIBC_POLL_H
#include "__llvm-libc-common.h"
#include "llvm-libc-macros/poll-macros.h"
%%public_api()
#endif // LLVM_LIBC_POLL_H

View file

@ -1,6 +1,27 @@
header: poll.h
header_template: poll.h.def
macros: []
standards:
- posix
macros:
- macro_name: POLLIN
macro_header: poll-macros.h
- macro_name: POLLPRI
macro_header: poll-macros.h
- macro_name: POLLOUT
macro_header: poll-macros.h
- macro_name: POLLERR
macro_header: poll-macros.h
- macro_name: POLLHUP
macro_header: poll-macros.h
- macro_name: POLLNVAL
macro_header: poll-macros.h
- macro_name: POLLRDNORM
macro_header: poll-macros.h
- macro_name: POLLRDBAND
macro_header: poll-macros.h
- macro_name: POLLWRNORM
macro_header: poll-macros.h
- macro_name: POLLWRBAND
macro_header: poll-macros.h
types:
- type_name: struct_pollfd
- type_name: nfds_t

View file

@ -1,17 +0,0 @@
//===-- C standard library header sched.h ---------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_SCHED_H
#define LLVM_LIBC_SCHED_H
#include "__llvm-libc-common.h"
#include "llvm-libc-macros/sched-macros.h"
%%public_api()
#endif // LLVM_LIBC_SCHED_H

View file

@ -1,6 +1,13 @@
header: sched.h
header_template: sched.h.def
macros: []
standards:
- posix
macros:
- macro_name: SCHED_OTHER
macro_header: sched-macros.h
- macro_name: SCHED_FIFO
macro_header: sched-macros.h
- macro_name: SCHED_RR
macro_header: sched-macros.h
types:
- type_name: struct_timespec
- type_name: time_t

View file

@ -1,21 +0,0 @@
//===-- C standard library header signal.h --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_SIGNAL_H
#define LLVM_LIBC_SIGNAL_H
#include "__llvm-libc-common.h"
#define __need_size_t
#include <stddef.h>
#include "llvm-libc-macros/signal-macros.h"
%%public_api()
#endif // LLVM_LIBC_SIGNAL_H

View file

@ -1,6 +1,25 @@
header: signal.h
header_template: signal.h.def
macros: []
standards:
- stdc
macros:
- macro_name: SIGABRT
macro_header: signal-macros.h
- macro_name: SIGFPE
macro_header: signal-macros.h
- macro_name: SIGILL
macro_header: signal-macros.h
- macro_name: SIGINT
macro_header: signal-macros.h
- macro_name: SIGSEGV
macro_header: signal-macros.h
- macro_name: SIGTERM
macro_header: signal-macros.h
- macro_name: SIG_ERR
macro_header: signal-macros.h
- macro_name: SIG_DFL
macro_header: signal-macros.h
- macro_name: SIG_IGN
macro_header: signal-macros.h
types:
- type_name: pid_t
- type_name: sig_atomic_t

View file

@ -1,20 +0,0 @@
//===-- C standard library header stdio.h ---------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_STDIO_H
#define LLVM_LIBC_STDIO_H
#include "__llvm-libc-common.h"
#include "llvm-libc-macros/file-seek-macros.h"
#include "llvm-libc-macros/stdio-macros.h"
#include <stdarg.h>
%%public_api()
#endif // LLVM_LIBC_STDIO_H

View file

@ -1,5 +1,6 @@
header: stdio.h
header_template: stdio.h.def
standards:
- stdc
macros:
- macro_name: "NULL"
macro_header: null-macro.h
@ -9,6 +10,22 @@ macros:
macro_value: stdin
- macro_name: stderr
macro_value: stderr
- macro_name: SEEK_SET
macro_header: file-seek-macros.h
- macro_name: SEEK_CUR
macro_header: file-seek-macros.h
- macro_name: SEEK_END
macro_header: file-seek-macros.h
- macro_name: EOF
macro_header: stdio-macros.h
- macro_name: BUFSIZ
macro_header: stdio-macros.h
- macro_name: _IONBF
macro_header: stdio-macros.h
- macro_name: _IOLBF
macro_header: stdio-macros.h
- macro_name: _IOFBF
macro_header: stdio-macros.h
types:
- type_name: rsize_t
- type_name: size_t

View file

@ -1,17 +0,0 @@
//===-- C standard library header stdlib.h --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_STDLIB_H
#define LLVM_LIBC_STDLIB_H
#include "__llvm-libc-common.h"
#include "llvm-libc-macros/stdlib-macros.h"
%%public_api()
#endif // LLVM_LIBC_STDLIB_H

View file

@ -1,5 +1,4 @@
header: stdlib.h
header_template: stdlib.h.def
standards:
- stdc
merge_yaml_files:
@ -7,6 +6,10 @@ merge_yaml_files:
macros:
- macro_name: "NULL"
macro_header: null-macro.h
- macro_name: EXIT_SUCCESS
macro_header: stdlib-macros.h
- macro_name: EXIT_FAILURE
macro_header: stdlib-macros.h
types:
- type_name: __atexithandler_t
- type_name: __qsortcompare_t

View file

@ -1,17 +0,0 @@
//===-- POSIX header sysexits.h -----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_SYSEXITS_H
#define LLVM_LIBC_SYSEXITS_H
#include "__llvm-libc-common.h"
#include "llvm-libc-macros/sysexits-macros.h"
%%public_api()
#endif // LLVM_LIBC_SYSEXITS_H

View file

@ -1,9 +1,10 @@
header: sysexits.h
header_template: sysexits.h.def
standards:
- BSDExtensions
- GNUExtensions
macros: []
- bsd
- gnu
macros:
- macro_name: EX_OK
macro_header: sysexits-macros.h
types: []
enums: []
objects: []

View file

@ -1,17 +0,0 @@
//===-- C standard library header termios.h -------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_TERMIOS_H
#define LLVM_LIBC_TERMIOS_H
#include "__llvm-libc-common.h"
#include "llvm-libc-macros/termios-macros.h"
%%public_api()
#endif // LLVM_LIBC_TERMIOS_H

View file

@ -1,6 +1,9 @@
header: termios.h
header_template: termios.h.def
macros: []
standards:
- posix
macros:
- macro_name: NCCS
macro_header: termios-macros.h
types:
- type_name: tcflag_t
- type_name: struct_termios

View file

@ -1,18 +0,0 @@
//===-- C standard library header unistd.h --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_UNISTD_H
#define LLVM_LIBC_UNISTD_H
#include "__llvm-libc-common.h"
#include "llvm-libc-macros/file-seek-macros.h"
#include "llvm-libc-macros/unistd-macros.h"
%%public_api()
#endif // LLVM_LIBC_UNISTD_H

View file

@ -1,6 +1,19 @@
header: unistd.h
header_template: unistd.h.def
macros: []
standards:
- posix
macros:
- macro_name: SEEK_SET
macro_header: file-seek-macros.h
- macro_name: SEEK_CUR
macro_header: file-seek-macros.h
- macro_name: SEEK_END
macro_header: file-seek-macros.h
- macro_name: STDIN_FILENO
macro_header: unistd-macros.h
- macro_name: STDOUT_FILENO
macro_header: unistd-macros.h
- macro_name: STDERR_FILENO
macro_header: unistd-macros.h
types:
- type_name: uid_t
- type_name: gid_t

View file

@ -112,34 +112,14 @@ py_binary(
)
LLVM_LIBC_HEADERS = [
libc_header_info(
"arpa/inet",
has_def_template = True,
),
libc_header_info(
"assert",
has_def_template = True,
),
libc_header_info(
"complex",
has_def_template = True,
),
libc_header_info(
"elf",
has_def_template = True,
),
libc_header_info(
"errno",
has_def_template = True,
),
libc_header_info(
"fcntl",
has_def_template = True,
),
libc_header_info(
"inttypes",
has_def_template = True,
),
libc_header_info(
"link",
has_def_template = True,
@ -148,22 +128,6 @@ LLVM_LIBC_HEADERS = [
"math",
has_def_template = True,
),
libc_header_info(
"netinet/in",
has_def_template = True,
),
libc_header_info(
"poll",
has_def_template = True,
),
libc_header_info(
"sched",
has_def_template = True,
),
libc_header_info(
"signal",
has_def_template = True,
),
libc_header_info(
"stdbit",
has_def_template = True,
@ -172,14 +136,6 @@ LLVM_LIBC_HEADERS = [
"stdfix",
has_def_template = True,
),
libc_header_info(
"stdio",
has_def_template = True,
),
libc_header_info(
"sysexits",
has_def_template = True,
),
libc_header_info(
"sys/prctl",
has_def_template = True,
@ -188,30 +144,32 @@ LLVM_LIBC_HEADERS = [
"sys/syscall",
has_def_template = True,
),
libc_header_info(
"termios",
has_def_template = True,
),
libc_header_info(
"unistd",
has_def_template = True,
),
libc_header_info("arpa/inet"),
libc_header_info("complex"),
libc_header_info("ctype"),
libc_header_info("dirent"),
libc_header_info("dlfcn"),
libc_header_info("elf"),
libc_header_info("endian"),
libc_header_info("fcntl"),
libc_header_info("features"),
libc_header_info("fenv"),
libc_header_info("float"),
libc_header_info("inttypes"),
libc_header_info("limits"),
libc_header_info("locale"),
libc_header_info("netinet/in"),
libc_header_info("nl_types"),
libc_header_info("poll"),
libc_header_info("pthread"),
libc_header_info("sched"),
libc_header_info("search"),
libc_header_info("setjmp"),
libc_header_info("signal"),
libc_header_info("spawn"),
libc_header_info("stdckdint"),
libc_header_info("stdint"),
libc_header_info("stdio"),
libc_header_info("string"),
libc_header_info("strings"),
libc_header_info("sys/auxv"),
@ -229,14 +187,16 @@ LLVM_LIBC_HEADERS = [
libc_header_info("sys/types"),
libc_header_info("sys/utsname"),
libc_header_info("sys/wait"),
libc_header_info("sysexits"),
libc_header_info("termios"),
libc_header_info("threads"),
libc_header_info("time"),
libc_header_info("uchar"),
libc_header_info("unistd"),
libc_header_info("wchar"),
libc_header_info("wctype"),
libc_header_info(
"stdlib",
has_def_template = True,
other_srcs = ["include/stdlib-malloc.yaml"],
),
libc_header_info(