summaryrefslogtreecommitdiffstats
path: root/clang/docs/UsersManual.rst
Commit message (Collapse)AuthorAgeFilesLines
...
* [Profile] Document new profile file name modifiersXinliang David Li2016-07-201-2/+34
| | | | | | Differential Revision: http://reviews.llvm.org/D22593 llvm-svn: 276207
* [Driver] Add flags for enabling both types of PGO InstrumentationSean Silva2016-07-161-10/+12
| | | | | | | | | | | | The flags: Enable IR-level instrumentation -fprofile-generate or -fprofile-generate= When applying profile data: -fprofile-use=/path/to/profdata Patch by Jake VanAdrighem! Differential Revision: https://reviews.llvm.org/D21823 llvm-svn: 275668
* Removing a few more :option: tags that we do not have corresponding .. ↵Aaron Ballman2016-07-151-9/+9
| | | | | | option directives for; these are causing the sphinx bot to fail (http://lab.llvm.org:8011/builders/clang-sphinx-docs/builds/15214/steps/docs-clang-html/logs/stdio). llvm-svn: 275560
* Removing a few more :option: tags that we do not have corresponding .. ↵Aaron Ballman2016-07-151-7/+7
| | | | | | option directives for; these are causing the sphinx bot to fail (http://lab.llvm.org:8011/builders/clang-sphinx-docs/builds/15213/steps/docs-clang-html/logs/stdio). llvm-svn: 275558
* Despite there being an option, it seems that Sphinx has decided that "=123" ↵Aaron Ballman2016-07-141-2/+2
| | | | | | is part of the option directive name, and so having "=0" in the option tag is problematic. Since the option tag is part of the option directive definition, it's superfluous, and so I've removed it. llvm-svn: 275440
* [Docs] More warning fixes to unbreak the docs buildbot.George Burgess IV2016-06-211-7/+12
| | | | | | | | | | | | | A number of warnings still remain, but these were the last of the "unlexable code"-related ones (AFAICT). I changed a few examples in docs/UsersManual.rst to showcase -Wextra-tokens because it's already documented (-Wmultichar isn't), and the sphinx C lexer apparently can't handle char literals like 'ab'. It seemed like a better overall approach than just marking the code blocks as none or console. llvm-svn: 273232
* [mips] Compact branch policy setting.Simon Dardis2016-05-271-0/+10
| | | | | | | | | | | | | | This patch adds the commandline option -mcompact-branches={never,optimal,always), which controls how LLVM generates compact branches for MIPSR6 targets. By default, the compact branch policy is 'optimal' where LLVM will generate the most appropriate branch for any situation. The 'never' and 'always' policy will disable or always generate compact branches wherever possible respectfully. Reviewers: dsanders, vkalintiris, atanasyan Differential Revision: http://reviews.llvm.org/D20729 llvm-svn: 271000
* Update -ffast-math documentation to match reality.Justin Lebar2016-05-201-0/+13
| | | | | | | | | | Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20457 llvm-svn: 270279
* fix docsKostya Serebryany2016-05-041-0/+1
| | | | llvm-svn: 268541
* document -f[no-]sanitize-recover=all and mention it in warning messagesKostya Serebryany2016-05-041-0/+1
| | | | llvm-svn: 268540
* Re-apply r267784, r267824 and r267830.Peter Collingbourne2016-04-281-11/+2
| | | | | | I have updated the compiler-rt tests. llvm-svn: 267903
* Revert r267784, r267824 and r267830.Benjamin Kramer2016-04-281-2/+11
| | | | | | | | | | It makes compiler-rt tests fail if the gold plugin is enabled. Revert "Rework interface for bitset-using features to use a notion of LTO visibility." Revert "Driver: only produce CFI -fvisibility= error when compiling." Revert "clang/test/CodeGenCXX/cfi-blacklist.cpp: Exclude ms targets. They would be non-cfi." llvm-svn: 267871
* Rework interface for bitset-using features to use a notion of LTO visibility.Peter Collingbourne2016-04-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bitsets, and the compiler features they rely on (vtable opt, CFI), only have visibility within the LTO'd part of the linkage unit. Therefore, only enable these features for classes with hidden LTO visibility. This notion is based on object file visibility or (on Windows) dllimport/dllexport attributes. We provide the [[clang::lto_visibility_public]] attribute to override the compiler's LTO visibility inference in cases where the class is defined in the non-LTO'd part of the linkage unit, or where the ABI supports calling classes derived from abstract base classes with hidden visibility in other linkage units (e.g. COM on Windows). If the cross-DSO CFI mode is enabled, bitset checks are emitted even for classes with public LTO visibility, as that mode uses a separate mechanism to cause bitsets to be exported. This mechanism replaces the whole-program-vtables blacklist, so remove the -fwhole-program-vtables-blacklist flag. Because __declspec(uuid()) now implies [[clang::lto_visibility_public]], the support for the special attr:uuid blacklist entry is removed. Differential Revision: http://reviews.llvm.org/D18635 llvm-svn: 267784
* Update the description of Clang's MSVC compatibility flagsReid Kleckner2016-03-281-24/+13
| | | | llvm-svn: 264651
* Add whole-program vtable optimization feature to Clang.Peter Collingbourne2016-02-241-0/+15
| | | | | | | | | This patch introduces the -fwhole-program-vtables flag, which enables the whole-program vtable optimization feature (D16795) in Clang. Differential Revision: http://reviews.llvm.org/D16821 llvm-svn: 261767
* UsersManual: update clang-cl commandsHans Wennborg2016-02-121-5/+7
| | | | llvm-svn: 260637
* Partial revert of rL260506.Andrey Bokhanko2016-02-111-0/+3
| | | | | | | | After some experiments I discovered that clang doesn't support static initialization of flexible array members in full, so restored this paragraph in "GCC extensions not implemented yet" list. llvm-svn: 260519
* Update of "GCC extensions not implemented yet" in Clang User's ManualAndrey Bokhanko2016-02-111-10/+0
| | | | | | | | | | #pragma weak, global register variables and static initialization of flexible array members are supported now, so they are removed from "GCC extensions not implemented yet" list. Differential Revision: http://reviews.llvm.org/D16851 llvm-svn: 260506
* [MSVC Compat] Only warn for unknown clang-cl argumentsEhsan Akhgari2016-01-251-2/+3
| | | | | | | | | | | | | | | | | Summary: MSVC's driver accepts all unknown arguments but warns about them. clang by default rejects all unknown arguments. This causes issues specifically with build systems such as autoconf which liberally pass things such as $LDFLAGS to the compiler and expect everything to work. This patch teaches clang-cl to ignore unknown driver arguments. Reviewers: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16511 llvm-svn: 258720
* Introduce -fsanitize-stats flag.Peter Collingbourne2016-01-161-0/+5
| | | | | | | | | This is part of a new statistics gathering feature for the sanitizers. See clang/docs/SanitizerStats.rst for further info and docs. Differential Revision: http://reviews.llvm.org/D16175 llvm-svn: 257971
* Driver part of debugger tuning.Paul Robinson2015-12-191-1/+19
| | | | | | | | | | | | | | | | Adds driver options named -glldb and -gsce to mean -g plus tuning for lldb and SCE debuggers respectively; the existing -ggdb option does the same for gdb. Existing options -ggdb0, -ggdb1 etc. unpack into -ggdb -g<N>. (There will not be -glldb<N> or -gsce<N> options.) The tuning gets a target-specific default in the driver, and is passed into cc1 with the new -debugger-tuning option. As fallout, fixes where '-gsplit-dwarf -g0' would ignore the -g0 part on Linux. Differential Revision: http://reviews.llvm.org/D15651 llvm-svn: 256104
* Cross-DSO control flow integrity (Clang part).Evgeniy Stepanov2015-12-151-0/+6
| | | | | | | | | | | | | | Clang-side cross-DSO CFI. * Adds a command line flag -f[no-]sanitize-cfi-cross-dso. * Links a runtime library when enabled. * Emits __cfi_slowpath calls is bitset test fails. * Emits extra hash-based bitsets for external CFI checks. * Sets a module flag to enable __cfi_check generation during LTO. This mode does not yet support diagnostics. llvm-svn: 255694
* [clang-cl] Let /W4 map to -Wall -Wextra instead of just -Wall.Nico Weber2015-12-111-1/+1
| | | | | | | | | There's no way to make a flag alias to two flags, so add a /WCL4 flag that maps to the All, Extra diag groups. Fixes PR25563. http://reviews.llvm.org/D15350 llvm-svn: 255382
* [OPENMP] Make -fopenmp to turn on OpenMP support by default, clang partAlexey Bataev2015-12-101-2/+2
| | | | | | | Patch turns on OpenMP support in clang by default after fixing OpenMP buildbots. Differential Revision: http://reviews.llvm.org/D13803 llvm-svn: 255223
* Fix a typo in the clang user manual.Yunzhong Gao2015-12-101-2/+2
| | | | | | -fmax-unknown-pointer-align => -fmax-type-align llvm-svn: 255200
* [Docs] One more cleanup of -fsanitize= section.Alexey Samsonov2015-12-041-17/+14
| | | | | | | Describe -fsanitize-blacklist flags in separate paragraphs, move notes about importance of clang++ for vptr down to UBSan docs. llvm-svn: 254798
* [Docs] Update MSan docsAlexey Samsonov2015-12-041-27/+2
| | | | | | | | | | | | | | Summary: 1. Move MSan-specific flags and features from user manual to MSan page. 2. Update current status / list of supported platforms. Reviewers: eugenis, kcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15246 llvm-svn: 254788
* [Docs] Move the list of CFI schemes down to CFI doc, and update it.Alexey Samsonov2015-12-041-13/+2
| | | | | | | | | | | | | Use proper headling levels in CFI doc. Before that, all sections were considered a subsection of "Introduction". Reviewers: pcc, kcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15237 llvm-svn: 254771
* [Docs] Remove false claim: UBSan can also be combined with TSan/MSan.Alexey Samsonov2015-12-041-2/+1
| | | | llvm-svn: 254734
* Clang documentation for UBSan.Alexey Samsonov2015-12-041-61/+8
| | | | | | | | | | | | | | | | | | | | | | Summary: Create a separate page describing UBSan tool, move the description of fine-grained checks there, provide extra information about supported platforms, symbolization etc. This text is compiled from four parts: * Existing documentation copied from User's Manual * Layout used in documentation for another sanitizers (ASan, MSan etc.) * Text written from scratch * Small parts taken from Michael Morrison's attempt at creating UBSan page: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20141215/249503.html Reviewers: kcc, rsmith, silvas Subscribers: tberghammer, danalbert, srhines, kcc Differential Revision: http://reviews.llvm.org/D15217 llvm-svn: 254733
* Revert r253582: "clang-cl: Make /W4 imply -Wall -Wextra (PR25563)"Hans Wennborg2015-11-201-1/+1
| | | | | | | | | | The patch expanded the flag *at the end*, breaking invocations like: clang-cl /W4 -Wno-unused-parameter Reverting for now. llvm-svn: 253678
* clang-cl: Make /W4 imply -Wall -Wextra (PR25563)Hans Wennborg2015-11-191-1/+1
| | | | llvm-svn: 253582
* [ASan] Allow -fsanitize-recover=address.Yury Gribov2015-11-111-2/+3
| | | | | | Differential Revision: http://reviews.llvm.org/D14243 llvm-svn: 252721
* Sample Profiles - Fix location of binary encoding documentation. NFC.Diego Novillo2015-10-191-1/+1
| | | | llvm-svn: 250705
* Sample profiles - Update text profile documentation.Diego Novillo2015-10-141-12/+54
| | | | | | | There's been some changes to the text encoding for sample profiles. This updates the documentation and an example. llvm-svn: 250310
* Updating docs for MSan to describe poison-in-dtor.Naomi Musgrave2015-09-171-0/+10
| | | | | | | | | | | | | | | | | | Summary: Describe the compile and runtime flags to enable MemorySanitizer detection of use-after-destroy. Reviewers: eugenis Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12914 Revise doc description of use-after-dtor. Change wording to specify memory no longer readable. llvm-svn: 247871
* [OPENMP] Info about OpenMP Support in Users Manual, NFC.Alexey Bataev2015-08-241-0/+26
| | | | | | Differential Revision: http://reviews.llvm.org/D12152 llvm-svn: 245823
* Docs: update clang-cl command-line documentationHans Wennborg2015-08-121-22/+59
| | | | llvm-svn: 244794
* Add flags to disable profile generation.Diego Novillo2015-08-051-0/+13
| | | | | | | | | | | | This patch adds flags -fno-profile-instr-generate and -fno-profile-instr-use, and the GCC aliases -fno-profile-generate and -fno-profile-use. These flags are used in situations where users need to disable profile generation or use for specific files in a build, without affecting other files. llvm-svn: 244153
* Grammar: Don't imply that a program wouldn't want a person as its output.Douglas Katzman2015-08-031-2/+2
| | | | | | (Because, hey, who wouldn't?) llvm-svn: 243901
* Add -femulated-tls flag to select the emulated TLS model.Chih-Hung Hsieh2015-07-281-0/+7
| | | | | | | | | This will be used for old targets like Android that do not support ELF TLS models. Differential Revision: http://reviews.llvm.org/D10524 llvm-svn: 243441
* Add GCC-compatible flags -fprofile-generate and -fprofile-use.Diego Novillo2015-07-091-0/+39
| | | | | | | | | | | | | | | | | | This patch adds support for specifying where the profile is emitted in a way similar to GCC. These flags are used to specify directories instead of filenames. When -fprofile-generate=DIR is used, the compiler will generate code to write to <DIR>/default.profraw. The patch also adds a couple of extensions: LLVM_PROFILE_FILE can still be used to override the directory and file name to use and -fprofile-use accepts both directories and filenames. To simplify the set of flags used in the backend, all the flags get canonicalized to -fprofile-instr-{generate,use} when passed to the backend. The decision to use a default name for the profile is done in the driver. llvm-svn: 241825
* [CFI] Require -flto instead of implying it.Alexey Samsonov2015-06-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is unfortunate, but would let us land http://reviews.llvm.org/D10467, that makes ToolChains responsible for computing the set of sanitizers they support. Unfortunately, Darwin ToolChains doesn't know about actual OS they target until ToolChain::TranslateArgs() is called. In particular, it means we won't be able to construct SanitizerArgs for these ToolChains before that. This change removes SanitizerArgs::needsLTO() method, so that now ToolChain::IsUsingLTO(), which is called very early, doesn't need SanitizerArgs to implement this method. Docs and test cases are updated accordingly. See https://llvm.org/bugs/show_bug.cgi?id=23539, which describes why we start all these. Test Plan: regression test suite Reviewers: pcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D10560 llvm-svn: 240170
* Implement diagnostic mode for -fsanitize=cfi*, -fsanitize=cfi-diag.Peter Collingbourne2015-06-191-4/+6
| | | | | | | | | | | | | | | | | This causes programs compiled with this flag to print a diagnostic when a control flow integrity check fails instead of aborting. Diagnostics are printed using UBSan's runtime library. The main motivation of this feature over -fsanitize=vptr is fidelity with the -fsanitize=cfi implementation: the diagnostics are printed under exactly the same conditions as those which would cause -fsanitize=cfi to abort the program. This means that the same restrictions apply regarding compiling all translation units with -fsanitize=cfi, cross-DSO virtual calls are forbidden, etc. Differential Revision: http://reviews.llvm.org/D10268 llvm-svn: 240109
* Introduce -fsanitize-trap= flag.Peter Collingbourne2015-06-181-15/+31
| | | | | | | | | | | | | | | | | | | | | | | | This flag controls whether a given sanitizer traps upon detecting an error. It currently only supports UBSan. The existing flag -fsanitize-undefined-trap-on-error has been made an alias of -fsanitize-trap=undefined. This change also cleans up some awkward behavior around the combination of -fsanitize-trap=undefined and -fsanitize=undefined. Previously we would reject command lines containing the combination of these two flags, as -fsanitize=vptr is not compatible with trapping. This required the creation of -fsanitize=undefined-trap, which excluded -fsanitize=vptr (and -fsanitize=function, but this seems like an oversight). Now, -fsanitize=undefined is an alias for -fsanitize=undefined-trap, and if -fsanitize-trap=undefined is specified, we treat -fsanitize=vptr as an "unsupported" flag, which means that we error out if the flag is specified explicitly, but implicitly disable it if the flag was implied by -fsanitize=undefined. Differential Revision: http://reviews.llvm.org/D10464 llvm-svn: 240105
* Protection against stack-based memory corruption errors using SafeStack: ↵Peter Collingbourne2015-06-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Clang command line option and function attribute This patch adds the -fsanitize=safe-stack command line argument for clang, which enables the Safe Stack protection (see http://reviews.llvm.org/D6094 for the detailed description of the Safe Stack). This patch is our implementation of the safe stack on top of Clang. The patches make the following changes: - Add -fsanitize=safe-stack and -fno-sanitize=safe-stack options to clang to control safe stack usage (the safe stack is disabled by default). - Add __attribute__((no_sanitize("safe-stack"))) attribute to clang that can be used to disable the safe stack for individual functions even when enabled globally. Original patch by Volodymyr Kuznetsov and others at the Dependable Systems Lab at EPFL; updates and upstreaming by myself. Differential Revision: http://reviews.llvm.org/D6095 llvm-svn: 239762
* Improve user documentation on profiling.Diego Novillo2015-05-281-14/+57
| | | | | | | | This clarifies the relationship between instrumentation and sampling based PGO, code coverage analysis and the different formats supported by sample profiling. llvm-svn: 238504
* Add clarifying note that sampling-based profiles cannot be used for code ↵Diego Novillo2015-05-221-0/+4
| | | | | | coverage. llvm-svn: 238031
* Implement no_sanitize attribute.Peter Collingbourne2015-05-151-0/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D9631 llvm-svn: 237463
* Update docs for SanitizerCoverage.Alexey Samsonov2015-05-071-0/+5
| | | | llvm-svn: 236793
OpenPOWER on IntegriCloud