summaryrefslogtreecommitdiffstats
path: root/clang/docs/UsersManual.rst
Commit message (Collapse)AuthorAgeFilesLines
* [Docs][OpenCL] Several corrections to C++ for OpenCLAnastasia Stulova2019-08-231-8/+9
| | | | | | Differential Revision:https://reviews.llvm.org/D64418 llvm-svn: 369749
* [docs] don't use :option: for Wall WextraJF Bastien2019-08-051-7/+7
| | | | | | The bots are sad that they're not documented. llvm-svn: 367918
* [docs] don't use :option: for C++ compatJF Bastien2019-08-051-2/+2
| | | | | | The bots are sad that they're not documented. llvm-svn: 367914
* [docs] document -Weveything more bettererJF Bastien2019-08-051-7/+18
| | | | | | | | | | | | Reviewers: aaron.ballman Subscribers: jkorous, dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65706 llvm-svn: 367889
* [OpenCL] Rename lang mode flag for C++ modeAnastasia Stulova2019-07-251-2/+2
| | | | | | | | | | | | Rename lang mode flag to -cl-std=clc++/-cl-std=CLC++ or -std=clc++/-std=CLC++. This aligns with OpenCL C conversion and removes ambiguity with OpenCL C++. Differential Revision: https://reviews.llvm.org/D65102 llvm-svn: 367008
* [Docs][OpenCL] Documentation of C++ for OpenCL modeAnastasia Stulova2019-07-171-1/+41
| | | | | | | | | Added documentation of C++ for OpenCL mode into Clang User Manual and Language Extensions document. Differential Revision: https://reviews.llvm.org/D64418 llvm-svn: 366351
* [Remarks][Driver] Use the specified format in the remarks file extensionFrancis Visoiu Mistrih2019-06-171-1/+3
| | | | | | | By default, use `.opt.yaml`, but when a format is specified with `-fsave-optimization-record=<format>`, use `.opt.<format>`. llvm-svn: 363627
* [Remarks] Extend -fsave-optimization-record to specify the formatFrancis Visoiu Mistrih2019-06-171-5/+13
| | | | | | | | | Use -fsave-optimization-record=<format> to specify a different format than the default, which is YAML. For now, only YAML is supported. llvm-svn: 363573
* [Remarks][NFC] Improve testing and documentation of -foptimization-record-passesFrancis Visoiu Mistrih2019-06-141-0/+12
| | | | | | | | | | | This adds: * documentation to the user manual * nicer error message * test for the error case * test for the gold plugin llvm-svn: 363463
* [Docs] Modernize references to macOSJ. Ryan Stinnett2019-05-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This updates all places in documentation that refer to "Mac OS X", "OS X", etc. to instead use the modern name "macOS" when no specific version number is mentioned. If a specific version is mentioned, this attempts to use the OS name at the time of that version: * Mac OS X for 10.0 - 10.7 * OS X for 10.8 - 10.11 * macOS for 10.12 - present Reviewers: JDevlieghere Subscribers: mgorny, christof, arphaman, cfe-commits, lldb-commits, libcxx-commits, llvm-commits Tags: #clang, #lldb, #libc, #llvm Differential Revision: https://reviews.llvm.org/D62654 llvm-svn: 362113
* Driver: support `/Zc:char8_t` and `/Zc:char8_t-`Saleem Abdulrasool2019-05-281-0/+2
| | | | | | | Update the `cl` emulation to support the `/Zc:char8_t[-]?` options as per the MSVC 2019.1 toolset. These are aliases for `-fchar8_t` and `-fno-char8_t`. llvm-svn: 361859
* [PGO] Clang part of change for context-sensitive PGO (part1)Rong Xu2019-03-041-1/+41
| | | | | | | | | | Part 1 of CSPGO change in Clang. This includes changes in clang options and calls to llvm PassManager. Tests will be committed in part2. This change needs the PassManager change in llvm. Differential Revision: https://reviews.llvm.org/D54176 llvm-svn: 355331
* [Documentation] Use HTTPS whenever possibleEugene Zelenko2019-01-231-10/+10
| | | | | | Differential revision: https://reviews.llvm.org/D56946 llvm-svn: 351976
* UsersManual.rst: Update the clang-cl flags sectionHans Wennborg2019-01-161-7/+37
| | | | llvm-svn: 351312
* [asan] Add clang flag -fsanitize-address-use-odr-indicatorVitaly Buka2018-12-051-0/+2
| | | | | | | | | | Reviewers: eugenis, m.ostapenko, ygribov Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D55157 llvm-svn: 348327
* [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to ↵Calixte Denizet2018-11-171-0/+49
| | | | | | | | | | | | | | | | | | filter the files to instrument with gcov (after revert https://reviews.llvm.org/rL346659) Summary: the previous patch (https://reviews.llvm.org/rC346642) has been reverted because of test failure under windows. So this patch fix the test cfe/trunk/test/CodeGen/code-coverage-filter.c. Reviewers: marco-c Reviewed By: marco-c Subscribers: cfe-commits, sylvestre.ledru Differential Revision: https://reviews.llvm.org/D54600 llvm-svn: 347144
* UserManual: Tweak the /Zc:dllexportInlines- docs someHans Wennborg2018-11-131-7/+8
| | | | | | Addressing comments on https://reviews.llvm.org/D54319 llvm-svn: 346748
* Revert rL346644, rL346642: the added test ↵Calixte Denizet2018-11-121-49/+0
| | | | | | test/CodeGen/code-coverage-filter.c is failing under windows llvm-svn: 346659
* [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to ↵Calixte Denizet2018-11-121-0/+49
| | | | | | | | | | | | | | | | | | | | | | filter the files to instrument with gcov Summary: These options are taking regex separated by colons to filter files. - if both are empty then all files are instrumented - if -fprofile-filter-files is empty then all the filenames matching any of the regex from exclude are not instrumented - if -fprofile-exclude-files is empty then all the filenames matching any of the regex from filter are instrumented - if both aren't empty then all the filenames which match any of the regex in filter and which don't match all the regex in filter are instrumented - this patch is a follow-up of https://reviews.llvm.org/D52033 Reviewers: marco-c, vsk Reviewed By: marco-c, vsk Subscribers: cfe-commits, sylvestre.ledru Differential Revision: https://reviews.llvm.org/D52034 llvm-svn: 346642
* clang-cl: Add documentation for /Zc:dllexportInlines-Hans Wennborg2018-11-121-0/+76
| | | | | | Differential revision: https://reviews.llvm.org/D54319 llvm-svn: 346639
* clang-cl: Add "/clang:" pass-through arg support.Hans Wennborg2018-11-081-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The clang-cl driver disables access to command line options outside of the "Core" and "CLOption" sets of command line arguments. This filtering makes it impossible to pass arguments that are interpreted by the clang driver and not by either 'cc1' (the frontend) or one of the other tools invoked by the driver. An example driver-level flag is the '-fno-slp-vectorize' flag, which is processed by the driver in Clang::ConstructJob and used to set the cc1 flag "-vectorize-slp". There is no negative cc1 flag or -mllvm flag, so it is not currently possible to disable the SLP vectorizer from the clang-cl driver. This change introduces the "/clang:" argument that is available when the driver mode is set to CL compatibility. This option works similarly to the "-Xclang" option, except that the option values are processed by the clang driver rather than by 'cc1'. An example usage is: clang-cl /clang:-fno-slp-vectorize /O2 test.c Another example shows how "/clang:" can be used to pass a flag where there is a conflict between a clang-cl compat option and an overlapping clang driver option: clang-cl /MD /clang:-MD /clang:-MF /clang:test_dep_file.dep test.c In the previous example, the unprefixed /MD selects the DLL version of the msvc CRT, while the prefixed -MD flag and the -MF flags are used to create a make dependency file for included headers. One note about flag ordering: the /clang: flags are concatenated to the end of the argument list, so in cases where the last flag wins, the /clang: flags will be chosen regardless of their order relative to other flags on the driver command line. Patch by Neeraj K. Singh! Differential revision: https://reviews.llvm.org/D53457 llvm-svn: 346393
* Update our URLs in clang doc to use httpsSylvestre Ledru2018-11-041-6/+6
| | | | llvm-svn: 346101
* Change -fsanitize-address-poison-class-member-array-new-cookie to ↵Filipe Cabecinhas2018-11-021-4/+4
| | | | | | | | | | | | | | -fsanitize-address-poison-custom-array-cookie Handle it in the driver and propagate it to cc1 Reviewers: rjmccall, kcc, rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52615 llvm-svn: 346001
* [Doc] fix second error in UsersManualJonas Toth2018-10-121-1/+1
| | | | llvm-svn: 344388
* [Doc] fix BB, add code-block typeJonas Toth2018-10-121-1/+1
| | | | llvm-svn: 344382
* Update user's manual documentation of profile remapping file to matchRichard Smith2018-10-111-5/+8
| | | | | | | | llvm-cxxmap documentation. Add a hint as to how to perform off-line profile data remapping. llvm-svn: 344319
* Update documentation to indicate that profile remapping support is onlyRichard Smith2018-10-101-0/+6
| | | | | | implemented for the new pass manager so far. llvm-svn: 344201
* Add a flag to remap manglings when reading profile data information.Richard Smith2018-10-101-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | This can be used to preserve profiling information across codebase changes that have widespread impact on mangled names, but across which most profiling data should still be usable. For example, when switching from libstdc++ to libc++, or from the old libstdc++ ABI to the new ABI, or even from a 32-bit to a 64-bit build. The user can provide a remapping file specifying parts of mangled names that should be treated as equivalent (eg, std::__1 should be treated as equivalent to std::__cxx11), and profile data will be treated as applying to a particular function if its name is equivalent to the name of a function in the profile data under the provided equivalences. See the documentation change for a description of how this is configured. Remapping is supported for both sample-based profiling and instruction profiling. We do not support remapping indirect branch target information, but all other profile data should be remapped appropriately. Support is only added for the new pass manager. If someone wants to also add support for this for the old pass manager, doing so should be straightforward. llvm-svn: 344199
* Update the docs for using LLVM toolset in Visual StudioStephen Kelly2018-08-221-9/+10
| | | | | | | | | | Reviewers: hans Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51079 llvm-svn: 340376
* UserManual: Update with the latest clang-cl flagsHans Wennborg2018-08-011-0/+21
| | | | llvm-svn: 338528
* [OPENMP] Modify the info about OpenMP support in UsersManual, NFC.Alexey Bataev2018-07-301-7/+2
| | | | llvm-svn: 338252
* Re-land r337333, "Teach Clang to emit address-significance tables.",Peter Collingbourne2018-07-181-0/+9
| | | | | | | | | | | | | | | | | | | | | which was reverted in r337336. The problem that required a revert was fixed in r337338. Also added a missing "REQUIRES: x86-registered-target" to one of the tests. Original commit message: > Teach Clang to emit address-significance tables. > > By default, we emit an address-significance table on all ELF > targets when the integrated assembler is enabled. The emission of an > address-significance table can be controlled with the -faddrsig and > -fno-addrsig flags. > > Differential Revision: https://reviews.llvm.org/D48155 llvm-svn: 337339
* Revert r337333, "Teach Clang to emit address-significance tables."Peter Collingbourne2018-07-171-9/+0
| | | | | | | | | Causing multiple failures on sanitizer bots due to TLS symbol errors, e.g. /usr/bin/ld: __msan_origin_tls: TLS definition in /home/buildbots/ppc64be-clang-test/clang-ppc64be/stage1/lib/clang/7.0.0/lib/linux/libclang_rt.msan-powerpc64.a(msan.cc.o) section .tbss.__msan_origin_tls mismatches non-TLS reference in /tmp/lit_tmp_0a71tA/mallinfo-3ca75e.o llvm-svn: 337336
* Teach Clang to emit address-significance tables.Peter Collingbourne2018-07-171-0/+9
| | | | | | | | | | | By default, we emit an address-significance table on all ELF targets when the integrated assembler is enabled. The emission of an address-significance table can be controlled with the -faddrsig and -fno-addrsig flags. Differential Revision: https://reviews.llvm.org/D48155 llvm-svn: 337333
* [docs] List correct default for -ftemplate-depth; also add missingRichard Smith2018-07-111-1/+6
| | | | | | documentation for -fconstexpr-steps. llvm-svn: 336747
* Add -fforce-emit-vtablesPiotr Padlewski2018-06-131-0/+6
| | | | | | | | | | | | | | | | | | | Summary: In many cases we can't devirtualize because definition of vtable is not present. Most of the time it is caused by inline virtual function not beeing emitted. Forcing emitting of vtable adds a reference of these inline virtual functions. Note that GCC was always doing it. Reviewers: rjmccall, rsmith, amharc, kuhar Subscribers: llvm-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D47108 Co-authored-by: Krzysztof Pszeniczny <krzysztof.pszeniczny@gmail.com> llvm-svn: 334600
* [docs] Fix typos in the Clang User's Manual.Joel Galenson2018-05-071-2/+2
| | | | llvm-svn: 331644
* [Driver, CodeGen] rename options to disable an FP cast optimizationSanjay Patel2018-04-301-9/+7
| | | | | | | | | | | | | | As suggested in the post-commit thread for rL331056, we should match these clang options with the established vocabulary of the corresponding sanitizer option. Also, the use of 'strict' is well-known for these kinds of knobs, and we can improve the descriptive text in the docs. So this intends to match the logic of D46135 but only change the words. Matching LLVM commit to match this spelling of the attribute to follow shortly. Differential Revision: https://reviews.llvm.org/D46236 llvm-svn: 331209
* [Driver, CodeGen] add options to enable/disable an FP cast optimizationSanjay Patel2018-04-271-0/+10
| | | | | | | | | | | | | | | | | | | | | | As discussed in the post-commit thread for: rL330437 ( http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20180423/545906.html ) We need a way to opt-out of a float-to-int-to-float cast optimization because too much existing code relies on the platform-specific undefined result of those casts when the float-to-int overflows. The LLVM changes associated with adding this function attribute are here: rL330947 rL330950 rL330951 Also as suggested, I changed the LLVM doc to mention the specific sanitizer flag that catches this problem: rL330958 Differential Revision: https://reviews.llvm.org/D46135 llvm-svn: 331041
* UsersManual.rst: update text for /GX- to match r328708Hans Wennborg2018-04-031-1/+1
| | | | llvm-svn: 329052
* [AMDGPU] Remove use of OpenCL triple environment and replace with function ↵Tony Tye2018-03-231-2/+2
| | | | | | | | | | | attribute for AMDGPU (CLANG) - Remove use of the opencl and amdopencl environment member of the target triple for the AMDGPU target. - Use a function attribute to communicate to the AMDGPU backend. Differential Revision: https://reviews.llvm.org/D43735 llvm-svn: 328347
* Update the supported C language standards in the user manual.Aaron Ballman2018-03-121-4/+5
| | | | | | Remove mention of -std=c94 (it is spelled iso9899:1994, not c94) and add mention of -std=c17 and -std=gnu17. llvm-svn: 327264
* UsersManual: improve the clang-cl text some moreHans Wennborg2018-03-011-0/+17
| | | | llvm-svn: 326438
* UsersManual: beef up the clang-cl text a littleHans Wennborg2018-03-011-3/+13
| | | | llvm-svn: 326434
* [Driver] Add option to manually control discarding value names in LLVM IR.Eric Fiselier2018-02-071-0/+21
| | | | | | | | | | | | | | | | | | | Summary: Currently, assertion-disabled Clang builds emit value names when generating LLVM IR. This is controlled by the `NDEBUG` macro, and is not easily overridable. In order to get IR output containing names from a release build of Clang, the user must manually construct the CC1 invocation w/o the `-discard-value-names` option. This is less than ideal. For example, Godbolt uses a release build of Clang, and so when asked to emit LLVM IR the result lacks names, making it harder to read. Manually invoking CC1 on Compiler Explorer is not feasible. This patch adds the driver options `-fdiscard-value-names` and `-fno-discard-value-names` which allow the user to override the default behavior. If neither is specified, the old behavior remains. Reviewers: erichkeane, aaron.ballman, lebedev.ri Reviewed By: aaron.ballman Subscribers: bogner, cfe-commits Differential Revision: https://reviews.llvm.org/D42887 llvm-svn: 324498
* Clarify that optimization levels -O2 and above are recommended for use of PGO.Eric Christopher2018-01-311-1/+2
| | | | llvm-svn: 323902
* [docs] Use monospace for PCH option flagsBrian Gesiak2018-01-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Use monospace for option flags in the PCH section, instead of the italics that were being used previously. I believe these used to be links, for which single backticks would have been appropriate, but since they were un-link-ified in https://reviews.llvm.org/rL275560, I believe monospace is now more appropriate, and so two backticks are needed. Test Plan: Build the `docs-clang-html` target and confirm the options are rendered using monospace font. Reviewers: sepavloff, aaron.ballman Reviewed By: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D42005 llvm-svn: 322447
* UserManual: Update with the latest clang-cl flagsHans Wennborg2018-01-031-1/+8
| | | | llvm-svn: 321705
* Fixed markup formattingSerge Pavlov2018-01-011-1/+1
| | | | llvm-svn: 321623
* Enable configuration files in clangSerge Pavlov2018-01-011-0/+73
| | | | | | | | | | | | | | | | | | | | | Clang is inherently a cross compiler and can generate code for any target enabled during build. It however requires to specify many parameters in the invocation, which could be hardcoded during configuration process in the case of single-target compiler. The purpose of configuration files is to make specifying clang arguments easier. A configuration file is a collection of driver options, which are inserted into command line before other options specified in the clang invocation. It groups related options together and allows specifying them in simpler, more flexible and less error prone way than just listing the options somewhere in build scripts. Configuration file may be thought as a "macro" that names an option set and is expanded when the driver is called. Use of configuration files is described in `UserManual.rst`. Differential Revision: https://reviews.llvm.org/D24933 llvm-svn: 321621
OpenPOWER on IntegriCloud