mirror of
https://github.com/clang-retro/llvm.git
synced 2026-11-28 13:19:18 -08:00
This patch adds `reallocarray` to LLVM libc under `stdlib` as standardized in POSIX.1-2024. Following maintainer discussion, `reallocarray` is treated as an external allocator entrypoint (similar to `malloc` and `realloc`), backed by the underlying allocator (e.g. Scudo): - Adds `reallocarray` declaration to `libc/include/stdlib-malloc.yaml` under the POSIX standard. - Adds `reallocarray` to `libc/utils/docgen/stdlib.yaml` tracking POSIX.1-2024. - Declares the external entrypoint in `libc/src/stdlib/CMakeLists.txt` and `libc/src/stdlib/reallocarray.h`. - Adds `reallocarray` to external entrypoints across Linux targets (`x86_64`, `aarch64`, `riscv`). Fixes #236898.
75 lines
1.4 KiB
YAML
75 lines
1.4 KiB
YAML
# This file has declarations that appear both in <stdlib.h> and in <malloc.h>.
|
|
# These include the subset of GNU extensions that Scudo supports.
|
|
|
|
functions:
|
|
- name: aligned_alloc
|
|
standards:
|
|
- stdc
|
|
return_type: void *
|
|
arguments:
|
|
- type: size_t
|
|
- type: size_t
|
|
- name: calloc
|
|
standards:
|
|
- stdc
|
|
return_type: void *
|
|
arguments:
|
|
- type: size_t
|
|
- type: size_t
|
|
- name: free
|
|
standards:
|
|
- stdc
|
|
return_type: void
|
|
arguments:
|
|
- type: void *
|
|
- name: free_aligned_sized
|
|
standards:
|
|
- stdc
|
|
return_type: void
|
|
arguments:
|
|
- type: void *
|
|
- type: size_t
|
|
- type: size_t
|
|
- name: free_sized
|
|
standards:
|
|
- stdc
|
|
return_type: void
|
|
arguments:
|
|
- type: void *
|
|
- type: size_t
|
|
- name: malloc
|
|
standards:
|
|
- stdc
|
|
return_type: void *
|
|
arguments:
|
|
- type: size_t
|
|
- name: memalign
|
|
standards:
|
|
- gnu
|
|
return_type: void *
|
|
arguments:
|
|
- type: size_t
|
|
- type: size_t
|
|
- name: realloc
|
|
standards:
|
|
- stdc
|
|
return_type: void *
|
|
arguments:
|
|
- type: void *
|
|
- type: size_t
|
|
- name: reallocarray
|
|
standards:
|
|
- posix
|
|
return_type: void *
|
|
arguments:
|
|
- type: void *
|
|
- type: size_t
|
|
- type: size_t
|
|
- name: valloc
|
|
standards:
|
|
- bsd
|
|
- gnu
|
|
return_type: void *
|
|
arguments:
|
|
- type: size_t
|