summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/TargetOptions.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix build after r349380Alex Lorenz2018-12-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349388 91177308-0d34-0410-b5e6-96231b3b80d8
* [darwin] parse the SDK settings from SDKSettings.json if it exists andAlex Lorenz2018-12-171-2/+6
| | | | | | | | | | | | | | | | | | | | | pass in the -target-sdk-version to the compiler and backend This commit adds support for reading the SDKSettings.json file in the Darwin driver. This file is used by the driver to determine the SDK's version, and it uses that information to pass it down to the compiler using the new -target-sdk-version= option. This option is then used to set the appropriate SDK Version module metadata introduced in r349119. Note: I had to adjust the two ast tests as the SDKROOT environment variable on macOS caused SDK version to be picked up for the compilation of source file but not the AST. rdar://45774000 Differential Revision: https://reviews.llvm.org/D55673 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349380 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce code_model macrosAli Tamur2018-10-081-0/+6
| | | | | | | | | | | | | | | | | | | Summary: gcc defines macros such as __code_model_small_ based on the user passed command line flag -mcmodel. clang accepts a flag with the same name and similar effects, but does not generate any macro that the user can use. This cl narrows the gap between gcc and clang behaviour. However, achieving full compatibility with gcc is not trivial: The set of valid values for mcmodel in gcc and clang are not equal. Also, gcc defines different macros for different architectures. In this cl, we only tackle an easy part of the problem and define the macro only for x64 architecture. When the user does not specify a mcmodel, the macro for small code model is produced, as is the case with gcc. Reviewers: compnerd, MaskRay Reviewed By: MaskRay Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D52920 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344000 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Added -f[no-]cuda-short-ptr optionArtem Belevich2018-05-091-0/+4
| | | | | | | | | The option enables use of 32-bit pointers for accessing const/local/shared memory. The feature is disabled by default. Differential Revision: https://reviews.llvm.org/D46148 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331938 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-091-5/+5
| | | | | | | | | | | | | | | | | | | This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331834 91177308-0d34-0410-b5e6-96231b3b80d8
* Explicitly initialize ForceEnableInt128 to avoid UBIlya Biryukov2018-02-261-1/+1
| | | | | | This fixes an uninitialized value read found by msan. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326083 91177308-0d34-0410-b5e6-96231b3b80d8
* [RISCV] Enable __int128_t and __uint128_t through clang flagMandeep Singh Grang2018-02-251-0/+3
| | | | | | | | | | | | | | | | Summary: If the flag -fforce-enable-int128 is passed, it will enable support for __int128_t and __uint128_t types. This flag can then be used to build compiler-rt for RISCV32. Reviewers: asb, kito-cheng, apazos, efriedma Reviewed By: asb, efriedma Subscribers: shiva0217, efriedma, jfb, dschuff, sdardis, sbc100, jgravelle-google, aheejin, rbar, johnrusso, simoncook, jordy.potman.lists, sabuasal, niosHD, cfe-commits Differential Revision: https://reviews.llvm.org/D43105 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326045 91177308-0d34-0410-b5e6-96231b3b80d8
* [CodeGen] Move Reciprocals option from TargetOptions to CodeGenOptionsCraig Topper2017-11-201-2/+0
| | | | | | Diffrential Revision: https://reviews.llvm.org/D40226 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318662 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed Opts.EABIVersion type string to llvm::EABI enum classYuka Takahashi2017-07-011-1/+2
| | | | | | | | | | Summary: Changed EABIVersion type from string to llvm::EABI. It seems it was just a typo and this is intended implementation. Differential Revision: https://reviews.llvm.org/D34595 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306953 91177308-0d34-0410-b5e6-96231b3b80d8
* PR5935: Adjust documentation.Vassil Vassilev2017-05-091-2/+1
| | | | | | | | | https://reviews.llvm.org/D31867 Patch by Johannes Altmanninger! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302521 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Override supported OpenCL extensions with -cl-ext optionAlexey Bader2016-11-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds a command line option '-cl-ext' to control a set of supported OpenCL extensions. Option accepts a comma-separated list of extensions prefixed with '+' or '-'. It can be used together with a target triple to override support for some extensions: // spir target supports all extensions, but we want to disable fp64 clang -cc1 -triple spir-unknown-unknown -cl-ext=-cl_khr_fp64 Special 'all' extension allows to enable or disable all possible extensions: // only fp64 will be supported clang -cc1 -triple spir-unknown-unknown -cl-ext=-all,+cl_khr_fp64 Patch by asavonic (Andrew Savonichev). Reviewers: joey, yaxunl Subscribers: yaxunl, bader, Anastasia, cfe-commits Differential Revision: https://reviews.llvm.org/D23712 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285700 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Add supported OpenCL extensions to target info.Yaxun Liu2016-05-161-0/+4
| | | | | | | | | | Add supported OpenCL extensions to target info. It serves as default values to save the users of the burden setting each supported extensions and optional core features in command line. Re-commit after fixing build error due to missing override attribute. Differential Revision: http://reviews.llvm.org/D19484 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269670 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[OpenCL] Add supported OpenCL extensions to target info."Yaxun Liu2016-05-131-4/+0
| | | | | | | | | | | Revert r269431 due to build failure caused by warning msg: llvm/tools/clang/lib/Basic/Targets.cpp:2090:9: error: 'setSupportedOpenCLOpts' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override] void setSupportedOpenCLOpts() { git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269435 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Add supported OpenCL extensions to target info.Yaxun Liu2016-05-131-0/+4
| | | | | | | | Add supported OpenCL extensions to target info. It serves as default values to save the users of the burden setting each supported extensions and optional core features in command line. Differential Revision: http://reviews.llvm.org/D19484 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269431 91177308-0d34-0410-b5e6-96231b3b80d8
* [CUDA] Copy host builtin types to NVPTXTargetInfo.Justin Lebar2016-04-291-0/+4
| | | | | | | | | | | | | | | | | Summary: Host and device types must match, otherwise when we pass values back and forth between the host and device, we will get the wrong result. This patch makes NVPTXTargetInfo inherit most of its type information from the host's target info. Reviewers: rsmith Subscribers: cfe-commits, jhen, tra Differential Revision: http://reviews.llvm.org/D19346 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268131 91177308-0d34-0410-b5e6-96231b3b80d8
* Move EABIVersion from CodeGenOptions to TargetOptionsSaleem Abdulrasool2016-04-081-1/+4
| | | | | | | | | It is possible to argue that the EABIVersion field is similar in spirit to the ABI field in TargetOptions. It represents the embedded ABI that the target follows. This will allow us to thread this information into the target information construction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265807 91177308-0d34-0410-b5e6-96231b3b80d8
* add the -mrecip driver flag and process its options (3rd try)Sanjay Patel2015-06-111-0/+2
| | | | | | | | | | | | | | | | | | | | | The 1st and 2nd tries to land this (r238055, r238851) were reverted due to bot failures caused by the LLVM part of the patch. That was hopefully fixed after r239001. This is the front-end counterpart to D8982. The -mrecip option interface is based on maintaining compatibility with gcc: https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/i386-and-x86-64-Options.html#index-mrecip_003dopt-1627 https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/RS_002f6000-and-PowerPC-Options.html#index-mrecip-2289 ...while adding more functionality (allowing users to specify the number of refinement steps for each estimate type). Differential Revision: http://reviews.llvm.org/D8989 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239536 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "add the -mrecip driver flag and process its options (2nd try)"Rafael Espindola2015-06-031-2/+0
| | | | | | | | This reverts commit r238851. It depends on a llvm commit that was reverted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238904 91177308-0d34-0410-b5e6-96231b3b80d8
* add the -mrecip driver flag and process its options (2nd try)Sanjay Patel2015-06-021-0/+2
| | | | | | | | | | | | | | | | | | | | | The first try to land this (r238055) was reverted due to bot failures caused by the LLVM part of the patch. That was hopefully fixed by r238788, and the LLVM patch was resubmitted at r238842. This is the front-end counterpart to D8982. The -mrecip option interface is based on maintaining compatibility with gcc: https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/i386-and-x86-64-Options.html#index-mrecip_003dopt-1627 https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/RS_002f6000-and-PowerPC-Options.html#index-mrecip-2289 ...while adding more functionality (allowing users to specify the number of refinement steps for each estimate type). Differential Revision: http://reviews.llvm.org/D8989 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238851 91177308-0d34-0410-b5e6-96231b3b80d8
* This reverts commit r238064 and r238055.Rafael Espindola2015-05-231-2/+0
| | | | | | They depend on a reverted llvm commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238076 91177308-0d34-0410-b5e6-96231b3b80d8
* add the -mrecip driver flag and process its optionsSanjay Patel2015-05-221-0/+2
| | | | | | | | | | | | | | | | | This is the front-end counterpart to D8982 (LLVM r238051). The -mrecip option interface is based on maintaining compatibility with gcc: https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/i386-and-x86-64-Options.html#index-mrecip_003dopt-1627 https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/RS_002f6000-and-PowerPC-Options.html#index-mrecip-2289 ...while adding more functionality (allowing users to specify the number of refinement steps for each estimate type). Differential Revision: http://reviews.llvm.org/D8989 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@238055 91177308-0d34-0410-b5e6-96231b3b80d8
* Header guard canonicalization, clang part.Benjamin Kramer2014-08-131-2/+2
| | | | | | Modifications made by clang-tidy with minor tweaks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215557 91177308-0d34-0410-b5e6-96231b3b80d8
* Use non-intrusive refcounting for TargetOptionsAlp Toker2014-07-061-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212388 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the -cxx-abi command-line flag.Hans Wennborg2014-01-141-4/+0
| | | | | | | | | | | | | | | This makes the C++ ABI depend entirely on the target: MS ABI for -win32 triples, Itanium otherwise. It's no longer possible to do weird combinations. To be able to run a test with a specific ABI without constraining it to a specific triple, new substitutions are added to lit: %itanium_abi_triple and %ms_abi_triple can be used to get the current target triple adjusted to the desired ABI. For example, if the test suite is running with the i686-pc-win32 target, %itanium_abi_triple will expand to i686-pc-mingw32. Differential Revision: http://llvm-reviews.chandlerc.com/D2545 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199250 91177308-0d34-0410-b5e6-96231b3b80d8
* Move -mfpmath handling to -cc1 and implement it for x86.Rafael Espindola2013-08-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | The original idea was to implement it all on the driver, but to do that the driver needs to know the sse level and to do that it has to know the default features of a cpu. Benjamin Kramer pointed out that if one day we decide to implement support for ' __attribute__ ((__target__ ("arch=core2")))', then the frontend needs to keep its knowledge of default features of a cpu. To avoid duplicating which part of clang handles default cpu features, it is probably better to handle -mfpmath in the frontend. For ARM this patch is just a small improvement. Instead of a cpu list, we check if neon is enabled, which allows us to reject things like -mcpu=cortex-a9 -mfpu=vfp -mfpmath=neon For X86, since LLVM doesn't support an independent ssefp feature, we just make sure the selected -mfpmath matches the sse level. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188939 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing includes and forward declarations so that headers don't depend onDmitri Gribenko2013-01-121-0/+1
| | | | | | | other headers included before them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172320 91177308-0d34-0410-b5e6-96231b3b80d8
* Serialize TargetOptions into an AST file, and make sure that we keepDouglas Gregor2012-10-161-1/+5
| | | | | | | | target options around so they can be accessed at any point (rather than keeping them transient). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166072 91177308-0d34-0410-b5e6-96231b3b80d8
* Documentation cleanup:James Dennett2012-07-021-1/+1
| | | | | | | | | | | | * Primarily, added \brief to most of include/clang/Basic, instead of prefixing the comments with "DeclaredName - "; * Made some brief summaries significantly briefer; * Fixed up some erroneous uses of \see and \arg; * Fixed up some extraneous backslashes in \code...\endcode blocks; * Fixed up some typos/spelling errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159616 91177308-0d34-0410-b5e6-96231b3b80d8
* Documentation cleanup: reformatting/fixing up file comments so that they haveJames Dennett2012-07-021-0/+5
| | | | | | | | | \file and \brief markup and appear in Doxygen's summaries (and eventually at http://clang.llvm.org/doxygen/files.html). Fixed up another couple of minor glitches in the docs at the same time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159517 91177308-0d34-0410-b5e6-96231b3b80d8
* The ARM C++ ABI is sufficiently different from the Itanium C++ ABI thatJohn McCall2010-08-211-5/+0
| | | | | | | | | it deserves its own enumerator. Obviously the implementations should closely follow the Itanium ABI except in cases of divergence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111749 91177308-0d34-0410-b5e6-96231b3b80d8
* Frontend: Add -target-linker-version, for specifying the version string of theDaniel Dunbar2010-08-111-0/+3
| | | | | | linker in use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110871 91177308-0d34-0410-b5e6-96231b3b80d8
* Really make the Itanium C++ ABI the default.Charles Davis2010-06-121-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105893 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an option to specify the target C++ ABI to the frontend. Use it toCharles Davis2010-06-111-0/+4
| | | | | | | select either the default Itanium ABI or the new, experimental Microsoft ABI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105804 91177308-0d34-0410-b5e6-96231b3b80d8
* Add TargetOptions and use it when constructing targets.Daniel Dunbar2009-11-151-0/+39
- This ended up being hard to factor, sorry for the large diff. - Some post-commit cleanup to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88833 91177308-0d34-0410-b5e6-96231b3b80d8