]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/clang/include/clang/Driver/Options.td
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm-project / clang / include / clang / Driver / Options.td
1 //===--- Options.td - Options for clang -----------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 //  This file defines the options accepted by clang.
10 //
11 //===----------------------------------------------------------------------===//
12
13 // Include the common option parsing interfaces.
14 include "llvm/Option/OptParser.td"
15
16 /////////
17 // Flags
18
19 // DriverOption - The option is a "driver" option, and should not be forwarded
20 // to other tools.
21 def DriverOption : OptionFlag;
22
23 // LinkerInput - The option is a linker input.
24 def LinkerInput : OptionFlag;
25
26 // NoArgumentUnused - Don't report argument unused warnings for this option; this
27 // is useful for options like -static or -dynamic which a user may always end up
28 // passing, even if the platform defaults to (or only supports) that option.
29 def NoArgumentUnused : OptionFlag;
30
31 // Unsupported - The option is unsupported, and the driver will reject command
32 // lines that use it.
33 def Unsupported : OptionFlag;
34
35 // Ignored - The option is unsupported, and the driver will silently ignore it.
36 def Ignored : OptionFlag;
37
38 // CoreOption - This is considered a "core" Clang option, available in both
39 // clang and clang-cl modes.
40 def CoreOption : OptionFlag;
41
42 // CLOption - This is a cl.exe compatibility option. Options with this flag
43 // are made available when the driver is running in CL compatibility mode.
44 def CLOption : OptionFlag;
45
46 // CC1Option - This option should be accepted by clang -cc1.
47 def CC1Option : OptionFlag;
48
49 // CC1AsOption - This option should be accepted by clang -cc1as.
50 def CC1AsOption : OptionFlag;
51
52 // NoDriverOption - This option should not be accepted by the driver.
53 def NoDriverOption : OptionFlag;
54
55 // A short name to show in documentation. The name will be interpreted as rST.
56 class DocName<string name> { string DocName = name; }
57
58 // A brief description to show in documentation, interpreted as rST.
59 class DocBrief<code descr> { code DocBrief = descr; }
60
61 // Indicates that this group should be flattened into its parent when generating
62 // documentation.
63 class DocFlatten { bit DocFlatten = 1; }
64
65 // Indicates that this warning is ignored, but accepted with a warning for
66 // GCC compatibility.
67 class IgnoredGCCCompat : Flags<[HelpHidden]> {}
68
69 /////////
70 // Groups
71
72 def Action_Group : OptionGroup<"<action group>">, DocName<"Actions">,
73                    DocBrief<[{The action to perform on the input.}]>;
74
75 // Meta-group for options which are only used for compilation,
76 // and not linking etc.
77 def CompileOnly_Group : OptionGroup<"<CompileOnly group>">,
78                         DocName<"Compilation flags">, DocBrief<[{
79 Flags controlling the behavior of Clang during compilation. These flags have
80 no effect during actions that do not perform compilation.}]>;
81
82 def Preprocessor_Group : OptionGroup<"<Preprocessor group>">,
83                          Group<CompileOnly_Group>,
84                          DocName<"Preprocessor flags">, DocBrief<[{
85 Flags controlling the behavior of the Clang preprocessor.}]>;
86
87 def IncludePath_Group : OptionGroup<"<I/i group>">, Group<Preprocessor_Group>,
88                         DocName<"Include path management">,
89                         DocBrief<[{
90 Flags controlling how ``#include``\s are resolved to files.}]>;
91
92 def I_Group : OptionGroup<"<I group>">, Group<IncludePath_Group>, DocFlatten;
93 def i_Group : OptionGroup<"<i group>">, Group<IncludePath_Group>, DocFlatten;
94 def clang_i_Group : OptionGroup<"<clang i group>">, Group<i_Group>, DocFlatten;
95
96 def M_Group : OptionGroup<"<M group>">, Group<Preprocessor_Group>,
97               DocName<"Dependency file generation">, DocBrief<[{
98 Flags controlling generation of a dependency file for ``make``-like build
99 systems.}]>;
100
101 def d_Group : OptionGroup<"<d group>">, Group<Preprocessor_Group>,
102               DocName<"Dumping preprocessor state">, DocBrief<[{
103 Flags allowing the state of the preprocessor to be dumped in various ways.}]>;
104
105 def Diag_Group : OptionGroup<"<W/R group>">, Group<CompileOnly_Group>,
106                  DocName<"Diagnostic flags">, DocBrief<[{
107 Flags controlling which warnings, errors, and remarks Clang will generate.
108 See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.}]>;
109
110 def R_Group : OptionGroup<"<R group>">, Group<Diag_Group>, DocFlatten;
111 def R_value_Group : OptionGroup<"<R (with value) group>">, Group<R_Group>,
112                     DocFlatten;
113 def W_Group : OptionGroup<"<W group>">, Group<Diag_Group>, DocFlatten;
114 def W_value_Group : OptionGroup<"<W (with value) group>">, Group<W_Group>,
115                     DocFlatten;
116
117 def f_Group : OptionGroup<"<f group>">, Group<CompileOnly_Group>,
118               DocName<"Target-independent compilation options">;
119
120 def f_clang_Group : OptionGroup<"<f (clang-only) group>">,
121                     Group<CompileOnly_Group>, DocFlatten;
122 def pedantic_Group : OptionGroup<"<pedantic group>">, Group<f_Group>,
123                      DocFlatten;
124 def opencl_Group : OptionGroup<"<opencl group>">, Group<f_Group>,
125                    DocName<"OpenCL flags">;
126
127 def sycl_Group : OptionGroup<"<SYCL group>">, Group<f_Group>,
128                  DocName<"SYCL flags">;
129
130 def m_Group : OptionGroup<"<m group>">, Group<CompileOnly_Group>,
131               DocName<"Target-dependent compilation options">;
132
133 // Feature groups - these take command line options that correspond directly to
134 // target specific features and can be translated directly from command line
135 // options.
136 def m_aarch64_Features_Group : OptionGroup<"<aarch64 features group>">,
137                                Group<m_Group>, DocName<"AARCH64">;
138 def m_amdgpu_Features_Group : OptionGroup<"<amdgpu features group>">,
139                               Group<m_Group>, DocName<"AMDGPU">;
140 def m_arm_Features_Group : OptionGroup<"<arm features group>">,
141                            Group<m_Group>, DocName<"ARM">;
142 def m_hexagon_Features_Group : OptionGroup<"<hexagon features group>">,
143                                Group<m_Group>, DocName<"Hexagon">;
144 // The features added by this group will not be added to target features.
145 // These are explicitly handled.
146 def m_hexagon_Features_HVX_Group : OptionGroup<"<hexagon features group>">,
147                                    Group<m_Group>, DocName<"Hexagon">;
148 def m_mips_Features_Group : OptionGroup<"<mips features group>">,
149                             Group<m_Group>, DocName<"MIPS">;
150 def m_ppc_Features_Group : OptionGroup<"<ppc features group>">,
151                            Group<m_Group>, DocName<"PowerPC">;
152 def m_wasm_Features_Group : OptionGroup<"<wasm features group>">,
153                             Group<m_Group>, DocName<"WebAssembly">;
154 // The features added by this group will not be added to target features.
155 // These are explicitly handled.
156 def m_wasm_Features_Driver_Group : OptionGroup<"<wasm driver features group>">,
157                                    Group<m_Group>, DocName<"WebAssembly Driver">;
158 def m_x86_Features_Group : OptionGroup<"<x86 features group>">,
159                            Group<m_Group>, Flags<[CoreOption]>, DocName<"X86">;
160 def m_riscv_Features_Group : OptionGroup<"<riscv features group>">,
161                              Group<m_Group>, DocName<"RISCV">;
162
163 def m_libc_Group : OptionGroup<"<m libc group>">, Group<m_mips_Features_Group>,
164                    Flags<[HelpHidden]>;
165
166 def O_Group : OptionGroup<"<O group>">, Group<CompileOnly_Group>,
167               DocName<"Optimization level">, DocBrief<[{
168 Flags controlling how much optimization should be performed.}]>;
169
170 def DebugInfo_Group : OptionGroup<"<g group>">, Group<CompileOnly_Group>,
171                       DocName<"Debug information generation">, DocBrief<[{
172 Flags controlling how much and what kind of debug information should be
173 generated.}]>;
174
175 def g_Group : OptionGroup<"<g group>">, Group<DebugInfo_Group>,
176               DocName<"Kind and level of debug information">;
177 def gN_Group : OptionGroup<"<gN group>">, Group<g_Group>,
178                DocName<"Debug level">;
179 def ggdbN_Group : OptionGroup<"<ggdbN group>">, Group<gN_Group>, DocFlatten;
180 def gTune_Group : OptionGroup<"<gTune group>">, Group<g_Group>,
181                   DocName<"Debugger to tune debug information for">;
182 def g_flags_Group : OptionGroup<"<g flags group>">, Group<DebugInfo_Group>,
183                     DocName<"Debug information flags">;
184
185 def StaticAnalyzer_Group : OptionGroup<"<Static analyzer group>">,
186                            DocName<"Static analyzer flags">, DocBrief<[{
187 Flags controlling the behavior of the Clang Static Analyzer.}]>;
188
189 // gfortran options that we recognize in the driver and pass along when
190 // invoking GCC to compile Fortran code.
191 def gfortran_Group : OptionGroup<"<gfortran group>">,
192                      DocName<"Fortran compilation flags">, DocBrief<[{
193 Flags that will be passed onto the ``gfortran`` compiler when Clang is given
194 a Fortran input.}]>;
195
196 def Link_Group : OptionGroup<"<T/e/s/t/u group>">, DocName<"Linker flags">,
197                  DocBrief<[{Flags that are passed on to the linker}]>;
198 def T_Group : OptionGroup<"<T group>">, Group<Link_Group>, DocFlatten;
199 def u_Group : OptionGroup<"<u group>">, Group<Link_Group>, DocFlatten;
200
201 def reserved_lib_Group : OptionGroup<"<reserved libs group>">,
202                          Flags<[Unsupported]>;
203
204 // Temporary groups for clang options which we know we don't support,
205 // but don't want to verbosely warn the user about.
206 def clang_ignored_f_Group : OptionGroup<"<clang ignored f group>">,
207   Group<f_Group>, Flags<[Ignored]>;
208 def clang_ignored_m_Group : OptionGroup<"<clang ignored m group>">,
209   Group<m_Group>, Flags<[Ignored]>;
210
211 // Group for clang options in the process of deprecation.
212 // Please include the version that deprecated the flag as comment to allow
213 // easier garbage collection.
214 def clang_ignored_legacy_options_Group : OptionGroup<"<clang legacy flags>">,
215   Group<f_Group>, Flags<[Ignored]>;
216
217 // Retired with clang-5.0
218 def : Flag<["-"], "fslp-vectorize-aggressive">, Group<clang_ignored_legacy_options_Group>;
219 def : Flag<["-"], "fno-slp-vectorize-aggressive">, Group<clang_ignored_legacy_options_Group>;
220
221 // Retired with clang-10.0. Previously controlled X86 MPX ISA.
222 def mmpx : Flag<["-"], "mmpx">, Group<clang_ignored_legacy_options_Group>;
223 def mno_mpx : Flag<["-"], "mno-mpx">, Group<clang_ignored_legacy_options_Group>;
224
225 // Group that ignores all gcc optimizations that won't be implemented
226 def clang_ignored_gcc_optimization_f_Group : OptionGroup<
227   "<clang_ignored_gcc_optimization_f_Group>">, Group<f_Group>, Flags<[Ignored]>;
228
229 // A boolean option which is opt-in in CC1. The positive option exists in CC1 and
230 // Args.hasArg(OPT_ffoo) is used to check that the flag is enabled.
231 // This is useful if the option is usually disabled.
232 multiclass OptInFFlag<string name, string pos_prefix, string neg_prefix="",
233                       string help="", list<OptionFlag> flags=[]> {
234   def f#NAME : Flag<["-"], "f"#name>, Flags<!listconcat([CC1Option], flags)>,
235                Group<f_Group>, HelpText<!strconcat(pos_prefix, help)>;
236   def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<flags>,
237                Group<f_Group>, HelpText<!strconcat(neg_prefix, help)>;
238 }
239
240 // A boolean option which is opt-out in CC1. The negative option exists in CC1 and
241 // Args.hasArg(OPT_fno_foo) is used to check that the flag is disabled.
242 multiclass OptOutFFlag<string name, string pos_prefix, string neg_prefix,
243                        string help="", list<OptionFlag> flags=[]> {
244   def f#NAME : Flag<["-"], "f"#name>, Flags<flags>,
245                Group<f_Group>, HelpText<!strconcat(pos_prefix, help)>;
246   def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<!listconcat([CC1Option], flags)>,
247                Group<f_Group>, HelpText<!strconcat(neg_prefix, help)>;
248 }
249
250 /////////
251 // Options
252
253 // The internal option ID must be a valid C++ identifier and results in a
254 // clang::driver::options::OPT_XX enum constant for XX.
255 //
256 // We want to unambiguously be able to refer to options from the driver source
257 // code, for this reason the option name is mangled into an ID. This mangling
258 // isn't guaranteed to have an inverse, but for practical purposes it does.
259 //
260 // The mangling scheme is to ignore the leading '-', and perform the following
261 // substitutions:
262 //   _ => __
263 //   - => _
264 //   / => _SLASH
265 //   # => _HASH
266 //   ? => _QUESTION
267 //   , => _COMMA
268 //   = => _EQ
269 //   C++ => CXX
270 //   . => _
271
272 // Developer Driver Options
273
274 def internal_Group : OptionGroup<"<clang internal options>">, Flags<[HelpHidden]>;
275 def internal_driver_Group : OptionGroup<"<clang driver internal options>">,
276   Group<internal_Group>, HelpText<"DRIVER OPTIONS">;
277 def internal_debug_Group :
278   OptionGroup<"<clang debug/development internal options>">,
279   Group<internal_Group>, HelpText<"DEBUG/DEVELOPMENT OPTIONS">;
280
281 class InternalDriverOpt : Group<internal_driver_Group>,
282   Flags<[DriverOption, HelpHidden]>;
283 def driver_mode : Joined<["--"], "driver-mode=">, Group<internal_driver_Group>,
284   Flags<[CoreOption, DriverOption, HelpHidden]>,
285   HelpText<"Set the driver mode to either 'gcc', 'g++', 'cpp', or 'cl'">;
286 def rsp_quoting : Joined<["--"], "rsp-quoting=">, Group<internal_driver_Group>,
287   Flags<[CoreOption, DriverOption, HelpHidden]>,
288   HelpText<"Set the rsp quoting to either 'posix', or 'windows'">;
289 def ccc_gcc_name : Separate<["-"], "ccc-gcc-name">, InternalDriverOpt,
290   HelpText<"Name for native GCC compiler">,
291   MetaVarName<"<gcc-path>">;
292
293 class InternalDebugOpt : Group<internal_debug_Group>,
294   Flags<[DriverOption, HelpHidden, CoreOption]>;
295 def ccc_install_dir : Separate<["-"], "ccc-install-dir">, InternalDebugOpt,
296   HelpText<"Simulate installation in the given directory">;
297 def ccc_print_phases : Flag<["-"], "ccc-print-phases">, InternalDebugOpt,
298   HelpText<"Dump list of actions to perform">;
299 def ccc_print_bindings : Flag<["-"], "ccc-print-bindings">, InternalDebugOpt,
300   HelpText<"Show bindings of tools to actions">;
301
302 def ccc_arcmt_check : Flag<["-"], "ccc-arcmt-check">, InternalDriverOpt,
303   HelpText<"Check for ARC migration issues that need manual handling">;
304 def ccc_arcmt_modify : Flag<["-"], "ccc-arcmt-modify">, InternalDriverOpt,
305   HelpText<"Apply modifications to files to conform to ARC">;
306 def ccc_arcmt_migrate : Separate<["-"], "ccc-arcmt-migrate">, InternalDriverOpt,
307   HelpText<"Apply modifications and produces temporary files that conform to ARC">;
308 def arcmt_migrate_report_output : Separate<["-"], "arcmt-migrate-report-output">,
309   HelpText<"Output path for the plist report">,  Flags<[CC1Option]>;
310 def arcmt_migrate_emit_arc_errors : Flag<["-"], "arcmt-migrate-emit-errors">,
311   HelpText<"Emit ARC errors even if the migrator can fix them">,
312   Flags<[CC1Option]>;
313 def gen_reproducer: Flag<["-"], "gen-reproducer">, InternalDebugOpt,
314   HelpText<"Auto-generates preprocessed source files and a reproduction script">;
315 def gen_cdb_fragment_path: Separate<["-"], "gen-cdb-fragment-path">, InternalDebugOpt,
316   HelpText<"Emit a compilation database fragment to the specified directory">;
317
318 def _migrate : Flag<["--"], "migrate">, Flags<[DriverOption]>,
319   HelpText<"Run the migrator">;
320 def ccc_objcmt_migrate : Separate<["-"], "ccc-objcmt-migrate">,
321   InternalDriverOpt,
322   HelpText<"Apply modifications and produces temporary files to migrate to "
323    "modern ObjC syntax">;
324 def objcmt_migrate_literals : Flag<["-"], "objcmt-migrate-literals">, Flags<[CC1Option]>,
325   HelpText<"Enable migration to modern ObjC literals">;
326 def objcmt_migrate_subscripting : Flag<["-"], "objcmt-migrate-subscripting">, Flags<[CC1Option]>,
327   HelpText<"Enable migration to modern ObjC subscripting">;
328 def objcmt_migrate_property : Flag<["-"], "objcmt-migrate-property">, Flags<[CC1Option]>,
329   HelpText<"Enable migration to modern ObjC property">;
330 def objcmt_migrate_all : Flag<["-"], "objcmt-migrate-all">, Flags<[CC1Option]>,
331   HelpText<"Enable migration to modern ObjC">;
332 def objcmt_migrate_readonly_property : Flag<["-"], "objcmt-migrate-readonly-property">, Flags<[CC1Option]>,
333   HelpText<"Enable migration to modern ObjC readonly property">;
334 def objcmt_migrate_readwrite_property : Flag<["-"], "objcmt-migrate-readwrite-property">, Flags<[CC1Option]>,
335   HelpText<"Enable migration to modern ObjC readwrite property">;
336 def objcmt_migrate_property_dot_syntax : Flag<["-"], "objcmt-migrate-property-dot-syntax">, Flags<[CC1Option]>,
337   HelpText<"Enable migration of setter/getter messages to property-dot syntax">;
338 def objcmt_migrate_annotation : Flag<["-"], "objcmt-migrate-annotation">, Flags<[CC1Option]>,
339   HelpText<"Enable migration to property and method annotations">;
340 def objcmt_migrate_instancetype : Flag<["-"], "objcmt-migrate-instancetype">, Flags<[CC1Option]>,
341   HelpText<"Enable migration to infer instancetype for method result type">;
342 def objcmt_migrate_nsmacros : Flag<["-"], "objcmt-migrate-ns-macros">, Flags<[CC1Option]>,
343   HelpText<"Enable migration to NS_ENUM/NS_OPTIONS macros">;
344 def objcmt_migrate_protocol_conformance : Flag<["-"], "objcmt-migrate-protocol-conformance">, Flags<[CC1Option]>,
345   HelpText<"Enable migration to add protocol conformance on classes">;
346 def objcmt_atomic_property : Flag<["-"], "objcmt-atomic-property">, Flags<[CC1Option]>,
347   HelpText<"Make migration to 'atomic' properties">;
348 def objcmt_returns_innerpointer_property : Flag<["-"], "objcmt-returns-innerpointer-property">, Flags<[CC1Option]>,
349   HelpText<"Enable migration to annotate property with NS_RETURNS_INNER_POINTER">;
350 def objcmt_ns_nonatomic_iosonly: Flag<["-"], "objcmt-ns-nonatomic-iosonly">, Flags<[CC1Option]>,
351   HelpText<"Enable migration to use NS_NONATOMIC_IOSONLY macro for setting property's 'atomic' attribute">;
352 def objcmt_migrate_designated_init : Flag<["-"], "objcmt-migrate-designated-init">, Flags<[CC1Option]>,
353   HelpText<"Enable migration to infer NS_DESIGNATED_INITIALIZER for initializer methods">;
354 def objcmt_whitelist_dir_path: Joined<["-"], "objcmt-whitelist-dir-path=">, Flags<[CC1Option]>,
355   HelpText<"Only modify files with a filename contained in the provided directory path">;
356 // The misspelt "white-list" [sic] alias is due for removal.
357 def : Joined<["-"], "objcmt-white-list-dir-path=">, Flags<[CC1Option]>,
358     Alias<objcmt_whitelist_dir_path>;
359
360 // Make sure all other -ccc- options are rejected.
361 def ccc_ : Joined<["-"], "ccc-">, Group<internal_Group>, Flags<[Unsupported]>;
362
363 // Standard Options
364
365 def _HASH_HASH_HASH : Flag<["-"], "###">, Flags<[DriverOption, CoreOption]>,
366     HelpText<"Print (but do not run) the commands to run for this compilation">;
367 def _DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>,
368     Flags<[DriverOption, CoreOption]>;
369 def A : JoinedOrSeparate<["-"], "A">, Flags<[RenderJoined]>, Group<gfortran_Group>;
370 def B : JoinedOrSeparate<["-"], "B">, MetaVarName<"<dir>">,
371     HelpText<"Add <dir> to search path for binaries and object files used implicitly">;
372 def CC : Flag<["-"], "CC">, Flags<[CC1Option]>, Group<Preprocessor_Group>,
373     HelpText<"Include comments from within macros in preprocessed output">;
374 def C : Flag<["-"], "C">, Flags<[CC1Option]>, Group<Preprocessor_Group>,
375     HelpText<"Include comments in preprocessed output">;
376 def D : JoinedOrSeparate<["-"], "D">, Group<Preprocessor_Group>,
377     Flags<[CC1Option]>, MetaVarName<"<macro>=<value>">,
378     HelpText<"Define <macro> to <value> (or 1 if <value> omitted)">;
379 def E : Flag<["-"], "E">, Flags<[DriverOption,CC1Option]>, Group<Action_Group>,
380     HelpText<"Only run the preprocessor">;
381 def F : JoinedOrSeparate<["-"], "F">, Flags<[RenderJoined,CC1Option]>,
382     HelpText<"Add directory to framework include search path">;
383 def G : JoinedOrSeparate<["-"], "G">, Flags<[DriverOption]>, Group<m_Group>,
384     MetaVarName<"<size>">, HelpText<"Put objects of at most <size> bytes "
385     "into small data section (MIPS / Hexagon)">;
386 def G_EQ : Joined<["-"], "G=">, Flags<[DriverOption]>, Group<m_Group>, Alias<G>;
387 def H : Flag<["-"], "H">, Flags<[CC1Option]>, Group<Preprocessor_Group>,
388     HelpText<"Show header includes and nesting depth">;
389 def I_ : Flag<["-"], "I-">, Group<I_Group>,
390     HelpText<"Restrict all prior -I flags to double-quoted inclusion and "
391              "remove current directory from include path">;
392 def I : JoinedOrSeparate<["-"], "I">, Group<I_Group>,
393     Flags<[CC1Option,CC1AsOption]>, MetaVarName<"<dir>">,
394     HelpText<"Add directory to include search path">;
395 def L : JoinedOrSeparate<["-"], "L">, Flags<[RenderJoined]>, Group<Link_Group>,
396     MetaVarName<"<dir>">, HelpText<"Add directory to library search path">;
397 def MD : Flag<["-"], "MD">, Group<M_Group>,
398     HelpText<"Write a depfile containing user and system headers">;
399 def MMD : Flag<["-"], "MMD">, Group<M_Group>,
400     HelpText<"Write a depfile containing user headers">;
401 def M : Flag<["-"], "M">, Group<M_Group>,
402     HelpText<"Like -MD, but also implies -E and writes to stdout by default">;
403 def MM : Flag<["-"], "MM">, Group<M_Group>,
404     HelpText<"Like -MMD, but also implies -E and writes to stdout by default">;
405 def MF : JoinedOrSeparate<["-"], "MF">, Group<M_Group>,
406     HelpText<"Write depfile output from -MMD, -MD, -MM, or -M to <file>">,
407     MetaVarName<"<file>">;
408 def MG : Flag<["-"], "MG">, Group<M_Group>, Flags<[CC1Option]>,
409     HelpText<"Add missing headers to depfile">;
410 def MJ : JoinedOrSeparate<["-"], "MJ">, Group<M_Group>,
411     HelpText<"Write a compilation database entry per input">;
412 def MP : Flag<["-"], "MP">, Group<M_Group>, Flags<[CC1Option]>,
413     HelpText<"Create phony target for each dependency (other than main file)">;
414 def MQ : JoinedOrSeparate<["-"], "MQ">, Group<M_Group>, Flags<[CC1Option]>,
415     HelpText<"Specify name of main file output to quote in depfile">;
416 def MT : JoinedOrSeparate<["-"], "MT">, Group<M_Group>, Flags<[CC1Option]>,
417     HelpText<"Specify name of main file output in depfile">;
418 def MV : Flag<["-"], "MV">, Group<M_Group>, Flags<[CC1Option]>,
419     HelpText<"Use NMake/Jom format for the depfile">;
420 def Mach : Flag<["-"], "Mach">, Group<Link_Group>;
421 def O0 : Flag<["-"], "O0">, Group<O_Group>, Flags<[CC1Option, HelpHidden]>;
422 def O4 : Flag<["-"], "O4">, Group<O_Group>, Flags<[CC1Option, HelpHidden]>;
423 def ObjCXX : Flag<["-"], "ObjC++">, Flags<[DriverOption]>,
424   HelpText<"Treat source input files as Objective-C++ inputs">;
425 def ObjC : Flag<["-"], "ObjC">, Flags<[DriverOption]>,
426   HelpText<"Treat source input files as Objective-C inputs">;
427 def O : Joined<["-"], "O">, Group<O_Group>, Flags<[CC1Option]>;
428 def O_flag : Flag<["-"], "O">, Flags<[CC1Option]>, Alias<O>, AliasArgs<["1"]>;
429 def Ofast : Joined<["-"], "Ofast">, Group<O_Group>, Flags<[CC1Option]>;
430 def P : Flag<["-"], "P">, Flags<[CC1Option]>, Group<Preprocessor_Group>,
431   HelpText<"Disable linemarker output in -E mode">;
432 def Qy : Flag<["-"], "Qy">, Flags<[CC1Option]>,
433   HelpText<"Emit metadata containing compiler name and version">;
434 def Qn : Flag<["-"], "Qn">, Flags<[CC1Option]>,
435   HelpText<"Do not emit metadata containing compiler name and version">;
436 def : Flag<["-"], "fident">, Group<f_Group>, Alias<Qy>, Flags<[CC1Option]>;
437 def : Flag<["-"], "fno-ident">, Group<f_Group>, Alias<Qn>, Flags<[CC1Option]>;
438 def Qunused_arguments : Flag<["-"], "Qunused-arguments">, Flags<[DriverOption, CoreOption]>,
439   HelpText<"Don't emit warning for unused driver arguments">;
440 def Q : Flag<["-"], "Q">, IgnoredGCCCompat;
441 def Rpass_EQ : Joined<["-"], "Rpass=">, Group<R_value_Group>, Flags<[CC1Option]>,
442   HelpText<"Report transformations performed by optimization passes whose "
443            "name matches the given POSIX regular expression">;
444 def Rpass_missed_EQ : Joined<["-"], "Rpass-missed=">, Group<R_value_Group>,
445   Flags<[CC1Option]>,
446   HelpText<"Report missed transformations by optimization passes whose "
447            "name matches the given POSIX regular expression">;
448 def Rpass_analysis_EQ : Joined<["-"], "Rpass-analysis=">, Group<R_value_Group>,
449   Flags<[CC1Option]>,
450   HelpText<"Report transformation analysis from optimization passes whose "
451            "name matches the given POSIX regular expression">;
452 def R_Joined : Joined<["-"], "R">, Group<R_Group>, Flags<[CC1Option, CoreOption]>,
453   MetaVarName<"<remark>">, HelpText<"Enable the specified remark">;
454 def S : Flag<["-"], "S">, Flags<[DriverOption,CC1Option]>, Group<Action_Group>,
455   HelpText<"Only run preprocess and compilation steps">;
456 def Tbss : JoinedOrSeparate<["-"], "Tbss">, Group<T_Group>,
457   MetaVarName<"<addr>">, HelpText<"Set starting address of BSS to <addr>">;
458 def Tdata : JoinedOrSeparate<["-"], "Tdata">, Group<T_Group>,
459   MetaVarName<"<addr>">, HelpText<"Set starting address of DATA to <addr>">;
460 def Ttext : JoinedOrSeparate<["-"], "Ttext">, Group<T_Group>,
461   MetaVarName<"<addr>">, HelpText<"Set starting address of TEXT to <addr>">;
462 def T : JoinedOrSeparate<["-"], "T">, Group<T_Group>,
463   MetaVarName<"<script>">, HelpText<"Specify <script> as linker script">;
464 def U : JoinedOrSeparate<["-"], "U">, Group<Preprocessor_Group>,
465   Flags<[CC1Option]>, MetaVarName<"<macro>">, HelpText<"Undefine macro <macro>">;
466 def V : JoinedOrSeparate<["-"], "V">, Flags<[DriverOption, Unsupported]>;
467 def Wa_COMMA : CommaJoined<["-"], "Wa,">,
468   HelpText<"Pass the comma separated arguments in <arg> to the assembler">,
469   MetaVarName<"<arg>">;
470 def Wall : Flag<["-"], "Wall">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
471 def WCL4 : Flag<["-"], "WCL4">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
472 def Wdeprecated : Flag<["-"], "Wdeprecated">, Group<W_Group>, Flags<[CC1Option]>,
473   HelpText<"Enable warnings for deprecated constructs and define __DEPRECATED">;
474 def Wno_deprecated : Flag<["-"], "Wno-deprecated">, Group<W_Group>, Flags<[CC1Option]>;
475 def Wl_COMMA : CommaJoined<["-"], "Wl,">, Flags<[LinkerInput, RenderAsInput]>,
476   HelpText<"Pass the comma separated arguments in <arg> to the linker">,
477   MetaVarName<"<arg>">, Group<Link_Group>;
478 // FIXME: This is broken; these should not be Joined arguments.
479 def Wno_nonportable_cfstrings : Joined<["-"], "Wno-nonportable-cfstrings">, Group<W_Group>,
480   Flags<[CC1Option]>;
481 def Wnonportable_cfstrings : Joined<["-"], "Wnonportable-cfstrings">, Group<W_Group>,
482   Flags<[CC1Option]>;
483 def Wp_COMMA : CommaJoined<["-"], "Wp,">,
484   HelpText<"Pass the comma separated arguments in <arg> to the preprocessor">,
485   MetaVarName<"<arg>">, Group<Preprocessor_Group>;
486 def Wundef_prefix_EQ : CommaJoined<["-"], "Wundef-prefix=">, Group<W_value_Group>,
487   Flags<[CC1Option, CoreOption, HelpHidden]>, MetaVarName<"<arg>">,
488   HelpText<"Enable warnings for undefined macros with a prefix in the comma separated list <arg>">;
489 def Wwrite_strings : Flag<["-"], "Wwrite-strings">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
490 def Wno_write_strings : Flag<["-"], "Wno-write-strings">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
491 def W_Joined : Joined<["-"], "W">, Group<W_Group>, Flags<[CC1Option, CoreOption]>,
492   MetaVarName<"<warning>">, HelpText<"Enable the specified warning">;
493 def Xanalyzer : Separate<["-"], "Xanalyzer">,
494   HelpText<"Pass <arg> to the static analyzer">, MetaVarName<"<arg>">,
495   Group<StaticAnalyzer_Group>;
496 def Xarch__ : JoinedAndSeparate<["-"], "Xarch_">, Flags<[DriverOption]>;
497 def Xarch_host : Separate<["-"], "Xarch_host">, Flags<[DriverOption]>,
498   HelpText<"Pass <arg> to the CUDA/HIP host compilation">, MetaVarName<"<arg>">;
499 def Xarch_device : Separate<["-"], "Xarch_device">, Flags<[DriverOption]>,
500   HelpText<"Pass <arg> to the CUDA/HIP device compilation">, MetaVarName<"<arg>">;
501 def Xassembler : Separate<["-"], "Xassembler">,
502   HelpText<"Pass <arg> to the assembler">, MetaVarName<"<arg>">,
503   Group<CompileOnly_Group>;
504 def Xclang : Separate<["-"], "Xclang">,
505   HelpText<"Pass <arg> to the clang compiler">, MetaVarName<"<arg>">,
506   Flags<[DriverOption, CoreOption]>, Group<CompileOnly_Group>;
507 def Xcuda_fatbinary : Separate<["-"], "Xcuda-fatbinary">,
508   HelpText<"Pass <arg> to fatbinary invocation">, MetaVarName<"<arg>">;
509 def Xcuda_ptxas : Separate<["-"], "Xcuda-ptxas">,
510   HelpText<"Pass <arg> to the ptxas assembler">, MetaVarName<"<arg>">;
511 def Xopenmp_target : Separate<["-"], "Xopenmp-target">,
512   HelpText<"Pass <arg> to the target offloading toolchain.">, MetaVarName<"<arg>">;
513 def Xopenmp_target_EQ : JoinedAndSeparate<["-"], "Xopenmp-target=">,
514   HelpText<"Pass <arg> to the target offloading toolchain identified by <triple>.">,
515   MetaVarName<"<triple> <arg>">;
516 def z : Separate<["-"], "z">, Flags<[LinkerInput, RenderAsInput]>,
517   HelpText<"Pass -z <arg> to the linker">, MetaVarName<"<arg>">,
518   Group<Link_Group>;
519 def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, RenderAsInput]>,
520   HelpText<"Pass <arg> to the linker">, MetaVarName<"<arg>">,
521   Group<Link_Group>;
522 def Xpreprocessor : Separate<["-"], "Xpreprocessor">, Group<Preprocessor_Group>,
523   HelpText<"Pass <arg> to the preprocessor">, MetaVarName<"<arg>">;
524 def X_Flag : Flag<["-"], "X">, Group<Link_Group>;
525 def X_Joined : Joined<["-"], "X">, IgnoredGCCCompat;
526 def Z_Flag : Flag<["-"], "Z">, Group<Link_Group>;
527 // FIXME: All we do with this is reject it. Remove.
528 def Z_Joined : Joined<["-"], "Z">;
529 def all__load : Flag<["-"], "all_load">;
530 def allowable__client : Separate<["-"], "allowable_client">;
531 def ansi : Flag<["-", "--"], "ansi">;
532 def arch__errors__fatal : Flag<["-"], "arch_errors_fatal">;
533 def arch : Separate<["-"], "arch">, Flags<[DriverOption]>;
534 def arch__only : Separate<["-"], "arch_only">;
535 def a : Joined<["-"], "a">;
536 def autocomplete : Joined<["--"], "autocomplete=">;
537 def bind__at__load : Flag<["-"], "bind_at_load">;
538 def bundle__loader : Separate<["-"], "bundle_loader">;
539 def bundle : Flag<["-"], "bundle">;
540 def b : JoinedOrSeparate<["-"], "b">, Flags<[Unsupported]>;
541 def cl_opt_disable : Flag<["-"], "cl-opt-disable">, Group<opencl_Group>, Flags<[CC1Option]>,
542   HelpText<"OpenCL only. This option disables all optimizations. By default optimizations are enabled.">;
543 def cl_strict_aliasing : Flag<["-"], "cl-strict-aliasing">, Group<opencl_Group>, Flags<[CC1Option]>,
544   HelpText<"OpenCL only. This option is added for compatibility with OpenCL 1.0.">;
545 def cl_single_precision_constant : Flag<["-"], "cl-single-precision-constant">, Group<opencl_Group>, Flags<[CC1Option]>,
546   HelpText<"OpenCL only. Treat double precision floating-point constant as single precision constant.">;
547 def cl_finite_math_only : Flag<["-"], "cl-finite-math-only">, Group<opencl_Group>, Flags<[CC1Option]>,
548   HelpText<"OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.">;
549 def cl_kernel_arg_info : Flag<["-"], "cl-kernel-arg-info">, Group<opencl_Group>, Flags<[CC1Option]>,
550   HelpText<"OpenCL only. Generate kernel argument metadata.">;
551 def cl_unsafe_math_optimizations : Flag<["-"], "cl-unsafe-math-optimizations">, Group<opencl_Group>, Flags<[CC1Option]>,
552   HelpText<"OpenCL only. Allow unsafe floating-point optimizations.  Also implies -cl-no-signed-zeros and -cl-mad-enable.">;
553 def cl_fast_relaxed_math : Flag<["-"], "cl-fast-relaxed-math">, Group<opencl_Group>, Flags<[CC1Option]>,
554   HelpText<"OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines __FAST_RELAXED_MATH__.">;
555 def cl_mad_enable : Flag<["-"], "cl-mad-enable">, Group<opencl_Group>, Flags<[CC1Option]>,
556   HelpText<"OpenCL only. Allow use of less precise MAD computations in the generated binary.">;
557 def cl_no_signed_zeros : Flag<["-"], "cl-no-signed-zeros">, Group<opencl_Group>, Flags<[CC1Option]>,
558   HelpText<"OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.">;
559 def cl_std_EQ : Joined<["-"], "cl-std=">, Group<opencl_Group>, Flags<[CC1Option]>,
560   HelpText<"OpenCL language standard to compile for.">, Values<"cl,CL,cl1.1,CL1.1,cl1.2,CL1.2,cl2.0,CL2.0,clc++,CLC++">;
561 def cl_denorms_are_zero : Flag<["-"], "cl-denorms-are-zero">, Group<opencl_Group>,
562   HelpText<"OpenCL only. Allow denormals to be flushed to zero.">;
563 def cl_fp32_correctly_rounded_divide_sqrt : Flag<["-"], "cl-fp32-correctly-rounded-divide-sqrt">, Group<opencl_Group>, Flags<[CC1Option]>,
564   HelpText<"OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.">;
565 def cl_uniform_work_group_size : Flag<["-"], "cl-uniform-work-group-size">, Group<opencl_Group>, Flags<[CC1Option]>,
566   HelpText<"OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel">;
567 def client__name : JoinedOrSeparate<["-"], "client_name">;
568 def combine : Flag<["-", "--"], "combine">, Flags<[DriverOption, Unsupported]>;
569 def compatibility__version : JoinedOrSeparate<["-"], "compatibility_version">;
570 def config : Separate<["--"], "config">, Flags<[DriverOption]>,
571   HelpText<"Specifies configuration file">;
572 def config_system_dir_EQ : Joined<["--"], "config-system-dir=">, Flags<[DriverOption, HelpHidden]>,
573   HelpText<"System directory for configuration files">;
574 def config_user_dir_EQ : Joined<["--"], "config-user-dir=">, Flags<[DriverOption, HelpHidden]>,
575   HelpText<"User directory for configuration files">;
576 def coverage : Flag<["-", "--"], "coverage">, Flags<[CoreOption]>;
577 def cpp_precomp : Flag<["-"], "cpp-precomp">, Group<clang_ignored_f_Group>;
578 def current__version : JoinedOrSeparate<["-"], "current_version">;
579 def cxx_isystem : JoinedOrSeparate<["-"], "cxx-isystem">, Group<clang_i_Group>,
580   HelpText<"Add directory to the C++ SYSTEM include search path">, Flags<[CC1Option]>,
581   MetaVarName<"<directory>">;
582 def c : Flag<["-"], "c">, Flags<[DriverOption]>, Group<Action_Group>,
583   HelpText<"Only run preprocess, compile, and assemble steps">;
584 def fconvergent_functions : Flag<["-"], "fconvergent-functions">, Group<f_Group>, Flags<[CC1Option]>,
585   HelpText<"Assume functions may be convergent">;
586
587 def gpu_use_aux_triple_only : Flag<["--"], "gpu-use-aux-triple-only">,
588   InternalDriverOpt, HelpText<"Prepare '-aux-triple' only without populating "
589                               "'-aux-target-cpu' and '-aux-target-feature'.">;
590 def cuda_device_only : Flag<["--"], "cuda-device-only">,
591   HelpText<"Compile CUDA code for device only">;
592 def cuda_host_only : Flag<["--"], "cuda-host-only">,
593   HelpText<"Compile CUDA code for host only.  Has no effect on non-CUDA "
594            "compilations.">;
595 def cuda_compile_host_device : Flag<["--"], "cuda-compile-host-device">,
596   HelpText<"Compile CUDA code for both host and device (default).  Has no "
597            "effect on non-CUDA compilations.">;
598 def cuda_include_ptx_EQ : Joined<["--"], "cuda-include-ptx=">, Flags<[DriverOption]>,
599   HelpText<"Include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">;
600 def no_cuda_include_ptx_EQ : Joined<["--"], "no-cuda-include-ptx=">, Flags<[DriverOption]>,
601   HelpText<"Do not include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">;
602 def offload_arch_EQ : Joined<["--"], "offload-arch=">, Flags<[DriverOption]>,
603   HelpText<"CUDA/HIP offloading device architecture (e.g. sm_35, gfx906).  May be specified more than once.">;
604 def cuda_gpu_arch_EQ : Joined<["--"], "cuda-gpu-arch=">, Flags<[DriverOption]>,
605   Alias<offload_arch_EQ>;
606 def hip_link : Flag<["--"], "hip-link">,
607   HelpText<"Link clang-offload-bundler bundles for HIP">;
608 def no_offload_arch_EQ : Joined<["--"], "no-offload-arch=">, Flags<[DriverOption]>,
609   HelpText<"Remove CUDA/HIP offloading device architecture (e.g. sm_35, gfx906) from the list of devices to compile for. "
610            "'all' resets the list to its default value.">;
611 def emit_static_lib : Flag<["--"], "emit-static-lib">,
612   HelpText<"Enable linker job to emit a static library.">;
613 def no_cuda_gpu_arch_EQ : Joined<["--"], "no-cuda-gpu-arch=">, Flags<[DriverOption]>,
614   Alias<no_offload_arch_EQ>;
615 def cuda_noopt_device_debug : Flag<["--"], "cuda-noopt-device-debug">,
616   HelpText<"Enable device-side debug info generation. Disables ptxas optimizations.">;
617 def no_cuda_version_check : Flag<["--"], "no-cuda-version-check">,
618   HelpText<"Don't error out if the detected version of the CUDA install is "
619            "too low for the requested CUDA gpu architecture.">;
620 def no_cuda_noopt_device_debug : Flag<["--"], "no-cuda-noopt-device-debug">;
621 def cuda_path_EQ : Joined<["--"], "cuda-path=">, Group<i_Group>,
622   HelpText<"CUDA installation path">;
623 def cuda_path_ignore_env : Flag<["--"], "cuda-path-ignore-env">, Group<i_Group>,
624   HelpText<"Ignore environment variables to detect CUDA installation">;
625 def ptxas_path_EQ : Joined<["--"], "ptxas-path=">, Group<i_Group>,
626   HelpText<"Path to ptxas (used for compiling CUDA code)">;
627 def fcuda_flush_denormals_to_zero : Flag<["-"], "fcuda-flush-denormals-to-zero">,
628   HelpText<"Flush denormal floating point values to zero in CUDA device mode.">;
629 def fno_cuda_flush_denormals_to_zero : Flag<["-"], "fno-cuda-flush-denormals-to-zero">;
630 defm cuda_approx_transcendentals : OptInFFlag<"cuda-approx-transcendentals", "Use", "Don't use",
631   " approximate transcendental functions">;
632 defm gpu_rdc : OptInFFlag<"gpu-rdc",
633   "Generate relocatable device code, also known as separate compilation mode", "", "">;
634 def : Flag<["-"], "fcuda-rdc">, Alias<fgpu_rdc>;
635 def : Flag<["-"], "fno-cuda-rdc">, Alias<fno_gpu_rdc>;
636 defm cuda_short_ptr : OptInFFlag<"cuda-short-ptr",
637   "Use 32-bit pointers for accessing const/local/shared address spaces">;
638 def rocm_path_EQ : Joined<["--"], "rocm-path=">, Group<i_Group>,
639   HelpText<"ROCm installation path, used for finding and automatically linking required bitcode libraries.">;
640 def rocm_device_lib_path_EQ : Joined<["--"], "rocm-device-lib-path=">, Group<Link_Group>,
641   HelpText<"ROCm device library path. Alternative to rocm-path.">;
642 def : Joined<["--"], "hip-device-lib-path=">, Alias<rocm_device_lib_path_EQ>;
643 def hip_device_lib_EQ : Joined<["--"], "hip-device-lib=">, Group<Link_Group>,
644   HelpText<"HIP device library">;
645 def hip_version_EQ : Joined<["--"], "hip-version=">,
646   HelpText<"HIP version in the format of major.minor.patch">;
647 def fhip_dump_offload_linker_script : Flag<["-"], "fhip-dump-offload-linker-script">,
648   Group<f_Group>, Flags<[NoArgumentUnused, HelpHidden]>;
649 defm hip_new_launch_api : OptInFFlag<"hip-new-launch-api",
650   "Use", "Don't use", " new kernel launching API for HIP">;
651 defm gpu_allow_device_init : OptInFFlag<"gpu-allow-device-init",
652   "Allow", "Don't allow", " device side init function in HIP">;
653 def gpu_max_threads_per_block_EQ : Joined<["--"], "gpu-max-threads-per-block=">,
654   Flags<[CC1Option]>,
655   HelpText<"Default max threads per block for kernel launch bounds for HIP">;
656 def libomptarget_nvptx_path_EQ : Joined<["--"], "libomptarget-nvptx-path=">, Group<i_Group>,
657   HelpText<"Path to libomptarget-nvptx libraries">;
658 def dD : Flag<["-"], "dD">, Group<d_Group>, Flags<[CC1Option]>,
659   HelpText<"Print macro definitions in -E mode in addition to normal output">;
660 def dI : Flag<["-"], "dI">, Group<d_Group>, Flags<[CC1Option]>,
661   HelpText<"Print include directives in -E mode in addition to normal output">;
662 def dM : Flag<["-"], "dM">, Group<d_Group>, Flags<[CC1Option]>,
663   HelpText<"Print macro definitions in -E mode instead of normal output">;
664 def dead__strip : Flag<["-"], "dead_strip">;
665 def dependency_file : Separate<["-"], "dependency-file">, Flags<[CC1Option]>,
666   HelpText<"Filename (or -) to write dependency output to">;
667 def dependency_dot : Separate<["-"], "dependency-dot">, Flags<[CC1Option]>,
668   HelpText<"Filename to write DOT-formatted header dependencies to">;
669 def module_dependency_dir : Separate<["-"], "module-dependency-dir">,
670   Flags<[CC1Option]>, HelpText<"Directory to dump module dependencies to">;
671 def dumpmachine : Flag<["-"], "dumpmachine">;
672 def dumpspecs : Flag<["-"], "dumpspecs">, Flags<[Unsupported]>;
673 def dumpversion : Flag<["-"], "dumpversion">;
674 def dylib__file : Separate<["-"], "dylib_file">;
675 def dylinker__install__name : JoinedOrSeparate<["-"], "dylinker_install_name">;
676 def dylinker : Flag<["-"], "dylinker">;
677 def dynamiclib : Flag<["-"], "dynamiclib">;
678 def dynamic : Flag<["-"], "dynamic">, Flags<[NoArgumentUnused]>;
679 def d_Flag : Flag<["-"], "d">, Group<d_Group>;
680 def d_Joined : Joined<["-"], "d">, Group<d_Group>;
681 def emit_ast : Flag<["-"], "emit-ast">,
682   HelpText<"Emit Clang AST files for source inputs">;
683 def emit_llvm : Flag<["-"], "emit-llvm">, Flags<[CC1Option]>, Group<Action_Group>,
684   HelpText<"Use the LLVM representation for assembler and object files">;
685 def emit_interface_stubs : Flag<["-"], "emit-interface-stubs">, Flags<[CC1Option]>, Group<Action_Group>,
686   HelpText<"Generate Inteface Stub Files.">;
687 def emit_merged_ifs : Flag<["-"], "emit-merged-ifs">,
688   Flags<[CC1Option]>, Group<Action_Group>,
689   HelpText<"Generate Interface Stub Files, emit merged text not binary.">;
690 def interface_stub_version_EQ : JoinedOrSeparate<["-"], "interface-stub-version=">, Flags<[CC1Option]>;
691 def exported__symbols__list : Separate<["-"], "exported_symbols_list">;
692 def e : JoinedOrSeparate<["-"], "e">, Group<Link_Group>;
693 def fmax_tokens_EQ : Joined<["-"], "fmax-tokens=">, Group<f_Group>, Flags<[CC1Option]>,
694   HelpText<"Max total number of preprocessed tokens for -Wmax-tokens.">;
695 def fPIC : Flag<["-"], "fPIC">, Group<f_Group>;
696 def fno_PIC : Flag<["-"], "fno-PIC">, Group<f_Group>;
697 def fPIE : Flag<["-"], "fPIE">, Group<f_Group>;
698 def fno_PIE : Flag<["-"], "fno-PIE">, Group<f_Group>;
699 defm access_control : OptOutFFlag<"no-access-control", "", "Disable C++ access control">;
700 def falign_functions : Flag<["-"], "falign-functions">, Group<f_Group>;
701 def falign_functions_EQ : Joined<["-"], "falign-functions=">, Group<f_Group>;
702 def fno_align_functions: Flag<["-"], "fno-align-functions">, Group<f_Group>;
703 defm allow_editor_placeholders : OptInFFlag<"allow-editor-placeholders", "Treat editor placeholders as valid source code">;
704 def fallow_unsupported : Flag<["-"], "fallow-unsupported">, Group<f_Group>;
705 def fapple_kext : Flag<["-"], "fapple-kext">, Group<f_Group>, Flags<[CC1Option]>,
706   HelpText<"Use Apple's kernel extensions ABI">;
707 def fapple_pragma_pack : Flag<["-"], "fapple-pragma-pack">, Group<f_Group>, Flags<[CC1Option]>,
708   HelpText<"Enable Apple gcc-compatible #pragma pack handling">;
709 def shared_libsan : Flag<["-"], "shared-libsan">,
710   HelpText<"Dynamically link the sanitizer runtime">;
711 def static_libsan : Flag<["-"], "static-libsan">,
712   HelpText<"Statically link the sanitizer runtime">;
713 def : Flag<["-"], "shared-libasan">, Alias<shared_libsan>;
714 def fasm : Flag<["-"], "fasm">, Group<f_Group>;
715
716 defm asm_blocks : OptInFFlag<"asm-blocks", "">;
717
718 def fassume_sane_operator_new : Flag<["-"], "fassume-sane-operator-new">, Group<f_Group>;
719 def fastcp : Flag<["-"], "fastcp">, Group<f_Group>;
720 def fastf : Flag<["-"], "fastf">, Group<f_Group>;
721 def fast : Flag<["-"], "fast">, Group<f_Group>;
722 def fasynchronous_unwind_tables : Flag<["-"], "fasynchronous-unwind-tables">, Group<f_Group>;
723
724 def fdouble_square_bracket_attributes : Flag<[ "-" ], "fdouble-square-bracket-attributes">,
725   Group<f_Group>, Flags<[DriverOption, CC1Option]>,
726   HelpText<"Enable '[[]]' attributes in all C and C++ language modes">;
727 def fno_double_square_bracket_attributes : Flag<[ "-" ], "fno-double-square-bracket-attributes">,
728   Group<f_Group>, Flags<[DriverOption, CC1Option]>,
729   HelpText<"Disable '[[]]' attributes in all C and C++ language modes">;
730
731 defm autolink : OptOutFFlag<"autolink", "", "Disable generation of linker directives for automatic library linking">;
732
733 // C++ Coroutines TS
734 defm coroutines_ts : OptInFFlag<"coroutines-ts", "Enable support for the C++ Coroutines TS">;
735
736 def fembed_bitcode_EQ : Joined<["-"], "fembed-bitcode=">,
737     Group<f_Group>, Flags<[DriverOption, CC1Option, CC1AsOption]>, MetaVarName<"<option>">,
738     HelpText<"Embed LLVM bitcode (option: off, all, bitcode, marker)">;
739 def fembed_bitcode : Flag<["-"], "fembed-bitcode">, Group<f_Group>,
740   Alias<fembed_bitcode_EQ>, AliasArgs<["all"]>,
741   HelpText<"Embed LLVM IR bitcode as data">;
742 def fembed_bitcode_marker : Flag<["-"], "fembed-bitcode-marker">,
743   Alias<fembed_bitcode_EQ>, AliasArgs<["marker"]>,
744   HelpText<"Embed placeholder LLVM IR data as a marker">;
745 defm gnu_inline_asm : OptOutFFlag<"gnu-inline-asm", "", "Disable GNU style inline asm">;
746
747 def fprofile_sample_use : Flag<["-"], "fprofile-sample-use">, Group<f_Group>,
748     Flags<[CoreOption]>;
749 def fno_profile_sample_use : Flag<["-"], "fno-profile-sample-use">, Group<f_Group>,
750     Flags<[CoreOption]>;
751 def fprofile_sample_use_EQ : Joined<["-"], "fprofile-sample-use=">,
752     Group<f_Group>, Flags<[DriverOption, CC1Option]>,
753     HelpText<"Enable sample-based profile guided optimizations">;
754 def fprofile_sample_accurate : Flag<["-"], "fprofile-sample-accurate">,
755     Group<f_Group>, Flags<[DriverOption, CC1Option]>,
756     HelpText<"Specifies that the sample profile is accurate">,
757     DocBrief<[{Specifies that the sample profile is accurate. If the sample
758                profile is accurate, callsites without profile samples are marked
759                as cold. Otherwise, treat callsites without profile samples as if
760                we have no profile}]>;
761 def fno_profile_sample_accurate : Flag<["-"], "fno-profile-sample-accurate">,
762   Group<f_Group>, Flags<[DriverOption]>;
763 def fauto_profile : Flag<["-"], "fauto-profile">, Group<f_Group>,
764     Alias<fprofile_sample_use>;
765 def fno_auto_profile : Flag<["-"], "fno-auto-profile">, Group<f_Group>,
766     Alias<fno_profile_sample_use>;
767 def fauto_profile_EQ : Joined<["-"], "fauto-profile=">,
768     Alias<fprofile_sample_use_EQ>;
769 def fauto_profile_accurate : Flag<["-"], "fauto-profile-accurate">,
770     Group<f_Group>, Alias<fprofile_sample_accurate>;
771 def fno_auto_profile_accurate : Flag<["-"], "fno-auto-profile-accurate">,
772     Group<f_Group>, Alias<fno_profile_sample_accurate>;
773 def fdebug_compilation_dir : Separate<["-"], "fdebug-compilation-dir">,
774     Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>,
775     HelpText<"The compilation directory to embed in the debug info.">;
776 def fdebug_compilation_dir_EQ : Joined<["-"], "fdebug-compilation-dir=">,
777     Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>,
778     Alias<fdebug_compilation_dir>;
779 defm debug_info_for_profiling : OptInFFlag<"debug-info-for-profiling",
780   "Emit extra debug info to make sample profile more accurate">;
781 def fprofile_instr_generate : Flag<["-"], "fprofile-instr-generate">,
782     Group<f_Group>, Flags<[CoreOption]>,
783     HelpText<"Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">;
784 def fprofile_instr_generate_EQ : Joined<["-"], "fprofile-instr-generate=">,
785     Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<file>">,
786     HelpText<"Generate instrumented code to collect execution counts into <file> (overridden by LLVM_PROFILE_FILE env var)">;
787 def fprofile_instr_use : Flag<["-"], "fprofile-instr-use">, Group<f_Group>,
788     Flags<[CoreOption]>;
789 def fprofile_instr_use_EQ : Joined<["-"], "fprofile-instr-use=">,
790     Group<f_Group>, Flags<[CoreOption]>,
791     HelpText<"Use instrumentation data for profile-guided optimization">;
792 def fprofile_remapping_file_EQ : Joined<["-"], "fprofile-remapping-file=">,
793     Group<f_Group>, Flags<[CC1Option, CoreOption]>, MetaVarName<"<file>">,
794     HelpText<"Use the remappings described in <file> to match the profile data against names in the program">;
795 def fprofile_remapping_file : Separate<["-"], "fprofile-remapping-file">,
796     Group<f_Group>, Flags<[CoreOption]>, Alias<fprofile_remapping_file_EQ>;
797 defm coverage_mapping : OptInFFlag<"coverage-mapping",
798   "Generate coverage mapping to enable code coverage analysis", "Disable code coverage analysis", "",
799   [CoreOption]>;
800 def fprofile_generate : Flag<["-"], "fprofile-generate">,
801     Group<f_Group>, Flags<[CoreOption]>,
802     HelpText<"Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
803 def fprofile_generate_EQ : Joined<["-"], "fprofile-generate=">,
804     Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<directory>">,
805     HelpText<"Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
806 def fcs_profile_generate : Flag<["-"], "fcs-profile-generate">,
807     Group<f_Group>, Flags<[CoreOption]>,
808     HelpText<"Generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
809 def fcs_profile_generate_EQ : Joined<["-"], "fcs-profile-generate=">,
810     Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<directory>">,
811     HelpText<"Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
812 def fprofile_use : Flag<["-"], "fprofile-use">, Group<f_Group>,
813     Alias<fprofile_instr_use>;
814 def fprofile_use_EQ : Joined<["-"], "fprofile-use=">,
815     Group<f_Group>, Flags<[DriverOption]>, MetaVarName<"<pathname>">,
816     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>.">;
817 def fno_profile_instr_generate : Flag<["-"], "fno-profile-instr-generate">,
818     Group<f_Group>, Flags<[CoreOption]>,
819     HelpText<"Disable generation of profile instrumentation.">;
820 def fno_profile_generate : Flag<["-"], "fno-profile-generate">,
821     Group<f_Group>, Flags<[CoreOption]>,
822     HelpText<"Disable generation of profile instrumentation.">;
823 def fno_profile_instr_use : Flag<["-"], "fno-profile-instr-use">,
824     Group<f_Group>, Flags<[CoreOption]>,
825     HelpText<"Disable using instrumentation data for profile-guided optimization">;
826 def fno_profile_use : Flag<["-"], "fno-profile-use">,
827     Alias<fno_profile_instr_use>;
828 def fprofile_filter_files_EQ : Joined<["-"], "fprofile-filter-files=">,
829     Group<f_Group>, Flags<[CC1Option, CoreOption]>,
830     HelpText<"Instrument only functions from files where names match any regex separated by a semi-colon">;
831 def fprofile_exclude_files_EQ : Joined<["-"], "fprofile-exclude-files=">,
832     Group<f_Group>, Flags<[CC1Option, CoreOption]>,
833     HelpText<"Instrument only functions from files where names don't match all the regexes separated by a semi-colon">;
834 def forder_file_instrumentation : Flag<["-"], "forder-file-instrumentation">,
835     Group<f_Group>, Flags<[CC1Option, CoreOption]>,
836     HelpText<"Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">;
837
838 defm addrsig : OptInFFlag<"addrsig", "Emit", "Don't emit", " an address-significance table", [CoreOption]>;
839 defm blocks : OptInFFlag<"blocks", "Enable the 'blocks' language feature", "", "", [CoreOption]>;
840 def fbootclasspath_EQ : Joined<["-"], "fbootclasspath=">, Group<f_Group>;
841 def fborland_extensions : Flag<["-"], "fborland-extensions">, Group<f_Group>, Flags<[CC1Option]>,
842   HelpText<"Accept non-standard constructs supported by the Borland compiler">;
843 def fbuiltin : Flag<["-"], "fbuiltin">, Group<f_Group>, Flags<[CoreOption]>;
844 def fbuiltin_module_map : Flag <["-"], "fbuiltin-module-map">, Group<f_Group>,
845   Flags<[DriverOption]>, HelpText<"Load the clang builtins module map file.">;
846 defm caret_diagnostics : OptOutFFlag<"caret-diagnostics", "", "">;
847 def fclang_abi_compat_EQ : Joined<["-"], "fclang-abi-compat=">, Group<f_clang_Group>,
848   Flags<[CC1Option]>, MetaVarName<"<version>">, Values<"<major>.<minor>,latest">,
849   HelpText<"Attempt to match the ABI of Clang <version>">;
850 def fclasspath_EQ : Joined<["-"], "fclasspath=">, Group<f_Group>;
851 defm color_diagnostics : OptInFFlag<"color-diagnostics", "Enable", "Disable", " colors in diagnostics", [CoreOption]>;
852 def fdiagnostics_color : Flag<["-"], "fdiagnostics-color">, Group<f_Group>,
853   Flags<[CoreOption, DriverOption]>;
854 def fdiagnostics_color_EQ : Joined<["-"], "fdiagnostics-color=">, Group<f_Group>;
855 def fansi_escape_codes : Flag<["-"], "fansi-escape-codes">, Group<f_Group>,
856   Flags<[CoreOption, CC1Option]>, HelpText<"Use ANSI escape codes for diagnostics">,
857   MarshallingInfoFlag<"DiagnosticOpts->UseANSIEscapeCodes", "false">;
858 def fcomment_block_commands : CommaJoined<["-"], "fcomment-block-commands=">, Group<f_clang_Group>, Flags<[CC1Option]>,
859   HelpText<"Treat each comma separated argument in <arg> as a documentation comment block command">,
860   MetaVarName<"<arg>">;
861 def fparse_all_comments : Flag<["-"], "fparse-all-comments">, Group<f_clang_Group>, Flags<[CC1Option]>;
862 def frecord_command_line : Flag<["-"], "frecord-command-line">,
863   Group<f_clang_Group>;
864 def fno_record_command_line : Flag<["-"], "fno-record-command-line">,
865   Group<f_clang_Group>;
866 def : Flag<["-"], "frecord-gcc-switches">, Alias<frecord_command_line>;
867 def : Flag<["-"], "fno-record-gcc-switches">, Alias<fno_record_command_line>;
868 def fcommon : Flag<["-"], "fcommon">, Group<f_Group>,
869   Flags<[CoreOption, CC1Option]>, HelpText<"Place uninitialized global variables in a common block">;
870 def fcompile_resource_EQ : Joined<["-"], "fcompile-resource=">, Group<f_Group>;
871 def fcomplete_member_pointers : Flag<["-"], "fcomplete-member-pointers">, Group<f_clang_Group>,
872    Flags<[CoreOption, CC1Option]>,
873    HelpText<"Require member pointer base types to be complete if they would be significant under the Microsoft ABI">;
874 def fno_complete_member_pointers : Flag<["-"], "fno-complete-member-pointers">, Group<f_clang_Group>,
875    Flags<[CoreOption]>,
876    HelpText<"Do not require member pointer base types to be complete if they would be significant under the Microsoft ABI">;
877 def fcf_runtime_abi_EQ : Joined<["-"], "fcf-runtime-abi=">, Group<f_Group>,
878     Flags<[CC1Option]>;
879 def fconstant_cfstrings : Flag<["-"], "fconstant-cfstrings">, Group<f_Group>;
880 def fconstant_string_class_EQ : Joined<["-"], "fconstant-string-class=">, Group<f_Group>;
881 def fconstexpr_depth_EQ : Joined<["-"], "fconstexpr-depth=">, Group<f_Group>;
882 def fconstexpr_steps_EQ : Joined<["-"], "fconstexpr-steps=">, Group<f_Group>;
883 def fexperimental_new_constant_interpreter : Flag<["-"], "fexperimental-new-constant-interpreter">, Group<f_Group>,
884   HelpText<"Enable the experimental new constant interpreter">, Flags<[CC1Option]>;
885 def fconstexpr_backtrace_limit_EQ : Joined<["-"], "fconstexpr-backtrace-limit=">,
886                                     Group<f_Group>;
887 def fno_crash_diagnostics : Flag<["-"], "fno-crash-diagnostics">, Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>,
888   HelpText<"Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash">;
889 def fcrash_diagnostics_dir : Joined<["-"], "fcrash-diagnostics-dir=">, Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>;
890 def fcreate_profile : Flag<["-"], "fcreate-profile">, Group<f_Group>;
891 defm cxx_exceptions: OptInFFlag<"cxx-exceptions", "Enable C++ exceptions">;
892 def fcxx_modules : Flag <["-"], "fcxx-modules">, Group<f_Group>,
893   Flags<[DriverOption]>;
894 def fdebug_pass_arguments : Flag<["-"], "fdebug-pass-arguments">, Group<f_Group>;
895 def fdebug_pass_structure : Flag<["-"], "fdebug-pass-structure">, Group<f_Group>;
896 def fdepfile_entry : Joined<["-"], "fdepfile-entry=">,
897     Group<f_clang_Group>, Flags<[CC1Option]>;
898 def fdiagnostics_fixit_info : Flag<["-"], "fdiagnostics-fixit-info">, Group<f_clang_Group>;
899 def fdiagnostics_parseable_fixits : Flag<["-"], "fdiagnostics-parseable-fixits">, Group<f_clang_Group>,
900     Flags<[CoreOption, CC1Option]>, HelpText<"Print fix-its in machine parseable form">;
901 def fdiagnostics_print_source_range_info : Flag<["-"], "fdiagnostics-print-source-range-info">,
902     Group<f_clang_Group>,  Flags<[CC1Option]>,
903     HelpText<"Print source range spans in numeric form">;
904 def fdiagnostics_show_hotness : Flag<["-"], "fdiagnostics-show-hotness">, Group<f_Group>,
905     Flags<[CC1Option]>, HelpText<"Enable profile hotness information in diagnostic line">;
906 def fdiagnostics_hotness_threshold_EQ : Joined<["-"], "fdiagnostics-hotness-threshold=">,
907     Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<number>">,
908     HelpText<"Prevent optimization remarks from being output if they do not have at least this profile count">;
909 def fdiagnostics_show_option : Flag<["-"], "fdiagnostics-show-option">, Group<f_Group>,
910     HelpText<"Print option name with mappable diagnostics">;
911 def fdiagnostics_show_note_include_stack : Flag<["-"], "fdiagnostics-show-note-include-stack">,
912     Group<f_Group>, Flags<[CC1Option]>, HelpText<"Display include stacks for diagnostic notes">;
913 def fdiagnostics_format_EQ : Joined<["-"], "fdiagnostics-format=">, Group<f_clang_Group>;
914 def fdiagnostics_show_category_EQ : Joined<["-"], "fdiagnostics-show-category=">, Group<f_clang_Group>;
915 def fdiagnostics_show_template_tree : Flag<["-"], "fdiagnostics-show-template-tree">,
916     Group<f_Group>, Flags<[CC1Option]>,
917     HelpText<"Print a template comparison tree for differing templates">;
918 def fdeclspec : Flag<["-"], "fdeclspec">, Group<f_clang_Group>,
919   HelpText<"Allow __declspec as a keyword">, Flags<[CC1Option]>;
920 def fdiscard_value_names : Flag<["-"], "fdiscard-value-names">, Group<f_clang_Group>,
921   HelpText<"Discard value names in LLVM IR">, Flags<[DriverOption]>;
922 def fno_discard_value_names : Flag<["-"], "fno-discard-value-names">, Group<f_clang_Group>,
923   HelpText<"Do not discard value names in LLVM IR">, Flags<[DriverOption]>;
924 def fdollars_in_identifiers : Flag<["-"], "fdollars-in-identifiers">, Group<f_Group>,
925   HelpText<"Allow '$' in identifiers">, Flags<[CC1Option]>;
926 def fdwarf2_cfi_asm : Flag<["-"], "fdwarf2-cfi-asm">, Group<clang_ignored_f_Group>;
927 def fno_dwarf2_cfi_asm : Flag<["-"], "fno-dwarf2-cfi-asm">, Group<clang_ignored_f_Group>;
928 defm dwarf_directory_asm : OptOutFFlag<"dwarf-directory-asm", "", "">;
929 def felide_constructors : Flag<["-"], "felide-constructors">, Group<f_Group>;
930 def fno_elide_type : Flag<["-"], "fno-elide-type">, Group<f_Group>,
931     Flags<[CC1Option]>,
932     HelpText<"Do not elide types when printing diagnostics">;
933 def feliminate_unused_debug_symbols : Flag<["-"], "feliminate-unused-debug-symbols">, Group<f_Group>;
934 def femit_all_decls : Flag<["-"], "femit-all-decls">, Group<f_Group>, Flags<[CC1Option]>,
935   HelpText<"Emit all declarations, even if unused">;
936 def femulated_tls : Flag<["-"], "femulated-tls">, Group<f_Group>, Flags<[CC1Option]>,
937   HelpText<"Use emutls functions to access thread_local variables">;
938 def fno_emulated_tls : Flag<["-"], "fno-emulated-tls">, Group<f_Group>, Flags<[CC1Option]>;
939 def fencoding_EQ : Joined<["-"], "fencoding=">, Group<f_Group>;
940 def ferror_limit_EQ : Joined<["-"], "ferror-limit=">, Group<f_Group>, Flags<[CoreOption]>;
941 defm exceptions : OptInFFlag<"exceptions", "Enable", "Disable", " support for exception handling">;
942 def fdwarf_exceptions : Flag<["-"], "fdwarf-exceptions">, Group<f_Group>,
943   Flags<[CC1Option]>, HelpText<"Use DWARF style exceptions">;
944 def fsjlj_exceptions : Flag<["-"], "fsjlj-exceptions">, Group<f_Group>,
945   Flags<[CC1Option]>, HelpText<"Use SjLj style exceptions">;
946 def fseh_exceptions : Flag<["-"], "fseh-exceptions">, Group<f_Group>,
947   Flags<[CC1Option]>, HelpText<"Use SEH style exceptions">;
948 def fwasm_exceptions : Flag<["-"], "fwasm-exceptions">, Group<f_Group>,
949   Flags<[CC1Option]>, HelpText<"Use WebAssembly style exceptions">;
950 def fignore_exceptions : Flag<["-"], "fignore-exceptions">, Group<f_Group>, Flags<[CC1Option]>,
951   HelpText<"Enable support for ignoring exception handling constructs">;
952 def fexcess_precision_EQ : Joined<["-"], "fexcess-precision=">,
953     Group<clang_ignored_gcc_optimization_f_Group>;
954 def : Flag<["-"], "fexpensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>;
955 def : Flag<["-"], "fno-expensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>;
956 def fextdirs_EQ : Joined<["-"], "fextdirs=">, Group<f_Group>;
957 def : Flag<["-"], "fdefer-pop">, Group<clang_ignored_gcc_optimization_f_Group>;
958 def : Flag<["-"], "fno-defer-pop">, Group<clang_ignored_gcc_optimization_f_Group>;
959 def : Flag<["-"], "fextended-identifiers">, Group<clang_ignored_f_Group>;
960 def : Flag<["-"], "fno-extended-identifiers">, Group<f_Group>, Flags<[Unsupported]>;
961 def fhosted : Flag<["-"], "fhosted">, Group<f_Group>;
962 def fdenormal_fp_math_EQ : Joined<["-"], "fdenormal-fp-math=">, Group<f_Group>, Flags<[CC1Option]>;
963 def ffp_model_EQ : Joined<["-"], "ffp-model=">, Group<f_Group>, Flags<[DriverOption]>,
964   HelpText<"Controls the semantics of floating-point calculations.">;
965 def ffp_exception_behavior_EQ : Joined<["-"], "ffp-exception-behavior=">, Group<f_Group>, Flags<[CC1Option]>,
966   HelpText<"Specifies the exception behavior of floating-point operations.">;
967 defm fast_math : OptInFFlag<"fast-math", "Allow aggressive, lossy floating-point optimizations">;
968 defm math_errno : OptInFFlag<"math-errno", "Require math functions to indicate errors by setting errno">;
969 def fbracket_depth_EQ : Joined<["-"], "fbracket-depth=">, Group<f_Group>, Flags<[CoreOption]>;
970 def fsignaling_math : Flag<["-"], "fsignaling-math">, Group<f_Group>;
971 def fno_signaling_math : Flag<["-"], "fno-signaling-math">, Group<f_Group>;
972 defm jump_tables : OptOutFFlag<"jump-tables", "Use", "Do not use", " jump tables for lowering switches">;
973 defm force_enable_int128 : OptInFFlag<"force-enable-int128", "Enable", "Disable", " support for int128_t type">;
974 defm keep_static_consts : OptInFFlag<"keep-static-consts", "Keep", "Don't keep", " static const variables if unused", [DriverOption]>;
975 defm fixed_point : OptInFFlag<"fixed-point", "Enable", "Disable", " fixed point types">;
976 defm cxx_static_destructors : OptOutFFlag<"c++-static-destructors", "",
977   "Disable C++ static destructor registration">;
978 def fsymbol_partition_EQ : Joined<["-"], "fsymbol-partition=">, Group<f_Group>,
979   Flags<[CC1Option]>;
980
981 // Begin sanitizer flags. These should all be core options exposed in all driver
982 // modes.
983 let Flags = [CC1Option, CoreOption] in {
984
985 def fsanitize_EQ : CommaJoined<["-"], "fsanitize=">, Group<f_clang_Group>,
986                    MetaVarName<"<check>">,
987                    HelpText<"Turn on runtime checks for various forms of undefined "
988                             "or suspicious behavior. See user manual for available checks">;
989 def fno_sanitize_EQ : CommaJoined<["-"], "fno-sanitize=">, Group<f_clang_Group>,
990                       Flags<[CoreOption, DriverOption]>;
991 def fsanitize_blacklist : Joined<["-"], "fsanitize-blacklist=">,
992                           Group<f_clang_Group>,
993                           HelpText<"Path to blacklist file for sanitizers">;
994 def fsanitize_system_blacklist : Joined<["-"], "fsanitize-system-blacklist=">,
995   HelpText<"Path to system blacklist file for sanitizers">,
996   Flags<[CC1Option]>;
997 def fno_sanitize_blacklist : Flag<["-"], "fno-sanitize-blacklist">,
998                              Group<f_clang_Group>,
999                              HelpText<"Don't use blacklist file for sanitizers">;
1000 def fsanitize_coverage
1001     : CommaJoined<["-"], "fsanitize-coverage=">,
1002       Group<f_clang_Group>,
1003       HelpText<"Specify the type of coverage instrumentation for Sanitizers">;
1004 def fno_sanitize_coverage
1005     : CommaJoined<["-"], "fno-sanitize-coverage=">,
1006       Group<f_clang_Group>, Flags<[CoreOption, DriverOption]>,
1007       HelpText<"Disable specified features of coverage instrumentation for "
1008                "Sanitizers">, Values<"func,bb,edge,indirect-calls,trace-bb,trace-cmp,trace-div,trace-gep,8bit-counters,trace-pc,trace-pc-guard,no-prune,inline-8bit-counters,inline-bool-flag">;
1009 def fsanitize_coverage_allowlist : Joined<["-"], "fsanitize-coverage-allowlist=">,
1010     Group<f_clang_Group>, Flags<[CoreOption, DriverOption]>,
1011     HelpText<"Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones">;
1012 def : Joined<["-"], "fsanitize-coverage-whitelist=">,
1013   Group<f_clang_Group>, Flags<[CoreOption, HelpHidden]>, Alias<fsanitize_coverage_allowlist>,
1014   HelpText<"Deprecated, use -fsanitize-coverage-allowlist= instead">;
1015 def fsanitize_coverage_blocklist : Joined<["-"], "fsanitize-coverage-blocklist=">,
1016     Group<f_clang_Group>, Flags<[CoreOption, DriverOption]>,
1017     HelpText<"Disable sanitizer coverage instrumentation for modules and functions that match the provided special case list, even the allowed ones">;
1018 def : Joined<["-"], "fsanitize-coverage-blacklist=">,
1019   Group<f_clang_Group>, Flags<[CoreOption, HelpHidden]>, Alias<fsanitize_coverage_blocklist>,
1020   HelpText<"Deprecated, use -fsanitize-coverage-blocklist= instead">;
1021 def fsanitize_memory_track_origins_EQ : Joined<["-"], "fsanitize-memory-track-origins=">,
1022                                         Group<f_clang_Group>,
1023                                         HelpText<"Enable origins tracking in MemorySanitizer">;
1024 def fsanitize_memory_track_origins : Flag<["-"], "fsanitize-memory-track-origins">,
1025                                      Group<f_clang_Group>,
1026                                      HelpText<"Enable origins tracking in MemorySanitizer">;
1027 def fno_sanitize_memory_track_origins : Flag<["-"], "fno-sanitize-memory-track-origins">,
1028                                         Group<f_clang_Group>,
1029                                         Flags<[CoreOption, DriverOption]>,
1030                                         HelpText<"Disable origins tracking in MemorySanitizer">;
1031 def fsanitize_memory_use_after_dtor : Flag<["-"], "fsanitize-memory-use-after-dtor">,
1032                                      Group<f_clang_Group>,
1033                                      HelpText<"Enable use-after-destroy detection in MemorySanitizer">;
1034 def fno_sanitize_memory_use_after_dtor : Flag<["-"], "fno-sanitize-memory-use-after-dtor">,
1035                                      Group<f_clang_Group>,
1036                                      HelpText<"Disable use-after-destroy detection in MemorySanitizer">;
1037 def fsanitize_address_field_padding : Joined<["-"], "fsanitize-address-field-padding=">,
1038                                         Group<f_clang_Group>,
1039                                         HelpText<"Level of field padding for AddressSanitizer">;
1040 def fsanitize_address_use_after_scope : Flag<["-"], "fsanitize-address-use-after-scope">,
1041                                         Group<f_clang_Group>,
1042                                         HelpText<"Enable use-after-scope detection in AddressSanitizer">;
1043 def fno_sanitize_address_use_after_scope : Flag<["-"], "fno-sanitize-address-use-after-scope">,
1044                                            Group<f_clang_Group>,
1045                                            Flags<[CoreOption, DriverOption]>,
1046                                            HelpText<"Disable use-after-scope detection in AddressSanitizer">;
1047 def fsanitize_address_poison_custom_array_cookie
1048     : Flag<[ "-" ], "fsanitize-address-poison-custom-array-cookie">,
1049       Group<f_clang_Group>,
1050       HelpText<"Enable poisoning array cookies when using custom operator new[] in AddressSanitizer">;
1051 def fno_sanitize_address_poison_custom_array_cookie
1052     : Flag<[ "-" ], "fno-sanitize-address-poison-custom-array-cookie">,
1053       Group<f_clang_Group>,
1054       HelpText<"Disable poisoning array cookies when using custom operator new[] in AddressSanitizer">;
1055 def fsanitize_address_globals_dead_stripping : Flag<["-"], "fsanitize-address-globals-dead-stripping">,
1056                                         Group<f_clang_Group>,
1057                                         HelpText<"Enable linker dead stripping of globals in AddressSanitizer">;
1058 def fsanitize_address_use_odr_indicator
1059     : Flag<["-"], "fsanitize-address-use-odr-indicator">,
1060       Group<f_clang_Group>,
1061       HelpText<"Enable ODR indicator globals to avoid false ODR violation reports in partially sanitized programs at the cost of an increase in binary size">;
1062 def fno_sanitize_address_use_odr_indicator
1063     : Flag<["-"], "fno-sanitize-address-use-odr-indicator">,
1064       Group<f_clang_Group>,
1065       HelpText<"Disable ODR indicator globals">;
1066 // Note: This flag was introduced when it was necessary to distinguish between
1067 //       ABI for correct codegen.  This is no longer needed, but the flag is
1068 //       not removed since targeting either ABI will behave the same.
1069 //       This way we cause no disturbance to existing scripts & code, and if we
1070 //       want to use this flag in the future we will cause no disturbance then
1071 //       either.
1072 def fsanitize_hwaddress_abi_EQ
1073     : Joined<["-"], "fsanitize-hwaddress-abi=">,
1074       Group<f_clang_Group>,
1075       HelpText<"Select the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor). This option is currently unused.">;
1076 def fsanitize_recover_EQ : CommaJoined<["-"], "fsanitize-recover=">,
1077                            Group<f_clang_Group>,
1078                            HelpText<"Enable recovery for specified sanitizers">;
1079 def fno_sanitize_recover_EQ : CommaJoined<["-"], "fno-sanitize-recover=">,
1080                               Group<f_clang_Group>, Flags<[CoreOption, DriverOption]>,
1081                               HelpText<"Disable recovery for specified sanitizers">;
1082 def fsanitize_recover : Flag<["-"], "fsanitize-recover">, Group<f_clang_Group>,
1083                         Alias<fsanitize_recover_EQ>, AliasArgs<["all"]>;
1084 def fno_sanitize_recover : Flag<["-"], "fno-sanitize-recover">,
1085                            Flags<[CoreOption, DriverOption]>, Group<f_clang_Group>,
1086                            Alias<fno_sanitize_recover_EQ>, AliasArgs<["all"]>;
1087 def fsanitize_trap_EQ : CommaJoined<["-"], "fsanitize-trap=">, Group<f_clang_Group>,
1088                         HelpText<"Enable trapping for specified sanitizers">;
1089 def fno_sanitize_trap_EQ : CommaJoined<["-"], "fno-sanitize-trap=">, Group<f_clang_Group>,
1090                            Flags<[CoreOption, DriverOption]>,
1091                            HelpText<"Disable trapping for specified sanitizers">;
1092 def fsanitize_trap : Flag<["-"], "fsanitize-trap">, Group<f_clang_Group>,
1093                      Alias<fsanitize_trap_EQ>, AliasArgs<["all"]>,
1094                      HelpText<"Enable trapping for all sanitizers">;
1095 def fno_sanitize_trap : Flag<["-"], "fno-sanitize-trap">, Group<f_clang_Group>,
1096                         Alias<fno_sanitize_trap_EQ>, AliasArgs<["all"]>,
1097                         Flags<[CoreOption, DriverOption]>,
1098                         HelpText<"Disable trapping for all sanitizers">;
1099 def fsanitize_undefined_trap_on_error
1100     : Flag<["-"], "fsanitize-undefined-trap-on-error">, Group<f_clang_Group>,
1101       Alias<fsanitize_trap_EQ>, AliasArgs<["undefined"]>;
1102 def fno_sanitize_undefined_trap_on_error
1103     : Flag<["-"], "fno-sanitize-undefined-trap-on-error">, Group<f_clang_Group>,
1104       Alias<fno_sanitize_trap_EQ>, AliasArgs<["undefined"]>;
1105 def fsanitize_minimal_runtime : Flag<["-"], "fsanitize-minimal-runtime">,
1106                                         Group<f_clang_Group>;
1107 def fno_sanitize_minimal_runtime : Flag<["-"], "fno-sanitize-minimal-runtime">,
1108                                         Group<f_clang_Group>;
1109 def fsanitize_link_runtime : Flag<["-"], "fsanitize-link-runtime">,
1110                            Group<f_clang_Group>;
1111 def fno_sanitize_link_runtime : Flag<["-"], "fno-sanitize-link-runtime">,
1112                               Group<f_clang_Group>;
1113 def fsanitize_link_cxx_runtime : Flag<["-"], "fsanitize-link-c++-runtime">,
1114                                  Group<f_clang_Group>;
1115 def fno_sanitize_link_cxx_runtime : Flag<["-"], "fno-sanitize-link-c++-runtime">,
1116                                     Group<f_clang_Group>;
1117 def fsanitize_cfi_cross_dso : Flag<["-"], "fsanitize-cfi-cross-dso">,
1118                               Group<f_clang_Group>,
1119                               HelpText<"Enable control flow integrity (CFI) checks for cross-DSO calls.">;
1120 def fno_sanitize_cfi_cross_dso : Flag<["-"], "fno-sanitize-cfi-cross-dso">,
1121                                  Flags<[CoreOption, DriverOption]>,
1122                                  Group<f_clang_Group>,
1123                                  HelpText<"Disable control flow integrity (CFI) checks for cross-DSO calls.">;
1124 def fsanitize_cfi_icall_generalize_pointers : Flag<["-"], "fsanitize-cfi-icall-generalize-pointers">,
1125                                               Group<f_clang_Group>,
1126                                               HelpText<"Generalize pointers in CFI indirect call type signature checks">;
1127 def fsanitize_cfi_canonical_jump_tables : Flag<["-"], "fsanitize-cfi-canonical-jump-tables">,
1128                                           Group<f_clang_Group>,
1129                                           HelpText<"Make the jump table addresses canonical in the symbol table">;
1130 def fno_sanitize_cfi_canonical_jump_tables : Flag<["-"], "fno-sanitize-cfi-canonical-jump-tables">,
1131                                              Group<f_clang_Group>,
1132                                              Flags<[CoreOption, DriverOption]>,
1133                                              HelpText<"Do not make the jump table addresses canonical in the symbol table">;
1134 def fsanitize_stats : Flag<["-"], "fsanitize-stats">,
1135                               Group<f_clang_Group>,
1136                               HelpText<"Enable sanitizer statistics gathering.">;
1137 def fno_sanitize_stats : Flag<["-"], "fno-sanitize-stats">,
1138                                  Group<f_clang_Group>,
1139                                  Flags<[CoreOption, DriverOption]>,
1140                                  HelpText<"Disable sanitizer statistics gathering.">;
1141 def fsanitize_thread_memory_access : Flag<["-"], "fsanitize-thread-memory-access">,
1142                                      Group<f_clang_Group>,
1143                                      HelpText<"Enable memory access instrumentation in ThreadSanitizer (default)">;
1144 def fno_sanitize_thread_memory_access : Flag<["-"], "fno-sanitize-thread-memory-access">,
1145                                         Group<f_clang_Group>,
1146                                         Flags<[CoreOption, DriverOption]>,
1147                                         HelpText<"Disable memory access instrumentation in ThreadSanitizer">;
1148 def fsanitize_thread_func_entry_exit : Flag<["-"], "fsanitize-thread-func-entry-exit">,
1149                                        Group<f_clang_Group>,
1150                                        HelpText<"Enable function entry/exit instrumentation in ThreadSanitizer (default)">;
1151 def fno_sanitize_thread_func_entry_exit : Flag<["-"], "fno-sanitize-thread-func-entry-exit">,
1152                                           Group<f_clang_Group>,
1153                                           Flags<[CoreOption, DriverOption]>,
1154                                           HelpText<"Disable function entry/exit instrumentation in ThreadSanitizer">;
1155 def fsanitize_thread_atomics : Flag<["-"], "fsanitize-thread-atomics">,
1156                                Group<f_clang_Group>,
1157                                HelpText<"Enable atomic operations instrumentation in ThreadSanitizer (default)">;
1158 def fno_sanitize_thread_atomics : Flag<["-"], "fno-sanitize-thread-atomics">,
1159                                   Group<f_clang_Group>,
1160                                   Flags<[CoreOption, DriverOption]>,
1161                                   HelpText<"Disable atomic operations instrumentation in ThreadSanitizer">;
1162 def fsanitize_undefined_strip_path_components_EQ : Joined<["-"], "fsanitize-undefined-strip-path-components=">,
1163   Group<f_clang_Group>, MetaVarName<"<number>">,
1164   HelpText<"Strip (or keep only, if negative) a given number of path components "
1165            "when emitting check metadata.">;
1166
1167 } // end -f[no-]sanitize* flags
1168
1169 def funsafe_math_optimizations : Flag<["-"], "funsafe-math-optimizations">,
1170   Group<f_Group>;
1171 def fno_unsafe_math_optimizations : Flag<["-"], "fno-unsafe-math-optimizations">,
1172   Group<f_Group>;
1173 def fassociative_math : Flag<["-"], "fassociative-math">, Group<f_Group>;
1174 def fno_associative_math : Flag<["-"], "fno-associative-math">, Group<f_Group>;
1175 def freciprocal_math :
1176   Flag<["-"], "freciprocal-math">, Group<f_Group>, Flags<[CC1Option]>,
1177   HelpText<"Allow division operations to be reassociated">;
1178 def fno_reciprocal_math : Flag<["-"], "fno-reciprocal-math">, Group<f_Group>;
1179 def ffinite_math_only : Flag<["-"], "ffinite-math-only">, Group<f_Group>, Flags<[CC1Option]>;
1180 def fno_finite_math_only : Flag<["-"], "fno-finite-math-only">, Group<f_Group>;
1181 def fsigned_zeros : Flag<["-"], "fsigned-zeros">, Group<f_Group>;
1182 def fno_signed_zeros :
1183   Flag<["-"], "fno-signed-zeros">, Group<f_Group>, Flags<[CC1Option]>,
1184   HelpText<"Allow optimizations that ignore the sign of floating point zeros">;
1185 def fhonor_nans : Flag<["-"], "fhonor-nans">, Group<f_Group>;
1186 def fno_honor_nans : Flag<["-"], "fno-honor-nans">, Group<f_Group>;
1187 def fhonor_infinities : Flag<["-"], "fhonor-infinities">, Group<f_Group>;
1188 def fno_honor_infinities : Flag<["-"], "fno-honor-infinities">, Group<f_Group>;
1189 // This option was originally misspelt "infinites" [sic].
1190 def : Flag<["-"], "fhonor-infinites">, Alias<fhonor_infinities>;
1191 def : Flag<["-"], "fno-honor-infinites">, Alias<fno_honor_infinities>;
1192 def frounding_math : Flag<["-"], "frounding-math">, Group<f_Group>, Flags<[CC1Option]>;
1193 def fno_rounding_math : Flag<["-"], "fno-rounding-math">, Group<f_Group>, Flags<[CC1Option]>;
1194 def ftrapping_math : Flag<["-"], "ftrapping-math">, Group<f_Group>, Flags<[CC1Option]>;
1195 def fno_trapping_math : Flag<["-"], "fno-trapping-math">, Group<f_Group>, Flags<[CC1Option]>;
1196 def ffp_contract : Joined<["-"], "ffp-contract=">, Group<f_Group>,
1197   Flags<[CC1Option]>, HelpText<"Form fused FP ops (e.g. FMAs): fast (everywhere)"
1198   " | on (according to FP_CONTRACT pragma) | off (never fuse). Default"
1199   " is 'fast' for CUDA/HIP and 'on' otherwise.">, Values<"fast,on,off">;
1200
1201 defm strict_float_cast_overflow : OptOutFFlag<"strict-float-cast-overflow",
1202   "Assume that overflowing float-to-int casts are undefined (default)",
1203   "Relax language rules and try to match the behavior of the target's native float-to-int conversion instructions">;
1204
1205 def ffor_scope : Flag<["-"], "ffor-scope">, Group<f_Group>;
1206 def fno_for_scope : Flag<["-"], "fno-for-scope">, Group<f_Group>;
1207
1208 defm rewrite_imports : OptInFFlag<"rewrite-imports", "">;
1209 defm rewrite_includes : OptInFFlag<"rewrite-includes", "">;
1210
1211 defm delete_null_pointer_checks : OptOutFFlag<"delete-null-pointer-checks",
1212   "Treat usage of null pointers as undefined behavior (default)",
1213   "Do not treat usage of null pointers as undefined behavior">;
1214
1215 def frewrite_map_file : Separate<["-"], "frewrite-map-file">,
1216                         Group<f_Group>,
1217                         Flags<[ DriverOption, CC1Option ]>;
1218 def frewrite_map_file_EQ : Joined<["-"], "frewrite-map-file=">,
1219                            Group<f_Group>,
1220                            Flags<[DriverOption]>;
1221
1222 defm use_line_directives : OptInFFlag<"use-line-directives", "Use #line in preprocessed output">;
1223
1224 def ffreestanding : Flag<["-"], "ffreestanding">, Group<f_Group>, Flags<[CC1Option]>,
1225   HelpText<"Assert that the compilation takes place in a freestanding environment">;
1226 def fgnuc_version_EQ : Joined<["-"], "fgnuc-version=">, Group<f_Group>,
1227   HelpText<"Sets various macros to claim compatibility with the given GCC version (default is 4.2.1)">,
1228   Flags<[CC1Option, CoreOption]>;
1229 def fgnu_keywords : Flag<["-"], "fgnu-keywords">, Group<f_Group>, Flags<[CC1Option]>,
1230   HelpText<"Allow GNU-extension keywords regardless of language standard">;
1231 defm gnu89_inline : OptInFFlag<"gnu89-inline", "Use the gnu89 inline semantics">;
1232 def fgnu_runtime : Flag<["-"], "fgnu-runtime">, Group<f_Group>,
1233   HelpText<"Generate output compatible with the standard GNU Objective-C runtime">;
1234 def fheinous_gnu_extensions : Flag<["-"], "fheinous-gnu-extensions">, Flags<[CC1Option]>;
1235 def filelist : Separate<["-"], "filelist">, Flags<[LinkerInput]>,
1236                Group<Link_Group>;
1237 def : Flag<["-"], "findirect-virtual-calls">, Alias<fapple_kext>;
1238 def finline_functions : Flag<["-"], "finline-functions">, Group<f_clang_Group>, Flags<[CC1Option]>,
1239   HelpText<"Inline suitable functions">;
1240 def finline_hint_functions: Flag<["-"], "finline-hint-functions">, Group<f_clang_Group>, Flags<[CC1Option]>,
1241   HelpText<"Inline functions which are (explicitly or implicitly) marked inline">;
1242 def finline : Flag<["-"], "finline">, Group<clang_ignored_f_Group>;
1243 def fglobal_isel : Flag<["-"], "fglobal-isel">, Group<f_clang_Group>, 
1244   HelpText<"Enables the global instruction selector">;
1245 def fexperimental_isel : Flag<["-"], "fexperimental-isel">, Group<f_clang_Group>,
1246   Alias<fglobal_isel>;
1247 def fexperimental_new_pass_manager : Flag<["-"], "fexperimental-new-pass-manager">,
1248   Group<f_clang_Group>, Flags<[CC1Option]>,
1249   HelpText<"Enables an experimental new pass manager in LLVM.">;
1250 def fexperimental_strict_floating_point : Flag<["-"], "fexperimental-strict-floating-point">,
1251   Group<f_clang_Group>, Flags<[CC1Option]>,
1252   HelpText<"Enables experimental strict floating point in LLVM.">;
1253 def finput_charset_EQ : Joined<["-"], "finput-charset=">, Group<f_Group>;
1254 def fexec_charset_EQ : Joined<["-"], "fexec-charset=">, Group<f_Group>;
1255 def finstrument_functions : Flag<["-"], "finstrument-functions">, Group<f_Group>, Flags<[CC1Option]>,
1256   HelpText<"Generate calls to instrument function entry and exit">;
1257 def finstrument_functions_after_inlining : Flag<["-"], "finstrument-functions-after-inlining">, Group<f_Group>, Flags<[CC1Option]>,
1258   HelpText<"Like -finstrument-functions, but insert the calls after inlining">;
1259 def finstrument_function_entry_bare : Flag<["-"], "finstrument-function-entry-bare">, Group<f_Group>, Flags<[CC1Option]>,
1260   HelpText<"Instrument function entry only, after inlining, without arguments to the instrumentation call">;
1261 def fcf_protection_EQ : Joined<["-"], "fcf-protection=">, Flags<[CoreOption, CC1Option]>, Group<f_Group>,
1262   HelpText<"Instrument control-flow architecture protection. Options: return, branch, full, none.">, Values<"return,branch,full,none">;
1263 def fcf_protection : Flag<["-"], "fcf-protection">, Group<f_Group>, Flags<[CoreOption, CC1Option]>,
1264   Alias<fcf_protection_EQ>, AliasArgs<["full"]>,
1265   HelpText<"Enable cf-protection in 'full' mode">;
1266
1267 defm xray_instrument : OptInFFlag<"xray-instrument", "Generate XRay instrumentation sleds on function entry and exit">;
1268
1269 def fxray_instruction_threshold_EQ :
1270   JoinedOrSeparate<["-"], "fxray-instruction-threshold=">,
1271   Group<f_Group>, Flags<[CC1Option]>,
1272   HelpText<"Sets the minimum function size to instrument with XRay">;
1273 def fxray_instruction_threshold_ :
1274   JoinedOrSeparate<["-"], "fxray-instruction-threshold">,
1275   Group<f_Group>, Flags<[CC1Option]>;
1276
1277 def fxray_always_instrument :
1278   JoinedOrSeparate<["-"], "fxray-always-instrument=">,
1279   Group<f_Group>, Flags<[CC1Option]>,
1280   HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.">;
1281 def fxray_never_instrument :
1282   JoinedOrSeparate<["-"], "fxray-never-instrument=">,
1283   Group<f_Group>, Flags<[CC1Option]>,
1284   HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.">;
1285 def fxray_attr_list :
1286   JoinedOrSeparate<["-"], "fxray-attr-list=">,
1287   Group<f_Group>, Flags<[CC1Option]>,
1288   HelpText<"Filename defining the list of functions/types for imbuing XRay attributes.">;
1289 def fxray_modes :
1290   JoinedOrSeparate<["-"], "fxray-modes=">,
1291   Group<f_Group>, Flags<[CC1Option]>,
1292   HelpText<"List of modes to link in by default into XRay instrumented binaries.">;
1293
1294 defm xray_always_emit_customevents : OptInFFlag<"xray-always-emit-customevents",
1295   "Always emit __xray_customevent(...) calls even if the containing function is not always instrumented">;
1296
1297 defm xray_always_emit_typedevents : OptInFFlag<"xray-always-emit-typedevents",
1298   "Always emit __xray_typedevent(...) calls even if the containing function is not always instrumented">;
1299
1300 defm xray_ignore_loops : OptInFFlag<"xray-ignore-loops",
1301   "Don't instrument functions with loops unless they also meet the minimum function size">;
1302 defm xray_function_index : OptOutFFlag<"xray-function-index", "",
1303   "Omit function index section at the expense of single-function patching performance">;
1304
1305 def fxray_link_deps : Flag<["-"], "fxray-link-deps">, Group<f_Group>,
1306   Flags<[CC1Option]>,
1307   HelpText<"Tells clang to add the link dependencies for XRay.">;
1308 def fnoxray_link_deps : Flag<["-"], "fnoxray-link-deps">, Group<f_Group>,
1309   Flags<[CC1Option]>;
1310
1311 def fxray_instrumentation_bundle :
1312   JoinedOrSeparate<["-"], "fxray-instrumentation-bundle=">,
1313   Group<f_Group>, Flags<[CC1Option]>,
1314   HelpText<"Select which XRay instrumentation points to emit. Options: all, none, function-entry, function-exit, function, custom. Default is 'all'.  'function' includes both 'function-entry' and 'function-exit'.">;
1315
1316 def ffine_grained_bitfield_accesses : Flag<["-"],
1317   "ffine-grained-bitfield-accesses">, Group<f_clang_Group>, Flags<[CC1Option]>,
1318   HelpText<"Use separate accesses for consecutive bitfield runs with legal widths and alignments.">;
1319 def fno_fine_grained_bitfield_accesses : Flag<["-"],
1320   "fno-fine-grained-bitfield-accesses">, Group<f_clang_Group>, Flags<[CC1Option]>,
1321   HelpText<"Use large-integer access for consecutive bitfield runs.">;
1322
1323 def fexperimental_relative_cxx_abi_vtables : Flag<["-"], "fexperimental-relative-c++-abi-vtables">,
1324   Group<f_Group>, Flags<[CC1Option]>,
1325   HelpText<"Use the experimental C++ class ABI for classes with virtual tables">;
1326 def fno_experimental_relative_cxx_abi_vtables : Flag<["-"], "fno-experimental-relative-c++-abi-vtables">,
1327   Group<f_Group>, Flags<[CC1Option]>,
1328   HelpText<"Do not use the experimental C++ class ABI for classes with virtual tables">;
1329
1330 def flat__namespace : Flag<["-"], "flat_namespace">;
1331 def flax_vector_conversions_EQ : Joined<["-"], "flax-vector-conversions=">, Group<f_Group>,
1332   HelpText<"Enable implicit vector bit-casts">, Values<"none,integer,all">, Flags<[CC1Option]>;
1333 def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group<f_Group>,
1334   Alias<flax_vector_conversions_EQ>, AliasArgs<["integer"]>;
1335 def flimited_precision_EQ : Joined<["-"], "flimited-precision=">, Group<f_Group>;
1336 def fapple_link_rtlib : Flag<["-"], "fapple-link-rtlib">, Group<f_Group>,
1337   HelpText<"Force linking the clang builtins runtime library">;
1338 def flto_EQ : Joined<["-"], "flto=">, Flags<[CoreOption, CC1Option]>, Group<f_Group>,
1339   HelpText<"Set LTO mode to either 'full' or 'thin'">, Values<"thin,full">;
1340 def flto : Flag<["-"], "flto">, Flags<[CoreOption, CC1Option]>, Group<f_Group>,
1341   HelpText<"Enable LTO in 'full' mode">;
1342 def fno_lto : Flag<["-"], "fno-lto">, Group<f_Group>,
1343   HelpText<"Disable LTO mode (default)">;
1344 def flto_jobs_EQ : Joined<["-"], "flto-jobs=">,
1345   Flags<[CC1Option]>, Group<f_Group>,
1346   HelpText<"Controls the backend parallelism of -flto=thin (default "
1347            "of 0 means the number of threads will be derived from "
1348            "the number of CPUs detected)">;
1349 def fthinlto_index_EQ : Joined<["-"], "fthinlto-index=">,
1350   Flags<[CoreOption, CC1Option]>, Group<f_Group>,
1351   HelpText<"Perform ThinLTO importing using provided function summary index">;
1352 def fthin_link_bitcode_EQ : Joined<["-"], "fthin-link-bitcode=">,
1353   Flags<[CoreOption, CC1Option]>, Group<f_Group>,
1354   HelpText<"Write minimized bitcode to <file> for the ThinLTO thin link only">;
1355 def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">,
1356                                 Group<f_Group>, Flags<[DriverOption, CoreOption]>;
1357 def fmerge_all_constants : Flag<["-"], "fmerge-all-constants">, Group<f_Group>,
1358   Flags<[CC1Option, CoreOption]>, HelpText<"Allow merging of constants">;
1359 def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group<f_Group>, Flags<[CC1Option]>,
1360   HelpText<"Format message diagnostics so that they fit within N columns">;
1361 def fms_extensions : Flag<["-"], "fms-extensions">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
1362   HelpText<"Accept some non-standard constructs supported by the Microsoft compiler">;
1363 def fms_compatibility : Flag<["-"], "fms-compatibility">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
1364   HelpText<"Enable full Microsoft Visual C++ compatibility">;
1365 def fms_volatile : Flag<["-"], "fms-volatile">, Group<f_Group>, Flags<[CC1Option]>;
1366 def fmsc_version : Joined<["-"], "fmsc-version=">, Group<f_Group>, Flags<[DriverOption, CoreOption]>,
1367   HelpText<"Microsoft compiler version number to report in _MSC_VER (0 = don't define it (default))">;
1368 def fms_compatibility_version
1369     : Joined<["-"], "fms-compatibility-version=">,
1370       Group<f_Group>,
1371       Flags<[ CC1Option, CoreOption ]>,
1372       HelpText<"Dot-separated value representing the Microsoft compiler "
1373                "version number to report in _MSC_VER (0 = don't define it "
1374                "(default))">;
1375 def fdelayed_template_parsing : Flag<["-"], "fdelayed-template-parsing">, Group<f_Group>,
1376   HelpText<"Parse templated function definitions at the end of the "
1377            "translation unit">,  Flags<[CC1Option, CoreOption]>;
1378 def fms_memptr_rep_EQ : Joined<["-"], "fms-memptr-rep=">, Group<f_Group>, Flags<[CC1Option]>;
1379 def fmodules_cache_path : Joined<["-"], "fmodules-cache-path=">, Group<i_Group>,
1380   Flags<[DriverOption, CC1Option]>, MetaVarName<"<directory>">,
1381   HelpText<"Specify the module cache path">;
1382 def fmodules_user_build_path : Separate<["-"], "fmodules-user-build-path">, Group<i_Group>,
1383   Flags<[DriverOption, CC1Option]>, MetaVarName<"<directory>">,
1384   HelpText<"Specify the module user build path">;
1385 def fprebuilt_module_path : Joined<["-"], "fprebuilt-module-path=">, Group<i_Group>,
1386   Flags<[DriverOption, CC1Option]>, MetaVarName<"<directory>">,
1387   HelpText<"Specify the prebuilt module path">;
1388 def fmodules_prune_interval : Joined<["-"], "fmodules-prune-interval=">, Group<i_Group>,
1389   Flags<[CC1Option]>, MetaVarName<"<seconds>">,
1390   HelpText<"Specify the interval (in seconds) between attempts to prune the module cache">;
1391 def fmodules_prune_after : Joined<["-"], "fmodules-prune-after=">, Group<i_Group>,
1392   Flags<[CC1Option]>, MetaVarName<"<seconds>">,
1393   HelpText<"Specify the interval (in seconds) after which a module file will be considered unused">;
1394 def fmodules_search_all : Flag <["-"], "fmodules-search-all">, Group<f_Group>,
1395   Flags<[DriverOption, CC1Option]>,
1396   HelpText<"Search even non-imported modules to resolve references">;
1397 def fbuild_session_timestamp : Joined<["-"], "fbuild-session-timestamp=">,
1398   Group<i_Group>, Flags<[CC1Option]>, MetaVarName<"<time since Epoch in seconds>">,
1399   HelpText<"Time when the current build session started">;
1400 def fbuild_session_file : Joined<["-"], "fbuild-session-file=">,
1401   Group<i_Group>, MetaVarName<"<file>">,
1402   HelpText<"Use the last modification time of <file> as the build session timestamp">;
1403 def fmodules_validate_once_per_build_session : Flag<["-"], "fmodules-validate-once-per-build-session">,
1404   Group<i_Group>, Flags<[CC1Option]>,
1405   HelpText<"Don't verify input files for the modules if the module has been "
1406            "successfully validated or loaded during this build session">;
1407 def fmodules_disable_diagnostic_validation : Flag<["-"], "fmodules-disable-diagnostic-validation">,
1408   Group<i_Group>, Flags<[CC1Option]>,
1409   HelpText<"Disable validation of the diagnostic options when loading the module">;
1410 def fmodules_validate_system_headers : Flag<["-"], "fmodules-validate-system-headers">,
1411   Group<i_Group>, Flags<[CC1Option]>,
1412   HelpText<"Validate the system headers that a module depends on when loading the module">;
1413 def fno_modules_validate_system_headers : Flag<["-"], "fno-modules-validate-system-headers">,
1414   Group<i_Group>, Flags<[DriverOption]>;
1415
1416 def fvalidate_ast_input_files_content:
1417   Flag <["-"], "fvalidate-ast-input-files-content">,
1418   Group<f_Group>, Flags<[CC1Option]>,
1419   HelpText<"Compute and store the hash of input files used to build an AST."
1420            " Files with mismatching mtime's are considered valid"
1421            " if both contents is identical">;
1422 def fmodules_validate_input_files_content:
1423   Flag <["-"], "fmodules-validate-input-files-content">,
1424   Group<f_Group>, Flags<[DriverOption]>,
1425   HelpText<"Validate PCM input files based on content if mtime differs">;
1426 def fno_modules_validate_input_files_content:
1427   Flag <["-"], "fno_modules-validate-input-files-content">,
1428   Group<f_Group>, Flags<[DriverOption]>;
1429 def fpch_validate_input_files_content:
1430   Flag <["-"], "fpch-validate-input-files-content">,
1431   Group<f_Group>, Flags<[DriverOption]>,
1432   HelpText<"Validate PCH input files based on content if mtime differs">;
1433 def fno_pch_validate_input_files_content:
1434   Flag <["-"], "fno_pch-validate-input-files-content">,
1435   Group<f_Group>, Flags<[DriverOption]>;
1436 def fpch_instantiate_templates:
1437   Flag <["-"], "fpch-instantiate-templates">,
1438   Group<f_Group>, Flags<[CC1Option, CoreOption]>,
1439   HelpText<"Instantiate templates already while building a PCH">;
1440 def fno_pch_instantiate_templates:
1441   Flag <["-"], "fno-pch-instantiate-templates">,
1442   Group<f_Group>, Flags<[CC1Option, CoreOption]>;
1443 defm pch_codegen: OptInFFlag<"pch-codegen", "Generate ", "Do not generate ",
1444   "code for uses of this PCH that assumes an explicit object file will be built for the PCH">;
1445 defm pch_debuginfo: OptInFFlag<"pch-debuginfo", "Generate ", "Do not generate ",
1446   "debug info for types in an object file built from this PCH and do not generate them elsewhere">;
1447
1448 def fmodules : Flag <["-"], "fmodules">, Group<f_Group>,
1449   Flags<[DriverOption, CC1Option]>,
1450   HelpText<"Enable the 'modules' language feature">;
1451 def fimplicit_module_maps : Flag <["-"], "fimplicit-module-maps">, Group<f_Group>,
1452   Flags<[DriverOption, CC1Option]>,
1453   HelpText<"Implicitly search the file system for module map files.">;
1454 def fmodules_ts : Flag <["-"], "fmodules-ts">, Group<f_Group>,
1455   Flags<[CC1Option]>, HelpText<"Enable support for the C++ Modules TS">;
1456 def fmodule_maps : Flag <["-"], "fmodule-maps">, Alias<fimplicit_module_maps>;
1457 def fmodule_name_EQ : Joined<["-"], "fmodule-name=">, Group<f_Group>,
1458   Flags<[DriverOption,CC1Option]>, MetaVarName<"<name>">,
1459   HelpText<"Specify the name of the module to build">;
1460 def fmodule_name : Separate<["-"], "fmodule-name">, Alias<fmodule_name_EQ>;
1461 def fmodule_implementation_of : Separate<["-"], "fmodule-implementation-of">,
1462   Flags<[CC1Option]>, Alias<fmodule_name_EQ>;
1463 def fsystem_module : Flag<["-"], "fsystem-module">, Flags<[CC1Option]>,
1464   HelpText<"Build this module as a system module. Only used with -emit-module">;
1465 def fmodule_map_file : Joined<["-"], "fmodule-map-file=">,
1466   Group<f_Group>, Flags<[DriverOption,CC1Option]>, MetaVarName<"<file>">,
1467   HelpText<"Load this module map file">;
1468 def fmodule_file : Joined<["-"], "fmodule-file=">,
1469   Group<i_Group>, Flags<[DriverOption,CC1Option]>, MetaVarName<"[<name>=]<file>">,
1470   HelpText<"Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.">;
1471 def fmodules_ignore_macro : Joined<["-"], "fmodules-ignore-macro=">, Group<f_Group>, Flags<[CC1Option]>,
1472   HelpText<"Ignore the definition of the given macro when building and loading modules">;
1473 def fmodules_decluse : Flag <["-"], "fmodules-decluse">, Group<f_Group>,
1474   Flags<[DriverOption,CC1Option]>,
1475   HelpText<"Require declaration of modules used within a module">;
1476 def fmodules_strict_decluse : Flag <["-"], "fmodules-strict-decluse">, Group<f_Group>,
1477   Flags<[DriverOption,CC1Option]>,
1478   HelpText<"Like -fmodules-decluse but requires all headers to be in modules">;
1479 def fno_modules_search_all : Flag <["-"], "fno-modules-search-all">, Group<f_Group>,
1480   Flags<[DriverOption, CC1Option]>;
1481 def fno_implicit_modules :
1482   Flag <["-"], "fno-implicit-modules">,
1483   Group<f_Group>, Flags<[DriverOption, CC1Option]>;
1484 def fretain_comments_from_system_headers : Flag<["-"], "fretain-comments-from-system-headers">, Group<f_Group>, Flags<[CC1Option]>;
1485
1486 def fmudflapth : Flag<["-"], "fmudflapth">, Group<f_Group>;
1487 def fmudflap : Flag<["-"], "fmudflap">, Group<f_Group>;
1488 def fnested_functions : Flag<["-"], "fnested-functions">, Group<f_Group>;
1489 def fnext_runtime : Flag<["-"], "fnext-runtime">, Group<f_Group>;
1490 def fno_apple_pragma_pack : Flag<["-"], "fno-apple-pragma-pack">, Group<f_Group>;
1491 def fno_asm : Flag<["-"], "fno-asm">, Group<f_Group>;
1492 def fno_asynchronous_unwind_tables : Flag<["-"], "fno-asynchronous-unwind-tables">, Group<f_Group>;
1493 def fno_assume_sane_operator_new : Flag<["-"], "fno-assume-sane-operator-new">, Group<f_Group>,
1494   HelpText<"Don't assume that C++'s global operator new can't alias any pointer">,
1495   Flags<[CC1Option]>;
1496 def fno_borland_extensions : Flag<["-"], "fno-borland-extensions">, Group<f_Group>;
1497 def fno_builtin : Flag<["-"], "fno-builtin">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
1498   HelpText<"Disable implicit builtin knowledge of functions">;
1499 def fno_builtin_ : Joined<["-"], "fno-builtin-">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
1500   HelpText<"Disable implicit builtin knowledge of a specific function">;
1501 def fno_diagnostics_color : Flag<["-"], "fno-diagnostics-color">, Group<f_Group>,
1502   Flags<[CoreOption, DriverOption]>;
1503 def fno_common : Flag<["-"], "fno-common">, Group<f_Group>, Flags<[CC1Option]>,
1504     HelpText<"Compile common globals like normal definitions">;
1505 def fno_constant_cfstrings : Flag<["-"], "fno-constant-cfstrings">, Group<f_Group>,
1506   Flags<[CC1Option]>,
1507   HelpText<"Disable creation of CodeFoundation-type constant strings">;
1508 def fno_cxx_modules : Flag <["-"], "fno-cxx-modules">, Group<f_Group>,
1509   Flags<[DriverOption]>;
1510 def fno_diagnostics_fixit_info : Flag<["-"], "fno-diagnostics-fixit-info">, Group<f_Group>,
1511   Flags<[CC1Option]>, HelpText<"Do not include fixit information in diagnostics">;
1512 def fno_diagnostics_show_hotness : Flag<["-"], "fno-diagnostics-show-hotness">, Group<f_Group>;
1513 def fno_diagnostics_show_option : Flag<["-"], "fno-diagnostics-show-option">, Group<f_Group>, Flags<[CC1Option]>;
1514 def fno_diagnostics_show_note_include_stack : Flag<["-"], "fno-diagnostics-show-note-include-stack">,
1515     Flags<[CC1Option]>, Group<f_Group>;
1516 def fdigraphs : Flag<["-"], "fdigraphs">, Group<f_Group>, Flags<[CC1Option]>,
1517   HelpText<"Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default)">;
1518 def fno_digraphs : Flag<["-"], "fno-digraphs">, Group<f_Group>, Flags<[CC1Option]>,
1519   HelpText<"Disallow alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:'">;
1520 def fno_declspec : Flag<["-"], "fno-declspec">, Group<f_clang_Group>,
1521   HelpText<"Disallow __declspec as a keyword">, Flags<[CC1Option]>;
1522 def fno_dollars_in_identifiers : Flag<["-"], "fno-dollars-in-identifiers">, Group<f_Group>,
1523   HelpText<"Disallow '$' in identifiers">, Flags<[CC1Option]>;
1524 def fno_elide_constructors : Flag<["-"], "fno-elide-constructors">, Group<f_Group>,
1525   HelpText<"Disable C++ copy constructor elision">, Flags<[CC1Option]>;
1526 def fno_eliminate_unused_debug_symbols : Flag<["-"], "fno-eliminate-unused-debug-symbols">, Group<f_Group>;
1527 def fno_gnu_keywords : Flag<["-"], "fno-gnu-keywords">, Group<f_Group>, Flags<[CC1Option]>;
1528 def fno_inline_functions : Flag<["-"], "fno-inline-functions">, Group<f_clang_Group>, Flags<[CC1Option]>;
1529 def fno_inline : Flag<["-"], "fno-inline">, Group<f_clang_Group>, Flags<[CC1Option]>;
1530 def fno_global_isel : Flag<["-"], "fno-global-isel">, Group<f_clang_Group>,
1531   HelpText<"Disables the global instruction selector">;
1532 def fno_experimental_isel : Flag<["-"], "fno-experimental-isel">, Group<f_clang_Group>,
1533   Alias<fno_global_isel>;
1534 def fno_experimental_new_pass_manager : Flag<["-"], "fno-experimental-new-pass-manager">,
1535   Group<f_clang_Group>, Flags<[CC1Option]>,
1536   HelpText<"Disables an experimental new pass manager in LLVM.">;
1537 def fveclib : Joined<["-"], "fveclib=">, Group<f_Group>, Flags<[CC1Option]>,
1538     HelpText<"Use the given vector functions library">, Values<"Accelerate,MASSV,SVML,none">;
1539 def fno_lax_vector_conversions : Flag<["-"], "fno-lax-vector-conversions">, Group<f_Group>,
1540   Alias<flax_vector_conversions_EQ>, AliasArgs<["none"]>;
1541 def fno_merge_all_constants : Flag<["-"], "fno-merge-all-constants">, Group<f_Group>,
1542   HelpText<"Disallow merging of constants">;
1543 def fno_modules : Flag <["-"], "fno-modules">, Group<f_Group>,
1544   Flags<[DriverOption]>;
1545 def fno_implicit_module_maps : Flag <["-"], "fno-implicit-module-maps">, Group<f_Group>,
1546   Flags<[DriverOption]>;
1547 def fno_module_maps : Flag <["-"], "fno-module-maps">, Alias<fno_implicit_module_maps>;
1548 def fno_modules_decluse : Flag <["-"], "fno-modules-decluse">, Group<f_Group>,
1549   Flags<[DriverOption]>;
1550 def fno_modules_strict_decluse : Flag <["-"], "fno-strict-modules-decluse">, Group<f_Group>,
1551   Flags<[DriverOption]>;
1552 def fimplicit_modules : Flag <["-"], "fimplicit-modules">, Group<f_Group>,
1553   Flags<[DriverOption]>;
1554 def fmodule_file_deps : Flag <["-"], "fmodule-file-deps">, Group<f_Group>,
1555   Flags<[DriverOption]>;
1556 def fno_module_file_deps : Flag <["-"], "fno-module-file-deps">, Group<f_Group>,
1557   Flags<[DriverOption]>;
1558 def fno_ms_extensions : Flag<["-"], "fno-ms-extensions">, Group<f_Group>,
1559   Flags<[CoreOption]>;
1560 def fno_ms_compatibility : Flag<["-"], "fno-ms-compatibility">, Group<f_Group>,
1561   Flags<[CoreOption]>;
1562 def fno_delayed_template_parsing : Flag<["-"], "fno-delayed-template-parsing">, Group<f_Group>,
1563   HelpText<"Disable delayed template parsing">,
1564   Flags<[DriverOption, CoreOption]>;
1565 def fno_objc_exceptions: Flag<["-"], "fno-objc-exceptions">, Group<f_Group>;
1566 def fno_objc_legacy_dispatch : Flag<["-"], "fno-objc-legacy-dispatch">, Group<f_Group>;
1567 def fno_objc_weak : Flag<["-"], "fno-objc-weak">, Group<f_Group>, Flags<[CC1Option]>;
1568 def fno_omit_frame_pointer : Flag<["-"], "fno-omit-frame-pointer">, Group<f_Group>;
1569 def fno_operator_names : Flag<["-"], "fno-operator-names">, Group<f_Group>,
1570   HelpText<"Do not treat C++ operator name keywords as synonyms for operators">,
1571   Flags<[CC1Option]>;
1572 def fno_pascal_strings : Flag<["-"], "fno-pascal-strings">, Group<f_Group>;
1573 def fno_short_enums : Flag<["-"], "fno-short-enums">, Group<f_Group>;
1574 def fno_show_source_location : Flag<["-"], "fno-show-source-location">, Group<f_Group>,
1575   Flags<[CC1Option]>, HelpText<"Do not include source location information with diagnostics">;
1576 def fdiagnostics_absolute_paths : Flag<["-"], "fdiagnostics-absolute-paths">, Group<f_Group>,
1577   Flags<[CC1Option, CoreOption]>, HelpText<"Print absolute paths in diagnostics">;
1578 def fno_spell_checking : Flag<["-"], "fno-spell-checking">, Group<f_Group>,
1579   Flags<[CC1Option]>, HelpText<"Disable spell-checking">;
1580 def fno_stack_protector : Flag<["-"], "fno-stack-protector">, Group<f_Group>,
1581   HelpText<"Disable the use of stack protectors">;
1582 def fno_strict_aliasing : Flag<["-"], "fno-strict-aliasing">, Group<f_Group>,
1583   Flags<[DriverOption, CoreOption]>;
1584 def fstruct_path_tbaa : Flag<["-"], "fstruct-path-tbaa">, Group<f_Group>;
1585 def fno_struct_path_tbaa : Flag<["-"], "fno-struct-path-tbaa">, Group<f_Group>;
1586 def fno_strict_enums : Flag<["-"], "fno-strict-enums">, Group<f_Group>;
1587 def fno_strict_vtable_pointers: Flag<["-"], "fno-strict-vtable-pointers">,
1588   Group<f_Group>;
1589 def fno_strict_overflow : Flag<["-"], "fno-strict-overflow">, Group<f_Group>;
1590 def fno_temp_file : Flag<["-"], "fno-temp-file">, Group<f_Group>,
1591   Flags<[CC1Option, CoreOption]>, HelpText<
1592   "Directly create compilation output files. This may lead to incorrect incremental builds if the compiler crashes">;
1593 def fno_threadsafe_statics : Flag<["-"], "fno-threadsafe-statics">, Group<f_Group>,
1594   Flags<[CC1Option]>, HelpText<"Do not emit code to make initialization of local statics thread safe">;
1595 def fno_use_cxa_atexit : Flag<["-"], "fno-use-cxa-atexit">, Group<f_Group>, Flags<[CC1Option]>,
1596   HelpText<"Don't use __cxa_atexit for calling destructors">;
1597 def fno_register_global_dtors_with_atexit : Flag<["-"], "fno-register-global-dtors-with-atexit">, Group<f_Group>,
1598   HelpText<"Don't use atexit or __cxa_atexit to register global destructors">;
1599 def fno_unit_at_a_time : Flag<["-"], "fno-unit-at-a-time">, Group<f_Group>;
1600 def fno_unwind_tables : Flag<["-"], "fno-unwind-tables">, Group<f_Group>;
1601 def fno_verbose_asm : Flag<["-"], "fno-verbose-asm">, Group<f_Group>, Flags<[CC1Option]>;
1602 def fno_working_directory : Flag<["-"], "fno-working-directory">, Group<f_Group>;
1603 def fno_wrapv : Flag<["-"], "fno-wrapv">, Group<f_Group>;
1604 def fobjc_arc : Flag<["-"], "fobjc-arc">, Group<f_Group>, Flags<[CC1Option]>,
1605   HelpText<"Synthesize retain and release calls for Objective-C pointers">;
1606 def fno_objc_arc : Flag<["-"], "fno-objc-arc">, Group<f_Group>;
1607 def fobjc_convert_messages_to_runtime_calls :
1608   Flag<["-"], "fobjc-convert-messages-to-runtime-calls">, Group<f_Group>;
1609 def fno_objc_convert_messages_to_runtime_calls :
1610   Flag<["-"], "fno-objc-convert-messages-to-runtime-calls">, Group<f_Group>, Flags<[CC1Option]>;
1611 def fobjc_arc_exceptions : Flag<["-"], "fobjc-arc-exceptions">, Group<f_Group>, Flags<[CC1Option]>,
1612   HelpText<"Use EH-safe code when synthesizing retains and releases in -fobjc-arc">;
1613 def fno_objc_arc_exceptions : Flag<["-"], "fno-objc-arc-exceptions">, Group<f_Group>;
1614 def fobjc_atdefs : Flag<["-"], "fobjc-atdefs">, Group<clang_ignored_f_Group>;
1615 def fobjc_call_cxx_cdtors : Flag<["-"], "fobjc-call-cxx-cdtors">, Group<clang_ignored_f_Group>;
1616 def fobjc_exceptions: Flag<["-"], "fobjc-exceptions">, Group<f_Group>,
1617   HelpText<"Enable Objective-C exceptions">, Flags<[CC1Option]>;
1618 def fapplication_extension : Flag<["-"], "fapplication-extension">,
1619   Group<f_Group>, Flags<[CC1Option]>,
1620   HelpText<"Restrict code to those available for App Extensions">;
1621 def fno_application_extension : Flag<["-"], "fno-application-extension">,
1622   Group<f_Group>;
1623 def frelaxed_template_template_args : Flag<["-"], "frelaxed-template-template-args">,
1624   Flags<[CC1Option]>, HelpText<"Enable C++17 relaxed template template argument matching">,
1625   Group<f_Group>;
1626 def fno_relaxed_template_template_args : Flag<["-"], "fno-relaxed-template-template-args">,
1627   Group<f_Group>;
1628 def fsized_deallocation : Flag<["-"], "fsized-deallocation">, Flags<[CC1Option]>,
1629   HelpText<"Enable C++14 sized global deallocation functions">, Group<f_Group>;
1630 def fno_sized_deallocation: Flag<["-"], "fno-sized-deallocation">, Group<f_Group>;
1631 def faligned_allocation : Flag<["-"], "faligned-allocation">, Flags<[CC1Option]>,
1632   HelpText<"Enable C++17 aligned allocation functions">, Group<f_Group>;
1633 def fno_aligned_allocation: Flag<["-"], "fno-aligned-allocation">,
1634   Group<f_Group>, Flags<[CC1Option]>;
1635 def fnew_alignment_EQ : Joined<["-"], "fnew-alignment=">,
1636   HelpText<"Specifies the largest alignment guaranteed by '::operator new(size_t)'">,
1637   MetaVarName<"<align>">, Group<f_Group>, Flags<[CC1Option]>;
1638 def : Separate<["-"], "fnew-alignment">, Alias<fnew_alignment_EQ>;
1639 def : Flag<["-"], "faligned-new">, Alias<faligned_allocation>;
1640 def : Flag<["-"], "fno-aligned-new">, Alias<fno_aligned_allocation>;
1641 def faligned_new_EQ : Joined<["-"], "faligned-new=">;
1642
1643 def fobjc_legacy_dispatch : Flag<["-"], "fobjc-legacy-dispatch">, Group<f_Group>;
1644 def fobjc_new_property : Flag<["-"], "fobjc-new-property">, Group<clang_ignored_f_Group>;
1645 def fobjc_infer_related_result_type : Flag<["-"], "fobjc-infer-related-result-type">,
1646                                       Group<f_Group>;
1647 def fno_objc_infer_related_result_type : Flag<["-"],
1648   "fno-objc-infer-related-result-type">, Group<f_Group>,
1649   HelpText<
1650     "do not infer Objective-C related result type based on method family">,
1651   Flags<[CC1Option]>;
1652 def fobjc_link_runtime: Flag<["-"], "fobjc-link-runtime">, Group<f_Group>;
1653 def fobjc_weak : Flag<["-"], "fobjc-weak">, Group<f_Group>, Flags<[CC1Option]>,
1654   HelpText<"Enable ARC-style weak references in Objective-C">;
1655
1656 // Objective-C ABI options.
1657 def fobjc_runtime_EQ : Joined<["-"], "fobjc-runtime=">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
1658   HelpText<"Specify the target Objective-C runtime kind and version">;
1659 def fobjc_abi_version_EQ : Joined<["-"], "fobjc-abi-version=">, Group<f_Group>;
1660 def fobjc_nonfragile_abi_version_EQ : Joined<["-"], "fobjc-nonfragile-abi-version=">, Group<f_Group>;
1661 def fobjc_nonfragile_abi : Flag<["-"], "fobjc-nonfragile-abi">, Group<f_Group>;
1662 def fno_objc_nonfragile_abi : Flag<["-"], "fno-objc-nonfragile-abi">, Group<f_Group>;
1663
1664 def fobjc_sender_dependent_dispatch : Flag<["-"], "fobjc-sender-dependent-dispatch">, Group<f_Group>;
1665 def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group<f_Group>;
1666 def fopenmp : Flag<["-"], "fopenmp">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>,
1667   HelpText<"Parse OpenMP pragmas and generate parallel code.">;
1668 def fno_openmp : Flag<["-"], "fno-openmp">, Group<f_Group>, Flags<[NoArgumentUnused]>;
1669 def fopenmp_version_EQ : Joined<["-"], "fopenmp-version=">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>;
1670 def fopenmp_EQ : Joined<["-"], "fopenmp=">, Group<f_Group>;
1671 def fopenmp_use_tls : Flag<["-"], "fopenmp-use-tls">, Group<f_Group>,
1672   Flags<[NoArgumentUnused, HelpHidden]>;
1673 def fnoopenmp_use_tls : Flag<["-"], "fnoopenmp-use-tls">, Group<f_Group>,
1674   Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
1675 def fopenmp_targets_EQ : CommaJoined<["-"], "fopenmp-targets=">, Flags<[DriverOption, CC1Option]>,
1676   HelpText<"Specify comma-separated list of triples OpenMP offloading targets to be supported">;
1677 def fopenmp_relocatable_target : Flag<["-"], "fopenmp-relocatable-target">,
1678   Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
1679 def fnoopenmp_relocatable_target : Flag<["-"], "fnoopenmp-relocatable-target">,
1680   Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
1681 def fopenmp_simd : Flag<["-"], "fopenmp-simd">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>,
1682   HelpText<"Emit OpenMP code only for SIMD-based constructs.">;
1683 def fopenmp_enable_irbuilder : Flag<["-"], "fopenmp-enable-irbuilder">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>,
1684   HelpText<"Use the experimental OpenMP-IR-Builder codegen path.">;
1685 def fno_openmp_simd : Flag<["-"], "fno-openmp-simd">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>;
1686 def fopenmp_cuda_mode : Flag<["-"], "fopenmp-cuda-mode">, Group<f_Group>,
1687   Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
1688 def fno_openmp_cuda_mode : Flag<["-"], "fno-openmp-cuda-mode">, Group<f_Group>,
1689   Flags<[NoArgumentUnused, HelpHidden]>;
1690 def fopenmp_cuda_force_full_runtime : Flag<["-"], "fopenmp-cuda-force-full-runtime">, Group<f_Group>,
1691   Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
1692 def fno_openmp_cuda_force_full_runtime : Flag<["-"], "fno-openmp-cuda-force-full-runtime">, Group<f_Group>,
1693   Flags<[NoArgumentUnused, HelpHidden]>;
1694 def fopenmp_cuda_number_of_sm_EQ : Joined<["-"], "fopenmp-cuda-number-of-sm=">, Group<f_Group>,
1695   Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
1696 def fopenmp_cuda_blocks_per_sm_EQ : Joined<["-"], "fopenmp-cuda-blocks-per-sm=">, Group<f_Group>,
1697   Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
1698 def fopenmp_cuda_teams_reduction_recs_num_EQ : Joined<["-"], "fopenmp-cuda-teams-reduction-recs-num=">, Group<f_Group>,
1699   Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
1700 def fopenmp_optimistic_collapse : Flag<["-"], "fopenmp-optimistic-collapse">, Group<f_Group>,
1701   Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
1702 def fno_openmp_optimistic_collapse : Flag<["-"], "fno-openmp-optimistic-collapse">, Group<f_Group>,
1703   Flags<[NoArgumentUnused, HelpHidden]>;
1704 def fopenmp_cuda_parallel_target_regions : Flag<["-"], "fopenmp-cuda-parallel-target-regions">, Group<f_Group>,
1705   Flags<[CC1Option, NoArgumentUnused, HelpHidden]>,
1706   HelpText<"Support parallel execution of target regions on Cuda-based devices.">;
1707 def fno_openmp_cuda_parallel_target_regions : Flag<["-"], "fno-openmp-cuda-parallel-target-regions">, Group<f_Group>,
1708   Flags<[NoArgumentUnused, HelpHidden]>,
1709   HelpText<"Support only serial execution of target regions on Cuda-based devices.">;
1710 def static_openmp: Flag<["-"], "static-openmp">,
1711   HelpText<"Use the static host OpenMP runtime while linking.">;
1712 def fno_optimize_sibling_calls : Flag<["-"], "fno-optimize-sibling-calls">, Group<f_Group>;
1713 def foptimize_sibling_calls : Flag<["-"], "foptimize-sibling-calls">, Group<f_Group>;
1714 def fno_escaping_block_tail_calls : Flag<["-"], "fno-escaping-block-tail-calls">, Group<f_Group>, Flags<[CC1Option]>;
1715 def fescaping_block_tail_calls : Flag<["-"], "fescaping-block-tail-calls">, Group<f_Group>;
1716 def force__cpusubtype__ALL : Flag<["-"], "force_cpusubtype_ALL">;
1717 def force__flat__namespace : Flag<["-"], "force_flat_namespace">;
1718 def force__load : Separate<["-"], "force_load">;
1719 def force_addr : Joined<["-"], "fforce-addr">, Group<clang_ignored_f_Group>;
1720 def foutput_class_dir_EQ : Joined<["-"], "foutput-class-dir=">, Group<f_Group>;
1721 def fpack_struct : Flag<["-"], "fpack-struct">, Group<f_Group>;
1722 def fno_pack_struct : Flag<["-"], "fno-pack-struct">, Group<f_Group>;
1723 def fpack_struct_EQ : Joined<["-"], "fpack-struct=">, Group<f_Group>, Flags<[CC1Option]>,
1724   HelpText<"Specify the default maximum struct packing alignment">;
1725 def fmax_type_align_EQ : Joined<["-"], "fmax-type-align=">, Group<f_Group>, Flags<[CC1Option]>,
1726   HelpText<"Specify the maximum alignment to enforce on pointers lacking an explicit alignment">;
1727 def fno_max_type_align : Flag<["-"], "fno-max-type-align">, Group<f_Group>;
1728 def fpascal_strings : Flag<["-"], "fpascal-strings">, Group<f_Group>, Flags<[CC1Option]>,
1729   HelpText<"Recognize and construct Pascal-style string literals">;
1730 def fpatchable_function_entry_EQ : Joined<["-"], "fpatchable-function-entry=">, Group<f_Group>, Flags<[CC1Option]>,
1731   MetaVarName<"<N,M>">, HelpText<"Generate M NOPs before function entry and N-M NOPs after function entry">;
1732 def fpcc_struct_return : Flag<["-"], "fpcc-struct-return">, Group<f_Group>, Flags<[CC1Option]>,
1733   HelpText<"Override the default ABI to return all structs on the stack">;
1734 def fpch_preprocess : Flag<["-"], "fpch-preprocess">, Group<f_Group>;
1735 def fpic : Flag<["-"], "fpic">, Group<f_Group>;
1736 def fno_pic : Flag<["-"], "fno-pic">, Group<f_Group>;
1737 def fpie : Flag<["-"], "fpie">, Group<f_Group>;
1738 def fno_pie : Flag<["-"], "fno-pie">, Group<f_Group>;
1739 defm plt : OptOutFFlag<"plt", "",
1740   "Use GOT indirection instead of PLT to make external function calls (x86 only)">;
1741 defm ropi : OptInFFlag<"ropi", "Generate read-only position independent code (ARM only)">;
1742 defm rwpi : OptInFFlag<"rwpi", "Generate read-write position independent code (ARM only)">;
1743 def fplugin_EQ : Joined<["-"], "fplugin=">, Group<f_Group>, Flags<[DriverOption]>, MetaVarName<"<dsopath>">,
1744   HelpText<"Load the named plugin (dynamic shared object)">;
1745 def fpass_plugin_EQ : Joined<["-"], "fpass-plugin=">,
1746   Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<dsopath>">,
1747   HelpText<"Load pass plugin from a dynamic shared object file (only with new pass manager).">;
1748 defm preserve_as_comments : OptOutFFlag<"preserve-as-comments", "",
1749   "Do not preserve comments in inline assembly">;
1750 def fprofile_arcs : Flag<["-"], "fprofile-arcs">, Group<f_Group>;
1751 def fno_profile_arcs : Flag<["-"], "fno-profile-arcs">, Group<f_Group>;
1752 def framework : Separate<["-"], "framework">, Flags<[LinkerInput]>;
1753 def frandom_seed_EQ : Joined<["-"], "frandom-seed=">, Group<clang_ignored_f_Group>;
1754 def freg_struct_return : Flag<["-"], "freg-struct-return">, Group<f_Group>, Flags<[CC1Option]>,
1755   HelpText<"Override the default ABI to return small structs in registers">;
1756 defm rtti : OptOutFFlag<"rtti", "", "Disable generation of rtti information">;
1757 defm rtti_data : OptOutFFlag<"rtti-data", "", "Disable generation of RTTI data">;
1758 def : Flag<["-"], "fsched-interblock">, Group<clang_ignored_f_Group>;
1759 def fshort_enums : Flag<["-"], "fshort-enums">, Group<f_Group>, Flags<[CC1Option]>,
1760   HelpText<"Allocate to an enum type only as many bytes as it needs for the declared range of possible values">;
1761 def fchar8__t : Flag<["-"], "fchar8_t">, Group<f_Group>, Flags<[CC1Option]>,
1762   HelpText<"Enable C++ builtin type char8_t">;
1763 def fno_char8__t : Flag<["-"], "fno-char8_t">, Group<f_Group>, Flags<[CC1Option]>,
1764   HelpText<"Disable C++ builtin type char8_t">;
1765 def fshort_wchar : Flag<["-"], "fshort-wchar">, Group<f_Group>,
1766   HelpText<"Force wchar_t to be a short unsigned int">;
1767 def fno_short_wchar : Flag<["-"], "fno-short-wchar">, Group<f_Group>,
1768   HelpText<"Force wchar_t to be an unsigned int">;
1769 def fshow_overloads_EQ : Joined<["-"], "fshow-overloads=">, Group<f_Group>, Flags<[CC1Option]>,
1770   HelpText<"Which overload candidates to show when overload resolution fails: "
1771            "best|all; defaults to all">, Values<"best,all">;
1772 defm show_column : OptOutFFlag<"show-column", "", "Do not include column number on diagnostics">;
1773 def fshow_source_location : Flag<["-"], "fshow-source-location">, Group<f_Group>;
1774 def fspell_checking : Flag<["-"], "fspell-checking">, Group<f_Group>;
1775 def fspell_checking_limit_EQ : Joined<["-"], "fspell-checking-limit=">, Group<f_Group>;
1776 def fsigned_bitfields : Flag<["-"], "fsigned-bitfields">, Group<f_Group>;
1777 defm signed_char : OptOutFFlag<"signed-char", "char is signed", "char is unsigned">;
1778 def fsplit_stack : Flag<["-"], "fsplit-stack">, Group<f_Group>;
1779 def fstack_protector_all : Flag<["-"], "fstack-protector-all">, Group<f_Group>,
1780   HelpText<"Enable stack protectors for all functions">;
1781 def fstack_clash_protection : Flag<["-"], "fstack-clash-protection">, Group<f_Group>, Flags<[CC1Option]>,
1782   HelpText<"Enable stack clash protection">;
1783 def fno_stack_clash_protection : Flag<["-"], "fno-stack-clash-protection">, Group<f_Group>,
1784   HelpText<"Disable stack clash protection">;
1785 def fstack_protector_strong : Flag<["-"], "fstack-protector-strong">, Group<f_Group>,
1786   HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. "
1787            "Compared to -fstack-protector, this uses a stronger heuristic "
1788            "that includes functions containing arrays of any size (and any type), "
1789            "as well as any calls to alloca or the taking of an address from a local variable">;
1790 def fstack_protector : Flag<["-"], "fstack-protector">, Group<f_Group>,
1791   HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. "
1792            "This uses a loose heuristic which considers functions vulnerable "
1793            "if they contain a char (or 8bit integer) array or constant sized calls to "
1794            "alloca, which are of greater size than ssp-buffer-size (default: 8 bytes). "
1795            "All variable sized calls to alloca are considered vulnerable">;
1796 def ftrivial_auto_var_init : Joined<["-"], "ftrivial-auto-var-init=">, Group<f_Group>,
1797   Flags<[CC1Option, CoreOption]>, HelpText<"Initialize trivial automatic stack variables: uninitialized (default)"
1798   " | pattern">, Values<"uninitialized,pattern">;
1799 def enable_trivial_var_init_zero : Flag<["-"], "enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang">,
1800   Flags<[CC1Option, CoreOption]>,
1801   HelpText<"Trivial automatic variable initialization to zero is only here for benchmarks, it'll eventually be removed, and I'm OK with that because I'm only using it to benchmark">;
1802 def ftrivial_auto_var_init_stop_after : Joined<["-"], "ftrivial-auto-var-init-stop-after=">, Group<f_Group>,
1803   Flags<[CC1Option, CoreOption]>, HelpText<"Stop initializing trivial automatic stack variables after the specified number of instances">;
1804 def fstandalone_debug : Flag<["-"], "fstandalone-debug">, Group<f_Group>, Flags<[CoreOption]>,
1805   HelpText<"Emit full debug info for all types used by the program">;
1806 def fno_standalone_debug : Flag<["-"], "fno-standalone-debug">, Group<f_Group>, Flags<[CoreOption]>,
1807   HelpText<"Limit debug information produced to reduce size of debug binary">;
1808 def flimit_debug_info : Flag<["-"], "flimit-debug-info">, Flags<[CoreOption]>, Alias<fno_standalone_debug>;
1809 def fno_limit_debug_info : Flag<["-"], "fno-limit-debug-info">, Flags<[CoreOption]>, Alias<fstandalone_debug>;
1810 def fdebug_macro : Flag<["-"], "fdebug-macro">, Group<f_Group>, Flags<[CoreOption]>,
1811   HelpText<"Emit macro debug information">;
1812 def fno_debug_macro : Flag<["-"], "fno-debug-macro">, Group<f_Group>, Flags<[CoreOption]>,
1813   HelpText<"Do not emit macro debug information">;
1814 def fstrict_aliasing : Flag<["-"], "fstrict-aliasing">, Group<f_Group>,
1815   Flags<[DriverOption, CoreOption]>;
1816 def fstrict_enums : Flag<["-"], "fstrict-enums">, Group<f_Group>, Flags<[CC1Option]>,
1817   HelpText<"Enable optimizations based on the strict definition of an enum's "
1818            "value range">;
1819 def fstrict_vtable_pointers: Flag<["-"], "fstrict-vtable-pointers">,
1820   Group<f_Group>, Flags<[CC1Option]>,
1821   HelpText<"Enable optimizations based on the strict rules for overwriting "
1822              "polymorphic C++ objects">;
1823 def fstrict_overflow : Flag<["-"], "fstrict-overflow">, Group<f_Group>;
1824 def fsyntax_only : Flag<["-"], "fsyntax-only">,
1825   Flags<[DriverOption,CoreOption,CC1Option]>, Group<Action_Group>;
1826 def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group<f_Group>;
1827 def ftemplate_depth_EQ : Joined<["-"], "ftemplate-depth=">, Group<f_Group>;
1828 def ftemplate_depth_ : Joined<["-"], "ftemplate-depth-">, Group<f_Group>;
1829 def ftemplate_backtrace_limit_EQ : Joined<["-"], "ftemplate-backtrace-limit=">,
1830                                    Group<f_Group>;
1831 def foperator_arrow_depth_EQ : Joined<["-"], "foperator-arrow-depth=">,
1832                                Group<f_Group>;
1833
1834 def fsave_optimization_record : Flag<["-"], "fsave-optimization-record">,
1835   Group<f_Group>, HelpText<"Generate a YAML optimization record file">;
1836 def fsave_optimization_record_EQ : Joined<["-"], "fsave-optimization-record=">,
1837   Group<f_Group>, HelpText<"Generate an optimization record file in a specific format">,
1838   MetaVarName<"<format>">;
1839 def fno_save_optimization_record : Flag<["-"], "fno-save-optimization-record">,
1840   Group<f_Group>, Flags<[NoArgumentUnused]>;
1841 def foptimization_record_file_EQ : Joined<["-"], "foptimization-record-file=">,
1842   Group<f_Group>,
1843   HelpText<"Specify the output name of the file containing the optimization remarks. Implies -fsave-optimization-record. On Darwin platforms, this cannot be used with multiple -arch <arch> options.">,
1844   MetaVarName<"<file>">;
1845 def foptimization_record_passes_EQ : Joined<["-"], "foptimization-record-passes=">,
1846   Group<f_Group>,
1847   HelpText<"Only include passes which match a specified regular expression in the generated optimization record (by default, include all passes)">,
1848   MetaVarName<"<regex>">;
1849
1850 def ftest_coverage : Flag<["-"], "ftest-coverage">, Group<f_Group>;
1851 def fno_test_coverage : Flag<["-"], "fno-test-coverage">, Group<f_Group>;
1852 def fvectorize : Flag<["-"], "fvectorize">, Group<f_Group>,
1853   HelpText<"Enable the loop vectorization passes">;
1854 def fno_vectorize : Flag<["-"], "fno-vectorize">, Group<f_Group>;
1855 def : Flag<["-"], "ftree-vectorize">, Alias<fvectorize>;
1856 def : Flag<["-"], "fno-tree-vectorize">, Alias<fno_vectorize>;
1857 def fslp_vectorize : Flag<["-"], "fslp-vectorize">, Group<f_Group>,
1858   HelpText<"Enable the superword-level parallelism vectorization passes">;
1859 def fno_slp_vectorize : Flag<["-"], "fno-slp-vectorize">, Group<f_Group>;
1860 def : Flag<["-"], "ftree-slp-vectorize">, Alias<fslp_vectorize>;
1861 def : Flag<["-"], "fno-tree-slp-vectorize">, Alias<fno_slp_vectorize>;
1862 def Wlarge_by_value_copy_def : Flag<["-"], "Wlarge-by-value-copy">,
1863   HelpText<"Warn if a function definition returns or accepts an object larger "
1864            "in bytes than a given value">, Flags<[HelpHidden]>;
1865 def Wlarge_by_value_copy_EQ : Joined<["-"], "Wlarge-by-value-copy=">, Flags<[CC1Option]>;
1866
1867 // These "special" warning flags are effectively processed as f_Group flags by the driver:
1868 // Just silence warnings about -Wlarger-than for now.
1869 def Wlarger_than_EQ : Joined<["-"], "Wlarger-than=">, Group<clang_ignored_f_Group>;
1870 def Wlarger_than_ : Joined<["-"], "Wlarger-than-">, Alias<Wlarger_than_EQ>;
1871 def Wframe_larger_than_EQ : Joined<["-"], "Wframe-larger-than=">, Group<f_Group>, Flags<[DriverOption]>;
1872
1873 def : Flag<["-"], "fterminated-vtables">, Alias<fapple_kext>;
1874 def fthreadsafe_statics : Flag<["-"], "fthreadsafe-statics">, Group<f_Group>;
1875 def ftime_report : Flag<["-"], "ftime-report">, Group<f_Group>, Flags<[CC1Option]>;
1876 def ftime_trace : Flag<["-"], "ftime-trace">, Group<f_Group>,
1877   HelpText<"Turn on time profiler. Generates JSON file based on output filename.">,
1878   DocBrief<[{
1879 Turn on time profiler. Generates JSON file based on output filename. Results
1880 can be analyzed with chrome://tracing or `Speedscope App
1881 <https://www.speedscope.app>`_ for flamegraph visualization.}]>,
1882   Flags<[CC1Option, CoreOption]>;
1883 def ftime_trace_granularity_EQ : Joined<["-"], "ftime-trace-granularity=">, Group<f_Group>,
1884   HelpText<"Minimum time granularity (in microseconds) traced by time profiler">,
1885   Flags<[CC1Option, CoreOption]>;
1886 def ftlsmodel_EQ : Joined<["-"], "ftls-model=">, Group<f_Group>, Flags<[CC1Option]>;
1887 def ftrapv : Flag<["-"], "ftrapv">, Group<f_Group>, Flags<[CC1Option]>,
1888   HelpText<"Trap on integer overflow">;
1889 def ftrapv_handler_EQ : Joined<["-"], "ftrapv-handler=">, Group<f_Group>,
1890   MetaVarName<"<function name>">,
1891   HelpText<"Specify the function to be called on overflow">;
1892 def ftrapv_handler : Separate<["-"], "ftrapv-handler">, Group<f_Group>, Flags<[CC1Option]>;
1893 def ftrap_function_EQ : Joined<["-"], "ftrap-function=">, Group<f_Group>, Flags<[CC1Option]>,
1894   HelpText<"Issue call to specified function rather than a trap instruction">;
1895 def funit_at_a_time : Flag<["-"], "funit-at-a-time">, Group<f_Group>;
1896 def funroll_loops : Flag<["-"], "funroll-loops">, Group<f_Group>,
1897   HelpText<"Turn on loop unroller">, Flags<[CC1Option]>;
1898 def fno_unroll_loops : Flag<["-"], "fno-unroll-loops">, Group<f_Group>,
1899   HelpText<"Turn off loop unroller">, Flags<[CC1Option]>;
1900 defm reroll_loops : OptInFFlag<"reroll-loops", "Turn on loop reroller">;
1901 def ftrigraphs : Flag<["-"], "ftrigraphs">, Group<f_Group>,
1902   HelpText<"Process trigraph sequences">, Flags<[CC1Option]>;
1903 def fno_trigraphs : Flag<["-"], "fno-trigraphs">, Group<f_Group>,
1904   HelpText<"Do not process trigraph sequences">, Flags<[CC1Option]>;
1905 def funsigned_bitfields : Flag<["-"], "funsigned-bitfields">, Group<f_Group>;
1906 def funsigned_char : Flag<["-"], "funsigned-char">, Group<f_Group>;
1907 def fno_unsigned_char : Flag<["-"], "fno-unsigned-char">;
1908 def funwind_tables : Flag<["-"], "funwind-tables">, Group<f_Group>;
1909 def fuse_cxa_atexit : Flag<["-"], "fuse-cxa-atexit">, Group<f_Group>;
1910 def fregister_global_dtors_with_atexit : Flag<["-"], "fregister-global-dtors-with-atexit">, Group<f_Group>, Flags<[CC1Option]>,
1911   HelpText<"Use atexit or __cxa_atexit to register global destructors">;
1912 defm use_init_array : OptOutFFlag<"use-init-array", "", "Use .ctors/.dtors instead of .init_array/.fini_array">;
1913 def fno_var_tracking : Flag<["-"], "fno-var-tracking">, Group<clang_ignored_f_Group>;
1914 def fverbose_asm : Flag<["-"], "fverbose-asm">, Group<f_Group>,
1915   HelpText<"Generate verbose assembly output">;
1916 def dA : Flag<["-"], "dA">, Alias<fverbose_asm>;
1917 def fvisibility_EQ : Joined<["-"], "fvisibility=">, Group<f_Group>,
1918   HelpText<"Set the default symbol visibility for all global declarations">, Values<"hidden,default">;
1919 def fvisibility_inlines_hidden : Flag<["-"], "fvisibility-inlines-hidden">, Group<f_Group>,
1920   HelpText<"Give inline C++ member functions hidden visibility by default">,
1921   Flags<[CC1Option]>;
1922 def fvisibility_ms_compat : Flag<["-"], "fvisibility-ms-compat">, Group<f_Group>,
1923   HelpText<"Give global types 'default' visibility and global functions and "
1924            "variables 'hidden' visibility by default">;
1925 def fvisibility_global_new_delete_hidden : Flag<["-"], "fvisibility-global-new-delete-hidden">, Group<f_Group>,
1926   HelpText<"Give global C++ operator new and delete declarations hidden visibility">, Flags<[CC1Option]>;
1927 defm whole_program_vtables : OptInFFlag<"whole-program-vtables",
1928   "Enables whole-program vtable optimization. Requires -flto", "", "", [CoreOption]>;
1929 defm split_lto_unit : OptInFFlag<"split-lto-unit",
1930   "Enables splitting of the LTO unit", "", "", [CoreOption]>;
1931 defm force_emit_vtables : OptInFFlag<"force-emit-vtables",
1932   "Emits more virtual tables to improve devirtualization", "", "", [CoreOption]>;
1933 defm virtual_function_elimination : OptInFFlag<"virtual-function-elimination",
1934   "Enables dead virtual function elimination optimization. Requires -flto=full", "", "", [CoreOption]>;
1935
1936 def fwrapv : Flag<["-"], "fwrapv">, Group<f_Group>, Flags<[CC1Option]>,
1937   HelpText<"Treat signed integer overflow as two's complement">;
1938 def fwritable_strings : Flag<["-"], "fwritable-strings">, Group<f_Group>, Flags<[CC1Option]>,
1939   HelpText<"Store string literals as writable data">;
1940 defm zero_initialized_in_bss : OptOutFFlag<"zero-initialized-in-bss", "", "Don't place zero initialized data in BSS">;
1941 defm function_sections : OptInFFlag<"function-sections", "Place each function in its own section">;
1942 def fbasic_block_sections_EQ : Joined<["-"], "fbasic-block-sections=">, Group<f_Group>,
1943   Flags<[CC1Option, CC1AsOption]>,
1944   HelpText<"Place each function's basic blocks in unique sections (ELF Only) : all | labels | none | list=<file>">,
1945   DocBrief<[{Generate labels for each basic block or place each basic block or a subset of basic blocks in its own section.}]>,
1946   Values<"all,labels,none,list=">;
1947 defm data_sections : OptInFFlag<"data-sections", "Place each data in its own section">;
1948 defm stack_size_section : OptInFFlag<"stack-size-section", "Emit section containing metadata on function stack sizes">;
1949
1950 defm unique_basic_block_section_names : OptInFFlag<"unique-basic-block-section-names",
1951  "Use unique names for basic block sections (ELF Only)">;
1952 defm unique_internal_linkage_names : OptInFFlag<"unique-internal-linkage-names",
1953  "Uniqueify Internal Linkage Symbol Names by appending the MD5 hash of the module path">;
1954 defm unique_section_names : OptOutFFlag<"unique-section-names",
1955   "", "Don't use unique names for text and data sections">;
1956
1957 defm strict_return : OptOutFFlag<"strict-return", "",
1958   "Don't treat control flow paths that fall off the end of a non-void function as unreachable">;
1959
1960 def fenable_matrix : Flag<["-"], "fenable-matrix">, Group<f_Group>,
1961     Flags<[CC1Option]>,
1962     HelpText<"Enable matrix data type and related builtin functions">;
1963
1964
1965 def fdebug_types_section: Flag <["-"], "fdebug-types-section">, Group<f_Group>,
1966   HelpText<"Place debug types in their own section (ELF Only)">;
1967 def fno_debug_types_section: Flag<["-"], "fno-debug-types-section">, Group<f_Group>;
1968 defm debug_ranges_base_address : OptInFFlag<"debug-ranges-base-address",
1969   "Use DWARF base address selection entries in .debug_ranges">;
1970 def fsplit_dwarf_inlining: Flag <["-"], "fsplit-dwarf-inlining">, Group<f_Group>,
1971   HelpText<"Provide minimal debug info in the object/executable to facilitate online symbolication/stack traces in the absence of .dwo/.dwp files when using Split DWARF">;
1972 def fno_split_dwarf_inlining: Flag<["-"], "fno-split-dwarf-inlining">, Group<f_Group>,
1973   Flags<[CC1Option]>;
1974 def fdebug_default_version: Joined<["-"], "fdebug-default-version=">, Group<f_Group>,
1975   HelpText<"Default DWARF version to use, if a -g option caused DWARF debug info to be produced">;
1976 def fdebug_prefix_map_EQ
1977   : Joined<["-"], "fdebug-prefix-map=">, Group<f_Group>,
1978     Flags<[CC1Option,CC1AsOption]>,
1979     HelpText<"remap file source paths in debug info">;
1980 def ffile_prefix_map_EQ
1981   : Joined<["-"], "ffile-prefix-map=">, Group<f_Group>,
1982     HelpText<"remap file source paths in debug info and predefined preprocessor macros">;
1983 def fmacro_prefix_map_EQ
1984   : Joined<["-"], "fmacro-prefix-map=">, Group<Preprocessor_Group>, Flags<[CC1Option]>,
1985     HelpText<"remap file source paths in predefined preprocessor macros">;
1986 defm force_dwarf_frame : OptInFFlag<"force-dwarf-frame", "Always emit a debug frame section">;
1987 def g_Flag : Flag<["-"], "g">, Group<g_Group>,
1988   HelpText<"Generate source-level debug information">;
1989 def gline_tables_only : Flag<["-"], "gline-tables-only">, Group<gN_Group>,
1990   Flags<[CoreOption]>, HelpText<"Emit debug line number tables only">;
1991 def gline_directives_only : Flag<["-"], "gline-directives-only">, Group<gN_Group>,
1992   Flags<[CoreOption]>, HelpText<"Emit debug line info directives only">;
1993 def gmlt : Flag<["-"], "gmlt">, Alias<gline_tables_only>;
1994 def g0 : Flag<["-"], "g0">, Group<gN_Group>;
1995 def g1 : Flag<["-"], "g1">, Group<gN_Group>, Alias<gline_tables_only>;
1996 def g2 : Flag<["-"], "g2">, Group<gN_Group>;
1997 def g3 : Flag<["-"], "g3">, Group<gN_Group>;
1998 def ggdb : Flag<["-"], "ggdb">, Group<gTune_Group>;
1999 def ggdb0 : Flag<["-"], "ggdb0">, Group<ggdbN_Group>;
2000 def ggdb1 : Flag<["-"], "ggdb1">, Group<ggdbN_Group>;
2001 def ggdb2 : Flag<["-"], "ggdb2">, Group<ggdbN_Group>;
2002 def ggdb3 : Flag<["-"], "ggdb3">, Group<ggdbN_Group>;
2003 def glldb : Flag<["-"], "glldb">, Group<gTune_Group>;
2004 def gsce : Flag<["-"], "gsce">, Group<gTune_Group>;
2005 // Equivalent to our default dwarf version. Forces usual dwarf emission when
2006 // CodeView is enabled.
2007 def gdwarf : Flag<["-"], "gdwarf">, Group<g_Group>, Flags<[CoreOption]>,
2008   HelpText<"Generate source-level debug information with the default dwarf version">;
2009 def gdwarf_2 : Flag<["-"], "gdwarf-2">, Group<g_Group>,
2010   HelpText<"Generate source-level debug information with dwarf version 2">;
2011 def gdwarf_3 : Flag<["-"], "gdwarf-3">, Group<g_Group>,
2012   HelpText<"Generate source-level debug information with dwarf version 3">;
2013 def gdwarf_4 : Flag<["-"], "gdwarf-4">, Group<g_Group>,
2014   HelpText<"Generate source-level debug information with dwarf version 4">;
2015 def gdwarf_5 : Flag<["-"], "gdwarf-5">, Group<g_Group>,
2016   HelpText<"Generate source-level debug information with dwarf version 5">;
2017
2018 def gcodeview : Flag<["-"], "gcodeview">,
2019   HelpText<"Generate CodeView debug information">,
2020   Flags<[CC1Option, CC1AsOption, CoreOption]>;
2021 def gcodeview_ghash : Flag<["-"], "gcodeview-ghash">,
2022   HelpText<"Emit type record hashes in a .debug$H section">,
2023   Flags<[CC1Option, CoreOption]>;
2024 def gno_codeview_ghash : Flag<["-"], "gno-codeview-ghash">, Flags<[CoreOption]>;
2025 def ginline_line_tables : Flag<["-"], "ginline-line-tables">, Flags<[CoreOption]>;
2026 def gno_inline_line_tables : Flag<["-"], "gno-inline-line-tables">,
2027   Flags<[CC1Option, CoreOption]>, HelpText<"Don't emit inline line tables">;
2028
2029 def gfull : Flag<["-"], "gfull">, Group<g_Group>;
2030 def gused : Flag<["-"], "gused">, Group<g_Group>;
2031 def gstabs : Joined<["-"], "gstabs">, Group<g_Group>, Flags<[Unsupported]>;
2032 def gcoff : Joined<["-"], "gcoff">, Group<g_Group>, Flags<[Unsupported]>;
2033 def gxcoff : Joined<["-"], "gxcoff">, Group<g_Group>, Flags<[Unsupported]>;
2034 def gvms : Joined<["-"], "gvms">, Group<g_Group>, Flags<[Unsupported]>;
2035 def gtoggle : Flag<["-"], "gtoggle">, Group<g_flags_Group>, Flags<[Unsupported]>;
2036 def grecord_command_line : Flag<["-"], "grecord-command-line">,
2037   Group<g_flags_Group>;
2038 def gno_record_command_line : Flag<["-"], "gno-record-command-line">,
2039   Group<g_flags_Group>;
2040 def : Flag<["-"], "grecord-gcc-switches">, Alias<grecord_command_line>;
2041 def : Flag<["-"], "gno-record-gcc-switches">, Alias<gno_record_command_line>;
2042 def gstrict_dwarf : Flag<["-"], "gstrict-dwarf">, Group<g_flags_Group>;
2043 def gno_strict_dwarf : Flag<["-"], "gno-strict-dwarf">, Group<g_flags_Group>;
2044 def gcolumn_info : Flag<["-"], "gcolumn-info">, Group<g_flags_Group>, Flags<[CoreOption]>;
2045 def gno_column_info : Flag<["-"], "gno-column-info">, Group<g_flags_Group>, Flags<[CoreOption, CC1Option]>;
2046 def gsplit_dwarf : Flag<["-"], "gsplit-dwarf">, Group<g_flags_Group>;
2047 def gsplit_dwarf_EQ : Joined<["-"], "gsplit-dwarf=">, Group<g_flags_Group>,
2048   HelpText<"Set DWARF fission mode to either 'split' or 'single'">,
2049   Values<"split,single">;
2050 def ggnu_pubnames : Flag<["-"], "ggnu-pubnames">, Group<g_flags_Group>, Flags<[CC1Option]>;
2051 def gno_gnu_pubnames : Flag<["-"], "gno-gnu-pubnames">, Group<g_flags_Group>;
2052 def gpubnames : Flag<["-"], "gpubnames">, Group<g_flags_Group>, Flags<[CC1Option]>;
2053 def gno_pubnames : Flag<["-"], "gno-pubnames">, Group<g_flags_Group>;
2054 def gdwarf_aranges : Flag<["-"], "gdwarf-aranges">, Group<g_flags_Group>;
2055 def gmodules : Flag <["-"], "gmodules">, Group<gN_Group>,
2056   HelpText<"Generate debug info with external references to clang modules"
2057            " or precompiled headers">;
2058 def gz : Flag<["-"], "gz">, Group<g_flags_Group>,
2059     HelpText<"DWARF debug sections compression type">;
2060 def gz_EQ : Joined<["-"], "gz=">, Group<g_flags_Group>,
2061     HelpText<"DWARF debug sections compression type">;
2062 def gembed_source : Flag<["-"], "gembed-source">, Group<g_flags_Group>, Flags<[CC1Option]>,
2063     HelpText<"Embed source text in DWARF debug sections">;
2064 def gno_embed_source : Flag<["-"], "gno-embed-source">, Group<g_flags_Group>,
2065     Flags<[DriverOption]>,
2066     HelpText<"Restore the default behavior of not embedding source text in DWARF debug sections">;
2067 def headerpad__max__install__names : Joined<["-"], "headerpad_max_install_names">;
2068 def help : Flag<["-", "--"], "help">, Flags<[CC1Option,CC1AsOption]>,
2069   HelpText<"Display available options">;
2070 def ibuiltininc : Flag<["-"], "ibuiltininc">,
2071   HelpText<"Enable builtin #include directories even when -nostdinc is used "
2072            "before or after -ibuiltininc. "
2073            "Using -nobuiltininc after the option disables it">;
2074 def index_header_map : Flag<["-"], "index-header-map">, Flags<[CC1Option]>,
2075   HelpText<"Make the next included directory (-I or -F) an indexer header map">;
2076 def idirafter : JoinedOrSeparate<["-"], "idirafter">, Group<clang_i_Group>, Flags<[CC1Option]>,
2077   HelpText<"Add directory to AFTER include search path">;
2078 def iframework : JoinedOrSeparate<["-"], "iframework">, Group<clang_i_Group>, Flags<[CC1Option]>,
2079   HelpText<"Add directory to SYSTEM framework search path">;
2080 def iframeworkwithsysroot : JoinedOrSeparate<["-"], "iframeworkwithsysroot">,
2081   Group<clang_i_Group>,
2082   HelpText<"Add directory to SYSTEM framework search path, "
2083            "absolute paths are relative to -isysroot">,
2084   MetaVarName<"<directory>">, Flags<[CC1Option]>;
2085 def imacros : JoinedOrSeparate<["-", "--"], "imacros">, Group<clang_i_Group>, Flags<[CC1Option]>,
2086   HelpText<"Include macros from file before parsing">, MetaVarName<"<file>">;
2087 def image__base : Separate<["-"], "image_base">;
2088 def include_ : JoinedOrSeparate<["-", "--"], "include">, Group<clang_i_Group>, EnumName<"include">,
2089     MetaVarName<"<file>">, HelpText<"Include file before parsing">, Flags<[CC1Option]>;
2090 def include_pch : Separate<["-"], "include-pch">, Group<clang_i_Group>, Flags<[CC1Option]>,
2091   HelpText<"Include precompiled header file">, MetaVarName<"<file>">;
2092 def relocatable_pch : Flag<["-", "--"], "relocatable-pch">, Flags<[CC1Option]>,
2093   HelpText<"Whether to build a relocatable precompiled header">;
2094 def verify_pch : Flag<["-"], "verify-pch">, Group<Action_Group>, Flags<[CC1Option]>,
2095   HelpText<"Load and verify that a pre-compiled header file is not stale">;
2096 def init : Separate<["-"], "init">;
2097 def install__name : Separate<["-"], "install_name">;
2098 def iprefix : JoinedOrSeparate<["-"], "iprefix">, Group<clang_i_Group>, Flags<[CC1Option]>,
2099   HelpText<"Set the -iwithprefix/-iwithprefixbefore prefix">, MetaVarName<"<dir>">;
2100 def iquote : JoinedOrSeparate<["-"], "iquote">, Group<clang_i_Group>, Flags<[CC1Option]>,
2101   HelpText<"Add directory to QUOTE include search path">, MetaVarName<"<directory>">;
2102 def isysroot : JoinedOrSeparate<["-"], "isysroot">, Group<clang_i_Group>, Flags<[CC1Option]>,
2103   HelpText<"Set the system root directory (usually /)">, MetaVarName<"<dir>">;
2104 def isystem : JoinedOrSeparate<["-"], "isystem">, Group<clang_i_Group>,
2105   Flags<[CC1Option]>,
2106   HelpText<"Add directory to SYSTEM include search path">, MetaVarName<"<directory>">;
2107 def isystem_after : JoinedOrSeparate<["-"], "isystem-after">,
2108   Group<clang_i_Group>, Flags<[DriverOption]>, MetaVarName<"<directory>">,
2109   HelpText<"Add directory to end of the SYSTEM include search path">;
2110 def iwithprefixbefore : JoinedOrSeparate<["-"], "iwithprefixbefore">, Group<clang_i_Group>,
2111   HelpText<"Set directory to include search path with prefix">, MetaVarName<"<dir>">,
2112   Flags<[CC1Option]>;
2113 def iwithprefix : JoinedOrSeparate<["-"], "iwithprefix">, Group<clang_i_Group>, Flags<[CC1Option]>,
2114   HelpText<"Set directory to SYSTEM include search path with prefix">, MetaVarName<"<dir>">;
2115 def iwithsysroot : JoinedOrSeparate<["-"], "iwithsysroot">, Group<clang_i_Group>,
2116   HelpText<"Add directory to SYSTEM include search path, "
2117            "absolute paths are relative to -isysroot">, MetaVarName<"<directory>">,
2118   Flags<[CC1Option]>;
2119 def ivfsoverlay : JoinedOrSeparate<["-"], "ivfsoverlay">, Group<clang_i_Group>, Flags<[CC1Option]>,
2120   HelpText<"Overlay the virtual filesystem described by file over the real file system">;
2121 def imultilib : Separate<["-"], "imultilib">, Group<gfortran_Group>;
2122 def keep__private__externs : Flag<["-"], "keep_private_externs">;
2123 def l : JoinedOrSeparate<["-"], "l">, Flags<[LinkerInput, RenderJoined]>,
2124         Group<Link_Group>;
2125 def lazy__framework : Separate<["-"], "lazy_framework">, Flags<[LinkerInput]>;
2126 def lazy__library : Separate<["-"], "lazy_library">, Flags<[LinkerInput]>;
2127 def mlittle_endian : Flag<["-"], "mlittle-endian">, Flags<[DriverOption]>;
2128 def EL : Flag<["-"], "EL">, Alias<mlittle_endian>;
2129 def mbig_endian : Flag<["-"], "mbig-endian">, Flags<[DriverOption]>;
2130 def EB : Flag<["-"], "EB">, Alias<mbig_endian>;
2131 def m16 : Flag<["-"], "m16">, Group<m_Group>, Flags<[DriverOption, CoreOption]>;
2132 def m32 : Flag<["-"], "m32">, Group<m_Group>, Flags<[DriverOption, CoreOption]>;
2133 def mqdsp6_compat : Flag<["-"], "mqdsp6-compat">, Group<m_Group>, Flags<[DriverOption,CC1Option]>,
2134   HelpText<"Enable hexagon-qdsp6 backward compatibility">;
2135 def m64 : Flag<["-"], "m64">, Group<m_Group>, Flags<[DriverOption, CoreOption]>;
2136 def mx32 : Flag<["-"], "mx32">, Group<m_Group>, Flags<[DriverOption, CoreOption]>;
2137 def mabi_EQ : Joined<["-"], "mabi=">, Group<m_Group>;
2138 def miamcu : Flag<["-"], "miamcu">, Group<m_Group>, Flags<[DriverOption, CoreOption]>,
2139   HelpText<"Use Intel MCU ABI">;
2140 def mno_iamcu : Flag<["-"], "mno-iamcu">, Group<m_Group>, Flags<[DriverOption, CoreOption]>;
2141 def malign_functions_EQ : Joined<["-"], "malign-functions=">, Group<clang_ignored_m_Group>;
2142 def malign_loops_EQ : Joined<["-"], "malign-loops=">, Group<clang_ignored_m_Group>;
2143 def malign_jumps_EQ : Joined<["-"], "malign-jumps=">, Group<clang_ignored_m_Group>;
2144 def malign_branch_EQ : CommaJoined<["-"], "malign-branch=">, Group<m_Group>, Flags<[DriverOption]>,
2145   HelpText<"Specify types of branches to align">;
2146 def malign_branch_boundary_EQ : Joined<["-"], "malign-branch-boundary=">, Group<m_Group>, Flags<[DriverOption]>,
2147   HelpText<"Specify the boundary's size to align branches">;
2148 def mpad_max_prefix_size_EQ : Joined<["-"], "mpad-max-prefix-size=">, Group<m_Group>, Flags<[DriverOption]>,
2149   HelpText<"Specify maximum number of prefixes to use for padding">;
2150 def mbranches_within_32B_boundaries : Flag<["-"], "mbranches-within-32B-boundaries">, Flags<[DriverOption]>, Group<m_Group>,
2151   HelpText<"Align selected branches (fused, jcc, jmp) within 32-byte boundary">;
2152 def mfancy_math_387 : Flag<["-"], "mfancy-math-387">, Group<clang_ignored_m_Group>;
2153 def mlong_calls : Flag<["-"], "mlong-calls">, Group<m_Group>,
2154   HelpText<"Generate branches with extended addressability, usually via indirect jumps.">;
2155 def mdouble_EQ : Joined<["-"], "mdouble=">, Group<m_Group>, Values<"32,64">, Flags<[CC1Option]>,
2156   HelpText<"Force double to be 32 bits or 64 bits">;
2157 def LongDouble_Group : OptionGroup<"<LongDouble group>">, Group<m_Group>,
2158   DocName<"Long double flags">,
2159   DocBrief<[{Selects the long double implementation}]>;
2160 def mlong_double_64 : Flag<["-"], "mlong-double-64">, Group<LongDouble_Group>, Flags<[CC1Option]>,
2161   HelpText<"Force long double to be 64 bits">;
2162 def mlong_double_80 : Flag<["-"], "mlong-double-80">, Group<LongDouble_Group>, Flags<[CC1Option]>,
2163   HelpText<"Force long double to be 80 bits, padded to 128 bits for storage">;
2164 def mlong_double_128 : Flag<["-"], "mlong-double-128">, Group<LongDouble_Group>, Flags<[CC1Option]>,
2165   HelpText<"Force long double to be 128 bits">;
2166 def mno_long_calls : Flag<["-"], "mno-long-calls">, Group<m_Group>,
2167   HelpText<"Restore the default behaviour of not generating long calls">;
2168 def mexecute_only : Flag<["-"], "mexecute-only">, Group<m_arm_Features_Group>,
2169   HelpText<"Disallow generation of data access to code sections (ARM only)">;
2170 def mno_execute_only : Flag<["-"], "mno-execute-only">, Group<m_arm_Features_Group>,
2171   HelpText<"Allow generation of data access to code sections (ARM only)">;
2172 def mtp_mode_EQ : Joined<["-"], "mtp=">, Group<m_arm_Features_Group>, Values<"soft,cp15,el0,el1,el2,el3">,
2173   HelpText<"Thread pointer access method (AArch32/AArch64 only)">;
2174 def mpure_code : Flag<["-"], "mpure-code">, Alias<mexecute_only>; // Alias for GCC compatibility
2175 def mno_pure_code : Flag<["-"], "mno-pure-code">, Alias<mno_execute_only>;
2176 def mtvos_version_min_EQ : Joined<["-"], "mtvos-version-min=">, Group<m_Group>;
2177 def mappletvos_version_min_EQ : Joined<["-"], "mappletvos-version-min=">, Alias<mtvos_version_min_EQ>;
2178 def mtvos_simulator_version_min_EQ : Joined<["-"], "mtvos-simulator-version-min=">;
2179 def mappletvsimulator_version_min_EQ : Joined<["-"], "mappletvsimulator-version-min=">, Alias<mtvos_simulator_version_min_EQ>;
2180 def mwatchos_version_min_EQ : Joined<["-"], "mwatchos-version-min=">, Group<m_Group>;
2181 def mwatchos_simulator_version_min_EQ : Joined<["-"], "mwatchos-simulator-version-min=">;
2182 def mwatchsimulator_version_min_EQ : Joined<["-"], "mwatchsimulator-version-min=">, Alias<mwatchos_simulator_version_min_EQ>;
2183 def march_EQ : Joined<["-"], "march=">, Group<m_Group>, Flags<[CoreOption]>;
2184 def masm_EQ : Joined<["-"], "masm=">, Group<m_Group>, Flags<[DriverOption]>;
2185 def mcmodel_EQ : Joined<["-"], "mcmodel=">, Group<m_Group>, Flags<[CC1Option]>;
2186 def mtls_size_EQ : Joined<["-"], "mtls-size=">, Group<m_Group>, Flags<[DriverOption, CC1Option]>,
2187   HelpText<"Specify bit size of immediate TLS offsets (AArch64 ELF only): "
2188            "12 (for 4KB) | 24 (for 16MB, default) | 32 (for 4GB) | 48 (for 256TB, needs -mcmodel=large)">;
2189 def mimplicit_it_EQ : Joined<["-"], "mimplicit-it=">, Group<m_Group>;
2190 def mdefault_build_attributes : Joined<["-"], "mdefault-build-attributes">, Group<m_Group>;
2191 def mno_default_build_attributes : Joined<["-"], "mno-default-build-attributes">, Group<m_Group>;
2192 def mconstant_cfstrings : Flag<["-"], "mconstant-cfstrings">, Group<clang_ignored_m_Group>;
2193 def mconsole : Joined<["-"], "mconsole">, Group<m_Group>, Flags<[DriverOption]>;
2194 def mwindows : Joined<["-"], "mwindows">, Group<m_Group>, Flags<[DriverOption]>;
2195 def mdll : Joined<["-"], "mdll">, Group<m_Group>, Flags<[DriverOption]>;
2196 def municode : Joined<["-"], "municode">, Group<m_Group>, Flags<[DriverOption]>;
2197 def mthreads : Joined<["-"], "mthreads">, Group<m_Group>, Flags<[DriverOption]>;
2198 def mcpu_EQ : Joined<["-"], "mcpu=">, Group<m_Group>;
2199 def mmcu_EQ : Joined<["-"], "mmcu=">, Group<m_Group>;
2200 def mdynamic_no_pic : Joined<["-"], "mdynamic-no-pic">, Group<m_Group>;
2201 def mfix_and_continue : Flag<["-"], "mfix-and-continue">, Group<clang_ignored_m_Group>;
2202 def mieee_fp : Flag<["-"], "mieee-fp">, Group<clang_ignored_m_Group>;
2203 def minline_all_stringops : Flag<["-"], "minline-all-stringops">, Group<clang_ignored_m_Group>;
2204 def mno_inline_all_stringops : Flag<["-"], "mno-inline-all-stringops">, Group<clang_ignored_m_Group>;
2205 def malign_double : Flag<["-"], "malign-double">, Group<m_Group>, Flags<[CC1Option]>,
2206   HelpText<"Align doubles to two words in structs (x86 only)">;
2207 def mfloat_abi_EQ : Joined<["-"], "mfloat-abi=">, Group<m_Group>, Values<"soft,softfp,hard">;
2208 def mfpmath_EQ : Joined<["-"], "mfpmath=">, Group<m_Group>;
2209 def mfpu_EQ : Joined<["-"], "mfpu=">, Group<m_Group>;
2210 def mhwdiv_EQ : Joined<["-"], "mhwdiv=">, Group<m_Group>;
2211 def mhwmult_EQ : Joined<["-"], "mhwmult=">, Group<m_Group>;
2212 def mglobal_merge : Flag<["-"], "mglobal-merge">, Group<m_Group>, Flags<[CC1Option]>,
2213   HelpText<"Enable merging of globals">;
2214 def mhard_float : Flag<["-"], "mhard-float">, Group<m_Group>;
2215 def miphoneos_version_min_EQ : Joined<["-"], "miphoneos-version-min=">, Group<m_Group>;
2216 def mios_version_min_EQ : Joined<["-"], "mios-version-min=">,
2217   Alias<miphoneos_version_min_EQ>, HelpText<"Set iOS deployment target">;
2218 def mios_simulator_version_min_EQ : Joined<["-"], "mios-simulator-version-min=">;
2219 def miphonesimulator_version_min_EQ : Joined<["-"], "miphonesimulator-version-min=">, Alias<mios_simulator_version_min_EQ>;
2220 def mkernel : Flag<["-"], "mkernel">, Group<m_Group>;
2221 def mlinker_version_EQ : Joined<["-"], "mlinker-version=">,
2222   Flags<[DriverOption]>;
2223 def mllvm : Separate<["-"], "mllvm">, Flags<[CC1Option,CC1AsOption,CoreOption]>,
2224   HelpText<"Additional arguments to forward to LLVM's option processing">;
2225 def mmacosx_version_min_EQ : Joined<["-"], "mmacosx-version-min=">,
2226   Group<m_Group>, HelpText<"Set Mac OS X deployment target">;
2227 def mmacos_version_min_EQ : Joined<["-"], "mmacos-version-min=">,
2228   Group<m_Group>, Alias<mmacosx_version_min_EQ>;
2229 def mms_bitfields : Flag<["-"], "mms-bitfields">, Group<m_Group>, Flags<[CC1Option]>,
2230   HelpText<"Set the default structure layout to be compatible with the Microsoft compiler standard">;
2231 def moutline : Flag<["-"], "moutline">, Group<f_clang_Group>, Flags<[CC1Option]>,
2232     HelpText<"Enable function outlining (AArch64 only)">;
2233 def mno_outline : Flag<["-"], "mno-outline">, Group<f_clang_Group>, Flags<[CC1Option]>,
2234     HelpText<"Disable function outlining (AArch64 only)">;
2235 def mno_ms_bitfields : Flag<["-"], "mno-ms-bitfields">, Group<m_Group>,
2236   HelpText<"Do not set the default structure layout to be compatible with the Microsoft compiler standard">;
2237 def mstackrealign : Flag<["-"], "mstackrealign">, Group<m_Group>, Flags<[CC1Option]>,
2238   HelpText<"Force realign the stack at entry to every function">;
2239 def mstack_alignment : Joined<["-"], "mstack-alignment=">, Group<m_Group>, Flags<[CC1Option]>,
2240   HelpText<"Set the stack alignment">;
2241 def mstack_probe_size : Joined<["-"], "mstack-probe-size=">, Group<m_Group>, Flags<[CC1Option]>,
2242   HelpText<"Set the stack probe size">;
2243 def mstack_arg_probe : Flag<["-"], "mstack-arg-probe">, Group<m_Group>,
2244   HelpText<"Enable stack probes">;
2245 def mno_stack_arg_probe : Flag<["-"], "mno-stack-arg-probe">, Group<m_Group>, Flags<[CC1Option]>,
2246   HelpText<"Disable stack probes which are enabled by default">;
2247 def mthread_model : Separate<["-"], "mthread-model">, Group<m_Group>, Flags<[CC1Option]>,
2248   HelpText<"The thread model to use, e.g. posix, single (posix by default)">, Values<"posix,single">;
2249 def meabi : Separate<["-"], "meabi">, Group<m_Group>, Flags<[CC1Option]>,
2250   HelpText<"Set EABI type, e.g. 4, 5 or gnu (default depends on triple)">, Values<"default,4,5,gnu">;
2251
2252 def mno_constant_cfstrings : Flag<["-"], "mno-constant-cfstrings">, Group<m_Group>;
2253 def mno_global_merge : Flag<["-"], "mno-global-merge">, Group<m_Group>, Flags<[CC1Option]>,
2254   HelpText<"Disable merging of globals">;
2255 def mno_pascal_strings : Flag<["-"], "mno-pascal-strings">,
2256   Alias<fno_pascal_strings>;
2257 def mno_red_zone : Flag<["-"], "mno-red-zone">, Group<m_Group>;
2258 def mno_tls_direct_seg_refs : Flag<["-"], "mno-tls-direct-seg-refs">, Group<m_Group>, Flags<[CC1Option]>,
2259   HelpText<"Disable direct TLS access through segment registers">;
2260 def mno_relax_all : Flag<["-"], "mno-relax-all">, Group<m_Group>;
2261 def mno_rtd: Flag<["-"], "mno-rtd">, Group<m_Group>;
2262 def mno_soft_float : Flag<["-"], "mno-soft-float">, Group<m_Group>;
2263 def mno_stackrealign : Flag<["-"], "mno-stackrealign">, Group<m_Group>;
2264
2265 def mretpoline : Flag<["-"], "mretpoline">, Group<m_Group>, Flags<[CoreOption,DriverOption]>;
2266 def mno_retpoline : Flag<["-"], "mno-retpoline">, Group<m_Group>, Flags<[CoreOption,DriverOption]>;
2267 def mspeculative_load_hardening : Flag<["-"], "mspeculative-load-hardening">,
2268   Group<m_Group>, Flags<[CoreOption,CC1Option]>;
2269 def mno_speculative_load_hardening : Flag<["-"], "mno-speculative-load-hardening">,
2270   Group<m_Group>, Flags<[CoreOption]>;
2271 def mlvi_hardening : Flag<["-"], "mlvi-hardening">, Group<m_Group>, Flags<[CoreOption,DriverOption]>,
2272   HelpText<"Enable all mitigations for Load Value Injection (LVI)">;
2273 def mno_lvi_hardening : Flag<["-"], "mno-lvi-hardening">, Group<m_Group>, Flags<[CoreOption,DriverOption]>,
2274   HelpText<"Disable mitigations for Load Value Injection (LVI)">;
2275 def mlvi_cfi : Flag<["-"], "mlvi-cfi">, Group<m_Group>, Flags<[CoreOption,DriverOption]>,
2276   HelpText<"Enable only control-flow mitigations for Load Value Injection (LVI)">;
2277 def mno_lvi_cfi : Flag<["-"], "mno-lvi-cfi">, Group<m_Group>, Flags<[CoreOption,DriverOption]>,
2278   HelpText<"Disable control-flow mitigations for Load Value Injection (LVI)">;
2279 def m_seses : Flag<["-"], "mseses">, Group<m_Group>, Flags<[CoreOption, DriverOption]>,
2280   HelpText<"Enable speculative execution side effect suppression (SESES). "
2281     "Includes LVI control flow integrity mitigations">;
2282 def mno_seses : Flag<["-"], "mno-seses">, Group<m_Group>, Flags<[CoreOption, DriverOption]>,
2283   HelpText<"Disable speculative execution side effect suppression (SESES)">;
2284
2285 def mrelax : Flag<["-"], "mrelax">, Group<m_riscv_Features_Group>,
2286   HelpText<"Enable linker relaxation">;
2287 def mno_relax : Flag<["-"], "mno-relax">, Group<m_riscv_Features_Group>,
2288   HelpText<"Disable linker relaxation">;
2289 def msmall_data_limit_EQ : Joined<["-"], "msmall-data-limit=">, Group<m_Group>,
2290   Alias<G>,
2291   HelpText<"Put global and static data smaller than the limit into a special section">;
2292 def msave_restore : Flag<["-"], "msave-restore">, Group<m_riscv_Features_Group>,
2293   HelpText<"Enable using library calls for save and restore">;
2294 def mno_save_restore : Flag<["-"], "mno-save-restore">, Group<m_riscv_Features_Group>,
2295   HelpText<"Disable using library calls for save and restore">;
2296 def mcmodel_EQ_medlow : Flag<["-"], "mcmodel=medlow">, Group<m_riscv_Features_Group>,
2297   Flags<[CC1Option]>, Alias<mcmodel_EQ>, AliasArgs<["small"]>,
2298   HelpText<"Equivalent to -mcmodel=small, compatible with RISC-V gcc.">;
2299 def mcmodel_EQ_medany : Flag<["-"], "mcmodel=medany">, Group<m_riscv_Features_Group>,
2300   Flags<[CC1Option]>, Alias<mcmodel_EQ>, AliasArgs<["medium"]>,
2301   HelpText<"Equivalent to -mcmodel=medium, compatible with RISC-V gcc.">;
2302 def menable_experimental_extensions : Flag<["-"], "menable-experimental-extensions">, Group<m_Group>,
2303   HelpText<"Enable use of experimental RISC-V extensions.">;
2304
2305 def munaligned_access : Flag<["-"], "munaligned-access">, Group<m_arm_Features_Group>,
2306   HelpText<"Allow memory accesses to be unaligned (AArch32/AArch64 only)">;
2307 def mno_unaligned_access : Flag<["-"], "mno-unaligned-access">, Group<m_arm_Features_Group>,
2308   HelpText<"Force all memory accesses to be aligned (AArch32/AArch64 only)">;
2309 def mstrict_align : Flag<["-"], "mstrict-align">, Alias<mno_unaligned_access>, Flags<[CC1Option,HelpHidden]>,
2310   HelpText<"Force all memory accesses to be aligned (same as mno-unaligned-access)">;
2311 def mno_thumb : Flag<["-"], "mno-thumb">, Group<m_arm_Features_Group>;
2312 def mrestrict_it: Flag<["-"], "mrestrict-it">, Group<m_arm_Features_Group>,
2313   HelpText<"Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode.">;
2314 def mno_restrict_it: Flag<["-"], "mno-restrict-it">, Group<m_arm_Features_Group>,
2315   HelpText<"Allow generation of deprecated IT blocks for ARMv8. It is off by default for ARMv8 Thumb mode">;
2316 def marm : Flag<["-"], "marm">, Alias<mno_thumb>;
2317 def ffixed_r9 : Flag<["-"], "ffixed-r9">, Group<m_arm_Features_Group>,
2318   HelpText<"Reserve the r9 register (ARM only)">;
2319 def mno_movt : Flag<["-"], "mno-movt">, Group<m_arm_Features_Group>,
2320   HelpText<"Disallow use of movt/movw pairs (ARM only)">;
2321 def mcrc : Flag<["-"], "mcrc">, Group<m_Group>,
2322   HelpText<"Allow use of CRC instructions (ARM/Mips only)">;
2323 def mnocrc : Flag<["-"], "mnocrc">, Group<m_arm_Features_Group>,
2324   HelpText<"Disallow use of CRC instructions (ARM only)">;
2325 def mno_neg_immediates: Flag<["-"], "mno-neg-immediates">, Group<m_arm_Features_Group>,
2326   HelpText<"Disallow converting instructions with negative immediates to their negation or inversion.">;
2327 def mcmse : Flag<["-"], "mcmse">, Group<m_arm_Features_Group>,
2328   Flags<[DriverOption,CC1Option]>,
2329   HelpText<"Allow use of CMSE (Armv8-M Security Extensions)">;
2330 def ForceAAPCSBitfieldLoad : Flag<["-"], "fAAPCSBitfieldLoad">, Group<m_arm_Features_Group>,
2331   Flags<[DriverOption,CC1Option]>,
2332   HelpText<"Follows the AAPCS standard that all volatile bit-field write generates at least one load. (ARM only).">;
2333
2334 def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group<m_aarch64_Features_Group>,
2335   HelpText<"Generate code which only uses the general purpose registers (AArch64 only)">;
2336 def mfix_cortex_a53_835769 : Flag<["-"], "mfix-cortex-a53-835769">,
2337   Group<m_aarch64_Features_Group>,
2338   HelpText<"Workaround Cortex-A53 erratum 835769 (AArch64 only)">;
2339 def mno_fix_cortex_a53_835769 : Flag<["-"], "mno-fix-cortex-a53-835769">,
2340   Group<m_aarch64_Features_Group>,
2341   HelpText<"Don't workaround Cortex-A53 erratum 835769 (AArch64 only)">;
2342 foreach i = {1-31} in
2343   def ffixed_x#i : Flag<["-"], "ffixed-x"#i>, Group<m_Group>,
2344     HelpText<"Reserve the x"#i#" register (AArch64/RISC-V only)">;
2345
2346 foreach i = {8-15,18} in
2347   def fcall_saved_x#i : Flag<["-"], "fcall-saved-x"#i>, Group<m_aarch64_Features_Group>,
2348     HelpText<"Make the x"#i#" register call-saved (AArch64 only)">;
2349
2350 def msign_return_address_EQ : Joined<["-"], "msign-return-address=">,
2351   Flags<[CC1Option]>, Group<m_Group>, Values<"none,all,non-leaf">,
2352   HelpText<"Select return address signing scope">;
2353 def mbranch_protection_EQ : Joined<["-"], "mbranch-protection=">,
2354   HelpText<"Enforce targets of indirect branches and function returns">;
2355
2356 def mharden_sls_EQ : Joined<["-"], "mharden-sls=">,
2357   HelpText<"Select straight-line speculation hardening scope">;
2358
2359 def msimd128 : Flag<["-"], "msimd128">, Group<m_wasm_Features_Group>;
2360 def munimplemented_simd128 : Flag<["-"], "munimplemented-simd128">, Group<m_wasm_Features_Group>;
2361 def mno_unimplemented_simd128 : Flag<["-"], "mno-unimplemented-simd128">, Group<m_wasm_Features_Group>;
2362 def mno_simd128 : Flag<["-"], "mno-simd128">, Group<m_wasm_Features_Group>;
2363 def mnontrapping_fptoint : Flag<["-"], "mnontrapping-fptoint">, Group<m_wasm_Features_Group>;
2364 def mno_nontrapping_fptoint : Flag<["-"], "mno-nontrapping-fptoint">, Group<m_wasm_Features_Group>;
2365 def msign_ext : Flag<["-"], "msign-ext">, Group<m_wasm_Features_Group>;
2366 def mno_sign_ext : Flag<["-"], "mno-sign-ext">, Group<m_wasm_Features_Group>;
2367 def mexception_handing : Flag<["-"], "mexception-handling">, Group<m_wasm_Features_Group>;
2368 def mno_exception_handing : Flag<["-"], "mno-exception-handling">, Group<m_wasm_Features_Group>;
2369 def matomics : Flag<["-"], "matomics">, Group<m_wasm_Features_Group>;
2370 def mno_atomics : Flag<["-"], "mno-atomics">, Group<m_wasm_Features_Group>;
2371 def mbulk_memory : Flag<["-"], "mbulk-memory">, Group<m_wasm_Features_Group>;
2372 def mno_bulk_memory : Flag<["-"], "mno-bulk-memory">, Group<m_wasm_Features_Group>;
2373 def mmutable_globals : Flag<["-"], "mmutable-globals">, Group<m_wasm_Features_Group>;
2374 def mno_mutable_globals : Flag<["-"], "mno-mutable-globals">, Group<m_wasm_Features_Group>;
2375 def mmultivalue : Flag<["-"], "mmultivalue">, Group<m_wasm_Features_Group>;
2376 def mno_multivalue : Flag<["-"], "mno-multivalue">, Group<m_wasm_Features_Group>;
2377 def mtail_call : Flag<["-"], "mtail-call">, Group<m_wasm_Features_Group>;
2378 def mno_tail_call : Flag<["-"], "mno-tail-call">, Group<m_wasm_Features_Group>;
2379 def mreference_types : Flag<["-"], "mreference-types">, Group<m_wasm_Features_Group>;
2380 def mno_reference_types : Flag<["-"], "mno-reference-types">, Group<m_wasm_Features_Group>;
2381 def mexec_model_EQ : Joined<["-"], "mexec-model=">, Group<m_wasm_Features_Driver_Group>,
2382                      Values<"command,reactor">,
2383                      HelpText<"Execution model (WebAssembly only)">;
2384
2385 def mamdgpu_debugger_abi : Joined<["-"], "mamdgpu-debugger-abi=">,
2386   Flags<[HelpHidden]>,
2387   Group<m_Group>,
2388   HelpText<"Generate additional code for specified <version> of debugger ABI (AMDGPU only)">,
2389   MetaVarName<"<version>">;
2390
2391 def mcode_object_v3 : Flag<["-"], "mcode-object-v3">, Group<m_amdgpu_Features_Group>,
2392   HelpText<"Enable code object v3 (AMDGPU only)">;
2393 def mno_code_object_v3 : Flag<["-"], "mno-code-object-v3">, Group<m_amdgpu_Features_Group>,
2394   HelpText<"Disable code object v3 (AMDGPU only)">;
2395 def mxnack : Flag<["-"], "mxnack">, Group<m_amdgpu_Features_Group>,
2396   HelpText<"Enable XNACK (AMDGPU only)">;
2397 def mno_xnack : Flag<["-"], "mno-xnack">, Group<m_amdgpu_Features_Group>,
2398   HelpText<"Disable XNACK (AMDGPU only)">;
2399 def msram_ecc : Flag<["-"], "msram-ecc">, Group<m_amdgpu_Features_Group>,
2400   HelpText<"Enable SRAM ECC (AMDGPU only)">;
2401 def mno_sram_ecc : Flag<["-"], "mno-sram-ecc">, Group<m_amdgpu_Features_Group>,
2402   HelpText<"Disable SRAM ECC (AMDGPU only)">;
2403
2404 def mcumode : Flag<["-"], "mcumode">, Group<m_amdgpu_Features_Group>,
2405   HelpText<"CU wavefront execution mode is used (AMDGPU only)">;
2406 def mno_cumode : Flag<["-"], "mno-cumode">, Group<m_amdgpu_Features_Group>,
2407   HelpText<"WGP wavefront execution mode is used (AMDGPU only)">;
2408
2409 def mwavefrontsize64 : Flag<["-"], "mwavefrontsize64">,
2410   Group<m_Group>, HelpText<"Wavefront size 64 is used">;
2411 def mno_wavefrontsize64 : Flag<["-"], "mno-wavefrontsize64">,
2412   Group<m_Group>, HelpText<"Wavefront size 32 is used">;
2413
2414 def faltivec : Flag<["-"], "faltivec">, Group<f_Group>, Flags<[DriverOption]>;
2415 def fno_altivec : Flag<["-"], "fno-altivec">, Group<f_Group>, Flags<[DriverOption]>;
2416 def maltivec : Flag<["-"], "maltivec">, Group<m_ppc_Features_Group>;
2417 def mno_altivec : Flag<["-"], "mno-altivec">, Group<m_ppc_Features_Group>;
2418 def mpcrel: Flag<["-"], "mpcrel">, Group<m_ppc_Features_Group>;
2419 def mno_pcrel: Flag<["-"], "mno-pcrel">, Group<m_ppc_Features_Group>;
2420 def mspe : Flag<["-"], "mspe">, Group<m_ppc_Features_Group>;
2421 def mno_spe : Flag<["-"], "mno-spe">, Group<m_ppc_Features_Group>;
2422 def mvsx : Flag<["-"], "mvsx">, Group<m_ppc_Features_Group>;
2423 def mno_vsx : Flag<["-"], "mno-vsx">, Group<m_ppc_Features_Group>;
2424 def msecure_plt : Flag<["-"], "msecure-plt">, Group<m_ppc_Features_Group>;
2425 def mpower8_vector : Flag<["-"], "mpower8-vector">,
2426     Group<m_ppc_Features_Group>;
2427 def mno_power8_vector : Flag<["-"], "mno-power8-vector">,
2428     Group<m_ppc_Features_Group>;
2429 def mpower9_vector : Flag<["-"], "mpower9-vector">,
2430     Group<m_ppc_Features_Group>;
2431 def mno_power9_vector : Flag<["-"], "mno-power9-vector">,
2432     Group<m_ppc_Features_Group>;
2433 def mpower10_vector : Flag<["-"], "mpower10-vector">,
2434     Group<m_ppc_Features_Group>;
2435 def mno_power10_vector : Flag<["-"], "mno-power10-vector">,
2436     Group<m_ppc_Features_Group>;
2437 def mpower8_crypto : Flag<["-"], "mcrypto">,
2438     Group<m_ppc_Features_Group>;
2439 def mnopower8_crypto : Flag<["-"], "mno-crypto">,
2440     Group<m_ppc_Features_Group>;
2441 def mdirect_move : Flag<["-"], "mdirect-move">,
2442     Group<m_ppc_Features_Group>;
2443 def mnodirect_move : Flag<["-"], "mno-direct-move">,
2444     Group<m_ppc_Features_Group>;
2445 def mhtm : Flag<["-"], "mhtm">, Group<m_ppc_Features_Group>;
2446 def mno_htm : Flag<["-"], "mno-htm">, Group<m_ppc_Features_Group>;
2447 def mfprnd : Flag<["-"], "mfprnd">, Group<m_ppc_Features_Group>;
2448 def mno_fprnd : Flag<["-"], "mno-fprnd">, Group<m_ppc_Features_Group>;
2449 def mcmpb : Flag<["-"], "mcmpb">, Group<m_ppc_Features_Group>;
2450 def mno_cmpb : Flag<["-"], "mno-cmpb">, Group<m_ppc_Features_Group>;
2451 def misel : Flag<["-"], "misel">, Group<m_ppc_Features_Group>;
2452 def mno_isel : Flag<["-"], "mno-isel">, Group<m_ppc_Features_Group>;
2453 def mmfocrf : Flag<["-"], "mmfocrf">, Group<m_ppc_Features_Group>;
2454 def mmfcrf : Flag<["-"], "mmfcrf">, Alias<mmfocrf>;
2455 def mno_mfocrf : Flag<["-"], "mno-mfocrf">, Group<m_ppc_Features_Group>;
2456 def mno_mfcrf : Flag<["-"], "mno-mfcrf">, Alias<mno_mfocrf>;
2457 def mpopcntd : Flag<["-"], "mpopcntd">, Group<m_ppc_Features_Group>;
2458 def mno_popcntd : Flag<["-"], "mno-popcntd">, Group<m_ppc_Features_Group>;
2459 def mqpx : Flag<["-"], "mqpx">, Group<m_ppc_Features_Group>;
2460 def mno_qpx : Flag<["-"], "mno-qpx">, Group<m_ppc_Features_Group>;
2461 def mcrbits : Flag<["-"], "mcrbits">, Group<m_ppc_Features_Group>;
2462 def mno_crbits : Flag<["-"], "mno-crbits">, Group<m_ppc_Features_Group>;
2463 def minvariant_function_descriptors :
2464   Flag<["-"], "minvariant-function-descriptors">, Group<m_ppc_Features_Group>;
2465 def mno_invariant_function_descriptors :
2466   Flag<["-"], "mno-invariant-function-descriptors">,
2467   Group<m_ppc_Features_Group>;
2468 def mfloat128: Flag<["-"], "mfloat128">,
2469     Group<m_ppc_Features_Group>;
2470 def mno_float128 : Flag<["-"], "mno-float128">,
2471     Group<m_ppc_Features_Group>;
2472 def mlongcall: Flag<["-"], "mlongcall">,
2473     Group<m_ppc_Features_Group>;
2474 def mno_longcall : Flag<["-"], "mno-longcall">,
2475     Group<m_ppc_Features_Group>;
2476 def maix_struct_return : Flag<["-"], "maix-struct-return">,
2477   Group<m_Group>, Flags<[CC1Option]>,
2478   HelpText<"Return all structs in memory (PPC32 only)">;
2479 def msvr4_struct_return : Flag<["-"], "msvr4-struct-return">,
2480   Group<m_Group>, Flags<[CC1Option]>,
2481   HelpText<"Return small structs in registers (PPC32 only)">;
2482
2483 def mvx : Flag<["-"], "mvx">, Group<m_Group>;
2484 def mno_vx : Flag<["-"], "mno-vx">, Group<m_Group>;
2485
2486 defm zvector : OptInFFlag<"zvector", "Enable System z vector language extension">;
2487 def mzvector : Flag<["-"], "mzvector">, Alias<fzvector>;
2488 def mno_zvector : Flag<["-"], "mno-zvector">, Alias<fno_zvector>;
2489
2490 def mbackchain : Flag<["-"], "mbackchain">, Group<m_Group>, Flags<[DriverOption,CC1Option]>,
2491   HelpText<"Link stack frames through backchain on System Z">;
2492 def mno_backchain : Flag<["-"], "mno-backchain">, Group<m_Group>, Flags<[DriverOption,CC1Option]>;
2493
2494 def mno_warn_nonportable_cfstrings : Flag<["-"], "mno-warn-nonportable-cfstrings">, Group<m_Group>;
2495 def mno_omit_leaf_frame_pointer : Flag<["-"], "mno-omit-leaf-frame-pointer">, Group<m_Group>;
2496 def momit_leaf_frame_pointer : Flag<["-"], "momit-leaf-frame-pointer">, Group<m_Group>,
2497   HelpText<"Omit frame pointer setup for leaf functions">;
2498 def moslib_EQ : Joined<["-"], "moslib=">, Group<m_Group>;
2499 def mpascal_strings : Flag<["-"], "mpascal-strings">, Alias<fpascal_strings>;
2500 def mred_zone : Flag<["-"], "mred-zone">, Group<m_Group>;
2501 def mtls_direct_seg_refs : Flag<["-"], "mtls-direct-seg-refs">, Group<m_Group>,
2502   HelpText<"Enable direct TLS access through segment registers (default)">;
2503 def mregparm_EQ : Joined<["-"], "mregparm=">, Group<m_Group>;
2504 def mrelax_all : Flag<["-"], "mrelax-all">, Group<m_Group>, Flags<[CC1Option,CC1AsOption]>,
2505   HelpText<"(integrated-as) Relax all machine instructions">;
2506 def mincremental_linker_compatible : Flag<["-"], "mincremental-linker-compatible">, Group<m_Group>,
2507   Flags<[CC1Option,CC1AsOption]>,
2508   HelpText<"(integrated-as) Emit an object file which can be used with an incremental linker">;
2509 def mno_incremental_linker_compatible : Flag<["-"], "mno-incremental-linker-compatible">, Group<m_Group>,
2510   HelpText<"(integrated-as) Emit an object file which cannot be used with an incremental linker">;
2511 def mrtd : Flag<["-"], "mrtd">, Group<m_Group>, Flags<[CC1Option]>,
2512   HelpText<"Make StdCall calling convention the default">;
2513 def msmall_data_threshold_EQ : Joined <["-"], "msmall-data-threshold=">,
2514   Group<m_Group>, Alias<G>;
2515 def msoft_float : Flag<["-"], "msoft-float">, Group<m_Group>, Flags<[CC1Option]>,
2516   HelpText<"Use software floating point">;
2517 def mno_implicit_float : Flag<["-"], "mno-implicit-float">, Group<m_Group>,
2518   HelpText<"Don't generate implicit floating point instructions">;
2519 def mimplicit_float : Flag<["-"], "mimplicit-float">, Group<m_Group>;
2520 def mrecip : Flag<["-"], "mrecip">, Group<m_Group>;
2521 def mrecip_EQ : CommaJoined<["-"], "mrecip=">, Group<m_Group>, Flags<[CC1Option]>;
2522 def mprefer_vector_width_EQ : Joined<["-"], "mprefer-vector-width=">, Group<m_Group>, Flags<[CC1Option]>,
2523   HelpText<"Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.">;
2524 def mpie_copy_relocations : Flag<["-"], "mpie-copy-relocations">, Group<m_Group>,
2525   Flags<[CC1Option]>,
2526   HelpText<"Use copy relocations support for PIE builds">;
2527 def mno_pie_copy_relocations : Flag<["-"], "mno-pie-copy-relocations">, Group<m_Group>;
2528 def mfentry : Flag<["-"], "mfentry">, HelpText<"Insert calls to fentry at function entry (x86/SystemZ only)">,
2529   Flags<[CC1Option]>, Group<m_Group>;
2530 def mnop_mcount : Flag<["-"], "mnop-mcount">, HelpText<"Generate mcount/__fentry__ calls as nops. To activate they need to be patched in.">,
2531   Flags<[CC1Option]>, Group<m_Group>;
2532 def mrecord_mcount : Flag<["-"], "mrecord-mcount">, HelpText<"Generate a __mcount_loc section entry for each __fentry__ call.">,
2533   Flags<[CC1Option]>, Group<m_Group>;
2534 def mpacked_stack : Flag<["-"], "mpacked-stack">, HelpText<"Use packed stack layout (SystemZ only).">,
2535   Flags<[CC1Option]>, Group<m_Group>;
2536 def mno_packed_stack : Flag<["-"], "mno-packed-stack">, Flags<[CC1Option]>, Group<m_Group>;
2537 def mips16 : Flag<["-"], "mips16">, Group<m_mips_Features_Group>;
2538 def mno_mips16 : Flag<["-"], "mno-mips16">, Group<m_mips_Features_Group>;
2539 def mmicromips : Flag<["-"], "mmicromips">, Group<m_mips_Features_Group>;
2540 def mno_micromips : Flag<["-"], "mno-micromips">, Group<m_mips_Features_Group>;
2541 def mxgot : Flag<["-"], "mxgot">, Group<m_mips_Features_Group>;
2542 def mno_xgot : Flag<["-"], "mno-xgot">, Group<m_mips_Features_Group>;
2543 def mldc1_sdc1 : Flag<["-"], "mldc1-sdc1">, Group<m_mips_Features_Group>;
2544 def mno_ldc1_sdc1 : Flag<["-"], "mno-ldc1-sdc1">, Group<m_mips_Features_Group>;
2545 def mcheck_zero_division : Flag<["-"], "mcheck-zero-division">,
2546                            Group<m_mips_Features_Group>;
2547 def mno_check_zero_division : Flag<["-"], "mno-check-zero-division">,
2548                               Group<m_mips_Features_Group>;
2549 def mcompact_branches_EQ : Joined<["-"], "mcompact-branches=">,
2550                            Group<m_mips_Features_Group>;
2551 def mbranch_likely : Flag<["-"], "mbranch-likely">, Group<m_Group>,
2552   IgnoredGCCCompat;
2553 def mno_branch_likely : Flag<["-"], "mno-branch-likely">, Group<m_Group>,
2554   IgnoredGCCCompat;
2555 def mindirect_jump_EQ : Joined<["-"], "mindirect-jump=">,
2556   Group<m_mips_Features_Group>,
2557   HelpText<"Change indirect jump instructions to inhibit speculation">;
2558 def mdsp : Flag<["-"], "mdsp">, Group<m_mips_Features_Group>;
2559 def mno_dsp : Flag<["-"], "mno-dsp">, Group<m_mips_Features_Group>;
2560 def mdspr2 : Flag<["-"], "mdspr2">, Group<m_mips_Features_Group>;
2561 def mno_dspr2 : Flag<["-"], "mno-dspr2">, Group<m_mips_Features_Group>;
2562 def msingle_float : Flag<["-"], "msingle-float">, Group<m_mips_Features_Group>;
2563 def mdouble_float : Flag<["-"], "mdouble-float">, Group<m_mips_Features_Group>;
2564 def mmadd4 : Flag<["-"], "mmadd4">, Group<m_mips_Features_Group>,
2565   HelpText<"Enable the generation of 4-operand madd.s, madd.d and related instructions.">;
2566 def mno_madd4 : Flag<["-"], "mno-madd4">, Group<m_mips_Features_Group>,
2567   HelpText<"Disable the generation of 4-operand madd.s, madd.d and related instructions.">;
2568 def mmsa : Flag<["-"], "mmsa">, Group<m_mips_Features_Group>,
2569   HelpText<"Enable MSA ASE (MIPS only)">;
2570 def mno_msa : Flag<["-"], "mno-msa">, Group<m_mips_Features_Group>,
2571   HelpText<"Disable MSA ASE (MIPS only)">;
2572 def mmt : Flag<["-"], "mmt">, Group<m_mips_Features_Group>,
2573   HelpText<"Enable MT ASE (MIPS only)">;
2574 def mno_mt : Flag<["-"], "mno-mt">, Group<m_mips_Features_Group>,
2575   HelpText<"Disable MT ASE (MIPS only)">;
2576 def mfp64 : Flag<["-"], "mfp64">, Group<m_mips_Features_Group>,
2577   HelpText<"Use 64-bit floating point registers (MIPS only)">;
2578 def mfp32 : Flag<["-"], "mfp32">, Group<m_mips_Features_Group>,
2579   HelpText<"Use 32-bit floating point registers (MIPS only)">;
2580 def mgpopt : Flag<["-"], "mgpopt">, Group<m_mips_Features_Group>,
2581   HelpText<"Use GP relative accesses for symbols known to be in a small"
2582            " data section (MIPS)">;
2583 def mno_gpopt : Flag<["-"], "mno-gpopt">, Group<m_mips_Features_Group>,
2584   HelpText<"Do not use GP relative accesses for symbols known to be in a small"
2585            " data section (MIPS)">;
2586 def mlocal_sdata : Flag<["-"], "mlocal-sdata">,
2587   Group<m_mips_Features_Group>,
2588   HelpText<"Extend the -G behaviour to object local data (MIPS)">;
2589 def mno_local_sdata : Flag<["-"], "mno-local-sdata">,
2590   Group<m_mips_Features_Group>,
2591   HelpText<"Do not extend the -G behaviour to object local data (MIPS)">;
2592 def mextern_sdata : Flag<["-"], "mextern-sdata">,
2593   Group<m_mips_Features_Group>,
2594   HelpText<"Assume that externally defined data is in the small data if it"
2595            " meets the -G <size> threshold (MIPS)">;
2596 def mno_extern_sdata : Flag<["-"], "mno-extern-sdata">,
2597   Group<m_mips_Features_Group>,
2598   HelpText<"Do not assume that externally defined data is in the small data if"
2599            " it meets the -G <size> threshold (MIPS)">;
2600 def membedded_data : Flag<["-"], "membedded-data">,
2601   Group<m_mips_Features_Group>,
2602   HelpText<"Place constants in the .rodata section instead of the .sdata "
2603            "section even if they meet the -G <size> threshold (MIPS)">;
2604 def mno_embedded_data : Flag<["-"], "mno-embedded-data">,
2605   Group<m_mips_Features_Group>,
2606   HelpText<"Do not place constants in the .rodata section instead of the "
2607            ".sdata if they meet the -G <size> threshold (MIPS)">;
2608 def mnan_EQ : Joined<["-"], "mnan=">, Group<m_mips_Features_Group>;
2609 def mabs_EQ : Joined<["-"], "mabs=">, Group<m_mips_Features_Group>;
2610 def mabicalls : Flag<["-"], "mabicalls">, Group<m_mips_Features_Group>,
2611   HelpText<"Enable SVR4-style position-independent code (Mips only)">;
2612 def mno_abicalls : Flag<["-"], "mno-abicalls">, Group<m_mips_Features_Group>,
2613   HelpText<"Disable SVR4-style position-independent code (Mips only)">;
2614 def mno_crc : Flag<["-"], "mno-crc">, Group<m_mips_Features_Group>,
2615   HelpText<"Disallow use of CRC instructions (Mips only)">;
2616 def mvirt : Flag<["-"], "mvirt">, Group<m_mips_Features_Group>;
2617 def mno_virt : Flag<["-"], "mno-virt">, Group<m_mips_Features_Group>;
2618 def mginv : Flag<["-"], "mginv">, Group<m_mips_Features_Group>;
2619 def mno_ginv : Flag<["-"], "mno-ginv">, Group<m_mips_Features_Group>;
2620 def mips1 : Flag<["-"], "mips1">,
2621   Alias<march_EQ>, AliasArgs<["mips1"]>, Group<m_mips_Features_Group>,
2622   HelpText<"Equivalent to -march=mips1">, Flags<[HelpHidden]>;
2623 def mips2 : Flag<["-"], "mips2">,
2624   Alias<march_EQ>, AliasArgs<["mips2"]>, Group<m_mips_Features_Group>,
2625   HelpText<"Equivalent to -march=mips2">, Flags<[HelpHidden]>;
2626 def mips3 : Flag<["-"], "mips3">,
2627   Alias<march_EQ>, AliasArgs<["mips3"]>, Group<m_mips_Features_Group>,
2628   HelpText<"Equivalent to -march=mips3">, Flags<[HelpHidden]>;
2629 def mips4 : Flag<["-"], "mips4">,
2630   Alias<march_EQ>, AliasArgs<["mips4"]>, Group<m_mips_Features_Group>,
2631   HelpText<"Equivalent to -march=mips4">, Flags<[HelpHidden]>;
2632 def mips5 : Flag<["-"], "mips5">,
2633   Alias<march_EQ>, AliasArgs<["mips5"]>, Group<m_mips_Features_Group>,
2634   HelpText<"Equivalent to -march=mips5">, Flags<[HelpHidden]>;
2635 def mips32 : Flag<["-"], "mips32">,
2636   Alias<march_EQ>, AliasArgs<["mips32"]>, Group<m_mips_Features_Group>,
2637   HelpText<"Equivalent to -march=mips32">, Flags<[HelpHidden]>;
2638 def mips32r2 : Flag<["-"], "mips32r2">,
2639   Alias<march_EQ>, AliasArgs<["mips32r2"]>, Group<m_mips_Features_Group>,
2640   HelpText<"Equivalent to -march=mips32r2">, Flags<[HelpHidden]>;
2641 def mips32r3 : Flag<["-"], "mips32r3">,
2642   Alias<march_EQ>, AliasArgs<["mips32r3"]>, Group<m_mips_Features_Group>,
2643   HelpText<"Equivalent to -march=mips32r3">, Flags<[HelpHidden]>;
2644 def mips32r5 : Flag<["-"], "mips32r5">,
2645   Alias<march_EQ>, AliasArgs<["mips32r5"]>, Group<m_mips_Features_Group>,
2646   HelpText<"Equivalent to -march=mips32r5">, Flags<[HelpHidden]>;
2647 def mips32r6 : Flag<["-"], "mips32r6">,
2648   Alias<march_EQ>, AliasArgs<["mips32r6"]>, Group<m_mips_Features_Group>,
2649   HelpText<"Equivalent to -march=mips32r6">, Flags<[HelpHidden]>;
2650 def mips64 : Flag<["-"], "mips64">,
2651   Alias<march_EQ>, AliasArgs<["mips64"]>, Group<m_mips_Features_Group>,
2652   HelpText<"Equivalent to -march=mips64">, Flags<[HelpHidden]>;
2653 def mips64r2 : Flag<["-"], "mips64r2">,
2654   Alias<march_EQ>, AliasArgs<["mips64r2"]>, Group<m_mips_Features_Group>,
2655   HelpText<"Equivalent to -march=mips64r2">, Flags<[HelpHidden]>;
2656 def mips64r3 : Flag<["-"], "mips64r3">,
2657   Alias<march_EQ>, AliasArgs<["mips64r3"]>, Group<m_mips_Features_Group>,
2658   HelpText<"Equivalent to -march=mips64r3">, Flags<[HelpHidden]>;
2659 def mips64r5 : Flag<["-"], "mips64r5">,
2660   Alias<march_EQ>, AliasArgs<["mips64r5"]>, Group<m_mips_Features_Group>,
2661   HelpText<"Equivalent to -march=mips64r5">, Flags<[HelpHidden]>;
2662 def mips64r6 : Flag<["-"], "mips64r6">,
2663   Alias<march_EQ>, AliasArgs<["mips64r6"]>, Group<m_mips_Features_Group>,
2664   HelpText<"Equivalent to -march=mips64r6">, Flags<[HelpHidden]>;
2665 def mfpxx : Flag<["-"], "mfpxx">, Group<m_mips_Features_Group>,
2666   HelpText<"Avoid FPU mode dependent operations when used with the O32 ABI">,
2667   Flags<[HelpHidden]>;
2668 def modd_spreg : Flag<["-"], "modd-spreg">, Group<m_mips_Features_Group>,
2669   HelpText<"Enable odd single-precision floating point registers">,
2670   Flags<[HelpHidden]>;
2671 def mno_odd_spreg : Flag<["-"], "mno-odd-spreg">, Group<m_mips_Features_Group>,
2672   HelpText<"Disable odd single-precision floating point registers">,
2673   Flags<[HelpHidden]>;
2674 def mrelax_pic_calls : Flag<["-"], "mrelax-pic-calls">,
2675   Group<m_mips_Features_Group>,
2676   HelpText<"Produce relaxation hints for linkers to try optimizing PIC "
2677            "call sequences into direct calls (MIPS only)">, Flags<[HelpHidden]>;
2678 def mno_relax_pic_calls : Flag<["-"], "mno-relax-pic-calls">,
2679   Group<m_mips_Features_Group>,
2680   HelpText<"Do not produce relaxation hints for linkers to try optimizing PIC "
2681            "call sequences into direct calls (MIPS only)">, Flags<[HelpHidden]>;
2682 def mglibc : Flag<["-"], "mglibc">, Group<m_libc_Group>, Flags<[HelpHidden]>;
2683 def muclibc : Flag<["-"], "muclibc">, Group<m_libc_Group>, Flags<[HelpHidden]>;
2684 def module_file_info : Flag<["-"], "module-file-info">, Flags<[DriverOption,CC1Option]>, Group<Action_Group>,
2685   HelpText<"Provide information about a particular module file">;
2686 def mthumb : Flag<["-"], "mthumb">, Group<m_Group>;
2687 def mtune_EQ : Joined<["-"], "mtune=">, Group<m_Group>,
2688   HelpText<"Accepted for compatibility with GCC. Currently has no effect.">;
2689 def multi__module : Flag<["-"], "multi_module">;
2690 def multiply__defined__unused : Separate<["-"], "multiply_defined_unused">;
2691 def multiply__defined : Separate<["-"], "multiply_defined">;
2692 def mwarn_nonportable_cfstrings : Flag<["-"], "mwarn-nonportable-cfstrings">, Group<m_Group>;
2693 def no_canonical_prefixes : Flag<["-"], "no-canonical-prefixes">, Flags<[HelpHidden, CoreOption]>,
2694   HelpText<"Use relative instead of canonical paths">;
2695 def no_cpp_precomp : Flag<["-"], "no-cpp-precomp">, Group<clang_ignored_f_Group>;
2696 def no_integrated_cpp : Flag<["-", "--"], "no-integrated-cpp">, Flags<[DriverOption]>;
2697 def no_pedantic : Flag<["-", "--"], "no-pedantic">, Group<pedantic_Group>;
2698 def no__dead__strip__inits__and__terms : Flag<["-"], "no_dead_strip_inits_and_terms">;
2699 def nobuiltininc : Flag<["-"], "nobuiltininc">, Flags<[CC1Option, CoreOption]>,
2700   HelpText<"Disable builtin #include directories">;
2701 def nogpuinc : Flag<["-"], "nogpuinc">;
2702 def : Flag<["-"], "nocudainc">, Alias<nogpuinc>;
2703 def nogpulib : Flag<["-"], "nogpulib">,
2704   HelpText<"Do not link device library for CUDA/HIP device compilation">;
2705 def : Flag<["-"], "nocudalib">, Alias<nogpulib>;
2706 def nodefaultlibs : Flag<["-"], "nodefaultlibs">;
2707 def nofixprebinding : Flag<["-"], "nofixprebinding">;
2708 def nolibc : Flag<["-"], "nolibc">;
2709 def nomultidefs : Flag<["-"], "nomultidefs">;
2710 def nopie : Flag<["-"], "nopie">;
2711 def no_pie : Flag<["-"], "no-pie">, Alias<nopie>;
2712 def noprebind : Flag<["-"], "noprebind">;
2713 def noprofilelib : Flag<["-"], "noprofilelib">;
2714 def noseglinkedit : Flag<["-"], "noseglinkedit">;
2715 def nostartfiles : Flag<["-"], "nostartfiles">;
2716 def nostdinc : Flag<["-"], "nostdinc">, Flags<[CoreOption]>;
2717 def nostdlibinc : Flag<["-"], "nostdlibinc">;
2718 def nostdincxx : Flag<["-"], "nostdinc++">, Flags<[CC1Option]>,
2719   HelpText<"Disable standard #include directories for the C++ standard library">;
2720 def nostdlib : Flag<["-"], "nostdlib">;
2721 def nostdlibxx : Flag<["-"], "nostdlib++">;
2722 def object : Flag<["-"], "object">;
2723 def o : JoinedOrSeparate<["-"], "o">, Flags<[DriverOption, RenderAsInput, CC1Option, CC1AsOption]>,
2724   HelpText<"Write output to <file>">, MetaVarName<"<file>">;
2725 def pagezero__size : JoinedOrSeparate<["-"], "pagezero_size">;
2726 def pass_exit_codes : Flag<["-", "--"], "pass-exit-codes">, Flags<[Unsupported]>;
2727 def pedantic_errors : Flag<["-", "--"], "pedantic-errors">, Group<pedantic_Group>, Flags<[CC1Option]>;
2728 def pedantic : Flag<["-", "--"], "pedantic">, Group<pedantic_Group>, Flags<[CC1Option]>;
2729 def pg : Flag<["-"], "pg">, HelpText<"Enable mcount instrumentation">, Flags<[CC1Option]>;
2730 def pipe : Flag<["-", "--"], "pipe">,
2731   HelpText<"Use pipes between commands, when possible">;
2732 def prebind__all__twolevel__modules : Flag<["-"], "prebind_all_twolevel_modules">;
2733 def prebind : Flag<["-"], "prebind">;
2734 def preload : Flag<["-"], "preload">;
2735 def print_file_name_EQ : Joined<["-", "--"], "print-file-name=">,
2736   HelpText<"Print the full library path of <file>">, MetaVarName<"<file>">;
2737 def print_ivar_layout : Flag<["-"], "print-ivar-layout">, Flags<[CC1Option]>,
2738   HelpText<"Enable Objective-C Ivar layout bitmap print trace">;
2739 def print_libgcc_file_name : Flag<["-", "--"], "print-libgcc-file-name">,
2740   HelpText<"Print the library path for the currently used compiler runtime "
2741            "library (\"libgcc.a\" or \"libclang_rt.builtins.*.a\")">;
2742 def print_multi_directory : Flag<["-", "--"], "print-multi-directory">;
2743 def print_multi_lib : Flag<["-", "--"], "print-multi-lib">;
2744 def print_multi_os_directory : Flag<["-", "--"], "print-multi-os-directory">,
2745   Flags<[Unsupported]>;
2746 def print_target_triple : Flag<["-", "--"], "print-target-triple">,
2747   HelpText<"Print the normalized target triple">;
2748 def print_effective_triple : Flag<["-", "--"], "print-effective-triple">,
2749   HelpText<"Print the effective target triple">;
2750 def print_prog_name_EQ : Joined<["-", "--"], "print-prog-name=">,
2751   HelpText<"Print the full program path of <name>">, MetaVarName<"<name>">;
2752 def print_resource_dir : Flag<["-", "--"], "print-resource-dir">,
2753   HelpText<"Print the resource directory pathname">;
2754 def print_search_dirs : Flag<["-", "--"], "print-search-dirs">,
2755   HelpText<"Print the paths used for finding libraries and programs">;
2756 def print_targets : Flag<["-", "--"], "print-targets">,
2757   HelpText<"Print the registered targets">;
2758 def private__bundle : Flag<["-"], "private_bundle">;
2759 def pthreads : Flag<["-"], "pthreads">;
2760 def pthread : Flag<["-"], "pthread">, Flags<[CC1Option]>,
2761   HelpText<"Support POSIX threads in generated code">;
2762 def no_pthread : Flag<["-"], "no-pthread">, Flags<[CC1Option]>;
2763 def p : Flag<["-"], "p">;
2764 def pie : Flag<["-"], "pie">;
2765 def static_pie : Flag<["-"], "static-pie">;
2766 def read__only__relocs : Separate<["-"], "read_only_relocs">;
2767 def remap : Flag<["-"], "remap">;
2768 def rewrite_objc : Flag<["-"], "rewrite-objc">, Flags<[DriverOption,CC1Option]>,
2769   HelpText<"Rewrite Objective-C source to C++">, Group<Action_Group>;
2770 def rewrite_legacy_objc : Flag<["-"], "rewrite-legacy-objc">, Flags<[DriverOption]>,
2771   HelpText<"Rewrite Legacy Objective-C source to C++">;
2772 def rdynamic : Flag<["-"], "rdynamic">;
2773 def resource_dir : Separate<["-"], "resource-dir">,
2774   Flags<[DriverOption, CC1Option, CoreOption, HelpHidden]>,
2775   HelpText<"The directory which holds the compiler resource files">;
2776 def resource_dir_EQ : Joined<["-"], "resource-dir=">, Flags<[DriverOption, CoreOption]>,
2777   Alias<resource_dir>;
2778 def rpath : Separate<["-"], "rpath">, Flags<[LinkerInput]>, Group<Link_Group>;
2779 def rtlib_EQ : Joined<["-", "--"], "rtlib=">,
2780   HelpText<"Compiler runtime library to use">;
2781 def frtlib_add_rpath: Flag<["-"], "frtlib-add-rpath">, Flags<[NoArgumentUnused]>,
2782   HelpText<"Add -rpath with architecture-specific resource directory to the linker flags">;
2783 def fno_rtlib_add_rpath: Flag<["-"], "fno-rtlib-add-rpath">, Flags<[NoArgumentUnused]>,
2784   HelpText<"Do not add -rpath with architecture-specific resource directory to the linker flags">;
2785 def r : Flag<["-"], "r">, Flags<[LinkerInput,NoArgumentUnused]>,
2786         Group<Link_Group>;
2787 def save_temps_EQ : Joined<["-", "--"], "save-temps=">, Flags<[CC1Option, DriverOption]>,
2788   HelpText<"Save intermediate compilation results.">;
2789 def save_temps : Flag<["-", "--"], "save-temps">, Flags<[DriverOption]>,
2790   Alias<save_temps_EQ>, AliasArgs<["cwd"]>,
2791   HelpText<"Save intermediate compilation results">;
2792 def save_stats_EQ : Joined<["-", "--"], "save-stats=">, Flags<[DriverOption]>,
2793   HelpText<"Save llvm statistics.">;
2794 def save_stats : Flag<["-", "--"], "save-stats">, Flags<[DriverOption]>,
2795   Alias<save_stats_EQ>, AliasArgs<["cwd"]>,
2796   HelpText<"Save llvm statistics.">;
2797 def via_file_asm : Flag<["-", "--"], "via-file-asm">, InternalDebugOpt,
2798   HelpText<"Write assembly to file for input to assemble jobs">;
2799 def sectalign : MultiArg<["-"], "sectalign", 3>;
2800 def sectcreate : MultiArg<["-"], "sectcreate", 3>;
2801 def sectobjectsymbols : MultiArg<["-"], "sectobjectsymbols", 2>;
2802 def sectorder : MultiArg<["-"], "sectorder", 3>;
2803 def seg1addr : JoinedOrSeparate<["-"], "seg1addr">;
2804 def seg__addr__table__filename : Separate<["-"], "seg_addr_table_filename">;
2805 def seg__addr__table : Separate<["-"], "seg_addr_table">;
2806 def segaddr : MultiArg<["-"], "segaddr", 2>;
2807 def segcreate : MultiArg<["-"], "segcreate", 3>;
2808 def seglinkedit : Flag<["-"], "seglinkedit">;
2809 def segprot : MultiArg<["-"], "segprot", 3>;
2810 def segs__read__only__addr : Separate<["-"], "segs_read_only_addr">;
2811 def segs__read__write__addr : Separate<["-"], "segs_read_write_addr">;
2812 def segs__read__ : Joined<["-"], "segs_read_">;
2813 def shared_libgcc : Flag<["-"], "shared-libgcc">;
2814 def shared : Flag<["-", "--"], "shared">;
2815 def single__module : Flag<["-"], "single_module">;
2816 def specs_EQ : Joined<["-", "--"], "specs=">;
2817 def specs : Separate<["-", "--"], "specs">, Flags<[Unsupported]>;
2818 def static_libgcc : Flag<["-"], "static-libgcc">;
2819 def static_libstdcxx : Flag<["-"], "static-libstdc++">;
2820 def static : Flag<["-", "--"], "static">, Flags<[NoArgumentUnused]>;
2821 def std_default_EQ : Joined<["-"], "std-default=">;
2822 def std_EQ : Joined<["-", "--"], "std=">, Flags<[CC1Option]>,
2823   Group<CompileOnly_Group>, HelpText<"Language standard to compile for">,
2824   ValuesCode<[{
2825     const char *Values =
2826     #define LANGSTANDARD(id, name, lang, desc, features) name ","
2827     #define LANGSTANDARD_ALIAS(id, alias) alias ","
2828     #include "clang/Basic/LangStandards.def"
2829     ;
2830   }]>;
2831 def stdlib_EQ : Joined<["-", "--"], "stdlib=">, Flags<[CC1Option]>,
2832   HelpText<"C++ standard library to use">, Values<"libc++,libstdc++,platform">;
2833 def stdlibxx_isystem : JoinedOrSeparate<["-"], "stdlib++-isystem">,
2834   Group<clang_i_Group>,
2835   HelpText<"Use directory as the C++ standard library include path">,
2836   Flags<[DriverOption]>, MetaVarName<"<directory>">;
2837 def unwindlib_EQ : Joined<["-", "--"], "unwindlib=">, Flags<[CC1Option]>,
2838   HelpText<"Unwind library to use">, Values<"libgcc,unwindlib,platform">;
2839 def sub__library : JoinedOrSeparate<["-"], "sub_library">;
2840 def sub__umbrella : JoinedOrSeparate<["-"], "sub_umbrella">;
2841 def system_header_prefix : Joined<["--"], "system-header-prefix=">,
2842   Group<clang_i_Group>, Flags<[CC1Option]>, MetaVarName<"<prefix>">,
2843   HelpText<"Treat all #include paths starting with <prefix> as including a "
2844            "system header.">;
2845 def : Separate<["--"], "system-header-prefix">, Alias<system_header_prefix>;
2846 def no_system_header_prefix : Joined<["--"], "no-system-header-prefix=">,
2847   Group<clang_i_Group>, Flags<[CC1Option]>, MetaVarName<"<prefix>">,
2848   HelpText<"Treat all #include paths starting with <prefix> as not including a "
2849            "system header.">;
2850 def : Separate<["--"], "no-system-header-prefix">, Alias<no_system_header_prefix>;
2851 def s : Flag<["-"], "s">, Group<Link_Group>;
2852 def target : Joined<["--"], "target=">, Flags<[DriverOption, CoreOption]>,
2853   HelpText<"Generate code for the given target">;
2854 def print_supported_cpus : Flag<["-", "--"], "print-supported-cpus">,
2855   Group<CompileOnly_Group>, Flags<[CC1Option, CoreOption]>,
2856   HelpText<"Print supported cpu models for the given target (if target is not specified,"
2857            " it will print the supported cpus for the default target)">;
2858 def mcpu_EQ_QUESTION : Flag<["-"], "mcpu=?">, Alias<print_supported_cpus>;
2859 def mtune_EQ_QUESTION : Flag<["-"], "mtune=?">, Alias<print_supported_cpus>;
2860 def gcc_toolchain : Joined<["--"], "gcc-toolchain=">, Flags<[DriverOption]>,
2861   HelpText<"Use the gcc toolchain at the given directory">;
2862 def time : Flag<["-"], "time">,
2863   HelpText<"Time individual commands">;
2864 def traditional_cpp : Flag<["-", "--"], "traditional-cpp">, Flags<[CC1Option]>,
2865   HelpText<"Enable some traditional CPP emulation">;
2866 def traditional : Flag<["-", "--"], "traditional">;
2867 def trigraphs : Flag<["-", "--"], "trigraphs">, Alias<ftrigraphs>,
2868   HelpText<"Process trigraph sequences">;
2869 def twolevel__namespace__hints : Flag<["-"], "twolevel_namespace_hints">;
2870 def twolevel__namespace : Flag<["-"], "twolevel_namespace">;
2871 def t : Flag<["-"], "t">, Group<Link_Group>;
2872 def umbrella : Separate<["-"], "umbrella">;
2873 def undefined : JoinedOrSeparate<["-"], "undefined">, Group<u_Group>;
2874 def undef : Flag<["-"], "undef">, Group<u_Group>, Flags<[CC1Option]>,
2875   HelpText<"undef all system defines">;
2876 def unexported__symbols__list : Separate<["-"], "unexported_symbols_list">;
2877 def u : JoinedOrSeparate<["-"], "u">, Group<u_Group>;
2878 def v : Flag<["-"], "v">, Flags<[CC1Option, CoreOption]>,
2879   HelpText<"Show commands to run and use verbose output">;
2880 def verify_debug_info : Flag<["--"], "verify-debug-info">, Flags<[DriverOption]>,
2881   HelpText<"Verify the binary representation of debug output">;
2882 def weak_l : Joined<["-"], "weak-l">, Flags<[LinkerInput]>;
2883 def weak__framework : Separate<["-"], "weak_framework">, Flags<[LinkerInput]>;
2884 def weak__library : Separate<["-"], "weak_library">, Flags<[LinkerInput]>;
2885 def weak__reference__mismatches : Separate<["-"], "weak_reference_mismatches">;
2886 def whatsloaded : Flag<["-"], "whatsloaded">;
2887 def whyload : Flag<["-"], "whyload">;
2888 def w : Flag<["-"], "w">, HelpText<"Suppress all warnings">, Flags<[CC1Option]>;
2889 def x : JoinedOrSeparate<["-"], "x">, Flags<[DriverOption,CC1Option]>,
2890   HelpText<"Treat subsequent input files as having type <language>">,
2891   MetaVarName<"<language>">;
2892 def y : Joined<["-"], "y">;
2893
2894 defm integrated_as : OptOutFFlag<"integrated-as", "Enable the integrated assembler", "Disable the integrated assembler">;
2895
2896 def fintegrated_cc1 : Flag<["-"], "fintegrated-cc1">,
2897                       Flags<[CoreOption, DriverOption]>, Group<f_Group>,
2898                       HelpText<"Run cc1 in-process">;
2899 def fno_integrated_cc1 : Flag<["-"], "fno-integrated-cc1">,
2900                          Flags<[CoreOption, DriverOption]>, Group<f_Group>,
2901                          HelpText<"Spawn a separate process for each cc1">;
2902
2903 def : Flag<["-"], "integrated-as">, Alias<fintegrated_as>, Flags<[DriverOption]>;
2904 def : Flag<["-"], "no-integrated-as">, Alias<fno_integrated_as>,
2905       Flags<[CC1Option, DriverOption]>;
2906
2907 def working_directory : JoinedOrSeparate<["-"], "working-directory">, Flags<[CC1Option]>,
2908   HelpText<"Resolve file paths relative to the specified directory">;
2909 def working_directory_EQ : Joined<["-"], "working-directory=">, Flags<[CC1Option]>,
2910   Alias<working_directory>;
2911
2912 // Double dash options, which are usually an alias for one of the previous
2913 // options.
2914
2915 def _mhwdiv_EQ : Joined<["--"], "mhwdiv=">, Alias<mhwdiv_EQ>;
2916 def _mhwdiv : Separate<["--"], "mhwdiv">, Alias<mhwdiv_EQ>;
2917 def _CLASSPATH_EQ : Joined<["--"], "CLASSPATH=">, Alias<fclasspath_EQ>;
2918 def _CLASSPATH : Separate<["--"], "CLASSPATH">, Alias<fclasspath_EQ>;
2919 def _all_warnings : Flag<["--"], "all-warnings">, Alias<Wall>;
2920 def _analyzer_no_default_checks : Flag<["--"], "analyzer-no-default-checks">, Flags<[DriverOption]>;
2921 def _analyzer_output : JoinedOrSeparate<["--"], "analyzer-output">, Flags<[DriverOption]>,
2922   HelpText<"Static analyzer report output format (html|plist|plist-multi-file|plist-html|sarif|text).">;
2923 def _analyze : Flag<["--"], "analyze">, Flags<[DriverOption, CoreOption]>,
2924   HelpText<"Run the static analyzer">;
2925 def _assemble : Flag<["--"], "assemble">, Alias<S>;
2926 def _assert_EQ : Joined<["--"], "assert=">, Alias<A>;
2927 def _assert : Separate<["--"], "assert">, Alias<A>;
2928 def _bootclasspath_EQ : Joined<["--"], "bootclasspath=">, Alias<fbootclasspath_EQ>;
2929 def _bootclasspath : Separate<["--"], "bootclasspath">, Alias<fbootclasspath_EQ>;
2930 def _classpath_EQ : Joined<["--"], "classpath=">, Alias<fclasspath_EQ>;
2931 def _classpath : Separate<["--"], "classpath">, Alias<fclasspath_EQ>;
2932 def _comments_in_macros : Flag<["--"], "comments-in-macros">, Alias<CC>;
2933 def _comments : Flag<["--"], "comments">, Alias<C>;
2934 def _compile : Flag<["--"], "compile">, Alias<c>;
2935 def _constant_cfstrings : Flag<["--"], "constant-cfstrings">;
2936 def _debug_EQ : Joined<["--"], "debug=">, Alias<g_Flag>;
2937 def _debug : Flag<["--"], "debug">, Alias<g_Flag>;
2938 def _define_macro_EQ : Joined<["--"], "define-macro=">, Alias<D>;
2939 def _define_macro : Separate<["--"], "define-macro">, Alias<D>;
2940 def _dependencies : Flag<["--"], "dependencies">, Alias<M>;
2941 def _dyld_prefix_EQ : Joined<["--"], "dyld-prefix=">;
2942 def _dyld_prefix : Separate<["--"], "dyld-prefix">, Alias<_dyld_prefix_EQ>;
2943 def _encoding_EQ : Joined<["--"], "encoding=">, Alias<fencoding_EQ>;
2944 def _encoding : Separate<["--"], "encoding">, Alias<fencoding_EQ>;
2945 def _entry : Flag<["--"], "entry">, Alias<e>;
2946 def _extdirs_EQ : Joined<["--"], "extdirs=">, Alias<fextdirs_EQ>;
2947 def _extdirs : Separate<["--"], "extdirs">, Alias<fextdirs_EQ>;
2948 def _extra_warnings : Flag<["--"], "extra-warnings">, Alias<W_Joined>;
2949 def _for_linker_EQ : Joined<["--"], "for-linker=">, Alias<Xlinker>;
2950 def _for_linker : Separate<["--"], "for-linker">, Alias<Xlinker>;
2951 def _force_link_EQ : Joined<["--"], "force-link=">, Alias<u>;
2952 def _force_link : Separate<["--"], "force-link">, Alias<u>;
2953 def _help_hidden : Flag<["--"], "help-hidden">,
2954   HelpText<"Display help for hidden options">;
2955 def _imacros_EQ : Joined<["--"], "imacros=">, Alias<imacros>;
2956 def _include_barrier : Flag<["--"], "include-barrier">, Alias<I_>;
2957 def _include_directory_after_EQ : Joined<["--"], "include-directory-after=">, Alias<idirafter>;
2958 def _include_directory_after : Separate<["--"], "include-directory-after">, Alias<idirafter>;
2959 def _include_directory_EQ : Joined<["--"], "include-directory=">, Alias<I>;
2960 def _include_directory : Separate<["--"], "include-directory">, Alias<I>;
2961 def _include_prefix_EQ : Joined<["--"], "include-prefix=">, Alias<iprefix>;
2962 def _include_prefix : Separate<["--"], "include-prefix">, Alias<iprefix>;
2963 def _include_with_prefix_after_EQ : Joined<["--"], "include-with-prefix-after=">, Alias<iwithprefix>;
2964 def _include_with_prefix_after : Separate<["--"], "include-with-prefix-after">, Alias<iwithprefix>;
2965 def _include_with_prefix_before_EQ : Joined<["--"], "include-with-prefix-before=">, Alias<iwithprefixbefore>;
2966 def _include_with_prefix_before : Separate<["--"], "include-with-prefix-before">, Alias<iwithprefixbefore>;
2967 def _include_with_prefix_EQ : Joined<["--"], "include-with-prefix=">, Alias<iwithprefix>;
2968 def _include_with_prefix : Separate<["--"], "include-with-prefix">, Alias<iwithprefix>;
2969 def _include_EQ : Joined<["--"], "include=">, Alias<include_>;
2970 def _language_EQ : Joined<["--"], "language=">, Alias<x>;
2971 def _language : Separate<["--"], "language">, Alias<x>;
2972 def _library_directory_EQ : Joined<["--"], "library-directory=">, Alias<L>;
2973 def _library_directory : Separate<["--"], "library-directory">, Alias<L>;
2974 def _no_line_commands : Flag<["--"], "no-line-commands">, Alias<P>;
2975 def _no_standard_includes : Flag<["--"], "no-standard-includes">, Alias<nostdinc>;
2976 def _no_standard_libraries : Flag<["--"], "no-standard-libraries">, Alias<nostdlib>;
2977 def _no_undefined : Flag<["--"], "no-undefined">, Flags<[LinkerInput]>;
2978 def _no_warnings : Flag<["--"], "no-warnings">, Alias<w>;
2979 def _optimize_EQ : Joined<["--"], "optimize=">, Alias<O>;
2980 def _optimize : Flag<["--"], "optimize">, Alias<O>;
2981 def _output_class_directory_EQ : Joined<["--"], "output-class-directory=">, Alias<foutput_class_dir_EQ>;
2982 def _output_class_directory : Separate<["--"], "output-class-directory">, Alias<foutput_class_dir_EQ>;
2983 def _output_EQ : Joined<["--"], "output=">, Alias<o>;
2984 def _output : Separate<["--"], "output">, Alias<o>;
2985 def _param : Separate<["--"], "param">, Group<CompileOnly_Group>;
2986 def _param_EQ : Joined<["--"], "param=">, Alias<_param>;
2987 def _precompile : Flag<["--"], "precompile">, Flags<[DriverOption]>,
2988   Group<Action_Group>, HelpText<"Only precompile the input">;
2989 def _prefix_EQ : Joined<["--"], "prefix=">, Alias<B>;
2990 def _prefix : Separate<["--"], "prefix">, Alias<B>;
2991 def _preprocess : Flag<["--"], "preprocess">, Alias<E>;
2992 def _print_diagnostic_categories : Flag<["--"], "print-diagnostic-categories">;
2993 def _print_file_name : Separate<["--"], "print-file-name">, Alias<print_file_name_EQ>;
2994 def _print_missing_file_dependencies : Flag<["--"], "print-missing-file-dependencies">, Alias<MG>;
2995 def _print_prog_name : Separate<["--"], "print-prog-name">, Alias<print_prog_name_EQ>;
2996 def _profile_blocks : Flag<["--"], "profile-blocks">, Alias<a>;
2997 def _profile : Flag<["--"], "profile">, Alias<p>;
2998 def _resource_EQ : Joined<["--"], "resource=">, Alias<fcompile_resource_EQ>;
2999 def _resource : Separate<["--"], "resource">, Alias<fcompile_resource_EQ>;
3000 def _rtlib : Separate<["--"], "rtlib">, Alias<rtlib_EQ>;
3001 def _serialize_diags : Separate<["-", "--"], "serialize-diagnostics">, Flags<[DriverOption]>,
3002   HelpText<"Serialize compiler diagnostics to a file">;
3003 // We give --version different semantics from -version.
3004 def _version : Flag<["--"], "version">, Flags<[CoreOption, CC1Option]>,
3005   HelpText<"Print version information">;
3006 def _signed_char : Flag<["--"], "signed-char">, Alias<fsigned_char>;
3007 def _std : Separate<["--"], "std">, Alias<std_EQ>;
3008 def _stdlib : Separate<["--"], "stdlib">, Alias<stdlib_EQ>;
3009 def _sysroot_EQ : Joined<["--"], "sysroot=">;
3010 def _sysroot : Separate<["--"], "sysroot">, Alias<_sysroot_EQ>;
3011 def _target_help : Flag<["--"], "target-help">;
3012 def _trace_includes : Flag<["--"], "trace-includes">, Alias<H>;
3013 def _undefine_macro_EQ : Joined<["--"], "undefine-macro=">, Alias<U>;
3014 def _undefine_macro : Separate<["--"], "undefine-macro">, Alias<U>;
3015 def _unsigned_char : Flag<["--"], "unsigned-char">, Alias<funsigned_char>;
3016 def _user_dependencies : Flag<["--"], "user-dependencies">, Alias<MM>;
3017 def _verbose : Flag<["--"], "verbose">, Alias<v>;
3018 def _warn__EQ : Joined<["--"], "warn-=">, Alias<W_Joined>;
3019 def _warn_ : Joined<["--"], "warn-">, Alias<W_Joined>;
3020 def _write_dependencies : Flag<["--"], "write-dependencies">, Alias<MD>;
3021 def _write_user_dependencies : Flag<["--"], "write-user-dependencies">, Alias<MMD>;
3022 def _ : Joined<["--"], "">, Flags<[Unsupported]>;
3023
3024 // Hexagon feature flags.
3025 def mieee_rnd_near : Flag<["-"], "mieee-rnd-near">,
3026   Group<m_hexagon_Features_Group>;
3027 def mv5 : Flag<["-"], "mv5">, Group<m_hexagon_Features_Group>, Alias<mcpu_EQ>,
3028   AliasArgs<["hexagonv5"]>;
3029 def mv55 : Flag<["-"], "mv55">, Group<m_hexagon_Features_Group>,
3030   Alias<mcpu_EQ>, AliasArgs<["hexagonv55"]>;
3031 def mv60 : Flag<["-"], "mv60">, Group<m_hexagon_Features_Group>,
3032   Alias<mcpu_EQ>, AliasArgs<["hexagonv60"]>;
3033 def mv62 : Flag<["-"], "mv62">, Group<m_hexagon_Features_Group>,
3034   Alias<mcpu_EQ>, AliasArgs<["hexagonv62"]>;
3035 def mv65 : Flag<["-"], "mv65">, Group<m_hexagon_Features_Group>,
3036   Alias<mcpu_EQ>, AliasArgs<["hexagonv65"]>;
3037 def mv66 : Flag<["-"], "mv66">, Group<m_hexagon_Features_Group>,
3038   Alias<mcpu_EQ>, AliasArgs<["hexagonv66"]>;
3039 def mv67 : Flag<["-"], "mv67">, Group<m_hexagon_Features_Group>,
3040   Alias<mcpu_EQ>, AliasArgs<["hexagonv67"]>;
3041 def mv67t : Flag<["-"], "mv67t">, Group<m_hexagon_Features_Group>,
3042   Alias<mcpu_EQ>, AliasArgs<["hexagonv67t"]>;
3043 def mhexagon_hvx : Flag<["-"], "mhvx">, Group<m_hexagon_Features_HVX_Group>,
3044   HelpText<"Enable Hexagon Vector eXtensions">;
3045 def mhexagon_hvx_EQ : Joined<["-"], "mhvx=">,
3046   Group<m_hexagon_Features_HVX_Group>,
3047   HelpText<"Enable Hexagon Vector eXtensions">;
3048 def mno_hexagon_hvx : Flag<["-"], "mno-hvx">,
3049   Group<m_hexagon_Features_HVX_Group>,
3050   HelpText<"Disable Hexagon Vector eXtensions">;
3051 def mhexagon_hvx_length_EQ : Joined<["-"], "mhvx-length=">,
3052   Group<m_hexagon_Features_HVX_Group>, HelpText<"Set Hexagon Vector Length">,
3053   Values<"64B,128B">;
3054 def ffixed_r19: Flag<["-"], "ffixed-r19">,
3055   HelpText<"Reserve register r19 (Hexagon only)">;
3056 def mmemops : Flag<["-"], "mmemops">, Group<m_hexagon_Features_Group>,
3057   Flags<[CC1Option]>, HelpText<"Enable generation of memop instructions">;
3058 def mno_memops : Flag<["-"], "mno-memops">, Group<m_hexagon_Features_Group>,
3059   Flags<[CC1Option]>, HelpText<"Disable generation of memop instructions">;
3060 def mpackets : Flag<["-"], "mpackets">, Group<m_hexagon_Features_Group>,
3061   Flags<[CC1Option]>, HelpText<"Enable generation of instruction packets">;
3062 def mno_packets : Flag<["-"], "mno-packets">, Group<m_hexagon_Features_Group>,
3063   Flags<[CC1Option]>, HelpText<"Disable generation of instruction packets">;
3064 def mnvj : Flag<["-"], "mnvj">, Group<m_hexagon_Features_Group>,
3065   Flags<[CC1Option]>, HelpText<"Enable generation of new-value jumps">;
3066 def mno_nvj : Flag<["-"], "mno-nvj">, Group<m_hexagon_Features_Group>,
3067   Flags<[CC1Option]>, HelpText<"Disable generation of new-value jumps">;
3068 def mnvs : Flag<["-"], "mnvs">, Group<m_hexagon_Features_Group>,
3069   Flags<[CC1Option]>, HelpText<"Enable generation of new-value stores">;
3070 def mno_nvs : Flag<["-"], "mno-nvs">, Group<m_hexagon_Features_Group>,
3071   Flags<[CC1Option]>, HelpText<"Disable generation of new-value stores">;
3072
3073
3074 // X86 feature flags
3075 def mx87 : Flag<["-"], "mx87">, Group<m_x86_Features_Group>;
3076 def mno_x87 : Flag<["-"], "mno-x87">, Group<m_x86_Features_Group>;
3077 def m80387 : Flag<["-"], "m80387">, Alias<mx87>;
3078 def mno_80387 : Flag<["-"], "mno-80387">, Alias<mno_x87>;
3079 def mmmx : Flag<["-"], "mmmx">, Group<m_x86_Features_Group>;
3080 def mno_mmx : Flag<["-"], "mno-mmx">, Group<m_x86_Features_Group>;
3081 def m3dnow : Flag<["-"], "m3dnow">, Group<m_x86_Features_Group>;
3082 def mno_3dnow : Flag<["-"], "mno-3dnow">, Group<m_x86_Features_Group>;
3083 def m3dnowa : Flag<["-"], "m3dnowa">, Group<m_x86_Features_Group>;
3084 def mno_3dnowa : Flag<["-"], "mno-3dnowa">, Group<m_x86_Features_Group>;
3085 def mamx_bf16 : Flag<["-"], "mamx-bf16">, Group<m_x86_Features_Group>;
3086 def mno_amx_bf16 : Flag<["-"], "mno-amx-bf16">, Group<m_x86_Features_Group>;
3087 def mtamx_int8 : Flag<["-"], "mamx-int8">, Group<m_x86_Features_Group>;
3088 def mno_amx_int8 : Flag<["-"], "mno-amx-int8">, Group<m_x86_Features_Group>;
3089 def mamx_tile : Flag<["-"], "mamx-tile">, Group<m_x86_Features_Group>;
3090 def mno_amx_tile : Flag<["-"], "mno-amx-tile">, Group<m_x86_Features_Group>;
3091 def msse : Flag<["-"], "msse">, Group<m_x86_Features_Group>;
3092 def mno_sse : Flag<["-"], "mno-sse">, Group<m_x86_Features_Group>;
3093 def msse2 : Flag<["-"], "msse2">, Group<m_x86_Features_Group>;
3094 def mno_sse2 : Flag<["-"], "mno-sse2">, Group<m_x86_Features_Group>;
3095 def msse3 : Flag<["-"], "msse3">, Group<m_x86_Features_Group>;
3096 def mno_sse3 : Flag<["-"], "mno-sse3">, Group<m_x86_Features_Group>;
3097 def mssse3 : Flag<["-"], "mssse3">, Group<m_x86_Features_Group>;
3098 def mno_ssse3 : Flag<["-"], "mno-ssse3">, Group<m_x86_Features_Group>;
3099 def msse4_1 : Flag<["-"], "msse4.1">, Group<m_x86_Features_Group>;
3100 def mno_sse4_1 : Flag<["-"], "mno-sse4.1">, Group<m_x86_Features_Group>;
3101 def msse4_2 : Flag<["-"], "msse4.2">, Group<m_x86_Features_Group>;
3102 def mno_sse4_2 : Flag<["-"], "mno-sse4.2">, Group<m_x86_Features_Group>;
3103 def msse4 : Flag<["-"], "msse4">, Alias<msse4_2>;
3104 // -mno-sse4 turns off sse4.1 which has the effect of turning off everything
3105 // later than 4.1. -msse4 turns on 4.2 which has the effect of turning on
3106 // everything earlier than 4.2.
3107 def mno_sse4 : Flag<["-"], "mno-sse4">, Alias<mno_sse4_1>;
3108 def msse4a : Flag<["-"], "msse4a">, Group<m_x86_Features_Group>;
3109 def mno_sse4a : Flag<["-"], "mno-sse4a">, Group<m_x86_Features_Group>;
3110 def mavx : Flag<["-"], "mavx">, Group<m_x86_Features_Group>;
3111 def mno_avx : Flag<["-"], "mno-avx">, Group<m_x86_Features_Group>;
3112 def mavx2 : Flag<["-"], "mavx2">, Group<m_x86_Features_Group>;
3113 def mno_avx2 : Flag<["-"], "mno-avx2">, Group<m_x86_Features_Group>;
3114 def mavx512f : Flag<["-"], "mavx512f">, Group<m_x86_Features_Group>;
3115 def mno_avx512f : Flag<["-"], "mno-avx512f">, Group<m_x86_Features_Group>;
3116 def mavx512bf16 : Flag<["-"], "mavx512bf16">, Group<m_x86_Features_Group>;
3117 def mno_avx512bf16 : Flag<["-"], "mno-avx512bf16">, Group<m_x86_Features_Group>;
3118 def mavx512bitalg : Flag<["-"], "mavx512bitalg">, Group<m_x86_Features_Group>;
3119 def mno_avx512bitalg : Flag<["-"], "mno-avx512bitalg">, Group<m_x86_Features_Group>;
3120 def mavx512bw : Flag<["-"], "mavx512bw">, Group<m_x86_Features_Group>;
3121 def mno_avx512bw : Flag<["-"], "mno-avx512bw">, Group<m_x86_Features_Group>;
3122 def mavx512cd : Flag<["-"], "mavx512cd">, Group<m_x86_Features_Group>;
3123 def mno_avx512cd : Flag<["-"], "mno-avx512cd">, Group<m_x86_Features_Group>;
3124 def mavx512dq : Flag<["-"], "mavx512dq">, Group<m_x86_Features_Group>;
3125 def mno_avx512dq : Flag<["-"], "mno-avx512dq">, Group<m_x86_Features_Group>;
3126 def mavx512er : Flag<["-"], "mavx512er">, Group<m_x86_Features_Group>;
3127 def mno_avx512er : Flag<["-"], "mno-avx512er">, Group<m_x86_Features_Group>;
3128 def mavx512ifma : Flag<["-"], "mavx512ifma">, Group<m_x86_Features_Group>;
3129 def mno_avx512ifma : Flag<["-"], "mno-avx512ifma">, Group<m_x86_Features_Group>;
3130 def mavx512pf : Flag<["-"], "mavx512pf">, Group<m_x86_Features_Group>;
3131 def mno_avx512pf : Flag<["-"], "mno-avx512pf">, Group<m_x86_Features_Group>;
3132 def mavx512vbmi : Flag<["-"], "mavx512vbmi">, Group<m_x86_Features_Group>;
3133 def mno_avx512vbmi : Flag<["-"], "mno-avx512vbmi">, Group<m_x86_Features_Group>;
3134 def mavx512vbmi2 : Flag<["-"], "mavx512vbmi2">, Group<m_x86_Features_Group>;
3135 def mno_avx512vbmi2 : Flag<["-"], "mno-avx512vbmi2">, Group<m_x86_Features_Group>;
3136 def mavx512vl : Flag<["-"], "mavx512vl">, Group<m_x86_Features_Group>;
3137 def mno_avx512vl : Flag<["-"], "mno-avx512vl">, Group<m_x86_Features_Group>;
3138 def mavx512vnni : Flag<["-"], "mavx512vnni">, Group<m_x86_Features_Group>;
3139 def mno_avx512vnni : Flag<["-"], "mno-avx512vnni">, Group<m_x86_Features_Group>;
3140 def mavx512vpopcntdq : Flag<["-"], "mavx512vpopcntdq">, Group<m_x86_Features_Group>;
3141 def mno_avx512vpopcntdq : Flag<["-"], "mno-avx512vpopcntdq">, Group<m_x86_Features_Group>;
3142 def mavx512vp2intersect : Flag<["-"], "mavx512vp2intersect">, Group<m_x86_Features_Group>;
3143 def mno_avx512vp2intersect : Flag<["-"], "mno-avx512vp2intersect">, Group<m_x86_Features_Group>;
3144 def madx : Flag<["-"], "madx">, Group<m_x86_Features_Group>;
3145 def mno_adx : Flag<["-"], "mno-adx">, Group<m_x86_Features_Group>;
3146 def maes : Flag<["-"], "maes">, Group<m_x86_Features_Group>;
3147 def mno_aes : Flag<["-"], "mno-aes">, Group<m_x86_Features_Group>;
3148 def mbmi : Flag<["-"], "mbmi">, Group<m_x86_Features_Group>;
3149 def mno_bmi : Flag<["-"], "mno-bmi">, Group<m_x86_Features_Group>;
3150 def mbmi2 : Flag<["-"], "mbmi2">, Group<m_x86_Features_Group>;
3151 def mno_bmi2 : Flag<["-"], "mno-bmi2">, Group<m_x86_Features_Group>;
3152 def mcldemote : Flag<["-"], "mcldemote">, Group<m_x86_Features_Group>;
3153 def mno_cldemote : Flag<["-"], "mno-cldemote">, Group<m_x86_Features_Group>;
3154 def mclflushopt : Flag<["-"], "mclflushopt">, Group<m_x86_Features_Group>;
3155 def mno_clflushopt : Flag<["-"], "mno-clflushopt">, Group<m_x86_Features_Group>;
3156 def mclwb : Flag<["-"], "mclwb">, Group<m_x86_Features_Group>;
3157 def mno_clwb : Flag<["-"], "mno-clwb">, Group<m_x86_Features_Group>;
3158 def mwbnoinvd : Flag<["-"], "mwbnoinvd">, Group<m_x86_Features_Group>;
3159 def mno_wbnoinvd : Flag<["-"], "mno-wbnoinvd">, Group<m_x86_Features_Group>;
3160 def mclzero : Flag<["-"], "mclzero">, Group<m_x86_Features_Group>;
3161 def mno_clzero : Flag<["-"], "mno-clzero">, Group<m_x86_Features_Group>;
3162 def mcx16 : Flag<["-"], "mcx16">, Group<m_x86_Features_Group>;
3163 def mno_cx16 : Flag<["-"], "mno-cx16">, Group<m_x86_Features_Group>;
3164 def menqcmd : Flag<["-"], "menqcmd">, Group<m_x86_Features_Group>;
3165 def mno_enqcmd : Flag<["-"], "mno-enqcmd">, Group<m_x86_Features_Group>;
3166 def mf16c : Flag<["-"], "mf16c">, Group<m_x86_Features_Group>;
3167 def mno_f16c : Flag<["-"], "mno-f16c">, Group<m_x86_Features_Group>;
3168 def mfma : Flag<["-"], "mfma">, Group<m_x86_Features_Group>;
3169 def mno_fma : Flag<["-"], "mno-fma">, Group<m_x86_Features_Group>;
3170 def mfma4 : Flag<["-"], "mfma4">, Group<m_x86_Features_Group>;
3171 def mno_fma4 : Flag<["-"], "mno-fma4">, Group<m_x86_Features_Group>;
3172 def mfsgsbase : Flag<["-"], "mfsgsbase">, Group<m_x86_Features_Group>;
3173 def mno_fsgsbase : Flag<["-"], "mno-fsgsbase">, Group<m_x86_Features_Group>;
3174 def mfxsr : Flag<["-"], "mfxsr">, Group<m_x86_Features_Group>;
3175 def mno_fxsr : Flag<["-"], "mno-fxsr">, Group<m_x86_Features_Group>;
3176 def minvpcid : Flag<["-"], "minvpcid">, Group<m_x86_Features_Group>;
3177 def mno_invpcid : Flag<["-"], "mno-invpcid">, Group<m_x86_Features_Group>;
3178 def mgfni : Flag<["-"], "mgfni">, Group<m_x86_Features_Group>;
3179 def mno_gfni : Flag<["-"], "mno-gfni">, Group<m_x86_Features_Group>;
3180 def mlwp : Flag<["-"], "mlwp">, Group<m_x86_Features_Group>;
3181 def mno_lwp : Flag<["-"], "mno-lwp">, Group<m_x86_Features_Group>;
3182 def mlzcnt : Flag<["-"], "mlzcnt">, Group<m_x86_Features_Group>;
3183 def mno_lzcnt : Flag<["-"], "mno-lzcnt">, Group<m_x86_Features_Group>;
3184 def mmovbe : Flag<["-"], "mmovbe">, Group<m_x86_Features_Group>;
3185 def mno_movbe : Flag<["-"], "mno-movbe">, Group<m_x86_Features_Group>;
3186 def mmovdiri : Flag<["-"], "mmovdiri">, Group<m_x86_Features_Group>;
3187 def mno_movdiri : Flag<["-"], "mno-movdiri">, Group<m_x86_Features_Group>;
3188 def mmovdir64b : Flag<["-"], "mmovdir64b">, Group<m_x86_Features_Group>;
3189 def mno_movdir64b : Flag<["-"], "mno-movdir64b">, Group<m_x86_Features_Group>;
3190 def mmwaitx : Flag<["-"], "mmwaitx">, Group<m_x86_Features_Group>;
3191 def mno_mwaitx : Flag<["-"], "mno-mwaitx">, Group<m_x86_Features_Group>;
3192 def mpku : Flag<["-"], "mpku">, Group<m_x86_Features_Group>;
3193 def mno_pku : Flag<["-"], "mno-pku">, Group<m_x86_Features_Group>;
3194 def mpclmul : Flag<["-"], "mpclmul">, Group<m_x86_Features_Group>;
3195 def mno_pclmul : Flag<["-"], "mno-pclmul">, Group<m_x86_Features_Group>;
3196 def mpconfig : Flag<["-"], "mpconfig">, Group<m_x86_Features_Group>;
3197 def mno_pconfig : Flag<["-"], "mno-pconfig">, Group<m_x86_Features_Group>;
3198 def mpopcnt : Flag<["-"], "mpopcnt">, Group<m_x86_Features_Group>;
3199 def mno_popcnt : Flag<["-"], "mno-popcnt">, Group<m_x86_Features_Group>;
3200 def mprefetchwt1 : Flag<["-"], "mprefetchwt1">, Group<m_x86_Features_Group>;
3201 def mno_prefetchwt1 : Flag<["-"], "mno-prefetchwt1">, Group<m_x86_Features_Group>;
3202 def mprfchw : Flag<["-"], "mprfchw">, Group<m_x86_Features_Group>;
3203 def mno_prfchw : Flag<["-"], "mno-prfchw">, Group<m_x86_Features_Group>;
3204 def mptwrite : Flag<["-"], "mptwrite">, Group<m_x86_Features_Group>;
3205 def mno_ptwrite : Flag<["-"], "mno-ptwrite">, Group<m_x86_Features_Group>;
3206 def mrdpid : Flag<["-"], "mrdpid">, Group<m_x86_Features_Group>;
3207 def mno_rdpid : Flag<["-"], "mno-rdpid">, Group<m_x86_Features_Group>;
3208 def mrdrnd : Flag<["-"], "mrdrnd">, Group<m_x86_Features_Group>;
3209 def mno_rdrnd : Flag<["-"], "mno-rdrnd">, Group<m_x86_Features_Group>;
3210 def mrtm : Flag<["-"], "mrtm">, Group<m_x86_Features_Group>;
3211 def mno_rtm : Flag<["-"], "mno-rtm">, Group<m_x86_Features_Group>;
3212 def mrdseed : Flag<["-"], "mrdseed">, Group<m_x86_Features_Group>;
3213 def mno_rdseed : Flag<["-"], "mno-rdseed">, Group<m_x86_Features_Group>;
3214 def msahf : Flag<["-"], "msahf">, Group<m_x86_Features_Group>;
3215 def mno_sahf : Flag<["-"], "mno-sahf">, Group<m_x86_Features_Group>;
3216 def mserialize : Flag<["-"], "mserialize">, Group<m_x86_Features_Group>;
3217 def mno_serialize : Flag<["-"], "mno-serialize">, Group<m_x86_Features_Group>;
3218 def msgx : Flag<["-"], "msgx">, Group<m_x86_Features_Group>;
3219 def mno_sgx : Flag<["-"], "mno-sgx">, Group<m_x86_Features_Group>;
3220 def msha : Flag<["-"], "msha">, Group<m_x86_Features_Group>;
3221 def mno_sha : Flag<["-"], "mno-sha">, Group<m_x86_Features_Group>;
3222 def mtbm : Flag<["-"], "mtbm">, Group<m_x86_Features_Group>;
3223 def mno_tbm : Flag<["-"], "mno-tbm">, Group<m_x86_Features_Group>;
3224 def mtsxldtrk : Flag<["-"], "mtsxldtrk">, Group<m_x86_Features_Group>;
3225 def mno_tsxldtrk : Flag<["-"], "mno-tsxldtrk">, Group<m_x86_Features_Group>;
3226 def mvaes : Flag<["-"], "mvaes">, Group<m_x86_Features_Group>;
3227 def mno_vaes : Flag<["-"], "mno-vaes">, Group<m_x86_Features_Group>;
3228 def mvpclmulqdq : Flag<["-"], "mvpclmulqdq">, Group<m_x86_Features_Group>;
3229 def mno_vpclmulqdq : Flag<["-"], "mno-vpclmulqdq">, Group<m_x86_Features_Group>;
3230 def mwaitpkg : Flag<["-"], "mwaitpkg">, Group<m_x86_Features_Group>;
3231 def mno_waitpkg : Flag<["-"], "mno-waitpkg">, Group<m_x86_Features_Group>;
3232 def mxop : Flag<["-"], "mxop">, Group<m_x86_Features_Group>;
3233 def mno_xop : Flag<["-"], "mno-xop">, Group<m_x86_Features_Group>;
3234 def mxsave : Flag<["-"], "mxsave">, Group<m_x86_Features_Group>;
3235 def mno_xsave : Flag<["-"], "mno-xsave">, Group<m_x86_Features_Group>;
3236 def mxsavec : Flag<["-"], "mxsavec">, Group<m_x86_Features_Group>;
3237 def mno_xsavec : Flag<["-"], "mno-xsavec">, Group<m_x86_Features_Group>;
3238 def mxsaveopt : Flag<["-"], "mxsaveopt">, Group<m_x86_Features_Group>;
3239 def mno_xsaveopt : Flag<["-"], "mno-xsaveopt">, Group<m_x86_Features_Group>;
3240 def mxsaves : Flag<["-"], "mxsaves">, Group<m_x86_Features_Group>;
3241 def mno_xsaves : Flag<["-"], "mno-xsaves">, Group<m_x86_Features_Group>;
3242 def mshstk : Flag<["-"], "mshstk">, Group<m_x86_Features_Group>;
3243 def mno_shstk : Flag<["-"], "mno-shstk">, Group<m_x86_Features_Group>;
3244 def mretpoline_external_thunk : Flag<["-"], "mretpoline-external-thunk">, Group<m_x86_Features_Group>;
3245 def mno_retpoline_external_thunk : Flag<["-"], "mno-retpoline-external-thunk">, Group<m_x86_Features_Group>;
3246 def mvzeroupper : Flag<["-"], "mvzeroupper">, Group<m_x86_Features_Group>;
3247 def mno_vzeroupper : Flag<["-"], "mno-vzeroupper">, Group<m_x86_Features_Group>;
3248
3249 // These are legacy user-facing driver-level option spellings. They are always
3250 // aliases for options that are spelled using the more common Unix / GNU flag
3251 // style of double-dash and equals-joined flags.
3252 def gcc_toolchain_legacy_spelling : Separate<["-"], "gcc-toolchain">, Alias<gcc_toolchain>;
3253 def target_legacy_spelling : Separate<["-"], "target">, Alias<target>;
3254
3255 // Special internal option to handle -Xlinker --no-demangle.
3256 def Z_Xlinker__no_demangle : Flag<["-"], "Z-Xlinker-no-demangle">,
3257     Flags<[Unsupported, NoArgumentUnused]>;
3258
3259 // Special internal option to allow forwarding arbitrary arguments to linker.
3260 def Zlinker_input : Separate<["-"], "Zlinker-input">,
3261     Flags<[Unsupported, NoArgumentUnused]>;
3262
3263 // Reserved library options.
3264 def Z_reserved_lib_stdcxx : Flag<["-"], "Z-reserved-lib-stdc++">,
3265     Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, Group<reserved_lib_Group>;
3266 def Z_reserved_lib_cckext : Flag<["-"], "Z-reserved-lib-cckext">,
3267     Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, Group<reserved_lib_Group>;
3268
3269 // Ignored options
3270 multiclass BooleanFFlag<string name> {
3271   def f#NAME : Flag<["-"], "f"#name>;
3272   def fno_#NAME : Flag<["-"], "fno-"#name>;
3273 }
3274
3275 defm : BooleanFFlag<"keep-inline-functions">, Group<clang_ignored_gcc_optimization_f_Group>;
3276
3277 def fprofile_dir : Joined<["-"], "fprofile-dir=">, Group<f_Group>;
3278
3279 def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group<f_Group>, Flags<[CoreOption]>;
3280
3281 defm align_labels : BooleanFFlag<"align-labels">, Group<clang_ignored_gcc_optimization_f_Group>;
3282 def falign_labels_EQ : Joined<["-"], "falign-labels=">, Group<clang_ignored_gcc_optimization_f_Group>;
3283 defm align_loops : BooleanFFlag<"align-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
3284 def falign_loops_EQ : Joined<["-"], "falign-loops=">, Group<clang_ignored_gcc_optimization_f_Group>;
3285 defm align_jumps : BooleanFFlag<"align-jumps">, Group<clang_ignored_gcc_optimization_f_Group>;
3286 def falign_jumps_EQ : Joined<["-"], "falign-jumps=">, Group<clang_ignored_gcc_optimization_f_Group>;
3287
3288 // FIXME: This option should be supported and wired up to our diognostics, but
3289 // ignore it for now to avoid breaking builds that use it.
3290 def fdiagnostics_show_location_EQ : Joined<["-"], "fdiagnostics-show-location=">, Group<clang_ignored_f_Group>;
3291
3292 defm fcheck_new : BooleanFFlag<"check-new">, Group<clang_ignored_f_Group>;
3293 defm caller_saves : BooleanFFlag<"caller-saves">, Group<clang_ignored_gcc_optimization_f_Group>;
3294 defm reorder_blocks : BooleanFFlag<"reorder-blocks">, Group<clang_ignored_gcc_optimization_f_Group>;
3295 defm eliminate_unused_debug_types : BooleanFFlag<"eliminate-unused-debug-types">, Group<clang_ignored_f_Group>;
3296 defm branch_count_reg : BooleanFFlag<"branch-count-reg">, Group<clang_ignored_gcc_optimization_f_Group>;
3297 defm default_inline : BooleanFFlag<"default-inline">, Group<clang_ignored_gcc_optimization_f_Group>;
3298 defm fat_lto_objects : BooleanFFlag<"fat-lto-objects">, Group<clang_ignored_gcc_optimization_f_Group>;
3299 defm float_store : BooleanFFlag<"float-store">, Group<clang_ignored_gcc_optimization_f_Group>;
3300 defm friend_injection : BooleanFFlag<"friend-injection">, Group<clang_ignored_f_Group>;
3301 defm function_attribute_list : BooleanFFlag<"function-attribute-list">, Group<clang_ignored_f_Group>;
3302 defm gcse : BooleanFFlag<"gcse">, Group<clang_ignored_gcc_optimization_f_Group>;
3303 defm gcse_after_reload: BooleanFFlag<"gcse-after-reload">, Group<clang_ignored_gcc_optimization_f_Group>;
3304 defm gcse_las: BooleanFFlag<"gcse-las">, Group<clang_ignored_gcc_optimization_f_Group>;
3305 defm gcse_sm: BooleanFFlag<"gcse-sm">, Group<clang_ignored_gcc_optimization_f_Group>;
3306 defm gnu : BooleanFFlag<"gnu">, Group<clang_ignored_f_Group>;
3307 defm implicit_templates : BooleanFFlag<"implicit-templates">, Group<clang_ignored_f_Group>;
3308 defm implement_inlines : BooleanFFlag<"implement-inlines">, Group<clang_ignored_f_Group>;
3309 defm merge_constants : BooleanFFlag<"merge-constants">, Group<clang_ignored_gcc_optimization_f_Group>;
3310 defm modulo_sched : BooleanFFlag<"modulo-sched">, Group<clang_ignored_gcc_optimization_f_Group>;
3311 defm modulo_sched_allow_regmoves : BooleanFFlag<"modulo-sched-allow-regmoves">,
3312     Group<clang_ignored_gcc_optimization_f_Group>;
3313 defm inline_functions_called_once : BooleanFFlag<"inline-functions-called-once">,
3314     Group<clang_ignored_gcc_optimization_f_Group>;
3315 def finline_limit_EQ : Joined<["-"], "finline-limit=">, Group<clang_ignored_gcc_optimization_f_Group>;
3316 defm finline_limit : BooleanFFlag<"inline-limit">, Group<clang_ignored_gcc_optimization_f_Group>;
3317 defm inline_small_functions : BooleanFFlag<"inline-small-functions">,
3318     Group<clang_ignored_gcc_optimization_f_Group>;
3319 defm ipa_cp : BooleanFFlag<"ipa-cp">,
3320     Group<clang_ignored_gcc_optimization_f_Group>;
3321 defm ivopts : BooleanFFlag<"ivopts">, Group<clang_ignored_gcc_optimization_f_Group>;
3322 def fsemantic_interposition : Flag<["-"], "fsemantic-interposition">, Group<f_Group>, Flags<[CC1Option]>;
3323 def fno_semantic_interposition: Flag<["-"], "fno-semantic-interposition">, Group<f_Group>, Flags<[CC1Option]>;
3324 defm non_call_exceptions : BooleanFFlag<"non-call-exceptions">, Group<clang_ignored_f_Group>;
3325 defm peel_loops : BooleanFFlag<"peel-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
3326 defm permissive : BooleanFFlag<"permissive">, Group<clang_ignored_f_Group>;
3327 defm prefetch_loop_arrays : BooleanFFlag<"prefetch-loop-arrays">, Group<clang_ignored_gcc_optimization_f_Group>;
3328 defm printf : BooleanFFlag<"printf">, Group<clang_ignored_f_Group>;
3329 defm profile : BooleanFFlag<"profile">, Group<clang_ignored_f_Group>;
3330 defm profile_correction : BooleanFFlag<"profile-correction">, Group<clang_ignored_gcc_optimization_f_Group>;
3331 defm profile_generate_sampling : BooleanFFlag<"profile-generate-sampling">, Group<clang_ignored_f_Group>;
3332 defm profile_reusedist : BooleanFFlag<"profile-reusedist">, Group<clang_ignored_f_Group>;
3333 defm profile_values : BooleanFFlag<"profile-values">, Group<clang_ignored_gcc_optimization_f_Group>;
3334 defm regs_graph : BooleanFFlag<"regs-graph">, Group<clang_ignored_f_Group>;
3335 defm rename_registers : BooleanFFlag<"rename-registers">, Group<clang_ignored_gcc_optimization_f_Group>;
3336 defm ripa : BooleanFFlag<"ripa">, Group<clang_ignored_f_Group>;
3337 defm schedule_insns : BooleanFFlag<"schedule-insns">, Group<clang_ignored_gcc_optimization_f_Group>;
3338 defm schedule_insns2 : BooleanFFlag<"schedule-insns2">, Group<clang_ignored_gcc_optimization_f_Group>;
3339 defm see : BooleanFFlag<"see">, Group<clang_ignored_f_Group>;
3340 defm signaling_nans : BooleanFFlag<"signaling-nans">, Group<clang_ignored_gcc_optimization_f_Group>;
3341 defm single_precision_constant : BooleanFFlag<"single-precision-constant">,
3342     Group<clang_ignored_gcc_optimization_f_Group>;
3343 defm spec_constr_count : BooleanFFlag<"spec-constr-count">, Group<clang_ignored_f_Group>;
3344 defm stack_check : BooleanFFlag<"stack-check">, Group<clang_ignored_f_Group>;
3345 defm strength_reduce :
3346     BooleanFFlag<"strength-reduce">, Group<clang_ignored_gcc_optimization_f_Group>;
3347 defm tls_model : BooleanFFlag<"tls-model">, Group<clang_ignored_f_Group>;
3348 defm tracer : BooleanFFlag<"tracer">, Group<clang_ignored_gcc_optimization_f_Group>;
3349 defm tree_dce : BooleanFFlag<"tree-dce">, Group<clang_ignored_gcc_optimization_f_Group>;
3350 defm tree_salias : BooleanFFlag<"tree-salias">, Group<clang_ignored_f_Group>;
3351 defm tree_ter : BooleanFFlag<"tree-ter">, Group<clang_ignored_gcc_optimization_f_Group>;
3352 defm tree_vectorizer_verbose : BooleanFFlag<"tree-vectorizer-verbose">, Group<clang_ignored_f_Group>;
3353 defm tree_vrp : BooleanFFlag<"tree-vrp">, Group<clang_ignored_gcc_optimization_f_Group>;
3354 defm unroll_all_loops : BooleanFFlag<"unroll-all-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
3355 defm unsafe_loop_optimizations : BooleanFFlag<"unsafe-loop-optimizations">,
3356     Group<clang_ignored_gcc_optimization_f_Group>;
3357 defm unswitch_loops : BooleanFFlag<"unswitch-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
3358 defm use_linker_plugin : BooleanFFlag<"use-linker-plugin">, Group<clang_ignored_gcc_optimization_f_Group>;
3359 defm vect_cost_model : BooleanFFlag<"vect-cost-model">, Group<clang_ignored_gcc_optimization_f_Group>;
3360 defm variable_expansion_in_unroller : BooleanFFlag<"variable-expansion-in-unroller">,
3361     Group<clang_ignored_gcc_optimization_f_Group>;
3362 defm web : BooleanFFlag<"web">, Group<clang_ignored_gcc_optimization_f_Group>;
3363 defm whole_program : BooleanFFlag<"whole-program">, Group<clang_ignored_gcc_optimization_f_Group>;
3364 defm devirtualize : BooleanFFlag<"devirtualize">, Group<clang_ignored_gcc_optimization_f_Group>;
3365 defm devirtualize_speculatively : BooleanFFlag<"devirtualize-speculatively">,
3366     Group<clang_ignored_gcc_optimization_f_Group>;
3367
3368 // Generic gfortran options.
3369 def A_DASH : Joined<["-"], "A-">, Group<gfortran_Group>;
3370 def J : JoinedOrSeparate<["-"], "J">, Flags<[RenderJoined]>, Group<gfortran_Group>;
3371 def cpp : Flag<["-"], "cpp">, Group<gfortran_Group>;
3372 def nocpp : Flag<["-"], "nocpp">, Group<gfortran_Group>;
3373 def static_libgfortran : Flag<["-"], "static-libgfortran">, Group<gfortran_Group>;
3374
3375 // "f" options with values for gfortran.
3376 def fblas_matmul_limit_EQ : Joined<["-"], "fblas-matmul-limit=">, Group<gfortran_Group>;
3377 def fcheck_EQ : Joined<["-"], "fcheck=">, Group<gfortran_Group>;
3378 def fcoarray_EQ : Joined<["-"], "fcoarray=">, Group<gfortran_Group>;
3379 def fconvert_EQ : Joined<["-"], "fconvert=">, Group<gfortran_Group>;
3380 def ffixed_line_length_VALUE : Joined<["-"], "ffixed-line-length-">, Group<gfortran_Group>;
3381 def ffpe_trap_EQ : Joined<["-"], "ffpe-trap=">, Group<gfortran_Group>;
3382 def ffree_line_length_VALUE : Joined<["-"], "ffree-line-length-">, Group<gfortran_Group>;
3383 def finit_character_EQ : Joined<["-"], "finit-character=">, Group<gfortran_Group>;
3384 def finit_integer_EQ : Joined<["-"], "finit-integer=">, Group<gfortran_Group>;
3385 def finit_logical_EQ : Joined<["-"], "finit-logical=">, Group<gfortran_Group>;
3386 def finit_real_EQ : Joined<["-"], "finit-real=">, Group<gfortran_Group>;
3387 def fmax_array_constructor_EQ : Joined<["-"], "fmax-array-constructor=">, Group<gfortran_Group>;
3388 def fmax_errors_EQ : Joined<["-"], "fmax-errors=">, Group<gfortran_Group>;
3389 def fmax_stack_var_size_EQ : Joined<["-"], "fmax-stack-var-size=">, Group<gfortran_Group>;
3390 def fmax_subrecord_length_EQ : Joined<["-"], "fmax-subrecord-length=">, Group<gfortran_Group>;
3391 def frecord_marker_EQ : Joined<["-"], "frecord-marker=">, Group<gfortran_Group>;
3392
3393 // "f" flags for gfortran.
3394 defm aggressive_function_elimination : BooleanFFlag<"aggressive-function-elimination">, Group<gfortran_Group>;
3395 defm align_commons : BooleanFFlag<"align-commons">, Group<gfortran_Group>;
3396 defm all_intrinsics : BooleanFFlag<"all-intrinsics">, Group<gfortran_Group>;
3397 defm automatic : BooleanFFlag<"automatic">, Group<gfortran_Group>;
3398 defm backslash : BooleanFFlag<"backslash">, Group<gfortran_Group>;
3399 defm backtrace : BooleanFFlag<"backtrace">, Group<gfortran_Group>;
3400 defm bounds_check : BooleanFFlag<"bounds-check">, Group<gfortran_Group>;
3401 defm check_array_temporaries : BooleanFFlag<"check-array-temporaries">, Group<gfortran_Group>;
3402 defm cray_pointer : BooleanFFlag<"cray-pointer">, Group<gfortran_Group>;
3403 defm d_lines_as_code : BooleanFFlag<"d-lines-as-code">, Group<gfortran_Group>;
3404 defm d_lines_as_comments : BooleanFFlag<"d-lines-as-comments">, Group<gfortran_Group>;
3405 defm default_double_8 : BooleanFFlag<"default-double-8">, Group<gfortran_Group>;
3406 defm default_integer_8 : BooleanFFlag<"default-integer-8">, Group<gfortran_Group>;
3407 defm default_real_8 : BooleanFFlag<"default-real-8">, Group<gfortran_Group>;
3408 defm dollar_ok : BooleanFFlag<"dollar-ok">, Group<gfortran_Group>;
3409 defm dump_fortran_optimized : BooleanFFlag<"dump-fortran-optimized">, Group<gfortran_Group>;
3410 defm dump_fortran_original : BooleanFFlag<"dump-fortran-original">, Group<gfortran_Group>;
3411 defm dump_parse_tree : BooleanFFlag<"dump-parse-tree">, Group<gfortran_Group>;
3412 defm external_blas : BooleanFFlag<"external-blas">, Group<gfortran_Group>;
3413 defm f2c : BooleanFFlag<"f2c">, Group<gfortran_Group>;
3414 defm fixed_form : BooleanFFlag<"fixed-form">, Group<gfortran_Group>;
3415 defm free_form : BooleanFFlag<"free-form">, Group<gfortran_Group>;
3416 defm frontend_optimize : BooleanFFlag<"frontend-optimize">, Group<gfortran_Group>;
3417 defm implicit_none : BooleanFFlag<"implicit-none">, Group<gfortran_Group>;
3418 defm init_local_zero : BooleanFFlag<"init-local-zero">, Group<gfortran_Group>;
3419 defm integer_4_integer_8 : BooleanFFlag<"integer-4-integer-8">, Group<gfortran_Group>;
3420 defm intrinsic_modules_path : BooleanFFlag<"intrinsic-modules-path">, Group<gfortran_Group>;
3421 defm max_identifier_length : BooleanFFlag<"max-identifier-length">, Group<gfortran_Group>;
3422 defm module_private : BooleanFFlag<"module-private">, Group<gfortran_Group>;
3423 defm pack_derived : BooleanFFlag<"pack-derived">, Group<gfortran_Group>;
3424 defm protect_parens : BooleanFFlag<"protect-parens">, Group<gfortran_Group>;
3425 defm range_check : BooleanFFlag<"range-check">, Group<gfortran_Group>;
3426 defm real_4_real_10 : BooleanFFlag<"real-4-real-10">, Group<gfortran_Group>;
3427 defm real_4_real_16 : BooleanFFlag<"real-4-real-16">, Group<gfortran_Group>;
3428 defm real_4_real_8 : BooleanFFlag<"real-4-real-8">, Group<gfortran_Group>;
3429 defm real_8_real_10 : BooleanFFlag<"real-8-real-10">, Group<gfortran_Group>;
3430 defm real_8_real_16 : BooleanFFlag<"real-8-real-16">, Group<gfortran_Group>;
3431 defm real_8_real_4 : BooleanFFlag<"real-8-real-4">, Group<gfortran_Group>;
3432 defm realloc_lhs : BooleanFFlag<"realloc-lhs">, Group<gfortran_Group>;
3433 defm recursive : BooleanFFlag<"recursive">, Group<gfortran_Group>;
3434 defm repack_arrays : BooleanFFlag<"repack-arrays">, Group<gfortran_Group>;
3435 defm second_underscore : BooleanFFlag<"second-underscore">, Group<gfortran_Group>;
3436 defm sign_zero : BooleanFFlag<"sign-zero">, Group<gfortran_Group>;
3437 defm stack_arrays : BooleanFFlag<"stack-arrays">, Group<gfortran_Group>;
3438 defm underscoring : BooleanFFlag<"underscoring">, Group<gfortran_Group>;
3439 defm whole_file : BooleanFFlag<"whole-file">, Group<gfortran_Group>;
3440
3441 // C++ SYCL options
3442 def fsycl : Flag<["-"], "fsycl">, Group<sycl_Group>, Flags<[CC1Option, CoreOption]>,
3443   HelpText<"Enable SYCL kernels compilation for device">;
3444 def fno_sycl : Flag<["-"], "fno-sycl">, Group<sycl_Group>, Flags<[CoreOption]>,
3445   HelpText<"Disable SYCL kernels compilation for device">;
3446 def sycl_std_EQ : Joined<["-"], "sycl-std=">, Group<sycl_Group>, Flags<[CC1Option, NoArgumentUnused, CoreOption]>,
3447   HelpText<"SYCL language standard to compile for.">, Values<"2017, 121, 1.2.1, sycl-1.2.1">;
3448
3449 //===----------------------------------------------------------------------===//
3450 // CC1 Options
3451 //===----------------------------------------------------------------------===//
3452
3453 let Flags = [CC1Option, NoDriverOption] in {
3454
3455 //===----------------------------------------------------------------------===//
3456 // Target Options
3457 //===----------------------------------------------------------------------===//
3458
3459 let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
3460
3461 def target_cpu : Separate<["-"], "target-cpu">,
3462   HelpText<"Target a specific cpu type">;
3463 def target_feature : Separate<["-"], "target-feature">,
3464   HelpText<"Target specific attributes">;
3465 def triple : Separate<["-"], "triple">,
3466   HelpText<"Specify target triple (e.g. i686-apple-darwin9)">,
3467   MarshallingInfoString<"TargetOpts->Triple", "llvm::Triple::normalize(llvm::sys::getDefaultTargetTriple())", "std::string">,
3468   AlwaysEmit, Normalizer<"normalizeTriple">, DenormalizeString;
3469 def target_abi : Separate<["-"], "target-abi">,
3470   HelpText<"Target a particular ABI type">;
3471 def target_sdk_version_EQ : Joined<["-"], "target-sdk-version=">,
3472   HelpText<"The version of target SDK used for compilation">;
3473
3474 }
3475
3476 def target_linker_version : Separate<["-"], "target-linker-version">,
3477   HelpText<"Target linker version">;
3478 def triple_EQ : Joined<["-"], "triple=">, Alias<triple>;
3479 def mfpmath : Separate<["-"], "mfpmath">,
3480   HelpText<"Which unit to use for fp math">;
3481
3482 def fpadding_on_unsigned_fixed_point : Flag<["-"], "fpadding-on-unsigned-fixed-point">,
3483   HelpText<"Force each unsigned fixed point type to have an extra bit of padding to align their scales with those of signed fixed point types">;
3484 def fno_padding_on_unsigned_fixed_point : Flag<["-"], "fno-padding-on-unsigned-fixed-point">;
3485
3486 //===----------------------------------------------------------------------===//
3487 // Analyzer Options
3488 //===----------------------------------------------------------------------===//
3489
3490 def analysis_UnoptimizedCFG : Flag<["-"], "unoptimized-cfg">,
3491   HelpText<"Generate unoptimized CFGs for all analyses">;
3492 def analysis_CFGAddImplicitDtors : Flag<["-"], "cfg-add-implicit-dtors">,
3493   HelpText<"Add C++ implicit destructors to CFGs for all analyses">;
3494
3495 def analyzer_store : Separate<["-"], "analyzer-store">,
3496   HelpText<"Source Code Analysis - Abstract Memory Store Models">;
3497 def analyzer_store_EQ : Joined<["-"], "analyzer-store=">, Alias<analyzer_store>;
3498
3499 def analyzer_constraints : Separate<["-"], "analyzer-constraints">,
3500   HelpText<"Source Code Analysis - Symbolic Constraint Engines">;
3501 def analyzer_constraints_EQ : Joined<["-"], "analyzer-constraints=">,
3502   Alias<analyzer_constraints>;
3503
3504 def analyzer_output : Separate<["-"], "analyzer-output">,
3505   HelpText<"Source Code Analysis - Output Options">;
3506 def analyzer_output_EQ : Joined<["-"], "analyzer-output=">,
3507   Alias<analyzer_output>;
3508
3509 def analyzer_purge : Separate<["-"], "analyzer-purge">,
3510   HelpText<"Source Code Analysis - Dead Symbol Removal Frequency">;
3511 def analyzer_purge_EQ : Joined<["-"], "analyzer-purge=">, Alias<analyzer_purge>;
3512
3513 def analyzer_opt_analyze_headers : Flag<["-"], "analyzer-opt-analyze-headers">,
3514   HelpText<"Force the static analyzer to analyze functions defined in header files">;
3515 def analyzer_opt_analyze_nested_blocks : Flag<["-"], "analyzer-opt-analyze-nested-blocks">,
3516   HelpText<"Analyze the definitions of blocks in addition to functions">;
3517 def analyzer_display_progress : Flag<["-"], "analyzer-display-progress">,
3518   HelpText<"Emit verbose output about the analyzer's progress">;
3519 def analyze_function : Separate<["-"], "analyze-function">,
3520   HelpText<"Run analysis on specific function (for C++ include parameters in name)">;
3521 def analyze_function_EQ : Joined<["-"], "analyze-function=">, Alias<analyze_function>;
3522 def trim_egraph : Flag<["-"], "trim-egraph">,
3523   HelpText<"Only show error-related paths in the analysis graph">;
3524 def analyzer_viz_egraph_graphviz : Flag<["-"], "analyzer-viz-egraph-graphviz">,
3525   HelpText<"Display exploded graph using GraphViz">;
3526 def analyzer_dump_egraph : Separate<["-"], "analyzer-dump-egraph">,
3527   HelpText<"Dump exploded graph to the specified file">;
3528 def analyzer_dump_egraph_EQ : Joined<["-"], "analyzer-dump-egraph=">, Alias<analyzer_dump_egraph>;
3529
3530 def analyzer_inline_max_stack_depth : Separate<["-"], "analyzer-inline-max-stack-depth">,
3531   HelpText<"Bound on stack depth while inlining (4 by default)">;
3532 def analyzer_inline_max_stack_depth_EQ : Joined<["-"], "analyzer-inline-max-stack-depth=">,
3533   Alias<analyzer_inline_max_stack_depth>;
3534
3535 def analyzer_inlining_mode : Separate<["-"], "analyzer-inlining-mode">,
3536   HelpText<"Specify the function selection heuristic used during inlining">;
3537 def analyzer_inlining_mode_EQ : Joined<["-"], "analyzer-inlining-mode=">, Alias<analyzer_inlining_mode>;
3538
3539 def analyzer_disable_retry_exhausted : Flag<["-"], "analyzer-disable-retry-exhausted">,
3540   HelpText<"Do not re-analyze paths leading to exhausted nodes with a different strategy (may decrease code coverage)">;
3541
3542 def analyzer_max_loop : Separate<["-"], "analyzer-max-loop">,
3543   HelpText<"The maximum number of times the analyzer will go through a loop">;
3544 def analyzer_stats : Flag<["-"], "analyzer-stats">,
3545   HelpText<"Print internal analyzer statistics.">;
3546
3547 def analyzer_checker : Separate<["-"], "analyzer-checker">,
3548   HelpText<"Choose analyzer checkers to enable">,
3549   ValuesCode<[{
3550     const char *Values =
3551     #define GET_CHECKERS
3552     #define CHECKER(FULLNAME, CLASS, HT, DOC_URI, IS_HIDDEN)  FULLNAME ","
3553     #include "clang/StaticAnalyzer/Checkers/Checkers.inc"
3554     #undef GET_CHECKERS
3555     #define GET_PACKAGES
3556     #define PACKAGE(FULLNAME)  FULLNAME ","
3557     #include "clang/StaticAnalyzer/Checkers/Checkers.inc"
3558     #undef GET_PACKAGES
3559     ;
3560   }]>;
3561 def analyzer_checker_EQ : Joined<["-"], "analyzer-checker=">,
3562   Alias<analyzer_checker>;
3563
3564 def analyzer_disable_checker : Separate<["-"], "analyzer-disable-checker">,
3565   HelpText<"Choose analyzer checkers to disable">;
3566 def analyzer_disable_checker_EQ : Joined<["-"], "analyzer-disable-checker=">,
3567   Alias<analyzer_disable_checker>;
3568
3569 def analyzer_disable_all_checks : Flag<["-"], "analyzer-disable-all-checks">,
3570   HelpText<"Disable all static analyzer checks">;
3571
3572 def analyzer_checker_help : Flag<["-"], "analyzer-checker-help">,
3573   HelpText<"Display the list of analyzer checkers that are available">;
3574
3575 def analyzer_checker_help_alpha : Flag<["-"], "analyzer-checker-help-alpha">,
3576   HelpText<"Display the list of in development analyzer checkers. These "
3577            "are NOT considered safe, they are unstable and will emit incorrect "
3578            "reports. Enable ONLY FOR DEVELOPMENT purposes">;
3579
3580 def analyzer_checker_help_developer : Flag<["-"], "analyzer-checker-help-developer">,
3581   HelpText<"Display the list of developer-only checkers such as modeling "
3582            "and debug checkers">;
3583
3584 def analyzer_config_help : Flag<["-"], "analyzer-config-help">,
3585   HelpText<"Display the list of -analyzer-config options. These are meant for "
3586            "development purposes only!">;
3587
3588 def analyzer_list_enabled_checkers : Flag<["-"], "analyzer-list-enabled-checkers">,
3589   HelpText<"Display the list of enabled analyzer checkers">;
3590
3591 def analyzer_config : Separate<["-"], "analyzer-config">,
3592   HelpText<"Choose analyzer options to enable">;
3593
3594 def analyzer_checker_option_help : Flag<["-"], "analyzer-checker-option-help">,
3595   HelpText<"Display the list of checker and package options">;
3596
3597 def analyzer_checker_option_help_alpha : Flag<["-"], "analyzer-checker-option-help-alpha">,
3598   HelpText<"Display the list of in development checker and package options. "
3599            "These are NOT considered safe, they are unstable and will emit "
3600            "incorrect reports. Enable ONLY FOR DEVELOPMENT purposes">;
3601
3602 def analyzer_checker_option_help_developer : Flag<["-"], "analyzer-checker-option-help-developer">,
3603   HelpText<"Display the list of checker and package options meant for "
3604            "development purposes only">;
3605
3606 def analyzer_config_compatibility_mode : Separate<["-"], "analyzer-config-compatibility-mode">,
3607   HelpText<"Don't emit errors on invalid analyzer-config inputs">;
3608
3609 def analyzer_config_compatibility_mode_EQ : Joined<["-"], "analyzer-config-compatibility-mode=">,
3610   Alias<analyzer_config_compatibility_mode>;
3611
3612 def analyzer_werror : Flag<["-"], "analyzer-werror">,
3613   HelpText<"Emit analyzer results as errors rather than warnings">;
3614
3615 //===----------------------------------------------------------------------===//
3616 // Migrator Options
3617 //===----------------------------------------------------------------------===//
3618 def migrator_no_nsalloc_error : Flag<["-"], "no-ns-alloc-error">,
3619   HelpText<"Do not error on use of NSAllocateCollectable/NSReallocateCollectable">;
3620
3621 def migrator_no_finalize_removal : Flag<["-"], "no-finalize-removal">,
3622   HelpText<"Do not remove finalize method in gc mode">;
3623
3624 //===----------------------------------------------------------------------===//
3625 // CodeGen Options
3626 //===----------------------------------------------------------------------===//
3627
3628 let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
3629 def debug_info_kind_EQ : Joined<["-"], "debug-info-kind=">;
3630 def debug_info_macro : Flag<["-"], "debug-info-macro">,
3631   HelpText<"Emit macro debug information">;
3632 def default_function_attr : Separate<["-"], "default-function-attr">,
3633   HelpText<"Apply given attribute to all functions">;
3634 def dwarf_version_EQ : Joined<["-"], "dwarf-version=">;
3635 def debugger_tuning_EQ : Joined<["-"], "debugger-tuning=">;
3636 def dwarf_debug_flags : Separate<["-"], "dwarf-debug-flags">,
3637   HelpText<"The string to embed in the Dwarf debug flags record.">;
3638 def record_command_line : Separate<["-"], "record-command-line">,
3639   HelpText<"The string to embed in the .LLVM.command.line section.">;
3640 def compress_debug_sections : Flag<["-", "--"], "compress-debug-sections">,
3641     HelpText<"DWARF debug sections compression">;
3642 def compress_debug_sections_EQ : Joined<["-", "--"], "compress-debug-sections=">,
3643     HelpText<"DWARF debug sections compression type">;
3644 def mno_exec_stack : Flag<["-"], "mnoexecstack">,
3645   HelpText<"Mark the file as not needing an executable stack">;
3646 def massembler_no_warn : Flag<["-"], "massembler-no-warn">,
3647   HelpText<"Make assembler not emit warnings">;
3648 def massembler_fatal_warnings : Flag<["-"], "massembler-fatal-warnings">,
3649   HelpText<"Make assembler warnings fatal">;
3650 def mrelax_relocations : Flag<["--"], "mrelax-relocations">,
3651     HelpText<"Use relaxable elf relocations">;
3652 def msave_temp_labels : Flag<["-"], "msave-temp-labels">,
3653   HelpText<"Save temporary labels in the symbol table. "
3654            "Note this may change .s semantics and shouldn't generally be used "
3655            "on compiler-generated code.">;
3656 def mrelocation_model : Separate<["-"], "mrelocation-model">,
3657   HelpText<"The relocation model to use">, Values<"static,pic,ropi,rwpi,ropi-rwpi,dynamic-no-pic">,
3658   NormalizedValuesScope<"llvm::Reloc">,
3659   NormalizedValues<["Static", "PIC_", "ROPI", "RWPI", "ROPI_RWPI", "DynamicNoPIC"]>,
3660   MarshallingInfoString<"CodeGenOpts.RelocationModel", "PIC_", "Model">,
3661   AutoNormalizeEnum;
3662 def fno_math_builtin : Flag<["-"], "fno-math-builtin">,
3663   HelpText<"Disable implicit builtin knowledge of math functions">;
3664 }
3665
3666 def disable_llvm_verifier : Flag<["-"], "disable-llvm-verifier">,
3667   HelpText<"Don't run the LLVM IR verifier pass">;
3668 def disable_llvm_passes : Flag<["-"], "disable-llvm-passes">,
3669   HelpText<"Use together with -emit-llvm to get pristine LLVM IR from the "
3670            "frontend by not running any LLVM passes at all">;
3671 def disable_llvm_optzns : Flag<["-"], "disable-llvm-optzns">,
3672   Alias<disable_llvm_passes>;
3673 def disable_lifetimemarkers : Flag<["-"], "disable-lifetime-markers">,
3674   HelpText<"Disable lifetime-markers emission even when optimizations are "
3675            "enabled">;
3676 def disable_O0_optnone : Flag<["-"], "disable-O0-optnone">,
3677   HelpText<"Disable adding the optnone attribute to functions at O0">;
3678 def disable_red_zone : Flag<["-"], "disable-red-zone">,
3679   HelpText<"Do not emit code that uses the red zone.">;
3680 def dwarf_ext_refs : Flag<["-"], "dwarf-ext-refs">,
3681   HelpText<"Generate debug info with external references to clang modules"
3682            " or precompiled headers">;
3683 def dwarf_explicit_import : Flag<["-"], "dwarf-explicit-import">,
3684   HelpText<"Generate explicit import from anonymous namespace to containing"
3685            " scope">;
3686 def debug_forward_template_params : Flag<["-"], "debug-forward-template-params">,
3687   HelpText<"Emit complete descriptions of template parameters in forward"
3688            " declarations">;
3689 def fforbid_guard_variables : Flag<["-"], "fforbid-guard-variables">,
3690   HelpText<"Emit an error if a C++ static local initializer would need a guard variable">;
3691 def no_implicit_float : Flag<["-"], "no-implicit-float">,
3692   HelpText<"Don't generate implicit floating point instructions">;
3693 def fdump_vtable_layouts : Flag<["-"], "fdump-vtable-layouts">,
3694   HelpText<"Dump the layouts of all vtables that will be emitted in a translation unit">;
3695 def fmerge_functions : Flag<["-"], "fmerge-functions">,
3696   HelpText<"Permit merging of identical functions when optimizing.">;
3697 def femit_coverage_notes : Flag<["-"], "femit-coverage-notes">,
3698   HelpText<"Emit a gcov coverage notes file when compiling.">;
3699 def femit_coverage_data: Flag<["-"], "femit-coverage-data">,
3700   HelpText<"Instrument the program to emit gcov coverage data when run.">;
3701 def coverage_data_file : Separate<["-"], "coverage-data-file">,
3702   HelpText<"Emit coverage data to this filename.">;
3703 def coverage_data_file_EQ : Joined<["-"], "coverage-data-file=">,
3704   Alias<coverage_data_file>;
3705 def coverage_notes_file : Separate<["-"], "coverage-notes-file">,
3706   HelpText<"Emit coverage notes to this filename.">;
3707 def coverage_notes_file_EQ : Joined<["-"], "coverage-notes-file=">,
3708   Alias<coverage_notes_file>;
3709 def coverage_version_EQ : Joined<["-"], "coverage-version=">,
3710   HelpText<"Four-byte version string for gcov files.">;
3711 def test_coverage : Flag<["-"], "test-coverage">,
3712   HelpText<"Do not generate coverage files or remove coverage changes from IR">;
3713 def dump_coverage_mapping : Flag<["-"], "dump-coverage-mapping">,
3714   HelpText<"Dump the coverage mapping records, for testing">;
3715 def fuse_register_sized_bitfield_access: Flag<["-"], "fuse-register-sized-bitfield-access">,
3716   HelpText<"Use register sized accesses to bit-fields, when possible.">;
3717 def relaxed_aliasing : Flag<["-"], "relaxed-aliasing">,
3718   HelpText<"Turn off Type Based Alias Analysis">;
3719 def no_struct_path_tbaa : Flag<["-"], "no-struct-path-tbaa">,
3720   HelpText<"Turn off struct-path aware Type Based Alias Analysis">;
3721 def new_struct_path_tbaa : Flag<["-"], "new-struct-path-tbaa">,
3722   HelpText<"Enable enhanced struct-path aware Type Based Alias Analysis">;
3723 def mdebug_pass : Separate<["-"], "mdebug-pass">,
3724   HelpText<"Enable additional debug output">;
3725 def mframe_pointer_EQ : Joined<["-"], "mframe-pointer=">,
3726   HelpText<"Specify which frame pointers to retain (all, non-leaf, none).">, Values<"all,non-leaf,none">;
3727 def mdisable_tail_calls : Flag<["-"], "mdisable-tail-calls">,
3728   HelpText<"Disable tail call optimization, keeping the call stack accurate">;
3729 def menable_no_infinities : Flag<["-"], "menable-no-infs">,
3730   HelpText<"Allow optimization to assume there are no infinities.">;
3731 def menable_no_nans : Flag<["-"], "menable-no-nans">,
3732   HelpText<"Allow optimization to assume there are no NaNs.">;
3733 def menable_unsafe_fp_math : Flag<["-"], "menable-unsafe-fp-math">,
3734   HelpText<"Allow unsafe floating-point math optimizations which may decrease "
3735            "precision">;
3736 def mreassociate : Flag<["-"], "mreassociate">,
3737   HelpText<"Allow reassociation transformations for floating-point instructions">;
3738 def mabi_EQ_ieeelongdouble : Flag<["-"], "mabi=ieeelongdouble">,
3739   HelpText<"Use IEEE 754 quadruple-precision for long double">;
3740 def mfloat_abi : Separate<["-"], "mfloat-abi">,
3741   HelpText<"The float ABI to use">;
3742 def mtp : Separate<["-"], "mtp">,
3743   HelpText<"Mode for reading thread pointer">;
3744 def mlimit_float_precision : Separate<["-"], "mlimit-float-precision">,
3745   HelpText<"Limit float precision to the given value">;
3746 def split_stacks : Flag<["-"], "split-stacks">,
3747   HelpText<"Try to use a split stack if possible.">;
3748 def mregparm : Separate<["-"], "mregparm">,
3749   HelpText<"Limit the number of registers available for integer arguments">;
3750 def msmall_data_limit : Separate<["-"], "msmall-data-limit">,
3751   HelpText<"Put global and static data smaller than the limit into a special section">;
3752 def munwind_tables : Flag<["-"], "munwind-tables">,
3753   HelpText<"Generate unwinding tables for all functions">;
3754 def mconstructor_aliases : Flag<["-"], "mconstructor-aliases">,
3755   HelpText<"Emit complete constructors and destructors as aliases when possible">;
3756 def mlink_bitcode_file : Separate<["-"], "mlink-bitcode-file">,
3757   HelpText<"Link the given bitcode file before performing optimizations.">;
3758 def mlink_builtin_bitcode : Separate<["-"], "mlink-builtin-bitcode">,
3759   HelpText<"Link and internalize needed symbols from the given bitcode file "
3760            "before performing optimizations.">;
3761 def mlink_cuda_bitcode : Separate<["-"], "mlink-cuda-bitcode">,
3762   Alias<mlink_builtin_bitcode>;
3763 def vectorize_loops : Flag<["-"], "vectorize-loops">,
3764   HelpText<"Run the Loop vectorization passes">;
3765 def vectorize_slp : Flag<["-"], "vectorize-slp">,
3766   HelpText<"Run the SLP vectorization passes">;
3767 def dependent_lib : Joined<["--"], "dependent-lib=">,
3768   HelpText<"Add dependent library">;
3769 def linker_option : Joined<["--"], "linker-option=">,
3770   HelpText<"Add linker option">;
3771 def fsanitize_coverage_type : Joined<["-"], "fsanitize-coverage-type=">,
3772                               HelpText<"Sanitizer coverage type">;
3773 def fsanitize_coverage_indirect_calls
3774     : Flag<["-"], "fsanitize-coverage-indirect-calls">,
3775       HelpText<"Enable sanitizer coverage for indirect calls">;
3776 def fsanitize_coverage_trace_bb
3777     : Flag<["-"], "fsanitize-coverage-trace-bb">,
3778       HelpText<"Enable basic block tracing in sanitizer coverage">;
3779 def fsanitize_coverage_trace_cmp
3780     : Flag<["-"], "fsanitize-coverage-trace-cmp">,
3781       HelpText<"Enable cmp instruction tracing in sanitizer coverage">;
3782 def fsanitize_coverage_trace_div
3783     : Flag<["-"], "fsanitize-coverage-trace-div">,
3784       HelpText<"Enable div instruction tracing in sanitizer coverage">;
3785 def fsanitize_coverage_trace_gep
3786     : Flag<["-"], "fsanitize-coverage-trace-gep">,
3787       HelpText<"Enable gep instruction tracing in sanitizer coverage">;
3788 def fsanitize_coverage_8bit_counters
3789     : Flag<["-"], "fsanitize-coverage-8bit-counters">,
3790       HelpText<"Enable frequency counters in sanitizer coverage">;
3791 def fsanitize_coverage_inline_8bit_counters
3792     : Flag<["-"], "fsanitize-coverage-inline-8bit-counters">,
3793       HelpText<"Enable inline 8-bit counters in sanitizer coverage">;
3794 def fsanitize_coverage_inline_bool_flag
3795     : Flag<["-"], "fsanitize-coverage-inline-bool-flag">,
3796       HelpText<"Enable inline bool flag in sanitizer coverage">;
3797 def fsanitize_coverage_pc_table
3798     : Flag<["-"], "fsanitize-coverage-pc-table">,
3799       HelpText<"Create a table of coverage-instrumented PCs">;
3800 def fsanitize_coverage_trace_pc
3801     : Flag<["-"], "fsanitize-coverage-trace-pc">,
3802       HelpText<"Enable PC tracing in sanitizer coverage">;
3803 def fsanitize_coverage_trace_pc_guard
3804     : Flag<["-"], "fsanitize-coverage-trace-pc-guard">,
3805       HelpText<"Enable PC tracing with guard in sanitizer coverage">;
3806 def fsanitize_coverage_no_prune
3807     : Flag<["-"], "fsanitize-coverage-no-prune">,
3808       HelpText<"Disable coverage pruning (i.e. instrument all blocks/edges)">;
3809 def fsanitize_coverage_stack_depth
3810     : Flag<["-"], "fsanitize-coverage-stack-depth">,
3811       HelpText<"Enable max stack depth tracing">;
3812 def fpatchable_function_entry_offset_EQ
3813     : Joined<["-"], "fpatchable-function-entry-offset=">, MetaVarName<"<M>">,
3814       HelpText<"Generate M NOPs before function entry">;
3815 def fprofile_instrument_EQ : Joined<["-"], "fprofile-instrument=">,
3816     HelpText<"Enable PGO instrumentation. The accepted value is clang, llvm, "
3817              "or none">, Values<"none,clang,llvm">;
3818 def fprofile_instrument_path_EQ : Joined<["-"], "fprofile-instrument-path=">,
3819     HelpText<"Generate instrumented code to collect execution counts into "
3820              "<file> (overridden by LLVM_PROFILE_FILE env var)">;
3821 def fprofile_instrument_use_path_EQ :
3822     Joined<["-"], "fprofile-instrument-use-path=">,
3823     HelpText<"Specify the profile path in PGO use compilation">;
3824 def flto_visibility_public_std:
3825     Flag<["-"], "flto-visibility-public-std">,
3826     HelpText<"Use public LTO visibility for classes in std and stdext namespaces">;
3827 def flto_unit: Flag<["-"], "flto-unit">,
3828     HelpText<"Emit IR to support LTO unit features (CFI, whole program vtable opt)">;
3829 def fno_lto_unit: Flag<["-"], "fno-lto-unit">;
3830 def fdebug_pass_manager : Flag<["-"], "fdebug-pass-manager">,
3831     HelpText<"Prints debug information for the new pass manager">;
3832 def fno_debug_pass_manager : Flag<["-"], "fno-debug-pass-manager">,
3833     HelpText<"Disables debug printing for the new pass manager">;
3834 // The driver option takes the key as a parameter to the -msign-return-address=
3835 // and -mbranch-protection= options, but CC1 has a separate option so we
3836 // don't have to parse the parameter twice.
3837 def msign_return_address_key_EQ : Joined<["-"], "msign-return-address-key=">,
3838     Values<"a_key,b_key">;
3839 def mbranch_target_enforce : Flag<["-"], "mbranch-target-enforce">;
3840 def fno_dllexport_inlines : Flag<["-"], "fno-dllexport-inlines">;
3841 def cfguard_no_checks : Flag<["-"], "cfguard-no-checks">,
3842     HelpText<"Emit Windows Control Flow Guard tables only (no checks)">;
3843 def cfguard : Flag<["-"], "cfguard">,
3844     HelpText<"Emit Windows Control Flow Guard tables and checks">;
3845
3846 def fdenormal_fp_math_f32_EQ : Joined<["-"], "fdenormal-fp-math-f32=">,
3847    Group<f_Group>;
3848
3849 //===----------------------------------------------------------------------===//
3850 // Dependency Output Options
3851 //===----------------------------------------------------------------------===//
3852
3853 def sys_header_deps : Flag<["-"], "sys-header-deps">,
3854   HelpText<"Include system headers in dependency output">;
3855 def module_file_deps : Flag<["-"], "module-file-deps">,
3856   HelpText<"Include module files in dependency output">;
3857 def header_include_file : Separate<["-"], "header-include-file">,
3858   HelpText<"Filename (or -) to write header include output to">;
3859 def show_includes : Flag<["--"], "show-includes">,
3860   HelpText<"Print cl.exe style /showIncludes to stdout">;
3861
3862 //===----------------------------------------------------------------------===//
3863 // Diagnostic Options
3864 //===----------------------------------------------------------------------===//
3865
3866 def diagnostic_log_file : Separate<["-"], "diagnostic-log-file">,
3867   HelpText<"Filename (or -) to log diagnostics to">;
3868 def diagnostic_serialized_file : Separate<["-"], "serialize-diagnostic-file">,
3869   MetaVarName<"<filename>">,
3870   HelpText<"File for serializing diagnostics in a binary format">;
3871
3872 def fdiagnostics_format : Separate<["-"], "fdiagnostics-format">,
3873   HelpText<"Change diagnostic formatting to match IDE and command line tools">, Values<"clang,msvc,msvc-fallback,vi">;
3874 def fdiagnostics_show_category : Separate<["-"], "fdiagnostics-show-category">,
3875   HelpText<"Print diagnostic category">, Values<"none,id,name">;
3876 def fno_diagnostics_use_presumed_location : Flag<["-"], "fno-diagnostics-use-presumed-location">,
3877   HelpText<"Ignore #line directives when displaying diagnostic locations">;
3878 def ftabstop : Separate<["-"], "ftabstop">, MetaVarName<"<N>">,
3879   HelpText<"Set the tab stop distance.">;
3880 def ferror_limit : Separate<["-"], "ferror-limit">, MetaVarName<"<N>">,
3881   HelpText<"Set the maximum number of errors to emit before stopping (0 = no limit).">;
3882 def fmacro_backtrace_limit : Separate<["-"], "fmacro-backtrace-limit">, MetaVarName<"<N>">,
3883   HelpText<"Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit).">;
3884 def ftemplate_backtrace_limit : Separate<["-"], "ftemplate-backtrace-limit">, MetaVarName<"<N>">,
3885   HelpText<"Set the maximum number of entries to print in a template instantiation backtrace (0 = no limit).">;
3886 def fconstexpr_backtrace_limit : Separate<["-"], "fconstexpr-backtrace-limit">, MetaVarName<"<N>">,
3887   HelpText<"Set the maximum number of entries to print in a constexpr evaluation backtrace (0 = no limit).">;
3888 def fspell_checking_limit : Separate<["-"], "fspell-checking-limit">, MetaVarName<"<N>">,
3889   HelpText<"Set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit).">;
3890 def fcaret_diagnostics_max_lines :
3891   Separate<["-"], "fcaret-diagnostics-max-lines">, MetaVarName<"<N>">,
3892   HelpText<"Set the maximum number of source lines to show in a caret diagnostic">;
3893 def verify_EQ : CommaJoined<["-"], "verify=">,
3894   MetaVarName<"<prefixes>">,
3895   HelpText<"Verify diagnostic output using comment directives that start with"
3896            " prefixes in the comma-separated sequence <prefixes>">;
3897 def verify : Flag<["-"], "verify">,
3898   HelpText<"Equivalent to -verify=expected">;
3899 def verify_ignore_unexpected : Flag<["-"], "verify-ignore-unexpected">,
3900   HelpText<"Ignore unexpected diagnostic messages">;
3901 def verify_ignore_unexpected_EQ : CommaJoined<["-"], "verify-ignore-unexpected=">,
3902   HelpText<"Ignore unexpected diagnostic messages">;
3903 def Wno_rewrite_macros : Flag<["-"], "Wno-rewrite-macros">,
3904   HelpText<"Silence ObjC rewriting warnings">;
3905
3906 //===----------------------------------------------------------------------===//
3907 // Frontend Options
3908 //===----------------------------------------------------------------------===//
3909
3910 // This isn't normally used, it is just here so we can parse a
3911 // CompilerInvocation out of a driver-derived argument vector.
3912 def cc1 : Flag<["-"], "cc1">;
3913 def cc1as : Flag<["-"], "cc1as">;
3914
3915 def ast_merge : Separate<["-"], "ast-merge">,
3916   MetaVarName<"<ast file>">,
3917   HelpText<"Merge the given AST file into the translation unit being compiled.">;
3918 def aux_target_cpu : Separate<["-"], "aux-target-cpu">,
3919   HelpText<"Target a specific auxiliary cpu type">;
3920 def aux_target_feature : Separate<["-"], "aux-target-feature">,
3921   HelpText<"Target specific auxiliary attributes">;
3922 def aux_triple : Separate<["-"], "aux-triple">,
3923   HelpText<"Auxiliary target triple.">;
3924 def code_completion_at : Separate<["-"], "code-completion-at">,
3925   MetaVarName<"<file>:<line>:<column>">,
3926   HelpText<"Dump code-completion information at a location">;
3927 def remap_file : Separate<["-"], "remap-file">,
3928   MetaVarName<"<from>;<to>">,
3929   HelpText<"Replace the contents of the <from> file with the contents of the <to> file">;
3930 def code_completion_at_EQ : Joined<["-"], "code-completion-at=">,
3931   Alias<code_completion_at>;
3932 def code_completion_macros : Flag<["-"], "code-completion-macros">,
3933   HelpText<"Include macros in code-completion results">;
3934 def code_completion_patterns : Flag<["-"], "code-completion-patterns">,
3935   HelpText<"Include code patterns in code-completion results">;
3936 def no_code_completion_globals : Flag<["-"], "no-code-completion-globals">,
3937   HelpText<"Do not include global declarations in code-completion results.">;
3938 def no_code_completion_ns_level_decls : Flag<["-"], "no-code-completion-ns-level-decls">,
3939   HelpText<"Do not include declarations inside namespaces (incl. global namespace) in the code-completion results.">;
3940 def code_completion_brief_comments : Flag<["-"], "code-completion-brief-comments">,
3941   HelpText<"Include brief documentation comments in code-completion results.">;
3942 def code_completion_with_fixits : Flag<["-"], "code-completion-with-fixits">,
3943   HelpText<"Include code completion results which require small fix-its.">;
3944 def disable_free : Flag<["-"], "disable-free">,
3945   HelpText<"Disable freeing of memory on exit">;
3946 def discard_value_names : Flag<["-"], "discard-value-names">,
3947   HelpText<"Discard value names in LLVM IR">;
3948 def load : Separate<["-"], "load">, MetaVarName<"<dsopath>">,
3949   HelpText<"Load the named plugin (dynamic shared object)">;
3950 def plugin : Separate<["-"], "plugin">, MetaVarName<"<name>">,
3951   HelpText<"Use the named plugin action instead of the default action (use \"help\" to list available options)">;
3952 def plugin_arg : JoinedAndSeparate<["-"], "plugin-arg-">,
3953     MetaVarName<"<name> <arg>">,
3954     HelpText<"Pass <arg> to plugin <name>">;
3955 def add_plugin : Separate<["-"], "add-plugin">, MetaVarName<"<name>">,
3956   HelpText<"Use the named plugin action in addition to the default action">;
3957 def ast_dump_filter : Separate<["-"], "ast-dump-filter">,
3958   MetaVarName<"<dump_filter>">,
3959   HelpText<"Use with -ast-dump or -ast-print to dump/print only AST declaration"
3960            " nodes having a certain substring in a qualified name. Use"
3961            " -ast-list to list all filterable declaration node names.">;
3962 def fno_modules_global_index : Flag<["-"], "fno-modules-global-index">,
3963   HelpText<"Do not automatically generate or update the global module index">;
3964 def fno_modules_error_recovery : Flag<["-"], "fno-modules-error-recovery">,
3965   HelpText<"Do not automatically import modules for error recovery">;
3966 def fmodule_map_file_home_is_cwd : Flag<["-"], "fmodule-map-file-home-is-cwd">,
3967   HelpText<"Use the current working directory as the home directory of "
3968            "module maps specified by -fmodule-map-file=<FILE>">;
3969 def fmodule_feature : Separate<["-"], "fmodule-feature">,
3970   MetaVarName<"<feature>">,
3971   HelpText<"Enable <feature> in module map requires declarations">;
3972 def fmodules_embed_file_EQ : Joined<["-"], "fmodules-embed-file=">,
3973   MetaVarName<"<file>">,
3974   HelpText<"Embed the contents of the specified file into the module file "
3975            "being compiled.">;
3976 def fmodules_embed_all_files : Joined<["-"], "fmodules-embed-all-files">,
3977   HelpText<"Embed the contents of all files read by this compilation into "
3978            "the produced module file.">;
3979 def fmodules_local_submodule_visibility :
3980   Flag<["-"], "fmodules-local-submodule-visibility">,
3981   HelpText<"Enforce name visibility rules across submodules of the same "
3982            "top-level module.">;
3983 def fmodules_codegen :
3984   Flag<["-"], "fmodules-codegen">,
3985   HelpText<"Generate code for uses of this module that assumes an explicit "
3986            "object file will be built for the module">;
3987 def fmodules_debuginfo :
3988   Flag<["-"], "fmodules-debuginfo">,
3989   HelpText<"Generate debug info for types in an object file built from this "
3990            "module and do not generate them elsewhere">;
3991 def fmodule_format_EQ : Joined<["-"], "fmodule-format=">,
3992   HelpText<"Select the container format for clang modules and PCH. "
3993            "Supported options are 'raw' and 'obj'.">;
3994 def ftest_module_file_extension_EQ :
3995   Joined<["-"], "ftest-module-file-extension=">,
3996   HelpText<"introduce a module file extension for testing purposes. "
3997            "The argument is parsed as blockname:major:minor:hashed:user info">;
3998 def fconcepts_ts : Flag<["-"], "fconcepts-ts">,
3999   HelpText<"Enable C++ Extensions for Concepts. (deprecated - use -std=c++2a)">;
4000 def fno_concept_satisfaction_caching : Flag<["-"],
4001                                             "fno-concept-satisfaction-caching">,
4002   HelpText<"Disable satisfaction caching for C++2a Concepts.">;
4003
4004 def frecovery_ast : Flag<["-"], "frecovery-ast">,
4005   HelpText<"Preserve expressions in AST rather than dropping them when "
4006            "encountering semantic errors">;
4007 def fno_recovery_ast : Flag<["-"], "fno-recovery-ast">;
4008 def frecovery_ast_type : Flag<["-"], "frecovery-ast-type">,
4009   HelpText<"Preserve the type for recovery expressions when possible "
4010           "(experimental)">;
4011 def fno_recovery_ast_type : Flag<["-"], "fno-recovery-ast-type">;
4012
4013 let Group = Action_Group in {
4014
4015 def Eonly : Flag<["-"], "Eonly">,
4016   HelpText<"Just run preprocessor, no output (for timings)">;
4017 def dump_raw_tokens : Flag<["-"], "dump-raw-tokens">,
4018   HelpText<"Lex file in raw mode and dump raw tokens">;
4019 def analyze : Flag<["-"], "analyze">,
4020   HelpText<"Run static analysis engine">;
4021 def dump_tokens : Flag<["-"], "dump-tokens">,
4022   HelpText<"Run preprocessor, dump internal rep of tokens">;
4023 def init_only : Flag<["-"], "init-only">,
4024   HelpText<"Only execute frontend initialization">;
4025 def fixit : Flag<["-"], "fixit">,
4026   HelpText<"Apply fix-it advice to the input source">;
4027 def fixit_EQ : Joined<["-"], "fixit=">,
4028   HelpText<"Apply fix-it advice creating a file with the given suffix">;
4029 def print_preamble : Flag<["-"], "print-preamble">,
4030   HelpText<"Print the \"preamble\" of a file, which is a candidate for implicit"
4031            " precompiled headers.">;
4032 def emit_html : Flag<["-"], "emit-html">,
4033   HelpText<"Output input source as HTML">;
4034 def ast_print : Flag<["-"], "ast-print">,
4035   HelpText<"Build ASTs and then pretty-print them">;
4036 def ast_list : Flag<["-"], "ast-list">,
4037   HelpText<"Build ASTs and print the list of declaration node qualified names">;
4038 def ast_dump : Flag<["-"], "ast-dump">,
4039   HelpText<"Build ASTs and then debug dump them">;
4040 def ast_dump_EQ : Joined<["-"], "ast-dump=">,
4041   HelpText<"Build ASTs and then debug dump them in the specified format. "
4042            "Supported formats include: default, json">;
4043 def ast_dump_all : Flag<["-"], "ast-dump-all">,
4044   HelpText<"Build ASTs and then debug dump them, forcing deserialization">;
4045 def ast_dump_all_EQ : Joined<["-"], "ast-dump-all=">,
4046   HelpText<"Build ASTs and then debug dump them in the specified format, "
4047            "forcing deserialization. Supported formats include: default, json">;
4048 def ast_dump_decl_types : Flag<["-"], "ast-dump-decl-types">,
4049   HelpText<"Include declaration types in AST dumps">;
4050 def templight_dump : Flag<["-"], "templight-dump">,
4051   HelpText<"Dump templight information to stdout">;
4052 def ast_dump_lookups : Flag<["-"], "ast-dump-lookups">,
4053   HelpText<"Build ASTs and then debug dump their name lookup tables">;
4054 def ast_view : Flag<["-"], "ast-view">,
4055   HelpText<"Build ASTs and view them with GraphViz">;
4056 def emit_module : Flag<["-"], "emit-module">,
4057   HelpText<"Generate pre-compiled module file from a module map">;
4058 def emit_module_interface : Flag<["-"], "emit-module-interface">,
4059   HelpText<"Generate pre-compiled module file from a C++ module interface">;
4060 def emit_header_module : Flag<["-"], "emit-header-module">,
4061   HelpText<"Generate pre-compiled module file from a set of header files">;
4062 def emit_pch : Flag<["-"], "emit-pch">,
4063   HelpText<"Generate pre-compiled header file">;
4064 def emit_llvm_bc : Flag<["-"], "emit-llvm-bc">,
4065   HelpText<"Build ASTs then convert to LLVM, emit .bc file">;
4066 def emit_llvm_only : Flag<["-"], "emit-llvm-only">,
4067   HelpText<"Build ASTs and convert to LLVM, discarding output">;
4068 def emit_codegen_only : Flag<["-"], "emit-codegen-only">,
4069   HelpText<"Generate machine code, but discard output">;
4070 def emit_obj : Flag<["-"], "emit-obj">,
4071   HelpText<"Emit native object files">;
4072 def rewrite_test : Flag<["-"], "rewrite-test">,
4073   HelpText<"Rewriter playground">;
4074 def rewrite_macros : Flag<["-"], "rewrite-macros">,
4075   HelpText<"Expand macros without full preprocessing">;
4076 def migrate : Flag<["-"], "migrate">,
4077   HelpText<"Migrate source code">;
4078 def compiler_options_dump : Flag<["-"], "compiler-options-dump">,
4079   HelpText<"Dump the compiler configuration options">;
4080 def print_dependency_directives_minimized_source : Flag<["-"],
4081   "print-dependency-directives-minimized-source">,
4082   HelpText<"Print the output of the dependency directives source minimizer">;
4083 }
4084
4085 def emit_llvm_uselists : Flag<["-"], "emit-llvm-uselists">,
4086   HelpText<"Preserve order of LLVM use-lists when serializing">;
4087 def no_emit_llvm_uselists : Flag<["-"], "no-emit-llvm-uselists">,
4088   HelpText<"Don't preserve order of LLVM use-lists when serializing">;
4089
4090 def mt_migrate_directory : Separate<["-"], "mt-migrate-directory">,
4091   HelpText<"Directory for temporary files produced during ARC or ObjC migration">;
4092 def arcmt_check : Flag<["-"], "arcmt-check">,
4093   HelpText<"Check for ARC migration issues that need manual handling">;
4094 def arcmt_modify : Flag<["-"], "arcmt-modify">,
4095   HelpText<"Apply modifications to files to conform to ARC">;
4096 def arcmt_migrate : Flag<["-"], "arcmt-migrate">,
4097   HelpText<"Apply modifications and produces temporary files that conform to ARC">;
4098
4099 def opt_record_file : Separate<["-"], "opt-record-file">,
4100   HelpText<"File name to use for YAML optimization record output">;
4101 def opt_record_passes : Separate<["-"], "opt-record-passes">,
4102   HelpText<"Only record remark information for passes whose names match the given regular expression">;
4103 def opt_record_format : Separate<["-"], "opt-record-format">,
4104   HelpText<"The format used for serializing remarks (default: YAML)">;
4105
4106 def print_stats : Flag<["-"], "print-stats">,
4107   HelpText<"Print performance metrics and statistics">;
4108 def stats_file : Joined<["-"], "stats-file=">,
4109   HelpText<"Filename to write statistics to">;
4110 def fdump_record_layouts : Flag<["-"], "fdump-record-layouts">,
4111   HelpText<"Dump record layout information">;
4112 def fdump_record_layouts_simple : Flag<["-"], "fdump-record-layouts-simple">,
4113   HelpText<"Dump record layout information in a simple form used for testing">;
4114 def fix_what_you_can : Flag<["-"], "fix-what-you-can">,
4115   HelpText<"Apply fix-it advice even in the presence of unfixable errors">;
4116 def fix_only_warnings : Flag<["-"], "fix-only-warnings">,
4117   HelpText<"Apply fix-it advice only for warnings, not errors">;
4118 def fixit_recompile : Flag<["-"], "fixit-recompile">,
4119   HelpText<"Apply fix-it changes and recompile">;
4120 def fixit_to_temp : Flag<["-"], "fixit-to-temporary">,
4121   HelpText<"Apply fix-it changes to temporary files">;
4122
4123 def foverride_record_layout_EQ : Joined<["-"], "foverride-record-layout=">,
4124   HelpText<"Override record layouts with those in the given file">;
4125 def pch_through_header_EQ : Joined<["-"], "pch-through-header=">,
4126   HelpText<"Stop PCH generation after including this file.  When using a PCH, "
4127            "skip tokens until after this file is included.">;
4128 def pch_through_hdrstop_create : Flag<["-"], "pch-through-hdrstop-create">,
4129   HelpText<"When creating a PCH, stop PCH generation after #pragma hdrstop.">;
4130 def pch_through_hdrstop_use : Flag<["-"], "pch-through-hdrstop-use">,
4131   HelpText<"When using a PCH, skip tokens until after a #pragma hdrstop.">;
4132 def fno_pch_timestamp : Flag<["-"], "fno-pch-timestamp">,
4133   HelpText<"Disable inclusion of timestamp in precompiled headers">;
4134 def building_pch_with_obj : Flag<["-"], "building-pch-with-obj">,
4135   HelpText<"This compilation is part of building a PCH with corresponding object file.">;
4136
4137 def aligned_alloc_unavailable : Flag<["-"], "faligned-alloc-unavailable">,
4138   HelpText<"Aligned allocation/deallocation functions are unavailable">;
4139
4140 //===----------------------------------------------------------------------===//
4141 // Language Options
4142 //===----------------------------------------------------------------------===//
4143
4144 let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
4145
4146 def version : Flag<["-"], "version">,
4147   HelpText<"Print the compiler version">;
4148 def main_file_name : Separate<["-"], "main-file-name">,
4149   HelpText<"Main file name to use for debug info and source if missing">;
4150 def split_dwarf_output : Separate<["-"], "split-dwarf-output">,
4151   HelpText<"File name to use for split dwarf debug info output">;
4152
4153 }
4154
4155 def fblocks_runtime_optional : Flag<["-"], "fblocks-runtime-optional">,
4156   HelpText<"Weakly link in the blocks runtime">;
4157 def fexternc_nounwind : Flag<["-"], "fexternc-nounwind">,
4158   HelpText<"Assume all functions with C linkage do not unwind">;
4159 def split_dwarf_file : Separate<["-"], "split-dwarf-file">,
4160   HelpText<"Name of the split dwarf debug info file to encode in the object file">;
4161 def fno_wchar : Flag<["-"], "fno-wchar">,
4162   HelpText<"Disable C++ builtin type wchar_t">;
4163 def fconstant_string_class : Separate<["-"], "fconstant-string-class">,
4164   MetaVarName<"<class name>">,
4165   HelpText<"Specify the class to use for constant Objective-C string objects.">;
4166 def fobjc_arc_cxxlib_EQ : Joined<["-"], "fobjc-arc-cxxlib=">,
4167   HelpText<"Objective-C++ Automatic Reference Counting standard library kind">, Values<"libc++,libstdc++,none">;
4168 def fobjc_runtime_has_weak : Flag<["-"], "fobjc-runtime-has-weak">,
4169   HelpText<"The target Objective-C runtime supports ARC weak operations">;
4170 def fobjc_dispatch_method_EQ : Joined<["-"], "fobjc-dispatch-method=">,
4171   HelpText<"Objective-C dispatch method to use">, Values<"legacy,non-legacy,mixed">;
4172 def disable_objc_default_synthesize_properties : Flag<["-"], "disable-objc-default-synthesize-properties">,
4173   HelpText<"disable the default synthesis of Objective-C properties">;
4174 def fencode_extended_block_signature : Flag<["-"], "fencode-extended-block-signature">,
4175   HelpText<"enable extended encoding of block type signature">;
4176 def function_alignment : Separate<["-"], "function-alignment">,
4177     HelpText<"default alignment for functions">;
4178 def pic_level : Separate<["-"], "pic-level">,
4179   HelpText<"Value for __PIC__">;
4180 def pic_is_pie : Flag<["-"], "pic-is-pie">,
4181   HelpText<"File is for a position independent executable">;
4182 def fno_validate_pch : Flag<["-"], "fno-validate-pch">,
4183   HelpText<"Disable validation of precompiled headers">;
4184 def fallow_pch_with_errors : Flag<["-"], "fallow-pch-with-compiler-errors">,
4185   HelpText<"Accept a PCH file that was created with compiler errors">;
4186 def dump_deserialized_pch_decls : Flag<["-"], "dump-deserialized-decls">,
4187   HelpText<"Dump declarations that are deserialized from PCH, for testing">;
4188 def error_on_deserialized_pch_decl : Separate<["-"], "error-on-deserialized-decl">,
4189   HelpText<"Emit error if a specific declaration is deserialized from PCH, for testing">;
4190 def error_on_deserialized_pch_decl_EQ : Joined<["-"], "error-on-deserialized-decl=">,
4191   Alias<error_on_deserialized_pch_decl>;
4192 def static_define : Flag<["-"], "static-define">,
4193   HelpText<"Should __STATIC__ be defined">;
4194 def stack_protector : Separate<["-"], "stack-protector">,
4195   HelpText<"Enable stack protectors">;
4196 def stack_protector_buffer_size : Separate<["-"], "stack-protector-buffer-size">,
4197   HelpText<"Lower bound for a buffer to be considered for stack protection">;
4198 def fvisibility : Separate<["-"], "fvisibility">,
4199   HelpText<"Default type and symbol visibility">;
4200 def ftype_visibility : Separate<["-"], "ftype-visibility">,
4201   HelpText<"Default type visibility">;
4202 def fapply_global_visibility_to_externs : Flag<["-"], "fapply-global-visibility-to-externs">,
4203   HelpText<"Apply global symbol visibility to external declarations without an explicit visibility">;
4204 def ftemplate_depth : Separate<["-"], "ftemplate-depth">,
4205   HelpText<"Maximum depth of recursive template instantiation">;
4206 def foperator_arrow_depth : Separate<["-"], "foperator-arrow-depth">,
4207   HelpText<"Maximum number of 'operator->'s to call for a member access">;
4208 def fconstexpr_depth : Separate<["-"], "fconstexpr-depth">,
4209   HelpText<"Maximum depth of recursive constexpr function calls">;
4210 def fconstexpr_steps : Separate<["-"], "fconstexpr-steps">,
4211   HelpText<"Maximum number of steps in constexpr function evaluation">;
4212 def fbracket_depth : Separate<["-"], "fbracket-depth">,
4213   HelpText<"Maximum nesting level for parentheses, brackets, and braces">;
4214 def fconst_strings : Flag<["-"], "fconst-strings">,
4215   HelpText<"Use a const qualified type for string literals in C and ObjC">;
4216 def fno_const_strings : Flag<["-"], "fno-const-strings">,
4217   HelpText<"Don't use a const qualified type for string literals in C and ObjC">;
4218 def fno_bitfield_type_align : Flag<["-"], "fno-bitfield-type-align">,
4219   HelpText<"Ignore bit-field types when aligning structures">;
4220 def ffake_address_space_map : Flag<["-"], "ffake-address-space-map">,
4221   HelpText<"Use a fake address space map; OpenCL testing purposes only">;
4222 def faddress_space_map_mangling_EQ : Joined<["-"], "faddress-space-map-mangling=">, MetaVarName<"<yes|no|target>">,
4223   HelpText<"Set the mode for address space map based mangling; OpenCL testing purposes only">;
4224 def funknown_anytype : Flag<["-"], "funknown-anytype">,
4225   HelpText<"Enable parser support for the __unknown_anytype type; for testing purposes only">;
4226 def fdebugger_support : Flag<["-"], "fdebugger-support">,
4227   HelpText<"Enable special debugger support behavior">;
4228 def fdebugger_cast_result_to_id : Flag<["-"], "fdebugger-cast-result-to-id">,
4229   HelpText<"Enable casting unknown expression results to id">;
4230 def fdebugger_objc_literal : Flag<["-"], "fdebugger-objc-literal">,
4231   HelpText<"Enable special debugger support for Objective-C subscripting and literals">;
4232 def fdeprecated_macro : Flag<["-"], "fdeprecated-macro">,
4233   HelpText<"Defines the __DEPRECATED macro">;
4234 def fno_deprecated_macro : Flag<["-"], "fno-deprecated-macro">,
4235   HelpText<"Undefines the __DEPRECATED macro">;
4236 def fobjc_subscripting_legacy_runtime : Flag<["-"], "fobjc-subscripting-legacy-runtime">,
4237   HelpText<"Allow Objective-C array and dictionary subscripting in legacy runtime">;
4238 def vtordisp_mode_EQ : Joined<["-"], "vtordisp-mode=">,
4239   HelpText<"Control vtordisp placement on win32 targets">;
4240 def fnative_half_type: Flag<["-"], "fnative-half-type">,
4241   HelpText<"Use the native half type for __fp16 instead of promoting to float">;
4242 def fnative_half_arguments_and_returns : Flag<["-"], "fnative-half-arguments-and-returns">,
4243   HelpText<"Use the native __fp16 type for arguments and returns (and skip ABI-specific lowering)">;
4244 def fallow_half_arguments_and_returns : Flag<["-"], "fallow-half-arguments-and-returns">,
4245   HelpText<"Allow function arguments and returns of type half">;
4246 def fdefault_calling_conv_EQ : Joined<["-"], "fdefault-calling-conv=">,
4247   HelpText<"Set default calling convention">, Values<"cdecl,fastcall,stdcall,vectorcall,regcall">;
4248 def finclude_default_header : Flag<["-"], "finclude-default-header">,
4249   HelpText<"Include default header file for OpenCL">;
4250 def fdeclare_opencl_builtins : Flag<["-"], "fdeclare-opencl-builtins">,
4251   HelpText<"Add OpenCL builtin function declarations (experimental)">;
4252 def fpreserve_vec3_type : Flag<["-"], "fpreserve-vec3-type">,
4253   HelpText<"Preserve 3-component vector type">;
4254 def fwchar_type_EQ : Joined<["-"], "fwchar-type=">,
4255   HelpText<"Select underlying type for wchar_t">, Values<"char,short,int">;
4256 def fsigned_wchar : Flag<["-"], "fsigned-wchar">,
4257   HelpText<"Use a signed type for wchar_t">;
4258 def fno_signed_wchar : Flag<["-"], "fno-signed-wchar">,
4259   HelpText<"Use an unsigned type for wchar_t">;
4260 def fcompatibility_qualified_id_block_param_type_checking : Flag<["-"], "fcompatibility-qualified-id-block-type-checking">,
4261   HelpText<"Allow using blocks with parameters of more specific type than "
4262            "the type system guarantees when a parameter is qualified id">;
4263
4264 // FIXME: Remove these entirely once functionality/tests have been excised.
4265 def fobjc_gc_only : Flag<["-"], "fobjc-gc-only">, Group<f_Group>,
4266   HelpText<"Use GC exclusively for Objective-C related memory management">;
4267 def fobjc_gc : Flag<["-"], "fobjc-gc">, Group<f_Group>,
4268   HelpText<"Enable Objective-C garbage collection">;
4269
4270 //===----------------------------------------------------------------------===//
4271 // Header Search Options
4272 //===----------------------------------------------------------------------===//
4273
4274 def nostdsysteminc : Flag<["-"], "nostdsysteminc">,
4275   HelpText<"Disable standard system #include directories">;
4276 def fdisable_module_hash : Flag<["-"], "fdisable-module-hash">,
4277   HelpText<"Disable the module hash">;
4278 def fmodules_hash_content : Flag<["-"], "fmodules-hash-content">,
4279   HelpText<"Enable hashing the content of a module file">;
4280 def fmodules_strict_context_hash : Flag<["-"], "fmodules-strict-context-hash">,
4281   HelpText<"Enable hashing of all compiler options that could impact the "
4282            "semantics of a module in an implicit build">,
4283   MarshallingInfoFlag<"HeaderSearchOpts->ModulesStrictContextHash", "false">;
4284 def c_isystem : JoinedOrSeparate<["-"], "c-isystem">, MetaVarName<"<directory>">,
4285   HelpText<"Add directory to the C SYSTEM include search path">;
4286 def objc_isystem : JoinedOrSeparate<["-"], "objc-isystem">,
4287   MetaVarName<"<directory>">,
4288   HelpText<"Add directory to the ObjC SYSTEM include search path">;
4289 def objcxx_isystem : JoinedOrSeparate<["-"], "objcxx-isystem">,
4290   MetaVarName<"<directory>">,
4291   HelpText<"Add directory to the ObjC++ SYSTEM include search path">;
4292 def internal_isystem : JoinedOrSeparate<["-"], "internal-isystem">,
4293   MetaVarName<"<directory>">,
4294   HelpText<"Add directory to the internal system include search path; these "
4295            "are assumed to not be user-provided and are used to model system "
4296            "and standard headers' paths.">;
4297 def internal_externc_isystem : JoinedOrSeparate<["-"], "internal-externc-isystem">,
4298   MetaVarName<"<directory>">,
4299   HelpText<"Add directory to the internal system include search path with "
4300            "implicit extern \"C\" semantics; these are assumed to not be "
4301            "user-provided and are used to model system and standard headers' "
4302            "paths.">;
4303
4304 //===----------------------------------------------------------------------===//
4305 // Preprocessor Options
4306 //===----------------------------------------------------------------------===//
4307
4308 def chain_include : Separate<["-"], "chain-include">, MetaVarName<"<file>">,
4309   HelpText<"Include and chain a header file after turning it into PCH">;
4310 def preamble_bytes_EQ : Joined<["-"], "preamble-bytes=">,
4311   HelpText<"Assume that the precompiled header is a precompiled preamble "
4312            "covering the first N bytes of the main file">;
4313 def detailed_preprocessing_record : Flag<["-"], "detailed-preprocessing-record">,
4314   HelpText<"include a detailed record of preprocessing actions">;
4315 def setup_static_analyzer : Flag<["-"], "setup-static-analyzer">,
4316   HelpText<"Set up preprocessor for static analyzer (done automatically when static analyzer is run).">;
4317 def disable_pragma_debug_crash : Flag<["-"], "disable-pragma-debug-crash">,
4318   HelpText<"Disable any #pragma clang __debug that can lead to crashing behavior. This is meant for testing.">;
4319
4320 //===----------------------------------------------------------------------===//
4321 // OpenCL Options
4322 //===----------------------------------------------------------------------===//
4323
4324 def cl_ext_EQ : CommaJoined<["-"], "cl-ext=">,
4325   HelpText<"OpenCL only. Enable or disable OpenCL extensions. The argument is a comma-separated sequence of one or more extension names, each prefixed by '+' or '-'.">;
4326
4327 //===----------------------------------------------------------------------===//
4328 // CUDA Options
4329 //===----------------------------------------------------------------------===//
4330
4331 def fcuda_is_device : Flag<["-"], "fcuda-is-device">,
4332   HelpText<"Generate code for CUDA device">;
4333 def fcuda_include_gpubinary : Separate<["-"], "fcuda-include-gpubinary">,
4334   HelpText<"Incorporate CUDA device-side binary into host object file.">;
4335 def fcuda_allow_variadic_functions : Flag<["-"], "fcuda-allow-variadic-functions">,
4336   HelpText<"Allow variadic functions in CUDA device code.">;
4337 def fno_cuda_host_device_constexpr : Flag<["-"], "fno-cuda-host-device-constexpr">,
4338   HelpText<"Don't treat unattributed constexpr functions as __host__ __device__.">;
4339
4340 //===----------------------------------------------------------------------===//
4341 // OpenMP Options
4342 //===----------------------------------------------------------------------===//
4343
4344 def fopenmp_is_device : Flag<["-"], "fopenmp-is-device">,
4345   HelpText<"Generate code only for an OpenMP target device.">;
4346 def fopenmp_host_ir_file_path : Separate<["-"], "fopenmp-host-ir-file-path">,
4347   HelpText<"Path to the IR file produced by the frontend for the host.">;
4348
4349 //===----------------------------------------------------------------------===//
4350 // SYCL Options
4351 //===----------------------------------------------------------------------===//
4352
4353 def fsycl_is_device : Flag<["-"], "fsycl-is-device">,
4354   HelpText<"Generate code for SYCL device.">;
4355
4356 } // let Flags = [CC1Option]
4357
4358 //===----------------------------------------------------------------------===//
4359 // cc1as-only Options
4360 //===----------------------------------------------------------------------===//
4361
4362 let Flags = [CC1AsOption, NoDriverOption] in {
4363
4364 // Language Options
4365 def n : Flag<["-"], "n">,
4366   HelpText<"Don't automatically start assembly file with a text section">;
4367
4368 // Frontend Options
4369 def filetype : Separate<["-"], "filetype">,
4370     HelpText<"Specify the output file type ('asm', 'null', or 'obj')">;
4371
4372 // Transliterate Options
4373 def output_asm_variant : Separate<["-"], "output-asm-variant">,
4374     HelpText<"Select the asm variant index to use for output">;
4375 def show_encoding : Flag<["-"], "show-encoding">,
4376     HelpText<"Show instruction encoding information in transliterate mode">;
4377 def show_inst : Flag<["-"], "show-inst">,
4378     HelpText<"Show internal instruction representation in transliterate mode">;
4379
4380 // Assemble Options
4381 def dwarf_debug_producer : Separate<["-"], "dwarf-debug-producer">,
4382   HelpText<"The string to embed in the Dwarf debug AT_producer record.">;
4383
4384 def defsym : Separate<["-"], "defsym">,
4385   HelpText<"Define a value for a symbol">;
4386
4387 } // let Flags = [CC1AsOption]
4388
4389 //===----------------------------------------------------------------------===//
4390 // clang-cl Options
4391 //===----------------------------------------------------------------------===//
4392
4393 def cl_Group : OptionGroup<"<clang-cl options>">, Flags<[CLOption]>,
4394   HelpText<"CL.EXE COMPATIBILITY OPTIONS">;
4395
4396 def cl_compile_Group : OptionGroup<"<clang-cl compile-only options>">,
4397   Group<cl_Group>;
4398
4399 def cl_ignored_Group : OptionGroup<"<clang-cl ignored options>">,
4400   Group<cl_Group>;
4401
4402 class CLFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
4403   Group<cl_Group>, Flags<[CLOption, DriverOption]>;
4404
4405 class CLCompileFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
4406   Group<cl_compile_Group>, Flags<[CLOption, DriverOption]>;
4407
4408 class CLIgnoredFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
4409   Group<cl_ignored_Group>, Flags<[CLOption, DriverOption]>;
4410
4411 class CLJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
4412   Group<cl_Group>, Flags<[CLOption, DriverOption]>;
4413
4414 class CLCompileJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
4415   Group<cl_compile_Group>, Flags<[CLOption, DriverOption]>;
4416
4417 class CLIgnoredJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
4418   Group<cl_ignored_Group>, Flags<[CLOption, DriverOption, HelpHidden]>;
4419
4420 class CLJoinedOrSeparate<string name> : Option<["/", "-"], name,
4421   KIND_JOINED_OR_SEPARATE>, Group<cl_Group>, Flags<[CLOption, DriverOption]>;
4422
4423 class CLCompileJoinedOrSeparate<string name> : Option<["/", "-"], name,
4424   KIND_JOINED_OR_SEPARATE>, Group<cl_compile_Group>,
4425   Flags<[CLOption, DriverOption]>;
4426
4427 class CLRemainingArgsJoined<string name> : Option<["/", "-"], name,
4428   KIND_REMAINING_ARGS_JOINED>, Group<cl_Group>, Flags<[CLOption, DriverOption]>;
4429
4430 // Aliases:
4431 // (We don't put any of these in cl_compile_Group as the options they alias are
4432 // already in the right group.)
4433
4434 def _SLASH_Brepro : CLFlag<"Brepro">,
4435   HelpText<"Do not write current time into COFF output (breaks link.exe /incremental)">,
4436   Alias<mno_incremental_linker_compatible>;
4437 def _SLASH_Brepro_ : CLFlag<"Brepro-">,
4438   HelpText<"Write current time into COFF output (default)">,
4439   Alias<mincremental_linker_compatible>;
4440 def _SLASH_C : CLFlag<"C">,
4441   HelpText<"Do not discard comments when preprocessing">, Alias<C>;
4442 def _SLASH_c : CLFlag<"c">, HelpText<"Compile only">, Alias<c>;
4443 def _SLASH_d1PP : CLFlag<"d1PP">,
4444   HelpText<"Retain macro definitions in /E mode">, Alias<dD>;
4445 def _SLASH_d1reportAllClassLayout : CLFlag<"d1reportAllClassLayout">,
4446   HelpText<"Dump record layout information">,
4447   Alias<Xclang>, AliasArgs<["-fdump-record-layouts"]>;
4448 def _SLASH_diagnostics_caret : CLFlag<"diagnostics:caret">,
4449   HelpText<"Enable caret and column diagnostics (default)">;
4450 def _SLASH_diagnostics_column : CLFlag<"diagnostics:column">,
4451   HelpText<"Disable caret diagnostics but keep column info">;
4452 def _SLASH_diagnostics_classic : CLFlag<"diagnostics:classic">,
4453   HelpText<"Disable column and caret diagnostics">;
4454 def _SLASH_D : CLJoinedOrSeparate<"D">, HelpText<"Define macro">,
4455   MetaVarName<"<macro[=value]>">, Alias<D>;
4456 def _SLASH_E : CLFlag<"E">, HelpText<"Preprocess to stdout">, Alias<E>;
4457 def _SLASH_fp_except : CLFlag<"fp:except">, HelpText<"">, Alias<ftrapping_math>;
4458 def _SLASH_fp_except_ : CLFlag<"fp:except-">,
4459   HelpText<"">, Alias<fno_trapping_math>;
4460 def _SLASH_fp_fast : CLFlag<"fp:fast">, HelpText<"">, Alias<ffast_math>;
4461 def _SLASH_fp_precise : CLFlag<"fp:precise">,
4462   HelpText<"">, Alias<fno_fast_math>;
4463 def _SLASH_fp_strict : CLFlag<"fp:strict">, HelpText<"">, Alias<fno_fast_math>;
4464 def _SLASH_GA : CLFlag<"GA">, Alias<ftlsmodel_EQ>, AliasArgs<["local-exec"]>,
4465   HelpText<"Assume thread-local variables are defined in the executable">;
4466 def _SLASH_GR : CLFlag<"GR">, HelpText<"Emit RTTI data (default)">;
4467 def _SLASH_GR_ : CLFlag<"GR-">, HelpText<"Do not emit RTTI data">;
4468 def _SLASH_GF : CLIgnoredFlag<"GF">,
4469   HelpText<"Enable string pooling (default)">;
4470 def _SLASH_GF_ : CLFlag<"GF-">, HelpText<"Disable string pooling">,
4471   Alias<fwritable_strings>;
4472 def _SLASH_GS : CLFlag<"GS">,
4473   HelpText<"Enable buffer security check (default)">;
4474 def _SLASH_GS_ : CLFlag<"GS-">, HelpText<"Disable buffer security check">;
4475 def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">,
4476   Alias<mstack_probe_size>, AliasArgs<["4096"]>;
4477 def _SLASH_Gs : CLJoined<"Gs">,
4478   HelpText<"Set stack probe size (default 4096)">, Alias<mstack_probe_size>;
4479 def _SLASH_Gy : CLFlag<"Gy">, HelpText<"Put each function in its own section">,
4480   Alias<ffunction_sections>;
4481 def _SLASH_Gy_ : CLFlag<"Gy-">,
4482   HelpText<"Do not put each function in its own section (default)">,
4483   Alias<fno_function_sections>;
4484 def _SLASH_Gw : CLFlag<"Gw">, HelpText<"Put each data item in its own section">,
4485   Alias<fdata_sections>;
4486 def _SLASH_Gw_ : CLFlag<"Gw-">,
4487   HelpText<"Do not put each data item in its own section (default)">,
4488   Alias<fno_data_sections>;
4489 def _SLASH_help : CLFlag<"help">, Alias<help>,
4490   HelpText<"Display available options">;
4491 def _SLASH_HELP : CLFlag<"HELP">, Alias<help>;
4492 def _SLASH_I : CLJoinedOrSeparate<"I">,
4493   HelpText<"Add directory to include search path">, MetaVarName<"<dir>">,
4494   Alias<I>;
4495 def _SLASH_J : CLFlag<"J">, HelpText<"Make char type unsigned">,
4496   Alias<funsigned_char>;
4497
4498 // The _SLASH_O option handles all the /O flags, but we also provide separate
4499 // aliased options to provide separate help messages.
4500 def _SLASH_O : CLJoined<"O">,
4501   HelpText<"Set multiple /O flags at once; e.g. '/O2y-' for '/O2 /Oy-'">,
4502   MetaVarName<"<flags>">;
4503 def : CLFlag<"O1">, Alias<_SLASH_O>, AliasArgs<["1"]>,
4504   HelpText<"Optimize for size  (like /Og     /Os /Oy /Ob2 /GF /Gy)">;
4505 def : CLFlag<"O2">, Alias<_SLASH_O>, AliasArgs<["2"]>,
4506   HelpText<"Optimize for speed (like /Og /Oi /Ot /Oy /Ob2 /GF /Gy)">;
4507 def : CLFlag<"Ob0">, Alias<_SLASH_O>, AliasArgs<["b0"]>,
4508   HelpText<"Disable function inlining">;
4509 def : CLFlag<"Ob1">, Alias<_SLASH_O>, AliasArgs<["b1"]>,
4510   HelpText<"Only inline functions explicitly or implicitly marked inline">;
4511 def : CLFlag<"Ob2">, Alias<_SLASH_O>, AliasArgs<["b2"]>,
4512   HelpText<"Inline functions as deemed beneficial by the compiler">;
4513 def : CLFlag<"Od">, Alias<_SLASH_O>, AliasArgs<["d"]>,
4514   HelpText<"Disable optimization">;
4515 def : CLFlag<"Og">, Alias<_SLASH_O>, AliasArgs<["g"]>,
4516   HelpText<"No effect">;
4517 def : CLFlag<"Oi">, Alias<_SLASH_O>, AliasArgs<["i"]>,
4518   HelpText<"Enable use of builtin functions">;
4519 def : CLFlag<"Oi-">, Alias<_SLASH_O>, AliasArgs<["i-"]>,
4520   HelpText<"Disable use of builtin functions">;
4521 def : CLFlag<"Os">, Alias<_SLASH_O>, AliasArgs<["s"]>,
4522   HelpText<"Optimize for size">;
4523 def : CLFlag<"Ot">, Alias<_SLASH_O>, AliasArgs<["t"]>,
4524   HelpText<"Optimize for speed">;
4525 def : CLFlag<"Ox">, Alias<_SLASH_O>, AliasArgs<["x"]>,
4526   HelpText<"Deprecated (like /Og /Oi /Ot /Oy /Ob2); use /O2">;
4527 def : CLFlag<"Oy">, Alias<_SLASH_O>, AliasArgs<["y"]>,
4528   HelpText<"Enable frame pointer omission (x86 only)">;
4529 def : CLFlag<"Oy-">, Alias<_SLASH_O>, AliasArgs<["y-"]>,
4530   HelpText<"Disable frame pointer omission (x86 only, default)">;
4531
4532 def _SLASH_QUESTION : CLFlag<"?">, Alias<help>,
4533   HelpText<"Display available options">;
4534 def _SLASH_Qvec : CLFlag<"Qvec">,
4535   HelpText<"Enable the loop vectorization passes">, Alias<fvectorize>;
4536 def _SLASH_Qvec_ : CLFlag<"Qvec-">,
4537   HelpText<"Disable the loop vectorization passes">, Alias<fno_vectorize>;
4538 def _SLASH_showIncludes : CLFlag<"showIncludes">,
4539   HelpText<"Print info about included files to stderr">;
4540 def _SLASH_showIncludes_user : CLFlag<"showIncludes:user">,
4541   HelpText<"Like /showIncludes but omit system headers">;
4542 def _SLASH_showFilenames : CLFlag<"showFilenames">,
4543   HelpText<"Print the name of each compiled file">;
4544 def _SLASH_showFilenames_ : CLFlag<"showFilenames-">,
4545   HelpText<"Do not print the name of each compiled file (default)">;
4546 def _SLASH_source_charset : CLCompileJoined<"source-charset:">,
4547   HelpText<"Set source encoding, supports only UTF-8">,
4548   Alias<finput_charset_EQ>;
4549 def _SLASH_execution_charset : CLCompileJoined<"execution-charset:">,
4550   HelpText<"Set runtime encoding, supports only UTF-8">,
4551   Alias<fexec_charset_EQ>;
4552 def _SLASH_std : CLCompileJoined<"std:">,
4553   HelpText<"Set C++ version (c++14,c++17,c++latest)">;
4554 def _SLASH_U : CLJoinedOrSeparate<"U">, HelpText<"Undefine macro">,
4555   MetaVarName<"<macro>">, Alias<U>;
4556 def _SLASH_validate_charset : CLFlag<"validate-charset">,
4557   Alias<W_Joined>, AliasArgs<["invalid-source-encoding"]>;
4558 def _SLASH_validate_charset_ : CLFlag<"validate-charset-">,
4559   Alias<W_Joined>, AliasArgs<["no-invalid-source-encoding"]>;
4560 def _SLASH_W0 : CLFlag<"W0">, HelpText<"Disable all warnings">, Alias<w>;
4561 def _SLASH_W1 : CLFlag<"W1">, HelpText<"Enable -Wall">, Alias<Wall>;
4562 def _SLASH_W2 : CLFlag<"W2">, HelpText<"Enable -Wall">, Alias<Wall>;
4563 def _SLASH_W3 : CLFlag<"W3">, HelpText<"Enable -Wall">, Alias<Wall>;
4564 def _SLASH_W4 : CLFlag<"W4">, HelpText<"Enable -Wall and -Wextra">, Alias<WCL4>;
4565 def _SLASH_Wall : CLFlag<"Wall">, HelpText<"Enable -Weverything">,
4566   Alias<W_Joined>, AliasArgs<["everything"]>;
4567 def _SLASH_WX : CLFlag<"WX">, HelpText<"Treat warnings as errors">,
4568   Alias<W_Joined>, AliasArgs<["error"]>;
4569 def _SLASH_WX_ : CLFlag<"WX-">,
4570   HelpText<"Do not treat warnings as errors (default)">,
4571   Alias<W_Joined>, AliasArgs<["no-error"]>;
4572 def _SLASH_w_flag : CLFlag<"w">, HelpText<"Disable all warnings">, Alias<w>;
4573 def _SLASH_wd4005 : CLFlag<"wd4005">, Alias<W_Joined>,
4574   AliasArgs<["no-macro-redefined"]>;
4575 def _SLASH_wd4018 : CLFlag<"wd4018">, Alias<W_Joined>,
4576   AliasArgs<["no-sign-compare"]>;
4577 def _SLASH_wd4100 : CLFlag<"wd4100">, Alias<W_Joined>,
4578   AliasArgs<["no-unused-parameter"]>;
4579 def _SLASH_wd4910 : CLFlag<"wd4910">, Alias<W_Joined>,
4580   AliasArgs<["no-dllexport-explicit-instantiation-decl"]>;
4581 def _SLASH_wd4996 : CLFlag<"wd4996">, Alias<W_Joined>,
4582   AliasArgs<["no-deprecated-declarations"]>;
4583 def _SLASH_vd : CLJoined<"vd">, HelpText<"Control vtordisp placement">,
4584   Alias<vtordisp_mode_EQ>;
4585 def _SLASH_X : CLFlag<"X">,
4586   HelpText<"Do not add %INCLUDE% to include search path">, Alias<nostdlibinc>;
4587 def _SLASH_Zc_sizedDealloc : CLFlag<"Zc:sizedDealloc">,
4588   HelpText<"Enable C++14 sized global deallocation functions">,
4589   Alias<fsized_deallocation>;
4590 def _SLASH_Zc_sizedDealloc_ : CLFlag<"Zc:sizedDealloc-">,
4591   HelpText<"Disable C++14 sized global deallocation functions">,
4592   Alias<fno_sized_deallocation>;
4593 def _SLASH_Zc_alignedNew : CLFlag<"Zc:alignedNew">,
4594   HelpText<"Enable C++17 aligned allocation functions">,
4595   Alias<faligned_allocation>;
4596 def _SLASH_Zc_alignedNew_ : CLFlag<"Zc:alignedNew-">,
4597   HelpText<"Disable C++17 aligned allocation functions">,
4598   Alias<fno_aligned_allocation>;
4599 def _SLASH_Zc_char8_t : CLFlag<"Zc:char8_t">,
4600   HelpText<"Enable char8_t from C++2a">,
4601   Alias<fchar8__t>;
4602 def _SLASH_Zc_char8_t_ : CLFlag<"Zc:char8_t-">,
4603   HelpText<"Disable char8_t from c++2a">,
4604   Alias<fno_char8__t>;
4605 def _SLASH_Zc_strictStrings : CLFlag<"Zc:strictStrings">,
4606   HelpText<"Treat string literals as const">, Alias<W_Joined>,
4607   AliasArgs<["error=c++11-compat-deprecated-writable-strings"]>;
4608 def _SLASH_Zc_threadSafeInit : CLFlag<"Zc:threadSafeInit">,
4609   HelpText<"Enable thread-safe initialization of static variables">,
4610   Alias<fthreadsafe_statics>;
4611 def _SLASH_Zc_threadSafeInit_ : CLFlag<"Zc:threadSafeInit-">,
4612   HelpText<"Disable thread-safe initialization of static variables">,
4613   Alias<fno_threadsafe_statics>;
4614 def _SLASH_Zc_trigraphs : CLFlag<"Zc:trigraphs">,
4615   HelpText<"Enable trigraphs">, Alias<ftrigraphs>;
4616 def _SLASH_Zc_trigraphs_off : CLFlag<"Zc:trigraphs-">,
4617   HelpText<"Disable trigraphs (default)">, Alias<fno_trigraphs>;
4618 def _SLASH_Zc_twoPhase : CLFlag<"Zc:twoPhase">,
4619   HelpText<"Enable two-phase name lookup in templates">,
4620   Alias<fno_delayed_template_parsing>;
4621 def _SLASH_Zc_twoPhase_ : CLFlag<"Zc:twoPhase-">,
4622   HelpText<"Disable two-phase name lookup in templates (default)">,
4623   Alias<fdelayed_template_parsing>;
4624 def _SLASH_Z7 : CLFlag<"Z7">,
4625   HelpText<"Enable CodeView debug information in object files">;
4626 def _SLASH_Zd : CLFlag<"Zd">,
4627   HelpText<"Emit debug line number tables only">;
4628 def _SLASH_Zi : CLFlag<"Zi">, Alias<_SLASH_Z7>,
4629   HelpText<"Like /Z7">;
4630 def _SLASH_Zp : CLJoined<"Zp">,
4631   HelpText<"Set default maximum struct packing alignment">,
4632   Alias<fpack_struct_EQ>;
4633 def _SLASH_Zp_flag : CLFlag<"Zp">,
4634   HelpText<"Set default maximum struct packing alignment to 1">,
4635   Alias<fpack_struct_EQ>, AliasArgs<["1"]>;
4636 def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Syntax-check only">,
4637   Alias<fsyntax_only>;
4638 def _SLASH_openmp_ : CLFlag<"openmp-">,
4639   HelpText<"Disable OpenMP support">, Alias<fno_openmp>;
4640 def _SLASH_openmp : CLFlag<"openmp">, HelpText<"Enable OpenMP support">,
4641   Alias<fopenmp>;
4642 def _SLASH_openmp_experimental : CLFlag<"openmp:experimental">,
4643   HelpText<"Enable OpenMP support with experimental SIMD support">,
4644   Alias<fopenmp>;
4645
4646 // Non-aliases:
4647
4648 def _SLASH_arch : CLCompileJoined<"arch:">,
4649   HelpText<"Set architecture for code generation">;
4650
4651 def _SLASH_M_Group : OptionGroup<"</M group>">, Group<cl_compile_Group>;
4652 def _SLASH_volatile_Group : OptionGroup<"</volatile group>">,
4653   Group<cl_compile_Group>;
4654
4655 def _SLASH_EH : CLJoined<"EH">, HelpText<"Set exception handling model">;
4656 def _SLASH_EP : CLFlag<"EP">,
4657   HelpText<"Disable linemarker output and preprocess to stdout">;
4658 def _SLASH_FA : CLFlag<"FA">,
4659   HelpText<"Output assembly code file during compilation">;
4660 def _SLASH_Fa : CLJoined<"Fa">,
4661   HelpText<"Set assembly output file name (with /FA)">,
4662   MetaVarName<"<file or dir/>">;
4663 def _SLASH_fallback : CLCompileFlag<"fallback">,
4664   HelpText<"Fall back to cl.exe if clang-cl fails to compile">;
4665 def _SLASH_FI : CLJoinedOrSeparate<"FI">,
4666   HelpText<"Include file before parsing">, Alias<include_>;
4667 def _SLASH_Fe : CLJoined<"Fe">,
4668   HelpText<"Set output executable file name">,
4669   MetaVarName<"<file or dir/>">;
4670 def _SLASH_Fi : CLCompileJoined<"Fi">,
4671   HelpText<"Set preprocess output file name (with /P)">,
4672   MetaVarName<"<file>">;
4673 def _SLASH_Fo : CLCompileJoined<"Fo">,
4674   HelpText<"Set output object file (with /c)">,
4675   MetaVarName<"<file or dir/>">;
4676 def _SLASH_guard : CLJoined<"guard:">,
4677   HelpText<"Enable Control Flow Guard with /guard:cf, or only the table with /guard:cf,nochecks">;
4678 def _SLASH_GX : CLFlag<"GX">,
4679   HelpText<"Deprecated; use /EHsc">;
4680 def _SLASH_GX_ : CLFlag<"GX-">,
4681   HelpText<"Deprecated (like not passing /EH)">;
4682 def _SLASH_imsvc : CLJoinedOrSeparate<"imsvc">,
4683   HelpText<"Add <dir> to system include search path, as if in %INCLUDE%">,
4684   MetaVarName<"<dir>">;
4685 def _SLASH_LD : CLFlag<"LD">, HelpText<"Create DLL">;
4686 def _SLASH_LDd : CLFlag<"LDd">, HelpText<"Create debug DLL">;
4687 def _SLASH_link : CLRemainingArgsJoined<"link">,
4688   HelpText<"Forward options to the linker">, MetaVarName<"<options>">;
4689 def _SLASH_MD : Option<["/", "-"], "MD", KIND_FLAG>, Group<_SLASH_M_Group>,
4690   Flags<[CLOption, DriverOption]>, HelpText<"Use DLL run-time">;
4691 def _SLASH_MDd : Option<["/", "-"], "MDd", KIND_FLAG>, Group<_SLASH_M_Group>,
4692   Flags<[CLOption, DriverOption]>, HelpText<"Use DLL debug run-time">;
4693 def _SLASH_MT : Option<["/", "-"], "MT", KIND_FLAG>, Group<_SLASH_M_Group>,
4694   Flags<[CLOption, DriverOption]>, HelpText<"Use static run-time">;
4695 def _SLASH_MTd : Option<["/", "-"], "MTd", KIND_FLAG>, Group<_SLASH_M_Group>,
4696   Flags<[CLOption, DriverOption]>, HelpText<"Use static debug run-time">;
4697 def _SLASH_o : CLJoinedOrSeparate<"o">,
4698   HelpText<"Deprecated (set output file name); use /Fe or /Fe">,
4699   MetaVarName<"<file or dir/>">;
4700 def _SLASH_P : CLFlag<"P">, HelpText<"Preprocess to file">;
4701 def _SLASH_Tc : CLCompileJoinedOrSeparate<"Tc">,
4702   HelpText<"Treat <file> as C source file">, MetaVarName<"<file>">;
4703 def _SLASH_TC : CLCompileFlag<"TC">, HelpText<"Treat all source files as C">;
4704 def _SLASH_Tp : CLCompileJoinedOrSeparate<"Tp">,
4705   HelpText<"Treat <file> as C++ source file">, MetaVarName<"<file>">;
4706 def _SLASH_TP : CLCompileFlag<"TP">, HelpText<"Treat all source files as C++">;
4707 def _SLASH_volatile_iso : Option<["/", "-"], "volatile:iso", KIND_FLAG>,
4708   Group<_SLASH_volatile_Group>, Flags<[CLOption, DriverOption]>,
4709   HelpText<"Volatile loads and stores have standard semantics">;
4710 def _SLASH_vmb : CLFlag<"vmb">,
4711   HelpText<"Use a best-case representation method for member pointers">;
4712 def _SLASH_vmg : CLFlag<"vmg">,
4713   HelpText<"Use a most-general representation for member pointers">;
4714 def _SLASH_vms : CLFlag<"vms">,
4715   HelpText<"Set the default most-general representation to single inheritance">;
4716 def _SLASH_vmm : CLFlag<"vmm">,
4717   HelpText<"Set the default most-general representation to "
4718            "multiple inheritance">;
4719 def _SLASH_vmv : CLFlag<"vmv">,
4720   HelpText<"Set the default most-general representation to "
4721            "virtual inheritance">;
4722 def _SLASH_volatile_ms  : Option<["/", "-"], "volatile:ms", KIND_FLAG>,
4723   Group<_SLASH_volatile_Group>, Flags<[CLOption, DriverOption]>,
4724   HelpText<"Volatile loads and stores have acquire and release semantics">;
4725 def _SLASH_clang : CLJoined<"clang:">,
4726   HelpText<"Pass <arg> to the clang driver">, MetaVarName<"<arg>">;
4727 def _SLASH_Zl : CLFlag<"Zl">,
4728   HelpText<"Do not let object file auto-link default libraries">;
4729
4730 def _SLASH_Yc : CLJoined<"Yc">,
4731   HelpText<"Generate a pch file for all code up to and including <filename>">,
4732   MetaVarName<"<filename>">;
4733 def _SLASH_Yu : CLJoined<"Yu">,
4734   HelpText<"Load a pch file and use it instead of all code up to "
4735            "and including <filename>">,
4736   MetaVarName<"<filename>">;
4737 def _SLASH_Y_ : CLFlag<"Y-">,
4738   HelpText<"Disable precompiled headers, overrides /Yc and /Yu">;
4739 def _SLASH_Zc_dllexportInlines : CLFlag<"Zc:dllexportInlines">,
4740   HelpText<"dllexport/dllimport inline member functions of dllexport/import classes (default)">;
4741 def _SLASH_Zc_dllexportInlines_ : CLFlag<"Zc:dllexportInlines-">,
4742   HelpText<"Do not dllexport/dllimport inline member functions of dllexport/import classes">;
4743 def _SLASH_Fp : CLJoined<"Fp">,
4744   HelpText<"Set pch file name (with /Yc and /Yu)">, MetaVarName<"<file>">;
4745
4746 def _SLASH_Gd : CLFlag<"Gd">,
4747   HelpText<"Set __cdecl as a default calling convention">;
4748 def _SLASH_Gr : CLFlag<"Gr">,
4749   HelpText<"Set __fastcall as a default calling convention">;
4750 def _SLASH_Gz : CLFlag<"Gz">,
4751   HelpText<"Set __stdcall as a default calling convention">;
4752 def _SLASH_Gv : CLFlag<"Gv">,
4753   HelpText<"Set __vectorcall as a default calling convention">;
4754 def _SLASH_Gregcall : CLFlag<"Gregcall">,
4755   HelpText<"Set __regcall as a default calling convention">;
4756
4757 // Ignored:
4758
4759 def _SLASH_analyze_ : CLIgnoredFlag<"analyze-">;
4760 def _SLASH_bigobj : CLIgnoredFlag<"bigobj">;
4761 def _SLASH_cgthreads : CLIgnoredJoined<"cgthreads">;
4762 def _SLASH_d2FastFail : CLIgnoredFlag<"d2FastFail">;
4763 def _SLASH_d2Zi_PLUS : CLIgnoredFlag<"d2Zi+">;
4764 def _SLASH_errorReport : CLIgnoredJoined<"errorReport">;
4765 def _SLASH_FC : CLIgnoredFlag<"FC">;
4766 def _SLASH_Fd : CLIgnoredJoined<"Fd">;
4767 def _SLASH_FS : CLIgnoredFlag<"FS">;
4768 def _SLASH_JMC : CLIgnoredFlag<"JMC">;
4769 def _SLASH_kernel_ : CLIgnoredFlag<"kernel-">;
4770 def _SLASH_nologo : CLIgnoredFlag<"nologo">;
4771 def _SLASH_permissive_ : CLIgnoredFlag<"permissive-">;
4772 def _SLASH_RTC : CLIgnoredJoined<"RTC">;
4773 def _SLASH_sdl : CLIgnoredFlag<"sdl">;
4774 def _SLASH_sdl_ : CLIgnoredFlag<"sdl-">;
4775 def _SLASH_utf8 : CLIgnoredFlag<"utf-8">,
4776   HelpText<"Set source and runtime encoding to UTF-8 (default)">;
4777 def _SLASH_w : CLIgnoredJoined<"w">;
4778 def _SLASH_Zc___cplusplus : CLIgnoredFlag<"Zc:__cplusplus">;
4779 def _SLASH_Zc_auto : CLIgnoredFlag<"Zc:auto">;
4780 def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">;
4781 def _SLASH_Zc_inline : CLIgnoredFlag<"Zc:inline">;
4782 def _SLASH_Zc_rvalueCast : CLIgnoredFlag<"Zc:rvalueCast">;
4783 def _SLASH_Zc_ternary : CLIgnoredFlag<"Zc:ternary">;
4784 def _SLASH_Zc_wchar_t : CLIgnoredFlag<"Zc:wchar_t">;
4785 def _SLASH_ZH_MD5 : CLIgnoredFlag<"ZH:MD5">;
4786 def _SLASH_ZH_SHA1 : CLIgnoredFlag<"ZH:SHA1">;
4787 def _SLASH_ZH_SHA_256 : CLIgnoredFlag<"ZH:SHA_256">;
4788 def _SLASH_Zm : CLIgnoredJoined<"Zm">;
4789 def _SLASH_Zo : CLIgnoredFlag<"Zo">;
4790 def _SLASH_Zo_ : CLIgnoredFlag<"Zo-">;
4791
4792
4793 // Unsupported:
4794
4795 def _SLASH_await : CLFlag<"await">;
4796 def _SLASH_constexpr : CLJoined<"constexpr:">;
4797 def _SLASH_AI : CLJoinedOrSeparate<"AI">;
4798 def _SLASH_Bt : CLFlag<"Bt">;
4799 def _SLASH_Bt_plus : CLFlag<"Bt+">;
4800 def _SLASH_clr : CLJoined<"clr">;
4801 def _SLASH_d2 : CLJoined<"d2">;
4802 def _SLASH_doc : CLJoined<"doc">;
4803 def _SLASH_FA_joined : CLJoined<"FA">;
4804 def _SLASH_favor : CLJoined<"favor">;
4805 def _SLASH_F : CLJoinedOrSeparate<"F">;
4806 def _SLASH_Fm : CLJoined<"Fm">;
4807 def _SLASH_Fr : CLJoined<"Fr">;
4808 def _SLASH_FR : CLJoined<"FR">;
4809 def _SLASH_FU : CLJoinedOrSeparate<"FU">;
4810 def _SLASH_Fx : CLFlag<"Fx">;
4811 def _SLASH_G1 : CLFlag<"G1">;
4812 def _SLASH_G2 : CLFlag<"G2">;
4813 def _SLASH_Ge : CLFlag<"Ge">;
4814 def _SLASH_Gh : CLFlag<"Gh">;
4815 def _SLASH_GH : CLFlag<"GH">;
4816 def _SLASH_GL : CLFlag<"GL">;
4817 def _SLASH_GL_ : CLFlag<"GL-">;
4818 def _SLASH_Gm : CLFlag<"Gm">;
4819 def _SLASH_Gm_ : CLFlag<"Gm-">;
4820 def _SLASH_GT : CLFlag<"GT">;
4821 def _SLASH_GZ : CLFlag<"GZ">;
4822 def _SLASH_H : CLFlag<"H">;
4823 def _SLASH_homeparams : CLFlag<"homeparams">;
4824 def _SLASH_hotpatch : CLFlag<"hotpatch">;
4825 def _SLASH_kernel : CLFlag<"kernel">;
4826 def _SLASH_LN : CLFlag<"LN">;
4827 def _SLASH_MP : CLJoined<"MP">;
4828 def _SLASH_Qfast_transcendentals : CLFlag<"Qfast_transcendentals">;
4829 def _SLASH_QIfist : CLFlag<"QIfist">;
4830 def _SLASH_QIntel_jcc_erratum : CLFlag<"QIntel-jcc-erratum">;
4831 def _SLASH_Qimprecise_fwaits : CLFlag<"Qimprecise_fwaits">;
4832 def _SLASH_Qpar : CLFlag<"Qpar">;
4833 def _SLASH_Qpar_report : CLJoined<"Qpar-report">;
4834 def _SLASH_Qsafe_fp_loads : CLFlag<"Qsafe_fp_loads">;
4835 def _SLASH_Qspectre : CLFlag<"Qspectre">;
4836 def _SLASH_Qspectre_load : CLFlag<"Qspectre-load">;
4837 def _SLASH_Qspectre_load_cf : CLFlag<"Qspectre-load-cf">;
4838 def _SLASH_Qvec_report : CLJoined<"Qvec-report">;
4839 def _SLASH_u : CLFlag<"u">;
4840 def _SLASH_V : CLFlag<"V">;
4841 def _SLASH_WL : CLFlag<"WL">;
4842 def _SLASH_Wp64 : CLFlag<"Wp64">;
4843 def _SLASH_Yd : CLFlag<"Yd">;
4844 def _SLASH_Yl : CLJoined<"Yl">;
4845 def _SLASH_Za : CLFlag<"Za">;
4846 def _SLASH_Zc : CLJoined<"Zc:">;
4847 def _SLASH_Ze : CLFlag<"Ze">;
4848 def _SLASH_Zg : CLFlag<"Zg">;
4849 def _SLASH_ZI : CLFlag<"ZI">;
4850 def _SLASH_ZW : CLJoined<"ZW">;