Skip to content

Rename libc/utils/hdrgen/yaml/ to libc/utils/hdrgen/spec/ #120931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ endif()
if(LLVM_LIBC_ENABLE_LINTING)
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(LLVM_LIBC_ENABLE_LINTING OFF)
message(WARNING "C++ compiler is not clang++, linting with be disabled.")
message(WARNING "C++ compiler is not clang++, linting will be disabled.")
else()
if (NOT LLVM_LIBC_CLANG_TIDY)
find_program(LLVM_LIBC_CLANG_TIDY NAMES clang-tidy)
Expand Down
14 changes: 7 additions & 7 deletions libc/docs/dev/header_generation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ To add through the command line:

.. code-block:: none

python3 libc/utils/hdrgen/yaml_to_classes.py
libc/utils/hdrgen/yaml/[yaml_file.yaml] --add_function "<return_type>" <function_name> "<function_arg1, function_arg2>" <standard> <guard> <attribute>
python3 libc/utils/hdrgen/spec/yaml_to_classes.py
libc/utils/hdrgen/spec//[yaml_file.yaml] --add_function "<return_type>" <function_name> "<function_arg1, function_arg2>" <standard> <guard> <attribute>

Example:

.. code-block:: none

python3 libc/utils/hdrgen/yaml_to_classes.py
libc/utils/hdrgen/yaml/ctype.yaml --add_function "char" example_function
python3 libc/utils/hdrgen/spec/yaml_to_classes.py
libc/utils/hdrgen/spec//ctype.yaml --add_function "char" example_function
"int, void, const void" stdc example_float example_attribute

Keep in mind only the return_type and arguments have quotes around them. If
Expand All @@ -63,7 +63,7 @@ To add through the command line:
examine.

If you want to sort the functions alphabetically you can check out
libc/utils/hdrgen/yaml_functions_sorted.py.
libc/utils/hdrgen/spec/_functions_sorted.py.


Testing
Expand All @@ -90,7 +90,7 @@ Common Errors

.. code-block:: none

"/llvm-project/libc/utils/hdrgen/yaml_to_classes.py", line 67, in yaml_to_classes function_data["return_type"]
"/llvm-project/libc/utils/hdrgen/spec/yaml_to_classes.py", line 67, in yaml_to_classes function_data["return_type"]

If you receive this error or any error pertaining to
``function_data[function_specific_component]`` while building the headers
Expand Down Expand Up @@ -118,7 +118,7 @@ Common Errors
missing. Ensure the correct style and required files are present:

| ``[header_name]``
| ``[../libc/utils/hdrgen/yaml/[yaml_file.yaml]``
| ``[../libc/utils/hdrgen/spec/[yaml_file.yaml]``
| ``[header_name.h.def]``
| ``[header_name.h]``
| ``DEPENDS``
Expand Down
Loading
Loading