1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
llvm-mirror/docs
Serge Guelton b20ef5f960 Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...>
As noted in https://bugs.llvm.org/show_bug.cgi?id=36651, the specialization for
isPodLike<std::pair<...>> did not match the expectation of
std::is_trivially_copyable which makes the memcpy optimization invalid.

This patch renames the llvm::isPodLike trait into llvm::is_trivially_copyable.
Unfortunately std::is_trivially_copyable is not portable across compiler / STL
versions. So a portable version is provided too.

Note that the following specialization were invalid:

    std::pair<T0, T1>
    llvm::Optional<T>

Tests have been added to assert that former specialization are respected by the
standard usage of llvm::is_trivially_copyable, and that when a decent version
of std::is_trivially_copyable is available, llvm::is_trivially_copyable is
compared to std::is_trivially_copyable.

As of this patch, llvm::Optional is no longer considered trivially copyable,
even if T is. This is to be fixed in a later patch, as it has impact on a
long-running bug (see r347004)

Note that GCC warns about this UB, but this got silented by https://reviews.llvm.org/D50296.

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

llvm-svn: 351701
2019-01-20 21:19:56 +00:00
..
_ocamldoc
_static
_templates
_themes/llvm-theme
AMDGPU
CommandGuide [llvm-readobj][ELF]Add demangling support 2019-01-17 15:34:12 +00:00
Frontend
HistoricalNotes
PDB
Proposals Remove misleading line about git's lack of revision numbers. 2019-01-16 16:59:11 +00:00
TableGen
tutorial
AdvancedBuilds.rst
AliasAnalysis.rst
AMDGPUInstructionNotation.rst
AMDGPUInstructionSyntax.rst
AMDGPUModifierSyntax.rst
AMDGPUOperandSyntax.rst [AMDGPU][MC][GFX8+][DISASSEMBLER] Corrected 1/2pi value for 64-bit operands 2019-01-18 15:17:17 +00:00
AMDGPUUsage.rst
ARM-BE-bitcastfail.png
ARM-BE-bitcastsuccess.png
ARM-BE-ld1.png
ARM-BE-ldr.png
Atomics.rst
Benchmarking.rst
BigEndianNEON.rst
BitCodeFormat.rst
BlockFrequencyTerminology.rst
BranchWeightMetadata.rst
BugLifeCycle.rst
Bugpoint.rst
CFIVerify.rst
CMake.rst [NFC] Factor out + document build requirements 2019-01-16 22:22:38 +00:00
CMakeLists.txt
CMakePrimer.rst
CodeGenerator.rst
CodeOfConduct.rst
CodingStandards.rst Update the coding standards with the new file header. 2019-01-19 11:53:58 +00:00
CommandLine.rst
CompileCudaWithLLVM.rst
CompilerWriterInfo.rst [docs] Fix formatting. 2019-01-17 00:31:35 +00:00
conf.py Bump the trunk version to 9.0.0svn 2019-01-16 10:57:02 +00:00
Contributing.rst
Coroutines.rst
CoverageMappingFormat.rst
DebuggingJITedCode.rst
DeveloperPolicy.rst Install new LLVM license structure and new developer policy. 2019-01-19 06:14:24 +00:00
Docker.rst
doxygen-mainpage.dox
doxygen.cfg.in
ExceptionHandling.rst
ExtendedIntegerResults.txt
ExtendingLLVM.rst Remove TypeBuilder.h, and fix the few locations using it. 2019-01-13 16:09:28 +00:00
Extensions.rst
FAQ.rst
FaultMaps.rst
FuzzingLLVM.rst
GarbageCollection.rst
gcc-loops.png
GetElementPtr.rst
GettingStarted.rst Update GettingStarted guide to recommend that people use the new 2019-01-14 22:27:32 +00:00
GettingStartedVS.rst
GlobalISel.rst
GoldPlugin.rst
HowToAddABuilder.rst
HowToBuildOnARM.rst
HowToBuildWithPGO.rst
HowToCrossCompileBuiltinsOnArm.rst
HowToCrossCompileLLVM.rst
HowToReleaseLLVM.rst
HowToSetUpLLVMStyleRTTI.rst
HowToSubmitABug.rst
HowToUseAttributes.rst
HowToUseInstrMappings.rst
InAlloca.rst
index.rst Update GettingStarted guide to recommend that people use the new 2019-01-14 22:27:32 +00:00
LangRef.rst [NFX] Fix language reference title declaration 2019-01-19 09:40:14 +00:00
Lexicon.rst
LibFuzzer.rst
LinkTimeOptimization.rst
linpack-pc.png
llvm-objdump.1 Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LLVMBuild.rst
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
make.bat
Makefile.sphinx
MarkdownQuickstartTemplate.md
MarkedUpDisassembly.rst
MCJIT-creation.png
MCJIT-dyld-load.png
MCJIT-engine-builder.png
MCJIT-load-object.png
MCJIT-load.png
MCJIT-resolve-relocations.png
MCJITDesignAndImplementation.rst
MemorySSA.rst
MergeFunctions.rst
MIRLangRef.rst
NVPTXUsage.rst
OptBisect.rst
Packaging.rst
Passes.rst
Phabricator.rst Update GettingStarted guide to recommend that people use the new 2019-01-14 22:27:32 +00:00
ProgrammersManual.rst Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...> 2019-01-20 21:19:56 +00:00
Projects.rst
re_format.7
README.txt
ReleaseNotes.rst Bump the trunk version to 9.0.0svn 2019-01-16 10:57:02 +00:00
ReleaseProcess.rst
ReportingGuide.rst
ScudoHardenedAllocator.rst
SegmentedStacks.rst
SourceLevelDebugging.rst Remove irrelevant references to legacy git repositories from 2019-01-15 16:18:52 +00:00
speculative_load_hardening_microbenchmarks.png
SpeculativeLoadHardening.md
SphinxQuickstartTemplate.rst
StackMaps.rst
StackSafetyAnalysis.rst
Statepoints.rst
SupportLibrary.rst
SystemLibrary.rst
TableGenFundamentals.rst
TestingGuide.rst
TestSuiteGuide.md
TestSuiteMakefileGuide.rst
TransformMetadata.rst
TypeMetadata.rst Update GettingStarted guide to recommend that people use the new 2019-01-14 22:27:32 +00:00
Vectorizers.rst Update GettingStarted guide to recommend that people use the new 2019-01-14 22:27:32 +00:00
WritingAnLLVMBackend.rst
WritingAnLLVMPass.rst
XRay.rst
XRayExample.rst
XRayFDRFormat.rst
yaml2obj.rst
YamlIO.rst

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