llvm/docs
George Karpenkov 92aa19c981 [lit] add a -vv option to echo all executed commands.
Debugging LIT scripts can be rather painful, as LIT directly does not
specify which line has failed.
Rather, FileCheck is expected to report the failing location, but it can
be often ambiguous if multiple commands are tested against the same
prefix.  This change adds a -vv option, which echoes all output.
Then detecting the error becomes straightforward: last printed line is
the failing one.

Of course, it could be desired to try to get failing line number
directly from bash, but it involves excessive hacks on older bash
versions (cf.
https://stackoverflow.com/questions/24398691/how-to-get-the-real-line-number-of-a-failing-bash-command)

Differential Revision: https://reviews.llvm.org/D35330

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307938 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-13 19:26:27 +00:00
..
_ocamldoc [OCaml] Use a nicer style for documentation than OCaml default. 2015-07-17 06:37:59 +00:00
_static Fix some typos in the doc 2016-08-28 20:29:18 +00:00
_templates [docs] Convert docs index page into Sphinx. 2012-04-19 16:31:37 +00:00
_themes/llvm-theme Sphinx CSS: remove negative letter-spacing, it makes some fonts look really 2012-09-30 20:43:24 +00:00
CommandGuide [lit] add a -vv option to echo all executed commands. 2017-07-13 19:26:27 +00:00
Frontend [docs][PerformanceTips] Add text on allocas and alignment 2015-09-10 17:03:10 +00:00
HistoricalNotes [typo] An LLVM. 2013-08-16 23:30:19 +00:00
PDB Add documentation for the PDB Module Info stream. 2016-11-29 22:14:56 +00:00
Proposals fix various typos 2017-06-26 02:45:39 +00:00
TableGen Improvements to TableGen/LangIntro.rst 2017-05-02 13:47:10 +00:00
tutorial [docs] NFC: Fix links in the tutorial 2017-07-10 09:07:23 +00:00
AdvancedBuilds.rst Fixing autocorrect changing cmake->make 2016-03-18 22:11:51 +00:00
AliasAnalysis.rst Invariant.group and mustalias docs fixes 2017-04-12 07:59:35 +00:00
AMDGPUUsage.rst Correct GFX9 processor names. 2017-07-07 03:10:01 +00:00
ARM-BE-bitcastfail.png [ARM64-BE] Add sphinx documentation for the ARM64 NEON implementation. 2014-05-12 15:13:39 +00:00
ARM-BE-bitcastsuccess.png [ARM64-BE] Add sphinx documentation for the ARM64 NEON implementation. 2014-05-12 15:13:39 +00:00
ARM-BE-ld1.png [ARM64-BE] Add sphinx documentation for the ARM64 NEON implementation. 2014-05-12 15:13:39 +00:00
ARM-BE-ldr.png [ARM64-BE] Add sphinx documentation for the ARM64 NEON implementation. 2014-05-12 15:13:39 +00:00
Atomics.rst fix some various typos in the doc 2016-07-02 19:28:40 +00:00
Benchmarking.rst Add some tips on benchmarking. 2017-05-24 16:39:12 +00:00
BigEndianNEON.rst Fix typos 2014-05-15 01:52:21 +00:00
BitCodeFormat.rst Bitcode: Add a string table to the bitcode format. 2017-04-17 17:51:36 +00:00
BlockFrequencyTerminology.rst Fix typos 2014-05-15 01:52:21 +00:00
BranchWeightMetadata.rst [Doc] Document prof metadata in LangRef 2017-06-15 15:57:12 +00:00
Bugpoint.rst Correct 'teh' and other typos / repeated words. 2015-04-14 20:52:58 +00:00
CMake.rst [Docs] Updating CMake docs to include LLVM_REVERSE_ITERATION 2017-07-10 17:37:36 +00:00
CMakeLists.txt Revert "Revert "CMake: Move sphinx detection into AddSphinxTarget.cmake"" 2017-05-09 01:41:28 +00:00
CMakePrimer.rst [docs] Remove obsolete section in CMake documentation. 2017-07-10 18:56:51 +00:00
CodeGenerator.rst Add documentation for various aspects of the AMDGPU backend. 2017-06-06 20:31:59 +00:00
CodeOfConduct.rst [Conduct] Refine what "rare cases" means wrt violations outside our spaces. 2016-07-06 19:32:41 +00:00
CodingStandards.rst Fix some remaining documentation references to MSVC 2013 2016-12-15 19:08:02 +00:00
CommandLine.rst Update CommandLine.rst getRegisteredOptions example 2016-11-07 02:43:01 +00:00
CompileCudaWithLLVM.rst [Docs] Update docs to indicate that CUDA compilation is supported on Windows. 2017-01-05 16:54:28 +00:00
CompilerWriterInfo.rst Add documentation for various aspects of the AMDGPU backend. 2017-06-06 20:31:59 +00:00
conf.py docs/conf.py: Suppress sphinx highlighting failure warnings 2017-02-10 00:00:22 +00:00
Coroutines.rst fix trivial typos in documents; NFC 2017-07-02 12:44:27 +00:00
CoverageMappingFormat.rst fix some typos in the doc 2017-01-14 11:37:01 +00:00
DebuggingJITedCode.rst docs: Fix long standing linking antipattern. 2013-01-11 02:28:08 +00:00
DeveloperPolicy.rst Update Bugzilla URLs in docs 2017-02-17 08:26:11 +00:00
Docker.rst Made a script to build docker images easier to use. 2017-07-06 12:46:51 +00:00
doxygen-mainpage.dox [docs] Updated docs to work with Doxygen 1.8.11 2016-03-06 03:50:08 +00:00
doxygen.cfg.in Sync with changes from r300825 in clang. 2017-04-27 17:23:53 +00:00
ExceptionHandling.rst [docs] Fixing Sphinx warnings to unclog the buildbot 2016-07-20 12:16:38 +00:00
ExtendedIntegerResults.txt
ExtendingLLVM.rst [WinEH] Add llvm.eh.exceptionpointer intrinsic 2015-09-03 09:15:32 +00:00
Extensions.rst Change section flag character for SHF_LINK_ORDER to "o". 2017-04-04 22:35:08 +00:00
FAQ.rst fix some typos in the doc 2016-07-28 09:28:58 +00:00
FaultMaps.rst Fix the docs build 2017-02-07 20:36:03 +00:00
GarbageCollection.rst Tidy up example of getting the pointer size. 2016-10-14 05:45:46 +00:00
gcc-loops.png Update the gcc-loops benchmark 2013-01-20 07:01:04 +00:00
GetElementPtr.rst [Doc] Fix getelementptr description about arguments 2017-06-19 05:34:21 +00:00
GettingStarted.rst Fix git command line in the Getting Started guide. 2017-05-15 22:32:34 +00:00
GettingStartedVS.rst Update the documentation and CMake file for Visual Studio generators. 2017-05-25 21:01:30 +00:00
GlobalISel.rst [AArch64][GlobalISel] Legalize narrow scalar ops again. 2017-01-23 21:10:05 +00:00
GoldPlugin.rst [docs] As of binutils 2.21.51.0.2, ld.bfd supports plugins too, represent this in docs 2017-06-23 13:54:10 +00:00
HowToAddABuilder.rst Added more info on silent master to the doc. 2017-07-05 20:45:44 +00:00
HowToBuildOnARM.rst [Docs] Change ARM build info to CMake 2015-11-06 18:39:34 +00:00
HowToCrossCompileLLVM.rst [docs] Fix unexpected indentation in HowToCrossCompileLLVM.rst 2016-05-10 14:02:46 +00:00
HowToReleaseLLVM.rst Adding RELEASE_TESTERS.TXT 2016-07-21 16:46:44 +00:00
HowToSetUpLLVMStyleRTTI.rst [docs][LLVM-style RTTI] Add a mention of multiple inheritance. 2015-02-07 01:16:26 +00:00
HowToSubmitABug.rst Update Bugzilla URLs in docs 2017-02-17 08:26:11 +00:00
HowToUseAttributes.rst Fix RST docs AttributeList heading underline 2017-03-21 17:05:00 +00:00
HowToUseInstrMappings.rst [docs] Fixing Sphinx warnings to unclog the buildbot 2016-07-20 12:16:38 +00:00
InAlloca.rst [docs] Fixing Sphinx warnings to unclog the buildbot 2016-07-20 12:16:38 +00:00
index.rst Added Dockerfiles to build clang from sources. 2017-06-30 09:46:45 +00:00
LangRef.rst Add element atomic memset intrinsic 2017-07-12 21:57:23 +00:00
Lexicon.rst [Lexicon] Add GVN 2017-06-13 03:06:16 +00:00
LibFuzzer.rst fix typo in document; NFC 2017-07-12 12:16:22 +00:00
LinkTimeOptimization.rst [docs] Typos and whitespace fixed in LTO docs. 2016-11-29 18:00:31 +00:00
linpack-pc.png Update the linpack benchmark with different array sizes. 2013-01-20 06:52:47 +00:00
LLVMBuild.rst Fix LLVMBuild.txt typo. NFC 2017-04-03 18:21:50 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
make.bat [docs] Stub out structure for Sphinx-based docs. 2012-04-19 16:31:19 +00:00
Makefile.sphinx Bring back Makefile.sphinx 2016-03-23 00:30:57 +00:00
MarkedUpDisassembly.rst [docs] Fixing Sphinx warnings to unclog the buildbot 2016-07-20 12:16:38 +00:00
MCJIT-creation.png Adding a document to describe the MCJIT execution engine implementation. 2013-08-21 22:15:09 +00:00
MCJIT-dyld-load.png Adding a document to describe the MCJIT execution engine implementation. 2013-08-21 22:15:09 +00:00
MCJIT-engine-builder.png Adding a document to describe the MCJIT execution engine implementation. 2013-08-21 22:15:09 +00:00
MCJIT-load-object.png Adding a document to describe the MCJIT execution engine implementation. 2013-08-21 22:15:09 +00:00
MCJIT-load.png Adding a document to describe the MCJIT execution engine implementation. 2013-08-21 22:15:09 +00:00
MCJIT-resolve-relocations.png Adding a document to describe the MCJIT execution engine implementation. 2013-08-21 22:15:09 +00:00
MCJITDesignAndImplementation.rst Fix several accidental DOS line endings in source files 2016-01-03 17:22:03 +00:00
MemorySSA.rst Fix some typos in the doc 2016-08-28 20:29:18 +00:00
MergeFunctions.rst [docs] Fixing Sphinx warnings to unclog the buildbot 2016-07-20 12:16:38 +00:00
MIRLangRef.rst MIParser/MIRPrinter: Compute block successors if not explicitely specified 2017-05-05 21:09:30 +00:00
NVPTXUsage.rst Update NVVMReflect usage doc to new idiom for adding target-specific early passes. 2017-01-27 19:44:24 +00:00
OptBisect.rst Remove opt-bisect support for "cases" in favor of debug counters 2017-03-11 01:41:03 +00:00
Packaging.rst docs: Fix long standing linking antipattern. 2013-01-11 02:28:08 +00:00
Passes.rst Remove the ScalarReplAggregates pass 2016-06-15 00:19:09 +00:00
Phabricator.rst docs/Phabricator: Better git examples to produce full context patches 2017-06-15 22:09:30 +00:00
ProgrammersManual.rst [docs] Simplify some language for Error/cantFail in the programmer's manual. 2017-04-30 17:24:52 +00:00
Projects.rst Rename all references to old mailing lists to new lists.llvm.org address. 2015-08-05 03:51:17 +00:00
re_format.7
README.txt Remove test commit change. 2017-06-24 20:13:32 +00:00
ReleaseNotes.rst Remove the BBVectorize pass. 2017-06-30 07:09:08 +00:00
ReleaseProcess.rst [OPENMP] Make -fopenmp to turn on OpenMP support by default. 2015-12-10 05:45:58 +00:00
ReportingGuide.rst fix some various typos in the doc 2016-07-02 19:28:40 +00:00
ScudoHardenedAllocator.rst [docs] Documentation update for Scudo 2017-02-09 16:07:52 +00:00
SegmentedStacks.rst [docs] Fixing Sphinx warnings to unclog the buildbot 2016-07-20 12:16:38 +00:00
SourceLevelDebugging.rst PR32382: Fix emitting complex DWARF expressions. 2017-04-18 01:21:53 +00:00
SphinxQuickstartTemplate.rst [docs] Provide pointer for building Sphinx docs. 2013-02-27 18:33:21 +00:00
StackMaps.rst [StackMaps] Increase the size of the "location size" field 2017-04-28 04:48:42 +00:00
Statepoints.rst Statepoint Docs: fix incorrect uses of it's 2017-04-19 23:55:03 +00:00
SystemLibrary.rst remove the rest of the "written by" lines in the documentation. It is 2013-01-10 21:24:04 +00:00
TableGenFundamentals.rst Recover TableGen/LangRef, make it official 2014-04-01 09:51:49 +00:00
TestingGuide.rst [docs] cleanup documentation on lit substitutions 2017-02-09 14:12:30 +00:00
TestSuiteMakefileGuide.rst Fix the docs I broke 2016-03-11 23:31:02 +00:00
TypeMetadata.rst IR: New representation for CFI and virtual call optimization pass metadata. 2016-06-24 21:21:32 +00:00
Vectorizers.rst [docs] Update name of vectorization interleave flag. 2017-05-31 23:02:55 +00:00
WritingAnLLVMBackend.rst fix some typos in the doc 2017-01-14 11:37:01 +00:00
WritingAnLLVMPass.rst [docs] Make WritingAnLLVMPass.rst up-to-date with current state of things 2016-09-27 12:07:21 +00:00
XRay.rst Fixed misplaced table border in the docs. 2017-06-30 09:47:17 +00:00
XRayExample.rst [XRay][docs] Fix hyperlink to XRay doc 2017-04-06 04:26:26 +00:00
yaml2obj.rst Summary: 2015-07-28 16:18:17 +00:00
YamlIO.rst fix some typos in the doc 2017-01-14 11:37:01 +00:00

LLVM Documentation
==================

LLVM's documentation is written in reStructuredText, a lightweight
plaintext markup language (file extension `.rst`). While the
reStructuredText documentation should be quite readable in source form, it
is mostly meant to be processed by the Sphinx documentation generation
system to create HTML pages which are hosted on <http://llvm.org/docs/> and
updated after every commit. Manpage output is also supported, see below.

If you instead would like to generate and view the HTML locally, install
Sphinx <http://sphinx-doc.org/> and then do:

    cd <build-dir>
    cmake -DLLVM_ENABLE_SPHINX=true -DSPHINX_OUTPUT_HTML=true <src-dir>
    make -j3 docs-llvm-html
    $BROWSER <build-dir>/docs//html/index.html

The mapping between reStructuredText files and generated documentation is
`docs/Foo.rst` <-> `<build-dir>/docs//html/Foo.html` <-> `http://llvm.org/docs/Foo.html`.

If you are interested in writing new documentation, you will want to read
`SphinxQuickstartTemplate.rst` which will get you writing documentation
very fast and includes examples of the most important reStructuredText
markup syntax.

Manpage Output
===============

Building the manpages is similar to building the HTML documentation. The
primary difference is to use the `man` makefile target, instead of the
default (which is `html`). Sphinx then produces the man pages in the
directory `<build-dir>/docs/man/`.

    cd <build-dir>
    cmake -DLLVM_ENABLE_SPHINX=true -DSPHINX_OUTPUT_MAN=true <src-dir>
    make -j3 docs-llvm-man
    man -l >build-dir>/docs/man/FileCheck.1

The correspondence between .rst files and man pages is
`docs/CommandGuide/Foo.rst` <-> `<build-dir>/docs//man/Foo.1`.
These .rst files are also included during HTML generation so they are also
viewable online (as noted above) at e.g.
`http://llvm.org/docs/CommandGuide/Foo.html`.

Checking links
==============

The reachability of external links in the documentation can be checked by
running:

    cd docs/
    make -f Makefile.sphinx linkcheck

Doxygen page Output
==============

Install doxygen <http://www.stack.nl/~dimitri/doxygen/download.html> and dot2tex <https://dot2tex.readthedocs.io/en/latest>.

    cd <build-dir>
    cmake -DLLVM_ENABLE_DOXYGEN=On <llvm-top-src-dir>
    make doxygen-llvm # for LLVM docs
    make doxygen-clang # for clang docs

It will generate html in
    
    <build-dir>/docs/doxygen/html # for LLVM docs
    <build-dir>/tools/clang/docs/doxygen/html # for clang docs