summaryrefslogtreecommitdiff
path: root/libc/utils/docgen
AgeCommit message (Collapse)Author
2025-03-20[libc][docs] Add dirent implementation status doc and include in CMakeLists ↵Prashanth
(#132151) These changes tracks `dirent.h` for the implementation status of functions and macros, with respect to the issue ( https://github.com/llvm/llvm-project/issues/122006 ).
2025-03-18[libc][docs] Add sys/utsname header and documentation for uname function ↵Prashanth
(#131817) These changes tracks `utsname.h` for the implementation status of functions and macros, with respect to the issue ( https://github.com/llvm/llvm-project/issues/122006 ).
2025-03-17[libc][docs] Add glob implementation status doc and include in CMakeLists ↵Prashanth
(#126923) These changes tracks `glob.h` for the implementation status of functions and macros, with respect to the issue ( #122006 ) . cc @nickdesaulniers
2025-02-11[libc][docgen] make note of sys/time.h interfaces removed in POSIX.1-2024 ↵Nick Desaulniers
(#126612) One of these days, we'll be able to specify time to a computer... Also, POSIX can remove stuff all they want. Folks probably will continue to depend on broken interfaces forever. Link: #124654 Link: https://austingroupbugs.net/view.php?id=1330
2025-02-10[libc][docs] Add sys/statvfs to documentation and YAML definitions (#126413)Prashanth
These changes ensure that the sys/statvfs header is documented properly with respect to the issue ( https://github.com/llvm/llvm-project/issues/122006 ) .
2025-02-07[libc] Add the `<endian.h>` header. (#125168)c8ef
Closes [#124631](https://github.com/llvm/llvm-project/issues/124631). ref: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/endian.h.html This patch adds the implementation of `endian.h`, which includes the header itself and three related macros. These macros in the header rely on the compiler preprocessor, similar to how https://github.com/llvm/llvm-project/blob/main/libc/src/__support/endian_internal.h does. Hopefully this will meet the requirements for compiling llvm with llvm-libc.
2025-01-24[libc][cpio] Add cpio.h header. (#123798)siya100
[libc][docs] add cpio to documentation and include related functi… These changes ensure that the cpio header is documented properly with respect to the issue (https://github.com/llvm/llvm-project/issues/122006 ). **Changes:** 1. **cpio.yaml**: Created a new YAML file for cpio with functions and related macros. 2. **CMakeLists.txt**: Added cpio to the documentation directories. 3. **index.rst**: Included `cpio` in the documentation index. --------- Co-authored-by: siya <siya@Siya.com>
2025-01-23 [libc][docs] Add Unistd header's page to the status of implementations doc ↵Prashanth
(#123068) These changes ensure that the unistd header is documented properly with respect to the issue ( https://github.com/llvm/llvm-project/issues/122006 ) .
2025-01-23[libc][NFC] Strip all training whitespace and missing newlines (#124163)Joseph Huber
2025-01-17[libc][docs] Add sys/stat page to the status of implementations docs (#122997)Prashanth
These changes ensure that the sys/stat header is documented properly with respect to the issue ( #122006 ) .
2025-01-17[libc][docs] Add termios page to the status of implementations docs (#123004)Prashanth
These changes ensure that the termios header is documented properly with respect to the issue ( https://github.com/llvm/llvm-project/issues/122006 ) .
2025-01-17[libc][docs] Add sys/time page to the status of implementations docs (#123000)Prashanth
These changes ensure that the sys/time header is documented properly with respect to the issue ( #122006 ) .
2025-01-15[libc][docs] add sys/wait to documentation and include related functi… ↵Prashanth
(#122598) These changes ensure that the `sys/wait` header is documented properly with respect to the issue (#122006 ). **Changes:** 1. **wait.yaml**: Created a new YAML file for `sys/wait` with functions (`wait`, `waitid`, `waitpid`) and related macros. 2. **CMakeLists.txt**: Added `sys/wait` to the documentation directories. 3. **index.rst**: Included `sys/wait` in the documentation index.
2025-01-14[libc][docs] stub out pthread.h support (#122497)Nick Desaulniers
Link: #122006
2025-01-14[libc][docs] Add sys/resource header's implementation status (#122563)Prashanth
### Add sys/resource header's implementation status ( #122006 ) #### Changes: 1. **CMakeLists.txt**: Added `sys/resource` to the list of documentation directories. 2. **index.rst**: Included `sys/resource` in the documentation index. 3. **resource.yaml**: Created a new YAML file for `sys/resource` with functions and macros which manages system resources. This PR adds documentation support for the `sys/resource` header, including functions and macros as per the latest POSIX standards.
2025-01-10[libc][docs] Add net/if.h documentation by referring to POSIX standards ↵Prashanth
(#122406) This pull request introduces the following changes to the project with reference to issue ( #122006 ): 1. **Documentation Update**: - Added a new YAML file `if.yaml` under `net` to document network interface functions and macros. - The `if.yaml` file includes the following functions and macros: - Functions: - `if_freenameindex` - `if_indextoname` - `if_nameindex` - `if_nametoindex` - Macros: - `IF_NAMESIZE` 2. **CMake Configuration Update**: - Updated the `CMakeLists.txt` file to create the necessary directory for the `net` headers. - Included the `net/if` documentation in the Sphinx build configuration. 3. **Index Update**: - Updated the `index.rst` file to include a reference to the newly added `net/if` documentation. **Purpose**: - This pull request adds documentation for network interface functions and macros, ensuring they are included in the project's documentation. - Updates the CMake configuration to support the new documentation. **Testing**: - Verified that the new YAML file is correctly referenced in the `index.rst`. - Ensured that the documentation builds without errors and includes the new network interface documentation. Co-authored-by: Nick Desaulniers <ndesaulniers@google.com>
2025-01-10[libc][docs] Add netinet/in header documentation by referring to POSIX ↵Prashanth
standards (#122411) This pull request introduces the following changes to the project with reference to ( #122006 ): 1. **Documentation Update**: - Added a new YAML file `in.yaml` to document network protocol and address macros. - The `in.yaml` file includes the following macros: - `IPPROTO_IP` - `IPPROTO_IPV6` - `IPPROTO_ICMP` - `IPPROTO_RAW` - `IPPROTO_TCP` - `IPPROTO_UDP` - `INADDR_ANY` - `INADDR_BROADCAST` - `INET_ADDRSTRLEN` - `IPV6_JOIN_GROUP` - `IPV6_LEAVE_GROUP` - `IPV6_MULTICAST_HOPS` - `IPV6_MULTICAST_IF` - `IPV6_MULTICAST_LOOP` - `IPV6_UNICAST_HOPS` - `IPV6_V6ONLY` - `IN6_IS_ADDR_UNSPECIFIED` - `IN6_IS_ADDR_LOOPBACK` - `IN6_IS_ADDR_MULTICAST` - `IN6_IS_ADDR_LINKLOCAL` - `IN6_IS_ADDR_SITELOCAL` - `IN6_IS_ADDR_V4MAPPED` - `IN6_IS_ADDR_V4COMPAT` - `IN6_IS_ADDR_MC_NODELOCAL` - `IN6_IS_ADDR_MC_LINKLOCAL` - `IN6_IS_ADDR_MC_SITELOCAL` - `IN6_IS_ADDR_MC_ORGLOCAL` - `IN6_IS_ADDR_MC_GLOBAL` _I believe, all these macros are necessary and should be documented._ 2. **CMake Configuration Update**: - Updated the `CMakeLists.txt` file to create the necessary directory for the `netinet` headers. - Included the `netinet/in` documentation in the Sphinx build configuration. 3. **Index Update**: - Updated the `index.rst` file to include a reference to the newly added `netinet/in` documentation. **Purpose**: - This pull request adds documentation for network protocol and address macros in the `netinet/in` header. - Updates the CMake configuration to support the new documentation. **Testing**: - Verified that the new YAML file is correctly referenced in the `index.rst`. - Ensured that the documentation builds without errors and includes the new network interface documentation. This pull request ensures that the `netinet/in` header macros are documented and included in the project's documentation, and updates the CMake configuration to support these changes.
2025-01-10[docs][libc] Add AIO documentation refering POSIX and include in build (#122219)Prashanth
With reference to #122006 , add a new header reference (aio.yaml) to doc
2025-01-06[libc][docgen] regen docgen via cmake (#119628)Nick Desaulniers
Now, `ninja docs-libc-html` will re-run docgen. Previously, we would run docgen offline, and commit the result. Now we no longer need to do that; docgen is invoked from the dependencies of the `docs-libc-html` target on demand. This commit removes the dynamically generated .rst files (keeping the static ones that haven't been converted to docgen), and fixes up some mistakes I failed to cleanup recently since I didn't have such automation in place to catch such bugs.
2024-12-18[libc][docs] convert stdio.h to docgen (#120334)Nick Desaulniers
Add info from n3220 and POSIX.1-2024.
2024-12-12[libc][docs] move docgen from json to yaml (#119744)Nick Desaulniers
That way it can more easily be integrated into hdrgen.
2024-12-12[libc][docgen] simplify posix links (#119595)Nick Desaulniers
Usually posix functions have individual doc pages, and each header has its own list of required macro definitions. Use a simpler key of "in-latest-posix" to signal that the URL convention can be followed. Add support for a "removed-in-posix-2008" key which will link to the 2004 docs for functions like bcmp, bcopy, bzero, index, and rindex from strings.h. I don't want to add all of these links for pthreads.h, so automating this will make documenting these go much faster.
2024-12-12[libc][docs] fix typoNick Desaulniers
Fixes: #119621
2024-12-12[libc][docgen] support non-top-level headers (#119621)Nick Desaulniers
such as arpa/inet, sys/*
2024-12-10[libc][docs] split "String Functions" into string.h, strings.h, stdlib.h, ↵Nick Desaulniers
and inttypes.h (#118860) bcmp, bcopy, and bzero should be moved from libc/src/string/ to lib/src/strings/ in order for docgen to use existing conventions to find whether we implement a function or not. We should add support to docgen for mentioning glibc extensions (mempcpy) or extensions from other libcs.
2024-12-09[libc][docs] add missing c99 docs (#119239)Nick Desaulniers
Looks like we were missing docs for: - float.h - wchar.h - wctype.h Which AFAICT were added in ISO C99.
2024-12-09[libc][docs] add c11 threads and uchar (#119250)Nick Desaulniers
FWICT, these were the newly added headers for c11.
2024-12-05[libc][docs] stub out assert, errno, and locale (#118852)Nick Desaulniers
[libc][docs] stub out assert, errno, and locale These were the remaining c89 library headers (besides string.h and stdlib.h; I will split strings.rst in a follow up commit). The macro support detection in docgen doesn't quite work for some of these headers. Add the stubs for these headers for now, and fix up docgen later. See the "NIST publication": Link: https://www.open-std.org/jtc1/sc22/wg14/www/projects.html
2024-12-05[libc][docs] reorganize documentation (#118836)Nick Desaulniers
This commit does a few things: * creates libc/docs/headers/ and moves all user API related headers under it. * updates paths and docgen * updates the top level index to put these headers under a new "Implementation Status" tab. * rename some of the files to be foo.rst for foo.h (except strings, which is currently a mix of string.h and stdlib.h) * update the heading of some files to be in the form foo.h.
2024-12-05[libc][docgen] update to POSIX.1-2024 (#118717)Nick Desaulniers
The recently ratified POSIX.1-2024 is newer than POSIX.1-2017.
2024-12-04docgen refresh (#118709)Nick Desaulniers
- **[libc][docgen] Use Macro for macro table name** - **fix setjmp json, otherwise can't regen** - **regen all docs**
2024-05-23[libc][docs] adds macro handling, POSIX status, and validation to docgen ↵Michael Flanders
(#89421) docgen now lists macro implementation status in the generated rst files. Adds POSIX definition link property to docgen json API (`posix-definition`) and changes the `defined` property of docgen json API to `c-definition`. Now that docgen's api is getting more specified, adds validation checks to docgen to start codifying the docgen api spec. To make sure this all looks good, I've added POSIX definition links to signal.h as a tester.
2024-04-23[libc] Generate docs for `setjmp.h` (#89542)Rajveer Singh Bharadwaj
Resolves #88065 Added macros and functions.
2024-04-18[libc][docs] Updates implementation status for some preexisting docgen json ↵Michael Flanders
files (#89281) Moving towards displaying impl status of standard header macros. The macros aren't handled by docgen yet, so I haven't included updated rst files.
2024-04-18[libc][docs] adds threads.h impl status docs (#89275)Michael Flanders
Closes #88067. Adding @nickdesaulniers for review.
2024-04-12[libc][docs] use docgen to generate stdbit rst docs (#88540)Michael Flanders
Closes #88066. Compared to before, the function names in the stdbit table are sorted by function name, not order-of-appearance in the standard. Since macros aren't printed by docgen.py and are still a TODO in the code, they are also not printed in the new stdbit.h docs. Adds some checks to docgen.py for conditions that tripped me up. Add code to docgen.py to add the include of the `|check|` rewriter, since all other generated files need it.
2024-04-11[libc][docs] Generate docs for signal.h & optimized is_implemented func (#88028)Xu Zhang
Fixes #87835 This patch added the documentation for the POSIX functions according to [n3096](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf) Section 7.14, and gives the *docgen.py* script a more elegant *is_implemented* function.
2024-04-08[libc][docs] generate docs for ctype.h (#87946)Zander Dumont-Strom
Fixes #87833
2024-04-05[libc][docs] Introduce docgen (#87682)Nick Desaulniers
This script+config should help us generate more consistent documentation wrt. what we currently support or not. As an example usage: $ ./libc/utils/docgen/docgen.py fenv.h Will spit out an RST formatted table that can be copy+pasted into our docs. The config is not filled out entirely, but doing so and then updating our docs would be great beginner bugs for new contributors. Having python+json generate things like docs, or headers (as imagined in https://github.com/nickdesaulniers/llvm-project/tree/hdr-gen2) is perhaps easier to work with than tablegen, and doesn't introduce a dependency on a host tool that needs to be compiled from llvm sources before building the rest of the libc. This can probably be merged with whatever we end up doing to replace libc-hdrgen. Please use https://llvm.org/docs/CodingStandards.html#python-version-and-source-code-formatting for keeping this file formatted.