-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
[libc][docs] reorganize documentation #118836
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@llvm/pr-subscribers-libc Author: Nick Desaulniers (nickdesaulniers) ChangesThis commit does a few things:
Full diff: https://github.com/llvm/llvm-project/pull/118836.diff 17 Files Affected:
diff --git a/libc/docs/complex.rst b/libc/docs/headers/complex.rst
similarity index 99%
rename from libc/docs/complex.rst
rename to libc/docs/headers/complex.rst
index 1e74f16b60e660..2e81aba97b0ef6 100644
--- a/libc/docs/complex.rst
+++ b/libc/docs/headers/complex.rst
@@ -1,4 +1,4 @@
-.. include:: check.rst
+.. include:: ../check.rst
=========
complex.h
diff --git a/libc/docs/ctype.rst b/libc/docs/headers/ctype.rst
similarity index 97%
rename from libc/docs/ctype.rst
rename to libc/docs/headers/ctype.rst
index 828785c9b6708f..eca0165d3d3351 100644
--- a/libc/docs/ctype.rst
+++ b/libc/docs/headers/ctype.rst
@@ -1,4 +1,4 @@
-.. include:: check.rst
+.. include:: ../check.rst
=======
ctype.h
diff --git a/libc/docs/fenv.rst b/libc/docs/headers/fenv.rst
similarity index 98%
rename from libc/docs/fenv.rst
rename to libc/docs/headers/fenv.rst
index 2492e22d2fd78d..3a06e59d821548 100644
--- a/libc/docs/fenv.rst
+++ b/libc/docs/headers/fenv.rst
@@ -1,4 +1,4 @@
-.. include:: check.rst
+.. include:: ../check.rst
======
fenv.h
diff --git a/libc/docs/headers/index.rst b/libc/docs/headers/index.rst
new file mode 100644
index 00000000000000..2a7bf59e0b56db
--- /dev/null
+++ b/libc/docs/headers/index.rst
@@ -0,0 +1,18 @@
+Implementation Status
+=====================
+
+.. toctree::
+ :maxdepth: 1
+
+ complex
+ ctype
+ fenv
+ math/index.rst
+ search
+ setjmp
+ signal
+ stdbit
+ stdio
+ strings
+ threads
+ time
diff --git a/libc/docs/math/index.rst b/libc/docs/headers/math/index.rst
similarity index 99%
rename from libc/docs/math/index.rst
rename to libc/docs/headers/math/index.rst
index 4934e93ccb1645..adc0afa080ec2a 100644
--- a/libc/docs/math/index.rst
+++ b/libc/docs/headers/math/index.rst
@@ -1,10 +1,10 @@
.. _math:
-==============
-Math Functions
-==============
+======
+math.h
+======
-.. include:: ../check.rst
+.. include:: ../../check.rst
.. raw:: html
diff --git a/libc/docs/math/log.rst b/libc/docs/headers/math/log.rst
similarity index 100%
rename from libc/docs/math/log.rst
rename to libc/docs/headers/math/log.rst
diff --git a/libc/docs/math/stdfix.rst b/libc/docs/headers/math/stdfix.rst
similarity index 99%
rename from libc/docs/math/stdfix.rst
rename to libc/docs/headers/math/stdfix.rst
index d8dcb0cfa4c521..58052f000995cd 100644
--- a/libc/docs/math/stdfix.rst
+++ b/libc/docs/headers/math/stdfix.rst
@@ -2,7 +2,7 @@
StdFix Functions
================
-.. include:: ../check.rst
+.. include:: ../../check.rst
Standards and Goals
-------------------
diff --git a/libc/docs/libc_search.rst b/libc/docs/headers/search.rst
similarity index 95%
rename from libc/docs/libc_search.rst
rename to libc/docs/headers/search.rst
index 774622d1e66c3f..51832e9bdc2ed4 100644
--- a/libc/docs/libc_search.rst
+++ b/libc/docs/headers/search.rst
@@ -1,8 +1,8 @@
-=============
-Search Tables
-=============
+========
+search.h
+========
-.. include:: check.rst
+.. include:: ../check.rst
---------------
Source Location
diff --git a/libc/docs/setjmp.rst b/libc/docs/headers/setjmp.rst
similarity index 95%
rename from libc/docs/setjmp.rst
rename to libc/docs/headers/setjmp.rst
index dd7e0aca3b9cda..d120d4f2d2e05d 100644
--- a/libc/docs/setjmp.rst
+++ b/libc/docs/headers/setjmp.rst
@@ -1,4 +1,4 @@
-.. include:: check.rst
+.. include:: ../check.rst
========
setjmp.h
diff --git a/libc/docs/signal.rst b/libc/docs/headers/signal.rst
similarity index 99%
rename from libc/docs/signal.rst
rename to libc/docs/headers/signal.rst
index e12f67b0c61c0b..6db604bf1fdd43 100644
--- a/libc/docs/signal.rst
+++ b/libc/docs/headers/signal.rst
@@ -1,4 +1,4 @@
-.. include:: check.rst
+.. include:: ../check.rst
========
signal.h
diff --git a/libc/docs/stdbit.rst b/libc/docs/headers/stdbit.rst
similarity index 99%
rename from libc/docs/stdbit.rst
rename to libc/docs/headers/stdbit.rst
index e6b82bb77a14aa..c268dece0295fe 100644
--- a/libc/docs/stdbit.rst
+++ b/libc/docs/headers/stdbit.rst
@@ -1,4 +1,4 @@
-.. include:: check.rst
+.. include:: ../check.rst
========
stdbit.h
diff --git a/libc/docs/stdio.rst b/libc/docs/headers/stdio.rst
similarity index 96%
rename from libc/docs/stdio.rst
rename to libc/docs/headers/stdio.rst
index d17821562c2556..3cd355529d4005 100644
--- a/libc/docs/stdio.rst
+++ b/libc/docs/headers/stdio.rst
@@ -1,8 +1,8 @@
-===============
-StdIO Functions
-===============
+=======
+stdio.h
+=======
-.. include:: check.rst
+.. include:: ../check.rst
---------------
Source location
diff --git a/libc/docs/strings.rst b/libc/docs/headers/strings.rst
similarity index 99%
rename from libc/docs/strings.rst
rename to libc/docs/headers/strings.rst
index 427644c407ae83..949c53bfa4f740 100644
--- a/libc/docs/strings.rst
+++ b/libc/docs/headers/strings.rst
@@ -2,7 +2,7 @@
String Functions
================
-.. include:: check.rst
+.. include:: ../check.rst
---------------
Source location
diff --git a/libc/docs/threads.rst b/libc/docs/headers/threads.rst
similarity index 98%
rename from libc/docs/threads.rst
rename to libc/docs/headers/threads.rst
index db0edacf7b4680..b4a594588a2971 100644
--- a/libc/docs/threads.rst
+++ b/libc/docs/headers/threads.rst
@@ -1,4 +1,4 @@
-.. include:: check.rst
+.. include:: ../check.rst
=========
threads.h
diff --git a/libc/docs/date_and_time.rst b/libc/docs/headers/time.rst
similarity index 99%
rename from libc/docs/date_and_time.rst
rename to libc/docs/headers/time.rst
index b745a3b416f802..de82d80a2bec48 100644
--- a/libc/docs/date_and_time.rst
+++ b/libc/docs/headers/time.rst
@@ -1,8 +1,8 @@
-=======================
-Date and Time Functions
-=======================
+======
+time.h
+======
-.. include:: check.rst
+.. include:: ../check.rst
---------------
Source location
diff --git a/libc/docs/index.rst b/libc/docs/index.rst
index 6f759aa215b62c..01f36709dfa549 100644
--- a/libc/docs/index.rst
+++ b/libc/docs/index.rst
@@ -64,19 +64,8 @@ stages there is no ABI stability in any form.
:caption: Status
compiler_support
- date_and_time
- math/index.rst
- strings
- stdio
- stdbit
- fenv
- libc_search
+ headers/index.rst
c23
- ctype
- complex
- signal
- threads
- setjmp
.. toctree::
:hidden:
diff --git a/libc/utils/docgen/docgen.py b/libc/utils/docgen/docgen.py
index af5d00a5cbf8c7..c62aa805749af2 100755
--- a/libc/utils/docgen/docgen.py
+++ b/libc/utils/docgen/docgen.py
@@ -161,7 +161,7 @@ def print_macros_rst(header: Header, macros: Dict):
def print_impl_status_rst(header: Header, api: Dict):
- print(".. include:: check.rst\n")
+ print(".. include:: ../check.rst\n")
print("=" * len(header.name))
print(header.name)
|
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.
nickdesaulniers
force-pushed
the
doc_tab
branch
from
December 5, 2024 17:29
f0dcef0
to
14590c8
Compare
This was referenced Dec 5, 2024
michaelrj-google
approved these changes
Dec 5, 2024
broxigarchen
pushed a commit
to broxigarchen/llvm-project
that referenced
this pull request
Dec 10, 2024
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.
chrsmcgrr
pushed a commit
to RooflineAI/llvm-project
that referenced
this pull request
Dec 12, 2024
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.
nickdesaulniers
added a commit
to nickdesaulniers/llvm-project
that referenced
this pull request
Dec 17, 2024
commit a9aff44 ("[libc][docs] reorganize documentation (llvm#118836)") moved https://libc.llvm.org/math/index.html to https://libc.llvm.org/headers/math/index.html which makes links from various slide decks stale. There's an extension for sphinx that can generate redirects. Add a dependency on that, then use it to create a redirect so that those older links still work. I was able to install this sphinx extension via: $ sudo apt install python3-sphinx-reredirects We may need to install this on whatever server generates the llvm documentation.
nickdesaulniers
added a commit
that referenced
this pull request
Dec 17, 2024
commit a9aff44 ("[libc][docs] reorganize documentation (#118836)") moved https://libc.llvm.org/math/index.html to https://libc.llvm.org/headers/math/index.html which makes links from various slide decks stale. There's an extension for sphinx that can generate redirects. Add a dependency on that, then use it to create a redirect so that those older links still work. I was able to install this sphinx extension via: $ sudo apt install python3-sphinx-reredirects We may need to install this on whatever server generates the llvm documentation.
TIFitis
pushed a commit
to TIFitis/llvm-project
that referenced
this pull request
Dec 18, 2024
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit does a few things:
Status" tab.
currently a mix of string.h and stdlib.h)