[libc-commits] [libc] [libc][docs] Fix docgen macro lookup for underscored headers (PR #194367)
Victor Campos via libc-commits
libc-commits at lists.llvm.org
Mon Apr 27 07:15: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("_", "-")
----------------
vhscampos wrote:
Maybe unrelated to the change, but wouldn't it be better if we renamed `nl-types-macros.h` to `nl_types-macros.h`?
https://github.com/llvm/llvm-project/pull/194367
More information about the libc-commits
mailing list