Lines Matching +full:docs +full:- +full:libc +full:- +full:html
1 # ====- Information about standard headers used by docgen ----*- python -*--==#
5 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 # ==-------------------------------------------------------------------------==#
19 By convention, the macro-only part of a header file is in a header-specific
21 ``$LLVM_PROJECT_ROOT/libc/include/llvm-libc-macros``. Docgen expects that
23 ``#define MACRO_NAME`` in some ``*-macros.h`` file in the directory tree.
25 shown in the generated rst docs rendered as html for display at
26 <libc.llvm.org>.
28 By convention, each function for a header is implemented in a function-specific
30 ``$LLVM_PROJECT_ROOT/libc/src/fenv``. Some headers have architecture-specific
32 presence of this function-specific cpp file to set the implementation status
33 shown in the generated rst docs rendered as html for display at
34 <libc.llvm.org>.
47 self.macros_dir = Path(self.libc_root, "include", "llvm-libc-macros")
49 def macro_file_exists(self) -> bool:
55 def fns_dir_exists(self) -> bool:
58 def implements_fn(self, fn_name: str) -> bool:
64 def implements_macro(self, m_name: str) -> bool:
67 ``$LLVM_PROJECT_ROOT/libc/include/llvm-libc-macros/fenv-macros.h``,
70 ``$LLVM_PROJECT_ROOT/libc/include/llvm-libc-macros/linux/signal-macros.h``.
80 def __get_macro_files(self) -> Generator[Path, None, None]:
84 libc/include/llvm-libc-macros/fcntl-macros.h
85 libc/include/llvm-libc-macros/linux/fcntl-macros.h
89 libc/include/llvm-libc-macros/sys-mman-macros.h
91 stem = self.stem.replace("/", "-")
92 return self.macros_dir.glob(f"**/{stem}-macros.h")