[libc-commits] [libc] [libc][docs] Fix docgen macro lookup for underscored headers (PR #194367)
Petter Berntsson via libc-commits
libc-commits at lists.llvm.org
Mon Apr 27 07:23:58 PDT 2026
================
@@ -112,5 +112,7 @@ def __get_macro_files(self) -> Generator[Path, None, None]:
instead use a hyphen in the name.
libc/include/llvm-libc-macros/sys-mman-macros.h
"""
- stem = self.stem.replace("/", "-")
+ # Some POSIX headers use underscores in the header name but hyphens in
+ # the macro file name, e.g. nl_types.h -> nl-types-macros.h.
+ stem = self.stem.replace("/", "-").replace("_", "-")
----------------
petbernt wrote:
I think either approach works, but renaming `nl-types-macros.h` to `nl_types-macros.h` is probably the cleaner fix since it removes the naming inconsistency at the source.
This patch was only meant to make the implementation-status lookup match the current repository state.
I’m happy to switch to the rename instead!
https://github.com/llvm/llvm-project/pull/194367
More information about the libc-commits
mailing list