diff options
Diffstat (limited to 'include/clang/Driver')
-rw-r--r-- | include/clang/Driver/Action.h | 7 | ||||
-rw-r--r-- | include/clang/Driver/CC1Options.td | 25 | ||||
-rw-r--r-- | include/clang/Driver/CLCompatOptions.td | 20 | ||||
-rw-r--r-- | include/clang/Driver/ClangOptionDocs.td | 7 | ||||
-rw-r--r-- | include/clang/Driver/Compilation.h | 7 | ||||
-rw-r--r-- | include/clang/Driver/DarwinSDKInfo.h | 7 | ||||
-rw-r--r-- | include/clang/Driver/Distro.h | 13 | ||||
-rw-r--r-- | include/clang/Driver/Driver.h | 13 | ||||
-rw-r--r-- | include/clang/Driver/DriverDiagnostic.h | 7 | ||||
-rw-r--r-- | include/clang/Driver/Job.h | 7 | ||||
-rw-r--r-- | include/clang/Driver/Multilib.h | 14 | ||||
-rw-r--r-- | include/clang/Driver/Options.h | 7 | ||||
-rw-r--r-- | include/clang/Driver/Options.td | 71 | ||||
-rw-r--r-- | include/clang/Driver/Phases.h | 7 | ||||
-rw-r--r-- | include/clang/Driver/SanitizerArgs.h | 12 | ||||
-rw-r--r-- | include/clang/Driver/Tool.h | 7 | ||||
-rw-r--r-- | include/clang/Driver/ToolChain.h | 38 | ||||
-rw-r--r-- | include/clang/Driver/Types.def | 7 | ||||
-rw-r--r-- | include/clang/Driver/Types.h | 7 | ||||
-rw-r--r-- | include/clang/Driver/Util.h | 7 | ||||
-rw-r--r-- | include/clang/Driver/XRayArgs.h | 7 |
21 files changed, 184 insertions, 113 deletions
diff --git a/include/clang/Driver/Action.h b/include/clang/Driver/Action.h index f4aaa6c544..c1ff0b1a60 100644 --- a/include/clang/Driver/Action.h +++ b/include/clang/Driver/Action.h @@ -1,9 +1,8 @@ //===- Action.h - Abstract compilation steps --------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td index 07c7688406..d18c37eb36 100644 --- a/include/clang/Driver/CC1Options.td +++ b/include/clang/Driver/CC1Options.td @@ -1,9 +1,8 @@ //===--- CC1Options.td - Options for clang -cc1 ---------------------------===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -108,7 +107,7 @@ def analyzer_checker : Separate<["-"], "analyzer-checker">, ValuesCode<[{ const char *Values = #define GET_CHECKERS - #define CHECKER(FULLNAME, CLASS, HT, DOC_URI) FULLNAME "," + #define CHECKER(FULLNAME, CLASS, HT, DOC_URI, IS_HIDDEN) FULLNAME "," #include "clang/StaticAnalyzer/Checkers/Checkers.inc" #undef GET_CHECKERS #define GET_PACKAGES @@ -131,6 +130,10 @@ def analyzer_disable_all_checks : Flag<["-"], "analyzer-disable-all-checks">, def analyzer_checker_help : Flag<["-"], "analyzer-checker-help">, HelpText<"Display the list of analyzer checkers that are available">; +def analyzer_checker_help_hidden : Flag<["-"], "analyzer-checker-help-hidden">, + HelpText<"Display the list of analyzer checkers that are available, " + "including modeling checkers">; + def analyzer_config_help : Flag<["-"], "analyzer-config-help">, HelpText<"Display the list of -analyzer-config options">; @@ -604,6 +607,8 @@ def arcmt_migrate : Flag<["-"], "arcmt-migrate">, def opt_record_file : Separate<["-"], "opt-record-file">, HelpText<"File name to use for YAML optimization record output">; +def opt_record_passes : Separate<["-"], "opt-record-passes">, + HelpText<"Only record remark information for passes whose names match the given regular expression">; def print_stats : Flag<["-"], "print-stats">, HelpText<"Print performance metrics and statistics">; @@ -703,6 +708,8 @@ def fvisibility : Separate<["-"], "fvisibility">, HelpText<"Default type and symbol visibility">; def ftype_visibility : Separate<["-"], "ftype-visibility">, HelpText<"Default type visibility">; +def fapply_global_visibility_to_externs : Flag<["-"], "fapply-global-visibility-to-externs">, + HelpText<"Apply global symbol visibility to external declarations without an explicit visibility">; def ftemplate_depth : Separate<["-"], "ftemplate-depth">, HelpText<"Maximum depth of recursive template instantiation">; def foperator_arrow_depth : Separate<["-"], "foperator-arrow-depth">, @@ -835,8 +842,14 @@ def fopenmp_is_device : Flag<["-"], "fopenmp-is-device">, def fopenmp_host_ir_file_path : Separate<["-"], "fopenmp-host-ir-file-path">, HelpText<"Path to the IR file produced by the frontend for the host.">; -} // let Flags = [CC1Option] +//===----------------------------------------------------------------------===// +// SYCL Options +//===----------------------------------------------------------------------===// + +def fsycl_is_device : Flag<["-"], "fsycl-is-device">, + HelpText<"Generate code for SYCL device.">; +} // let Flags = [CC1Option] //===----------------------------------------------------------------------===// // cc1as-only Options diff --git a/include/clang/Driver/CLCompatOptions.td b/include/clang/Driver/CLCompatOptions.td index 3e0dc2db7d..fb02d856a2 100644 --- a/include/clang/Driver/CLCompatOptions.td +++ b/include/clang/Driver/CLCompatOptions.td @@ -1,9 +1,8 @@ //===--- CLCompatOptions.td - Options for clang-cl ------------------------===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -167,7 +166,7 @@ def _SLASH_source_charset : CLCompileJoined<"source-charset:">, def _SLASH_execution_charset : CLCompileJoined<"execution-charset:">, HelpText<"Runtime encoding, supports only UTF-8">, Alias<fexec_charset_EQ>; def _SLASH_std : CLCompileJoined<"std:">, - HelpText<"Language standard to compile for">; + HelpText<"Language standard to compile for (c++14,c++17,c++latest)">; def _SLASH_U : CLJoinedOrSeparate<"U">, HelpText<"Undefine macro">, MetaVarName<"<macro>">, Alias<U>; def _SLASH_validate_charset : CLFlag<"validate-charset">, @@ -395,14 +394,17 @@ def _SLASH_Zo_ : CLIgnoredFlag<"Zo-">; // Unsupported: -def _SLASH_AI : CLJoined<"AI">; +def _SLASH_await : CLFlag<"await">; +def _SLASH_constexpr : CLJoined<"constexpr:">; +def _SLASH_AI : CLJoinedOrSeparate<"AI">; def _SLASH_Bt : CLFlag<"Bt">; def _SLASH_Bt_plus : CLFlag<"Bt+">; def _SLASH_clr : CLJoined<"clr">; +def _SLASH_d2 : CLJoined<"d2">; def _SLASH_doc : CLJoined<"doc">; def _SLASH_FA_joined : CLJoined<"FA">; def _SLASH_favor : CLJoined<"favor">; -def _SLASH_F : CLFlag<"F">; +def _SLASH_F : CLJoinedOrSeparate<"F">; def _SLASH_Fm : CLJoined<"Fm">; def _SLASH_Fr : CLJoined<"Fr">; def _SLASH_FR : CLJoined<"FR">; @@ -426,10 +428,14 @@ def _SLASH_kernel : CLFlag<"kernel">; def _SLASH_LN : CLFlag<"LN">; def _SLASH_MP : CLJoined<"MP">; def _SLASH_openmp : CLFlag<"openmp">; +def _SLASH_openmp_experimental : CLFlag<"openmp:experimental">; def _SLASH_Qfast_transcendentals : CLFlag<"Qfast_transcendentals">; def _SLASH_QIfist : CLFlag<"QIfist">; def _SLASH_Qimprecise_fwaits : CLFlag<"Qimprecise_fwaits">; def _SLASH_Qpar : CLFlag<"Qpar">; +def _SLASH_Qpar_report : CLJoined<"Qpar-report">; +def _SLASH_Qsafe_fp_loads : CLFlag<"Qsafe_fp_loads">; +def _SLASH_Qspectre : CLFlag<"Qspectre">; def _SLASH_Qvec_report : CLJoined<"Qvec-report">; def _SLASH_u : CLFlag<"u">; def _SLASH_V : CLFlag<"V">; diff --git a/include/clang/Driver/ClangOptionDocs.td b/include/clang/Driver/ClangOptionDocs.td index 97c44692d2..5513642161 100644 --- a/include/clang/Driver/ClangOptionDocs.td +++ b/include/clang/Driver/ClangOptionDocs.td @@ -1,9 +1,8 @@ //==--- ClangOptionDocs.td - Option documentation -------------------------===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// diff --git a/include/clang/Driver/Compilation.h b/include/clang/Driver/Compilation.h index 20eb07f6de..33ae133e05 100644 --- a/include/clang/Driver/Compilation.h +++ b/include/clang/Driver/Compilation.h @@ -1,9 +1,8 @@ //===- Compilation.h - Compilation Task Data Structure ----------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// diff --git a/include/clang/Driver/DarwinSDKInfo.h b/include/clang/Driver/DarwinSDKInfo.h index 4ffb02fea3..f7075a8d3b 100644 --- a/include/clang/Driver/DarwinSDKInfo.h +++ b/include/clang/Driver/DarwinSDKInfo.h @@ -1,9 +1,8 @@ //===--- DarwinSDKInfo.h - SDK Information parser for darwin ----*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// diff --git a/include/clang/Driver/Distro.h b/include/clang/Driver/Distro.h index 5651ebb6d4..67dc764fb7 100644 --- a/include/clang/Driver/Distro.h +++ b/include/clang/Driver/Distro.h @@ -1,9 +1,8 @@ //===--- Distro.h - Linux distribution detection support --------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// @@ -34,6 +33,7 @@ public: DebianJessie, DebianStretch, DebianBuster, + DebianBullseye, Exherbo, RHEL5, RHEL6, @@ -64,6 +64,7 @@ public: UbuntuBionic, UbuntuCosmic, UbuntuDisco, + UbuntuEoan, UnknownDistro }; @@ -113,11 +114,11 @@ public: } bool IsDebian() const { - return DistroVal >= DebianLenny && DistroVal <= DebianBuster; + return DistroVal >= DebianLenny && DistroVal <= DebianBullseye; } bool IsUbuntu() const { - return DistroVal >= UbuntuHardy && DistroVal <= UbuntuDisco; + return DistroVal >= UbuntuHardy && DistroVal <= UbuntuEoan; } bool IsAlpineLinux() const { diff --git a/include/clang/Driver/Driver.h b/include/clang/Driver/Driver.h index 494336d672..03e6458a5e 100644 --- a/include/clang/Driver/Driver.h +++ b/include/clang/Driver/Driver.h @@ -1,9 +1,8 @@ //===--- Driver.h - Clang GCC Compatible Driver -----------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// @@ -278,6 +277,12 @@ private: SmallString<128> &CrashDiagDir); public: + + /// Takes the path to a binary that's either in bin/ or lib/ and returns + /// the path to clang's resource directory. + static std::string GetResourcesPath(StringRef BinaryPath, + StringRef CustomResourceDir = ""); + Driver(StringRef ClangExecutable, StringRef TargetTriple, DiagnosticsEngine &Diags, IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS = nullptr); diff --git a/include/clang/Driver/DriverDiagnostic.h b/include/clang/Driver/DriverDiagnostic.h index ad160ec6c6..ec2f8b403b 100644 --- a/include/clang/Driver/DriverDiagnostic.h +++ b/include/clang/Driver/DriverDiagnostic.h @@ -1,9 +1,8 @@ //===--- DiagnosticDriver.h - Diagnostics for libdriver ---------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// diff --git a/include/clang/Driver/Job.h b/include/clang/Driver/Job.h index 870a31c520..41d9722808 100644 --- a/include/clang/Driver/Job.h +++ b/include/clang/Driver/Job.h @@ -1,9 +1,8 @@ //===- Job.h - Commands to Execute ------------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// diff --git a/include/clang/Driver/Multilib.h b/include/clang/Driver/Multilib.h index 132d981854..abf0d5fa6e 100644 --- a/include/clang/Driver/Multilib.h +++ b/include/clang/Driver/Multilib.h @@ -1,9 +1,8 @@ //===- Multilib.h -----------------------------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// @@ -35,10 +34,11 @@ private: std::string OSSuffix; std::string IncludeSuffix; flags_list Flags; + int Priority; public: Multilib(StringRef GCCSuffix = {}, StringRef OSSuffix = {}, - StringRef IncludeSuffix = {}); + StringRef IncludeSuffix = {}, int Priority = 0); /// Get the detected GCC installation path suffix for the multi-arch /// target variant. Always starts with a '/', unless empty @@ -78,6 +78,10 @@ public: const flags_list &flags() const { return Flags; } flags_list &flags() { return Flags; } + /// Returns the multilib priority. When more than one multilib matches flags, + /// the one with the highest priority is selected, with 0 being the default. + int priority() const { return Priority; } + /// Add a flag to the flags list /// \p Flag must be a flag accepted by the driver with its leading '-' removed, /// and replaced with either: diff --git a/include/clang/Driver/Options.h b/include/clang/Driver/Options.h index 2da3cb4828..f8963d4811 100644 --- a/include/clang/Driver/Options.h +++ b/include/clang/Driver/Options.h @@ -1,9 +1,8 @@ //===--- Options.h - Option info & table ------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index f02a7190f5..a293a39f28 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -1,9 +1,8 @@ //===--- Options.td - Options for clang -----------------------------------===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -552,9 +551,9 @@ def cuda_compile_host_device : Flag<["--"], "cuda-compile-host-device">, HelpText<"Compile CUDA code for both host and device (default). Has no " "effect on non-CUDA compilations.">; def cuda_include_ptx_EQ : Joined<["--"], "cuda-include-ptx=">, Flags<[DriverOption]>, - HelpText<"Include PTX for the follwing GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">; + HelpText<"Include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">; def no_cuda_include_ptx_EQ : Joined<["--"], "no-cuda-include-ptx=">, Flags<[DriverOption]>, - HelpText<"Do not include PTX for the follwing GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">; + HelpText<"Do not include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">; def cuda_gpu_arch_EQ : Joined<["--"], "cuda-gpu-arch=">, Flags<[DriverOption]>, HelpText<"CUDA GPU architecture (e.g. sm_35). May be specified more than once.">; def hip_link : Flag<["--"], "hip-link">, @@ -743,24 +742,30 @@ def fno_coverage_mapping : Flag<["-"], "fno-coverage-mapping">, Group<f_Group>, Flags<[DriverOption, CoreOption]>, HelpText<"Disable code coverage analysis">; def fprofile_generate : Flag<["-"], "fprofile-generate">, - Group<f_Group>, Flags<[DriverOption]>, + Group<f_Group>, Flags<[CoreOption]>, HelpText<"Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">; def fprofile_generate_EQ : Joined<["-"], "fprofile-generate=">, - Group<f_Group>, Flags<[DriverOption]>, MetaVarName<"<directory>">, + Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<directory>">, HelpText<"Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">; +def fcs_profile_generate : Flag<["-"], "fcs-profile-generate">, + Group<f_Group>, Flags<[CoreOption]>, + HelpText<"Generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">; +def fcs_profile_generate_EQ : Joined<["-"], "fcs-profile-generate=">, + Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<directory>">, + HelpText<"Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">; def fprofile_use : Flag<["-"], "fprofile-use">, Group<f_Group>, Alias<fprofile_instr_use>; def fprofile_use_EQ : Joined<["-"], "fprofile-use=">, Group<f_Group>, Flags<[DriverOption]>, MetaVarName<"<pathname>">, HelpText<"Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.">; def fno_profile_instr_generate : Flag<["-"], "fno-profile-instr-generate">, - Group<f_Group>, Flags<[DriverOption]>, + Group<f_Group>, Flags<[CoreOption]>, HelpText<"Disable generation of profile instrumentation.">; def fno_profile_generate : Flag<["-"], "fno-profile-generate">, - Group<f_Group>, Flags<[DriverOption]>, + Group<f_Group>, Flags<[CoreOption]>, HelpText<"Disable generation of profile instrumentation.">; def fno_profile_instr_use : Flag<["-"], "fno-profile-instr-use">, - Group<f_Group>, Flags<[DriverOption]>, + Group<f_Group>, Flags<[CoreOption]>, HelpText<"Disable using instrumentation data for profile-guided optimization">; def fno_profile_use : Flag<["-"], "fno-profile-use">, Alias<fno_profile_instr_use>; @@ -770,6 +775,9 @@ def fprofile_filter_files_EQ : Joined<["-"], "fprofile-filter-files=">, def fprofile_exclude_files_EQ : Joined<["-"], "fprofile-exclude-files=">, Group<f_Group>, Flags<[CC1Option, CoreOption]>, HelpText<"Instrument only functions from files where names don't match all the regexes separated by a semi-colon">; +def forder_file_instrumentation : Flag<["-"], "forder-file-instrumentation">, + Group<f_Group>, Flags<[CC1Option, CoreOption]>, + HelpText<"Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">; def faddrsig : Flag<["-"], "faddrsig">, Group<f_Group>, Flags<[CoreOption, CC1Option]>, HelpText<"Emit an address-significance table">; @@ -902,7 +910,7 @@ def fno_fast_math : Flag<["-"], "fno-fast-math">, Group<f_Group>; def fmath_errno : Flag<["-"], "fmath-errno">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Require math functions to indicate errors by setting errno">; def fno_math_errno : Flag<["-"], "fno-math-errno">, Group<f_Group>; -def fbracket_depth_EQ : Joined<["-"], "fbracket-depth=">, Group<f_Group>; +def fbracket_depth_EQ : Joined<["-"], "fbracket-depth=">, Group<f_Group>, Flags<[CoreOption]>; def fsignaling_math : Flag<["-"], "fsignaling-math">, Group<f_Group>; def fno_signaling_math : Flag<["-"], "fno-signaling-math">, Group<f_Group>; def fjump_tables : Flag<["-"], "fjump-tables">, Group<f_Group>; @@ -1574,6 +1582,8 @@ def fopenmp_cuda_number_of_sm_EQ : Joined<["-"], "fopenmp-cuda-number-of-sm=">, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; def fopenmp_cuda_blocks_per_sm_EQ : Joined<["-"], "fopenmp-cuda-blocks-per-sm=">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; +def fopenmp_cuda_teams_reduction_recs_num_EQ : Joined<["-"], "fopenmp-cuda-teams-reduction-recs-num=">, Group<f_Group>, + Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; def fopenmp_optimistic_collapse : Flag<["-"], "fopenmp-optimistic-collapse">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; def fno_openmp_optimistic_collapse : Flag<["-"], "fno-openmp-optimistic-collapse">, Group<f_Group>, @@ -1607,12 +1617,15 @@ def fplt : Flag<["-"], "fplt">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Use the PLT to make function calls">; def fno_plt : Flag<["-"], "fno-plt">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Do not use the PLT to make function calls">; -def fropi : Flag<["-"], "fropi">, Group<f_Group>; +def fropi : Flag<["-"], "fropi">, Group<f_Group>, Flags<[CC1Option]>; def fno_ropi : Flag<["-"], "fno-ropi">, Group<f_Group>; -def frwpi : Flag<["-"], "frwpi">, Group<f_Group>; +def frwpi : Flag<["-"], "frwpi">, Group<f_Group>, Flags<[CC1Option]>; def fno_rwpi : Flag<["-"], "fno-rwpi">, Group<f_Group>; def fplugin_EQ : Joined<["-"], "fplugin=">, Group<f_Group>, Flags<[DriverOption]>, MetaVarName<"<dsopath>">, HelpText<"Load the named plugin (dynamic shared object)">; +def fpass_plugin_EQ : Joined<["-"], "fpass-plugin=">, + Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<dsopath>">, + HelpText<"Load pass plugin from a dynamic shared object file (only with new pass manager).">; def fpreserve_as_comments : Flag<["-"], "fpreserve-as-comments">, Group<f_Group>; def fno_preserve_as_comments : Flag<["-"], "fno-preserve-as-comments">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Do not preserve comments in inline assembly">; @@ -1702,6 +1715,10 @@ def fno_save_optimization_record : Flag<["-"], "fno-save-optimization-record">, def foptimization_record_file_EQ : Joined<["-"], "foptimization-record-file=">, Group<f_Group>, HelpText<"Specify the file name of any generated YAML optimization record">; +def foptimization_record_passes_EQ : Joined<["-"], "foptimization-record-passes=">, + Group<f_Group>, + HelpText<"Only include passes which match a specified regular expression in the generated optimization record (by default, include all passes)">; + def ftest_coverage : Flag<["-"], "ftest-coverage">, Group<f_Group>; def fvectorize : Flag<["-"], "fvectorize">, Group<f_Group>, @@ -1728,6 +1745,7 @@ def Wframe_larger_than_EQ : Joined<["-"], "Wframe-larger-than=">, Group<f_Group> def : Flag<["-"], "fterminated-vtables">, Alias<fapple_kext>; def fthreadsafe_statics : Flag<["-"], "fthreadsafe-statics">, Group<f_Group>; def ftime_report : Flag<["-"], "ftime-report">, Group<f_Group>, Flags<[CC1Option]>; +def ftime_trace : Flag<["-"], "ftime-trace">, Group<f_Group>, Flags<[CC1Option]>; def ftlsmodel_EQ : Joined<["-"], "ftls-model=">, Group<f_Group>, Flags<[CC1Option]>; def ftrapv : Flag<["-"], "ftrapv">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Trap on integer overflow">; @@ -1999,8 +2017,8 @@ def mexecute_only : Flag<["-"], "mexecute-only">, Group<m_arm_Features_Group>, HelpText<"Disallow generation of data access to code sections (ARM only)">; def mno_execute_only : Flag<["-"], "mno-execute-only">, Group<m_arm_Features_Group>, HelpText<"Allow generation of data access to code sections (ARM only)">; -def mtp_mode_EQ : Joined<["-"], "mtp=">, Group<m_arm_Features_Group>, Values<"soft, cp15">, - HelpText<"Read thread pointer from coprocessor register (ARM only)">; +def mtp_mode_EQ : Joined<["-"], "mtp=">, Group<m_arm_Features_Group>, Values<"soft,cp15,el0,el1,el2,el3">, + HelpText<"Thread pointer access method (AArch32/AArch64 only)">; def mpure_code : Flag<["-"], "mpure-code">, Alias<mexecute_only>; // Alias for GCC compatibility def mno_pure_code : Flag<["-"], "mno-pure-code">, Alias<mno_execute_only>; def mtvos_version_min_EQ : Joined<["-"], "mtvos-version-min=">, Group<m_Group>; @@ -2132,7 +2150,7 @@ def mfix_cortex_a53_835769 : Flag<["-"], "mfix-cortex-a53-835769">, def mno_fix_cortex_a53_835769 : Flag<["-"], "mno-fix-cortex-a53-835769">, Group<m_aarch64_Features_Group>, HelpText<"Don't workaround Cortex-A53 erratum 835769 (AArch64 only)">; -foreach i = {1-7,18,20} in +foreach i = {1-7,9-15,18,20-28} in def ffixed_x#i : Flag<["-"], "ffixed-x"#i>, Group<m_aarch64_Features_Group>, HelpText<"Reserve the "#i#" register (AArch64 only)">; @@ -2156,6 +2174,12 @@ def msign_ext : Flag<["-"], "msign-ext">, Group<m_wasm_Features_Group>; def mno_sign_ext : Flag<["-"], "mno-sign-ext">, Group<m_wasm_Features_Group>; def mexception_handing : Flag<["-"], "mexception-handling">, Group<m_wasm_Features_Group>; def mno_exception_handing : Flag<["-"], "mno-exception-handling">, Group<m_wasm_Features_Group>; +def matomics : Flag<["-"], "matomics">, Group<m_wasm_Features_Group>; +def mno_atomics : Flag<["-"], "mno-atomics">, Group<m_wasm_Features_Group>; +def mbulk_memory : Flag<["-"], "mbulk-memory">, Group<m_wasm_Features_Group>; +def mno_bulk_memory : Flag<["-"], "mno-bulk-memory">, Group<m_wasm_Features_Group>; +def mmutable_globals : Flag<["-"], "mmutable-globals">, Group<m_wasm_Features_Group>; +def mno_mutable_globals : Flag<["-"], "mno-mutable-globals">, Group<m_wasm_Features_Group>; def mamdgpu_debugger_abi : Joined<["-"], "mamdgpu-debugger-abi=">, Flags<[HelpHidden]>, @@ -2418,6 +2442,14 @@ def modd_spreg : Flag<["-"], "modd-spreg">, Group<m_mips_Features_Group>, def mno_odd_spreg : Flag<["-"], "mno-odd-spreg">, Group<m_mips_Features_Group>, HelpText<"Disable odd single-precision floating point registers">, Flags<[HelpHidden]>; +def mrelax_pic_calls : Flag<["-"], "mrelax-pic-calls">, + Group<m_mips_Features_Group>, + HelpText<"Produce relaxation hints for linkers to try optimizing PIC " + "call sequences into direct calls (MIPS only)">, Flags<[HelpHidden]>; +def mno_relax_pic_calls : Flag<["-"], "mno-relax-pic-calls">, + Group<m_mips_Features_Group>, + HelpText<"Do not produce relaxation hints for linkers to try optimizing PIC " + "call sequences into direct calls (MIPS only)">, Flags<[HelpHidden]>; def mglibc : Flag<["-"], "mglibc">, Group<m_libc_Group>, Flags<[HelpHidden]>; def muclibc : Flag<["-"], "muclibc">, Group<m_libc_Group>, Flags<[HelpHidden]>; def module_file_info : Flag<["-"], "module-file-info">, Flags<[DriverOption,CC1Option]>, Group<Action_Group>, @@ -2494,6 +2526,7 @@ def pthread : Flag<["-"], "pthread">, Flags<[CC1Option]>, def no_pthread : Flag<["-"], "no-pthread">, Flags<[CC1Option]>; def p : Flag<["-"], "p">; def pie : Flag<["-"], "pie">; +def static_pie : Flag<["-"], "static-pie">; def read__only__relocs : Separate<["-"], "read_only_relocs">; def remap : Flag<["-"], "remap">; def rewrite_objc : Flag<["-"], "rewrite-objc">, Flags<[DriverOption,CC1Option]>, @@ -2561,6 +2594,8 @@ def std_EQ : Joined<["-", "--"], "std=">, Flags<[CC1Option]>, }]>; def stdlib_EQ : Joined<["-", "--"], "stdlib=">, Flags<[CC1Option]>, HelpText<"C++ standard library to use">, Values<"libc++,libstdc++,platform">; +def unwindlib_EQ : Joined<["-", "--"], "unwindlib=">, Flags<[CC1Option]>, + HelpText<"Unwind library to use">, Values<"libgcc,unwindlib,platform">; def sub__library : JoinedOrSeparate<["-"], "sub_library">; def sub__umbrella : JoinedOrSeparate<["-"], "sub_umbrella">; def system_header_prefix : Joined<["--"], "system-header-prefix=">, @@ -2819,6 +2854,8 @@ def mavx2 : Flag<["-"], "mavx2">, Group<m_x86_Features_Group>; def mno_avx2 : Flag<["-"], "mno-avx2">, Group<m_x86_Features_Group>; def mavx512f : Flag<["-"], "mavx512f">, Group<m_x86_Features_Group>; def mno_avx512f : Flag<["-"], "mno-avx512f">, Group<m_x86_Features_Group>; +def mavx512bf16 : Flag<["-"], "mavx512bf16">, Group<m_x86_Features_Group>; +def mno_avx512bf16 : Flag<["-"], "mno-avx512bf16">, Group<m_x86_Features_Group>; def mavx512bitalg : Flag<["-"], "mavx512bitalg">, Group<m_x86_Features_Group>; def mno_avx512bitalg : Flag<["-"], "mno-avx512bitalg">, Group<m_x86_Features_Group>; def mavx512bw : Flag<["-"], "mavx512bw">, Group<m_x86_Features_Group>; diff --git a/include/clang/Driver/Phases.h b/include/clang/Driver/Phases.h index cd6b5b5c9f..7199c65784 100644 --- a/include/clang/Driver/Phases.h +++ b/include/clang/Driver/Phases.h @@ -1,9 +1,8 @@ //===--- Phases.h - Transformations on Driver Types -------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// diff --git a/include/clang/Driver/SanitizerArgs.h b/include/clang/Driver/SanitizerArgs.h index e590a49dee..957e752b68 100644 --- a/include/clang/Driver/SanitizerArgs.h +++ b/include/clang/Driver/SanitizerArgs.h @@ -1,9 +1,8 @@ //===--- SanitizerArgs.h - Arguments for sanitizer tools -------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_DRIVER_SANITIZERARGS_H @@ -39,6 +38,8 @@ class SanitizerArgs { bool AsanPoisonCustomArrayCookie = false; bool AsanGlobalsDeadStripping = false; bool AsanUseOdrIndicator = false; + bool AsanInvalidPointerCmp = false; + bool AsanInvalidPointerSub = false; std::string HwasanAbi; bool LinkCXXRuntimes = false; bool NeedPIE = false; @@ -74,9 +75,6 @@ class SanitizerArgs { bool needsCfiRt() const; bool needsCfiDiagRt() const; bool needsStatsRt() const { return Stats; } - bool needsEsanRt() const { - return Sanitizers.hasOneOf(SanitizerKind::Efficiency); - } bool needsScudoRt() const { return Sanitizers.has(SanitizerKind::Scudo); } bool requiresPIE() const; diff --git a/include/clang/Driver/Tool.h b/include/clang/Driver/Tool.h index b02ac66d3b..8d04916069 100644 --- a/include/clang/Driver/Tool.h +++ b/include/clang/Driver/Tool.h @@ -1,9 +1,8 @@ //===--- Tool.h - Compilation Tools -----------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// diff --git a/include/clang/Driver/ToolChain.h b/include/clang/Driver/ToolChain.h index d5f75b8271..4ccf8413ff 100644 --- a/include/clang/Driver/ToolChain.h +++ b/include/clang/Driver/ToolChain.h @@ -1,9 +1,8 @@ //===- ToolChain.h - Collections of tools for one platform ------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// @@ -100,11 +99,19 @@ public: RLT_Libgcc }; + enum UnwindLibType { + UNW_None, + UNW_CompilerRT, + UNW_Libgcc + }; + enum RTTIMode { RM_Enabled, RM_Disabled, }; + enum FileType { FT_Object, FT_Static, FT_Shared }; + private: friend class RegisterEffectiveTriple; @@ -368,15 +375,19 @@ public: return ToolChain::CST_Libstdcxx; } + virtual UnwindLibType GetDefaultUnwindLibType() const { + return ToolChain::UNW_None; + } + virtual std::string getCompilerRTPath() const; virtual std::string getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component, - bool Shared = false) const; + FileType Type = ToolChain::FT_Static) const; - const char *getCompilerRTArgString(const llvm::opt::ArgList &Args, - StringRef Component, - bool Shared = false) const; + const char * + getCompilerRTArgString(const llvm::opt::ArgList &Args, StringRef Component, + FileType Type = ToolChain::FT_Static) const; // Returns <ResourceDir>/lib/<OSName>/<arch>. This is used by runtimes (such // as OpenMP) to find arch-specific libraries. @@ -401,6 +412,9 @@ public: /// Test whether this toolchain defaults to PIE. virtual bool isPIEDefault() const = 0; + /// Test whether this toolchaind defaults to non-executable stacks. + virtual bool isNoExecStackDefault() const; + /// Tests whether this toolchain forces its default for PIC, PIE or /// non-PIC. If this returns true, any PIC related flags should be ignored /// and instead the results of \c isPICDefault() and \c isPIEDefault() are @@ -512,6 +526,10 @@ public: // given compilation arguments. virtual CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const; + // GetUnwindLibType - Determine the unwind library type to use with the + // given compilation arguments. + virtual UnwindLibType GetUnwindLibType(const llvm::opt::ArgList &Args) const; + /// AddClangCXXStdlibIncludeArgs - Add the clang -cc1 level arguments to set /// the include paths to use for the given C++ standard library type. virtual void @@ -564,7 +582,9 @@ public: virtual SanitizerMask getSupportedSanitizers() const; /// Return sanitizers which are enabled by default. - virtual SanitizerMask getDefaultSanitizers() const { return 0; } + virtual SanitizerMask getDefaultSanitizers() const { + return SanitizerMask(); + } }; /// Set a ToolChain's effective triple. Reset it when the registration object diff --git a/include/clang/Driver/Types.def b/include/clang/Driver/Types.def index c25bc4b080..d2aaf58f15 100644 --- a/include/clang/Driver/Types.def +++ b/include/clang/Driver/Types.def @@ -1,9 +1,8 @@ //===--- Types.def - Driver Type info ---------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // diff --git a/include/clang/Driver/Types.h b/include/clang/Driver/Types.h index 5bc6668a0d..53afada7ab 100644 --- a/include/clang/Driver/Types.h +++ b/include/clang/Driver/Types.h @@ -1,9 +1,8 @@ //===--- Types.h - Input & Temporary Driver Types ---------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// diff --git a/include/clang/Driver/Util.h b/include/clang/Driver/Util.h index 07495a1850..6788420912 100644 --- a/include/clang/Driver/Util.h +++ b/include/clang/Driver/Util.h @@ -1,9 +1,8 @@ //===--- Util.h - Common Driver Utilities -----------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// diff --git a/include/clang/Driver/XRayArgs.h b/include/clang/Driver/XRayArgs.h index c7ca945291..fa2583f4b9 100644 --- a/include/clang/Driver/XRayArgs.h +++ b/include/clang/Driver/XRayArgs.h @@ -1,9 +1,8 @@ //===--- XRayArgs.h - Arguments for XRay ------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_DRIVER_XRAYARGS_H |