From d7061fcc4e1e2df05ad1d513fa8ae4805a6a79df Mon Sep 17 00:00:00 2001 From: kristina Date: Sat, 16 Nov 2019 23:06:50 +0000 Subject: [PATCH] [Docs] Try fixing the tutorial toctree Unorphan the old tutorial and reference every page in the index explicitly. This should hopefully make Sphinx generate correct hyperlinks now. --- .../MyFirstLanguageFrontend/LangImpl01.rst | 2 -- .../MyFirstLanguageFrontend/LangImpl02.rst | 2 -- .../MyFirstLanguageFrontend/LangImpl03.rst | 4 +--- .../MyFirstLanguageFrontend/LangImpl04.rst | 2 -- .../MyFirstLanguageFrontend/LangImpl05.rst | 2 -- .../MyFirstLanguageFrontend/LangImpl06.rst | 2 -- .../MyFirstLanguageFrontend/LangImpl07.rst | 2 -- .../MyFirstLanguageFrontend/LangImpl08.rst | 2 -- .../MyFirstLanguageFrontend/LangImpl09.rst | 2 -- .../MyFirstLanguageFrontend/LangImpl10.rst | 2 -- docs/tutorial/MyFirstLanguageFrontend/index.rst | 17 ++++++++++++++++- docs/tutorial/index.rst | 9 ++++----- 12 files changed, 21 insertions(+), 27 deletions(-) diff --git a/docs/tutorial/MyFirstLanguageFrontend/LangImpl01.rst b/docs/tutorial/MyFirstLanguageFrontend/LangImpl01.rst index 8cf01c8e4b9..71ba9322817 100644 --- a/docs/tutorial/MyFirstLanguageFrontend/LangImpl01.rst +++ b/docs/tutorial/MyFirstLanguageFrontend/LangImpl01.rst @@ -1,5 +1,3 @@ -:orphan: - ===================================================== Kaleidoscope: Kaleidoscope Introduction and the Lexer ===================================================== diff --git a/docs/tutorial/MyFirstLanguageFrontend/LangImpl02.rst b/docs/tutorial/MyFirstLanguageFrontend/LangImpl02.rst index dec9f36ed56..c07c3ab192b 100644 --- a/docs/tutorial/MyFirstLanguageFrontend/LangImpl02.rst +++ b/docs/tutorial/MyFirstLanguageFrontend/LangImpl02.rst @@ -1,5 +1,3 @@ -:orphan: - =========================================== Kaleidoscope: Implementing a Parser and AST =========================================== diff --git a/docs/tutorial/MyFirstLanguageFrontend/LangImpl03.rst b/docs/tutorial/MyFirstLanguageFrontend/LangImpl03.rst index 5364b172ad9..9b6df015bbd 100644 --- a/docs/tutorial/MyFirstLanguageFrontend/LangImpl03.rst +++ b/docs/tutorial/MyFirstLanguageFrontend/LangImpl03.rst @@ -1,5 +1,3 @@ -:orphan: - ======================================== Kaleidoscope: Code generation to LLVM IR ======================================== @@ -198,7 +196,7 @@ automatically provide each one with an increasing, unique numeric suffix. Local value names for instructions are purely optional, but it makes it much easier to read the IR dumps. -`LLVM instructions <../../LangRef.html#instruction-reference>`_ are constrained by strict +:doc:`LLVM instructions ` are constrained by strict rules: for example, the Left and Right operators of an `add instruction <../../LangRef.html#add-instruction>`_ must have the same type, and the result type of the add must match the operand types. Because all values diff --git a/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst b/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst index b643ae583c3..24c2b0f1755 100644 --- a/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst +++ b/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst @@ -1,5 +1,3 @@ -:orphan: - ============================================== Kaleidoscope: Adding JIT and Optimizer Support ============================================== diff --git a/docs/tutorial/MyFirstLanguageFrontend/LangImpl05.rst b/docs/tutorial/MyFirstLanguageFrontend/LangImpl05.rst index 725423f2d38..11ae79de301 100644 --- a/docs/tutorial/MyFirstLanguageFrontend/LangImpl05.rst +++ b/docs/tutorial/MyFirstLanguageFrontend/LangImpl05.rst @@ -1,5 +1,3 @@ -:orphan: - ================================================== Kaleidoscope: Extending the Language: Control Flow ================================================== diff --git a/docs/tutorial/MyFirstLanguageFrontend/LangImpl06.rst b/docs/tutorial/MyFirstLanguageFrontend/LangImpl06.rst index a05ed0b1a3b..dd3a3f17137 100644 --- a/docs/tutorial/MyFirstLanguageFrontend/LangImpl06.rst +++ b/docs/tutorial/MyFirstLanguageFrontend/LangImpl06.rst @@ -1,5 +1,3 @@ -:orphan: - ============================================================ Kaleidoscope: Extending the Language: User-defined Operators ============================================================ diff --git a/docs/tutorial/MyFirstLanguageFrontend/LangImpl07.rst b/docs/tutorial/MyFirstLanguageFrontend/LangImpl07.rst index 14501fdf643..a30be9894c3 100644 --- a/docs/tutorial/MyFirstLanguageFrontend/LangImpl07.rst +++ b/docs/tutorial/MyFirstLanguageFrontend/LangImpl07.rst @@ -1,5 +1,3 @@ -:orphan: - ======================================================= Kaleidoscope: Extending the Language: Mutable Variables ======================================================= diff --git a/docs/tutorial/MyFirstLanguageFrontend/LangImpl08.rst b/docs/tutorial/MyFirstLanguageFrontend/LangImpl08.rst index bd730fea693..82776006a80 100644 --- a/docs/tutorial/MyFirstLanguageFrontend/LangImpl08.rst +++ b/docs/tutorial/MyFirstLanguageFrontend/LangImpl08.rst @@ -1,5 +1,3 @@ -:orphan: - ======================================== Kaleidoscope: Compiling to Object Code ======================================== diff --git a/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst b/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst index 87584cdb394..4cdecc3ff13 100644 --- a/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst +++ b/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst @@ -1,5 +1,3 @@ -:orphan: - ====================================== Kaleidoscope: Adding Debug Information ====================================== diff --git a/docs/tutorial/MyFirstLanguageFrontend/LangImpl10.rst b/docs/tutorial/MyFirstLanguageFrontend/LangImpl10.rst index 6d8a131509e..dd7d5477898 100644 --- a/docs/tutorial/MyFirstLanguageFrontend/LangImpl10.rst +++ b/docs/tutorial/MyFirstLanguageFrontend/LangImpl10.rst @@ -1,5 +1,3 @@ -:orphan: - ====================================================== Kaleidoscope: Conclusion and other useful LLVM tidbits ====================================================== diff --git a/docs/tutorial/MyFirstLanguageFrontend/index.rst b/docs/tutorial/MyFirstLanguageFrontend/index.rst index dcf9d5814fb..e1e477d57d2 100644 --- a/docs/tutorial/MyFirstLanguageFrontend/index.rst +++ b/docs/tutorial/MyFirstLanguageFrontend/index.rst @@ -2,6 +2,20 @@ My First Language Frontend with LLVM Tutorial ============================================= +.. toctree:: + :hidden: + + LangImpl01 + LangImpl02 + LangImpl03 + LangImpl04 + LangImpl05 + LangImpl06 + LangImpl07 + LangImpl08 + LangImpl09 + LangImpl10 + **Requirements:** This tutorial assumes you know C++, but no previous compiler experience is necessary. @@ -46,7 +60,8 @@ allowing you to skip ahead as you wish: One great thing about LLVM is its support for JIT compilation, so we'll dive right into it and show you the 3 lines it takes to add JIT support. Later chapters show how to generate .o files. -- `Chapter #5: Extending the Language: Control Flow `_ - With the basic language up and running, we show how to extend +- `Chapter #5: Extending the Language: Control Flow `_ - With + the basic language up and running, we show how to extend it with control flow operations ('if' statement and a 'for' loop). This gives us a chance to talk about SSA construction and control flow. diff --git a/docs/tutorial/index.rst b/docs/tutorial/index.rst index 1a5277de4d8..8aa45184902 100644 --- a/docs/tutorial/index.rst +++ b/docs/tutorial/index.rst @@ -6,14 +6,13 @@ Kaleidoscope: Implementing a Language with LLVM =============================================== .. toctree:: - :titlesonly: - :glob: - :numbered: + :hidden: MyFirstLanguageFrontend/index -This is the "Kaleidoscope" Language tutorial, showing how to implement a simple -language using LLVM components in C++. +:doc:`MyFirstLanguageFrontend/index` + This is the "Kaleidoscope" Language tutorial, showing how to implement a simple + language using LLVM components in C++. Kaleidoscope: Implementing a Language with LLVM in Objective Caml =================================================================