xref: /netbsd-src/external/apache2/llvm/dist/clang/include/clang/Driver/Options.td (revision e038c9c4676b0f19b1b7dd08a940c6ed64a6d5ae)
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.
14include "llvm/Option/OptParser.td"
15
16/////////
17// Flags
18
19// The option is a "driver"-only option, and should not be forwarded to other
20// tools via `-Xarch` options.
21def NoXarchOption : OptionFlag;
22
23// LinkerInput - The option is a linker input.
24def 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.
29def NoArgumentUnused : OptionFlag;
30
31// Unsupported - The option is unsupported, and the driver will reject command
32// lines that use it.
33def Unsupported : OptionFlag;
34
35// Ignored - The option is unsupported, and the driver will silently ignore it.
36def Ignored : OptionFlag;
37
38// CoreOption - This is considered a "core" Clang option, available in both
39// clang and clang-cl modes.
40def 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.
44def CLOption : OptionFlag;
45
46// CC1Option - This option should be accepted by clang -cc1.
47def CC1Option : OptionFlag;
48
49// CC1AsOption - This option should be accepted by clang -cc1as.
50def CC1AsOption : OptionFlag;
51
52// NoDriverOption - This option should not be accepted by the driver.
53def NoDriverOption : OptionFlag;
54
55// If an option affects linking, but has a primary group (so Link_Group cannot
56// be used), add this flag.
57def LinkOption : OptionFlag;
58
59// FlangOption - This is considered a "core" Flang option, available in
60// flang mode.
61def FlangOption : OptionFlag;
62
63// FlangOnlyOption - This option should only be used by Flang (i.e. it is not
64// available for Clang)
65def FlangOnlyOption : OptionFlag;
66
67// FC1Option - This option should be accepted by flang -fc1.
68def FC1Option : OptionFlag;
69
70// A short name to show in documentation. The name will be interpreted as rST.
71class DocName<string name> { string DocName = name; }
72
73// A brief description to show in documentation, interpreted as rST.
74class DocBrief<code descr> { code DocBrief = descr; }
75
76// Indicates that this group should be flattened into its parent when generating
77// documentation.
78class DocFlatten { bit DocFlatten = 1; }
79
80// Indicates that this warning is ignored, but accepted with a warning for
81// GCC compatibility.
82class IgnoredGCCCompat : Flags<[HelpHidden]> {}
83
84/////////
85// Groups
86
87def Action_Group : OptionGroup<"<action group>">, DocName<"Actions">,
88                   DocBrief<[{The action to perform on the input.}]>;
89
90// Meta-group for options which are only used for compilation,
91// and not linking etc.
92def CompileOnly_Group : OptionGroup<"<CompileOnly group>">,
93                        DocName<"Compilation flags">, DocBrief<[{
94Flags controlling the behavior of Clang during compilation. These flags have
95no effect during actions that do not perform compilation.}]>;
96
97def Preprocessor_Group : OptionGroup<"<Preprocessor group>">,
98                         Group<CompileOnly_Group>,
99                         DocName<"Preprocessor flags">, DocBrief<[{
100Flags controlling the behavior of the Clang preprocessor.}]>;
101
102def IncludePath_Group : OptionGroup<"<I/i group>">, Group<Preprocessor_Group>,
103                        DocName<"Include path management">,
104                        DocBrief<[{
105Flags controlling how ``#include``\s are resolved to files.}]>;
106
107def I_Group : OptionGroup<"<I group>">, Group<IncludePath_Group>, DocFlatten;
108def i_Group : OptionGroup<"<i group>">, Group<IncludePath_Group>, DocFlatten;
109def clang_i_Group : OptionGroup<"<clang i group>">, Group<i_Group>, DocFlatten;
110
111def M_Group : OptionGroup<"<M group>">, Group<Preprocessor_Group>,
112              DocName<"Dependency file generation">, DocBrief<[{
113Flags controlling generation of a dependency file for ``make``-like build
114systems.}]>;
115
116def d_Group : OptionGroup<"<d group>">, Group<Preprocessor_Group>,
117              DocName<"Dumping preprocessor state">, DocBrief<[{
118Flags allowing the state of the preprocessor to be dumped in various ways.}]>;
119
120def Diag_Group : OptionGroup<"<W/R group>">, Group<CompileOnly_Group>,
121                 DocName<"Diagnostic flags">, DocBrief<[{
122Flags controlling which warnings, errors, and remarks Clang will generate.
123See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.}]>;
124
125def R_Group : OptionGroup<"<R group>">, Group<Diag_Group>, DocFlatten;
126def R_value_Group : OptionGroup<"<R (with value) group>">, Group<R_Group>,
127                    DocFlatten;
128def W_Group : OptionGroup<"<W group>">, Group<Diag_Group>, DocFlatten;
129def W_value_Group : OptionGroup<"<W (with value) group>">, Group<W_Group>,
130                    DocFlatten;
131
132def f_Group : OptionGroup<"<f group>">, Group<CompileOnly_Group>,
133              DocName<"Target-independent compilation options">;
134
135def f_clang_Group : OptionGroup<"<f (clang-only) group>">,
136                    Group<CompileOnly_Group>, DocFlatten;
137def pedantic_Group : OptionGroup<"<pedantic group>">, Group<f_Group>,
138                     DocFlatten;
139def opencl_Group : OptionGroup<"<opencl group>">, Group<f_Group>,
140                   DocName<"OpenCL flags">;
141
142def sycl_Group : OptionGroup<"<SYCL group>">, Group<f_Group>,
143                 DocName<"SYCL flags">;
144
145def m_Group : OptionGroup<"<m group>">, Group<CompileOnly_Group>,
146              DocName<"Target-dependent compilation options">;
147
148// Feature groups - these take command line options that correspond directly to
149// target specific features and can be translated directly from command line
150// options.
151def m_aarch64_Features_Group : OptionGroup<"<aarch64 features group>">,
152                               Group<m_Group>, DocName<"AARCH64">;
153def m_amdgpu_Features_Group : OptionGroup<"<amdgpu features group>">,
154                              Group<m_Group>, DocName<"AMDGPU">;
155def m_arm_Features_Group : OptionGroup<"<arm features group>">,
156                           Group<m_Group>, DocName<"ARM">;
157def m_hexagon_Features_Group : OptionGroup<"<hexagon features group>">,
158                               Group<m_Group>, DocName<"Hexagon">;
159// The features added by this group will not be added to target features.
160// These are explicitly handled.
161def m_hexagon_Features_HVX_Group : OptionGroup<"<hexagon features group>">,
162                                   Group<m_Group>, DocName<"Hexagon">;
163def m_m68k_Features_Group: OptionGroup<"<m68k features group>">,
164                           Group<m_Group>, DocName<"M68k">;
165def m_mips_Features_Group : OptionGroup<"<mips features group>">,
166                            Group<m_Group>, DocName<"MIPS">;
167def m_ppc_Features_Group : OptionGroup<"<ppc features group>">,
168                           Group<m_Group>, DocName<"PowerPC">;
169def m_wasm_Features_Group : OptionGroup<"<wasm features group>">,
170                            Group<m_Group>, DocName<"WebAssembly">;
171// The features added by this group will not be added to target features.
172// These are explicitly handled.
173def m_wasm_Features_Driver_Group : OptionGroup<"<wasm driver features group>">,
174                                   Group<m_Group>, DocName<"WebAssembly Driver">;
175def m_x86_Features_Group : OptionGroup<"<x86 features group>">,
176                           Group<m_Group>, Flags<[CoreOption]>, DocName<"X86">;
177def m_riscv_Features_Group : OptionGroup<"<riscv features group>">,
178                             Group<m_Group>, DocName<"RISCV">;
179
180def m_libc_Group : OptionGroup<"<m libc group>">, Group<m_mips_Features_Group>,
181                   Flags<[HelpHidden]>;
182
183def O_Group : OptionGroup<"<O group>">, Group<CompileOnly_Group>,
184              DocName<"Optimization level">, DocBrief<[{
185Flags controlling how much optimization should be performed.}]>;
186
187def DebugInfo_Group : OptionGroup<"<g group>">, Group<CompileOnly_Group>,
188                      DocName<"Debug information generation">, DocBrief<[{
189Flags controlling how much and what kind of debug information should be
190generated.}]>;
191
192def g_Group : OptionGroup<"<g group>">, Group<DebugInfo_Group>,
193              DocName<"Kind and level of debug information">;
194def gN_Group : OptionGroup<"<gN group>">, Group<g_Group>,
195               DocName<"Debug level">;
196def ggdbN_Group : OptionGroup<"<ggdbN group>">, Group<gN_Group>, DocFlatten;
197def gTune_Group : OptionGroup<"<gTune group>">, Group<g_Group>,
198                  DocName<"Debugger to tune debug information for">;
199def g_flags_Group : OptionGroup<"<g flags group>">, Group<DebugInfo_Group>,
200                    DocName<"Debug information flags">;
201
202def StaticAnalyzer_Group : OptionGroup<"<Static analyzer group>">,
203                           DocName<"Static analyzer flags">, DocBrief<[{
204Flags controlling the behavior of the Clang Static Analyzer.}]>;
205
206// gfortran options that we recognize in the driver and pass along when
207// invoking GCC to compile Fortran code.
208def gfortran_Group : OptionGroup<"<gfortran group>">,
209                     DocName<"Fortran compilation flags">, DocBrief<[{
210Flags that will be passed onto the ``gfortran`` compiler when Clang is given
211a Fortran input.}]>;
212
213def Link_Group : OptionGroup<"<T/e/s/t/u group>">, DocName<"Linker flags">,
214                 DocBrief<[{Flags that are passed on to the linker}]>;
215def T_Group : OptionGroup<"<T group>">, Group<Link_Group>, DocFlatten;
216def u_Group : OptionGroup<"<u group>">, Group<Link_Group>, DocFlatten;
217
218def reserved_lib_Group : OptionGroup<"<reserved libs group>">,
219                         Flags<[Unsupported]>;
220
221// Temporary groups for clang options which we know we don't support,
222// but don't want to verbosely warn the user about.
223def clang_ignored_f_Group : OptionGroup<"<clang ignored f group>">,
224  Group<f_Group>, Flags<[Ignored]>;
225def clang_ignored_m_Group : OptionGroup<"<clang ignored m group>">,
226  Group<m_Group>, Flags<[Ignored]>;
227
228// Group for clang options in the process of deprecation.
229// Please include the version that deprecated the flag as comment to allow
230// easier garbage collection.
231def clang_ignored_legacy_options_Group : OptionGroup<"<clang legacy flags>">,
232  Group<f_Group>, Flags<[Ignored]>;
233
234// Retired with clang-5.0
235def : Flag<["-"], "fslp-vectorize-aggressive">, Group<clang_ignored_legacy_options_Group>;
236def : Flag<["-"], "fno-slp-vectorize-aggressive">, Group<clang_ignored_legacy_options_Group>;
237
238// Retired with clang-10.0. Previously controlled X86 MPX ISA.
239def mmpx : Flag<["-"], "mmpx">, Group<clang_ignored_legacy_options_Group>;
240def mno_mpx : Flag<["-"], "mno-mpx">, Group<clang_ignored_legacy_options_Group>;
241
242// Group that ignores all gcc optimizations that won't be implemented
243def clang_ignored_gcc_optimization_f_Group : OptionGroup<
244  "<clang_ignored_gcc_optimization_f_Group>">, Group<f_Group>, Flags<[Ignored]>;
245
246class DiagnosticOpts<string base>
247  : KeyPathAndMacro<"DiagnosticOpts->", base, "DIAG_"> {}
248class LangOpts<string base>
249  : KeyPathAndMacro<"LangOpts->", base, "LANG_"> {}
250class TargetOpts<string base>
251  : KeyPathAndMacro<"TargetOpts->", base, "TARGET_"> {}
252class FrontendOpts<string base>
253  : KeyPathAndMacro<"FrontendOpts.", base, "FRONTEND_"> {}
254class PreprocessorOutputOpts<string base>
255  : KeyPathAndMacro<"PreprocessorOutputOpts.", base, "PREPROCESSOR_OUTPUT_"> {}
256class DependencyOutputOpts<string base>
257  : KeyPathAndMacro<"DependencyOutputOpts.", base, "DEPENDENCY_OUTPUT_"> {}
258class CodeGenOpts<string base>
259  : KeyPathAndMacro<"CodeGenOpts.", base, "CODEGEN_"> {}
260class HeaderSearchOpts<string base>
261  : KeyPathAndMacro<"HeaderSearchOpts->", base, "HEADER_SEARCH_"> {}
262class PreprocessorOpts<string base>
263  : KeyPathAndMacro<"PreprocessorOpts->", base, "PREPROCESSOR_"> {}
264class FileSystemOpts<string base>
265  : KeyPathAndMacro<"FileSystemOpts.", base, "FILE_SYSTEM_"> {}
266class AnalyzerOpts<string base>
267  : KeyPathAndMacro<"AnalyzerOpts->", base, "ANALYZER_"> {}
268class MigratorOpts<string base>
269  : KeyPathAndMacro<"MigratorOpts.", base, "MIGRATOR_"> {}
270
271// A boolean option which is opt-in in CC1. The positive option exists in CC1 and
272// Args.hasArg(OPT_ffoo) can be used to check that the flag is enabled.
273// This is useful if the option is usually disabled.
274// Use this only when the option cannot be declared via BoolFOption.
275multiclass OptInFFlag<string name, string pos_prefix, string neg_prefix="",
276                      string help="", list<OptionFlag> flags=[]> {
277  def f#NAME : Flag<["-"], "f"#name>, Flags<[CC1Option] # flags>,
278               Group<f_Group>, HelpText<pos_prefix # help>;
279  def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<flags>,
280                  Group<f_Group>, HelpText<neg_prefix # help>;
281}
282
283// A boolean option which is opt-out in CC1. The negative option exists in CC1 and
284// Args.hasArg(OPT_fno_foo) can be used to check that the flag is disabled.
285// Use this only when the option cannot be declared via BoolFOption.
286multiclass OptOutFFlag<string name, string pos_prefix, string neg_prefix,
287                       string help="", list<OptionFlag> flags=[]> {
288  def f#NAME : Flag<["-"], "f"#name>, Flags<flags>,
289               Group<f_Group>, HelpText<pos_prefix # help>;
290  def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<[CC1Option] # flags>,
291                  Group<f_Group>, HelpText<neg_prefix # help>;
292}
293
294// Creates a positive and negative flags where both of them are prefixed with
295// "m", have help text specified for positive and negative option, and a Group
296// optionally specified by the opt_group argument, otherwise Group<m_Group>.
297multiclass SimpleMFlag<string name, string pos_prefix, string neg_prefix,
298                       string help, OptionGroup opt_group = m_Group> {
299  def m#NAME : Flag<["-"], "m"#name>, Group<opt_group>,
300    HelpText<pos_prefix # help>;
301  def mno_#NAME : Flag<["-"], "mno-"#name>, Group<opt_group>,
302    HelpText<neg_prefix # help>;
303}
304
305//===----------------------------------------------------------------------===//
306// BoolOption
307//===----------------------------------------------------------------------===//
308
309// The default value of a marshalled key path.
310class Default<code value> { code Value = value; }
311
312// Convenience variables for boolean defaults.
313def DefaultTrue : Default<"true"> {}
314def DefaultFalse : Default<"false"> {}
315
316// The value set to the key path when the flag is present on the command line.
317class Set<bit value> { bit Value = value; }
318def SetTrue : Set<true> {}
319def SetFalse : Set<false> {}
320
321// Definition of single command line flag. This is an implementation detail, use
322// SetTrueBy or SetFalseBy instead.
323class FlagDef<bit polarity, bit value, list<OptionFlag> option_flags,
324              string help, list<code> implied_by_expressions = []> {
325  // The polarity. Besides spelling, this also decides whether the TableGen
326  // record will be prefixed with "no_".
327  bit Polarity = polarity;
328
329  // The value assigned to key path when the flag is present on command line.
330  bit Value = value;
331
332  // OptionFlags that control visibility of the flag in different tools.
333  list<OptionFlag> OptionFlags = option_flags;
334
335  // The help text associated with the flag.
336  string Help = help;
337
338  // List of expressions that, when true, imply this flag.
339  list<code> ImpliedBy = implied_by_expressions;
340}
341
342// Additional information to be appended to both positive and negative flag.
343class BothFlags<list<OptionFlag> option_flags, string help = ""> {
344  list<OptionFlag> OptionFlags = option_flags;
345  string Help = help;
346}
347
348// Functor that appends the suffix to the base flag definition.
349class ApplySuffix<FlagDef flag, BothFlags suffix> {
350  FlagDef Result
351    = FlagDef<flag.Polarity, flag.Value,
352              flag.OptionFlags # suffix.OptionFlags,
353              flag.Help # suffix.Help, flag.ImpliedBy>;
354}
355
356// Definition of the command line flag with positive spelling, e.g. "-ffoo".
357class PosFlag<Set value, list<OptionFlag> flags = [], string help = "",
358              list<code> implied_by_expressions = []>
359  : FlagDef<true, value.Value, flags, help, implied_by_expressions> {}
360
361// Definition of the command line flag with negative spelling, e.g. "-fno-foo".
362class NegFlag<Set value, list<OptionFlag> flags = [], string help = "",
363              list<code> implied_by_expressions = []>
364  : FlagDef<false, value.Value, flags, help, implied_by_expressions> {}
365
366// Expanded FlagDef that's convenient for creation of TableGen records.
367class FlagDefExpanded<FlagDef flag, string prefix, string name, string spelling>
368  : FlagDef<flag.Polarity, flag.Value, flag.OptionFlags, flag.Help,
369            flag.ImpliedBy> {
370  // Name of the TableGen record.
371  string RecordName = prefix # !if(flag.Polarity, "", "no_") # name;
372
373  // Spelling of the flag.
374  string Spelling = prefix # !if(flag.Polarity, "", "no-") # spelling;
375
376  // Can the flag be implied by another flag?
377  bit CanBeImplied = !not(!empty(flag.ImpliedBy));
378
379  // C++ code that will be assigned to the keypath when the flag is present.
380  code ValueAsCode = !if(flag.Value, "true", "false");
381}
382
383// TableGen record for a single marshalled flag.
384class MarshalledFlagRec<FlagDefExpanded flag, FlagDefExpanded other,
385                        FlagDefExpanded implied, KeyPathAndMacro kpm,
386                        Default default>
387  : Flag<["-"], flag.Spelling>, Flags<flag.OptionFlags>, HelpText<flag.Help>,
388    MarshallingInfoBooleanFlag<kpm, default.Value, flag.ValueAsCode,
389                               flag.RecordName, other.ValueAsCode,
390                               other.RecordName>,
391    ImpliedByAnyOf<implied.ImpliedBy, implied.ValueAsCode> {}
392
393// Generates TableGen records for two command line flags that control the same
394// key path via the marshalling infrastructure.
395// Names of the records consist of the specified prefix, "no_" for the negative
396// flag, and NAME.
397// Used for -cc1 frontend options. Driver-only options do not map to
398// CompilerInvocation.
399multiclass BoolOption<string prefix = "", string spelling_base,
400                      KeyPathAndMacro kpm, Default default,
401                      FlagDef flag1_base, FlagDef flag2_base,
402                      BothFlags suffix = BothFlags<[], "">> {
403  defvar flag1 = FlagDefExpanded<ApplySuffix<flag1_base, suffix>.Result, prefix,
404                                 NAME, spelling_base>;
405
406  defvar flag2 = FlagDefExpanded<ApplySuffix<flag2_base, suffix>.Result, prefix,
407                                 NAME, spelling_base>;
408
409  // The flags must have different polarity, different values, and only
410  // one can be implied.
411  assert !xor(flag1.Polarity, flag2.Polarity),
412         "the flags must have different polarity: flag1: " #
413             flag1.Polarity # ", flag2: " # flag2.Polarity;
414  assert !ne(flag1.Value, flag2.Value),
415         "the flags must have different values: flag1: " #
416             flag1.Value # ", flag2: " # flag2.Value;
417  assert !not(!and(flag1.CanBeImplied, flag2.CanBeImplied)),
418         "only one of the flags can be implied: flag1: " #
419             flag1.CanBeImplied # ", flag2: " # flag2.CanBeImplied;
420
421  defvar implied = !if(flag1.CanBeImplied, flag1, flag2);
422
423  def flag1.RecordName : MarshalledFlagRec<flag1, flag2, implied, kpm, default>;
424  def flag2.RecordName : MarshalledFlagRec<flag2, flag1, implied, kpm, default>;
425}
426
427/// Creates a BoolOption where both of the flags are prefixed with "f", are in
428/// the Group<f_Group>.
429/// Used for -cc1 frontend options. Driver-only options do not map to
430/// CompilerInvocation.
431multiclass BoolFOption<string flag_base, KeyPathAndMacro kpm,
432                       Default default, FlagDef flag1, FlagDef flag2,
433                       BothFlags both = BothFlags<[], "">> {
434  defm NAME : BoolOption<"f", flag_base, kpm, default, flag1, flag2, both>,
435              Group<f_Group>;
436}
437
438// Creates a BoolOption where both of the flags are prefixed with "g" and have
439// the Group<g_Group>.
440// Used for -cc1 frontend options. Driver-only options do not map to
441// CompilerInvocation.
442multiclass BoolGOption<string flag_base, KeyPathAndMacro kpm,
443                       Default default, FlagDef flag1, FlagDef flag2,
444                       BothFlags both = BothFlags<[], "">> {
445  defm NAME : BoolOption<"g", flag_base, kpm, default, flag1, flag2, both>,
446              Group<g_Group>;
447}
448
449// FIXME: Diagnose if target does not support protected visibility.
450class MarshallingInfoVisibility<KeyPathAndMacro kpm, code default>
451  : MarshallingInfoEnum<kpm, default>,
452    Values<"default,hidden,internal,protected">,
453    NormalizedValues<["DefaultVisibility", "HiddenVisibility",
454                      "HiddenVisibility", "ProtectedVisibility"]> {}
455
456// Key paths that are constant during parsing of options with the same key path prefix.
457defvar cplusplus = LangOpts<"CPlusPlus">;
458defvar cpp11 = LangOpts<"CPlusPlus11">;
459defvar cpp17 = LangOpts<"CPlusPlus17">;
460defvar cpp20 = LangOpts<"CPlusPlus20">;
461defvar c99 = LangOpts<"C99">;
462defvar c2x = LangOpts<"C2x">;
463defvar lang_std = LangOpts<"LangStd">;
464defvar open_cl = LangOpts<"OpenCL">;
465defvar cuda = LangOpts<"CUDA">;
466defvar render_script = LangOpts<"RenderScript">;
467defvar hip = LangOpts<"HIP">;
468defvar gnu_mode = LangOpts<"GNUMode">;
469defvar asm_preprocessor = LangOpts<"AsmPreprocessor">;
470defvar cpp_modules = LangOpts<"CPlusPlusModules">;
471
472defvar std = !strconcat("LangStandard::getLangStandardForKind(", lang_std.KeyPath, ")");
473
474/////////
475// Options
476
477// The internal option ID must be a valid C++ identifier and results in a
478// clang::driver::options::OPT_XX enum constant for XX.
479//
480// We want to unambiguously be able to refer to options from the driver source
481// code, for this reason the option name is mangled into an ID. This mangling
482// isn't guaranteed to have an inverse, but for practical purposes it does.
483//
484// The mangling scheme is to ignore the leading '-', and perform the following
485// substitutions:
486//   _ => __
487//   - => _
488//   / => _SLASH
489//   # => _HASH
490//   ? => _QUESTION
491//   , => _COMMA
492//   = => _EQ
493//   C++ => CXX
494//   . => _
495
496// Developer Driver Options
497
498def internal_Group : OptionGroup<"<clang internal options>">, Flags<[HelpHidden]>;
499def internal_driver_Group : OptionGroup<"<clang driver internal options>">,
500  Group<internal_Group>, HelpText<"DRIVER OPTIONS">;
501def internal_debug_Group :
502  OptionGroup<"<clang debug/development internal options>">,
503  Group<internal_Group>, HelpText<"DEBUG/DEVELOPMENT OPTIONS">;
504
505class InternalDriverOpt : Group<internal_driver_Group>,
506  Flags<[NoXarchOption, HelpHidden]>;
507def driver_mode : Joined<["--"], "driver-mode=">, Group<internal_driver_Group>,
508  Flags<[CoreOption, NoXarchOption, HelpHidden]>,
509  HelpText<"Set the driver mode to either 'gcc', 'g++', 'cpp', or 'cl'">;
510def rsp_quoting : Joined<["--"], "rsp-quoting=">, Group<internal_driver_Group>,
511  Flags<[CoreOption, NoXarchOption, HelpHidden]>,
512  HelpText<"Set the rsp quoting to either 'posix', or 'windows'">;
513def ccc_gcc_name : Separate<["-"], "ccc-gcc-name">, InternalDriverOpt,
514  HelpText<"Name for native GCC compiler">,
515  MetaVarName<"<gcc-path>">;
516
517class InternalDebugOpt : Group<internal_debug_Group>,
518  Flags<[NoXarchOption, HelpHidden, CoreOption]>;
519def ccc_install_dir : Separate<["-"], "ccc-install-dir">, InternalDebugOpt,
520  HelpText<"Simulate installation in the given directory">;
521def ccc_print_phases : Flag<["-"], "ccc-print-phases">, InternalDebugOpt,
522  HelpText<"Dump list of actions to perform">;
523def ccc_print_bindings : Flag<["-"], "ccc-print-bindings">, InternalDebugOpt,
524  HelpText<"Show bindings of tools to actions">;
525
526def ccc_arcmt_check : Flag<["-"], "ccc-arcmt-check">, InternalDriverOpt,
527  HelpText<"Check for ARC migration issues that need manual handling">;
528def ccc_arcmt_modify : Flag<["-"], "ccc-arcmt-modify">, InternalDriverOpt,
529  HelpText<"Apply modifications to files to conform to ARC">;
530def ccc_arcmt_migrate : Separate<["-"], "ccc-arcmt-migrate">, InternalDriverOpt,
531  HelpText<"Apply modifications and produces temporary files that conform to ARC">;
532def arcmt_migrate_report_output : Separate<["-"], "arcmt-migrate-report-output">,
533  HelpText<"Output path for the plist report">,  Flags<[CC1Option]>,
534  MarshallingInfoString<FrontendOpts<"ARCMTMigrateReportOut">>;
535def arcmt_migrate_emit_arc_errors : Flag<["-"], "arcmt-migrate-emit-errors">,
536  HelpText<"Emit ARC errors even if the migrator can fix them">, Flags<[CC1Option]>,
537  MarshallingInfoFlag<FrontendOpts<"ARCMTMigrateEmitARCErrors">>;
538def gen_reproducer: Flag<["-"], "gen-reproducer">, InternalDebugOpt,
539  HelpText<"Auto-generates preprocessed source files and a reproduction script">;
540def gen_cdb_fragment_path: Separate<["-"], "gen-cdb-fragment-path">, InternalDebugOpt,
541  HelpText<"Emit a compilation database fragment to the specified directory">;
542
543def round_trip_args : Flag<["-"], "round-trip-args">, Flags<[CC1Option, NoDriverOption]>,
544  HelpText<"Enable command line arguments round-trip.">;
545def no_round_trip_args : Flag<["-"], "no-round-trip-args">, Flags<[CC1Option, NoDriverOption]>,
546  HelpText<"Disable command line arguments round-trip.">;
547
548def _migrate : Flag<["--"], "migrate">, Flags<[NoXarchOption]>,
549  HelpText<"Run the migrator">;
550def ccc_objcmt_migrate : Separate<["-"], "ccc-objcmt-migrate">,
551  InternalDriverOpt,
552  HelpText<"Apply modifications and produces temporary files to migrate to "
553   "modern ObjC syntax">;
554
555def objcmt_migrate_literals : Flag<["-"], "objcmt-migrate-literals">, Flags<[CC1Option]>,
556  HelpText<"Enable migration to modern ObjC literals">,
557  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Literals">;
558def objcmt_migrate_subscripting : Flag<["-"], "objcmt-migrate-subscripting">, Flags<[CC1Option]>,
559  HelpText<"Enable migration to modern ObjC subscripting">,
560  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Subscripting">;
561def objcmt_migrate_property : Flag<["-"], "objcmt-migrate-property">, Flags<[CC1Option]>,
562  HelpText<"Enable migration to modern ObjC property">,
563  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Property">;
564def objcmt_migrate_all : Flag<["-"], "objcmt-migrate-all">, Flags<[CC1Option]>,
565  HelpText<"Enable migration to modern ObjC">,
566  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_MigrateDecls">;
567def objcmt_migrate_readonly_property : Flag<["-"], "objcmt-migrate-readonly-property">, Flags<[CC1Option]>,
568  HelpText<"Enable migration to modern ObjC readonly property">,
569  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ReadonlyProperty">;
570def objcmt_migrate_readwrite_property : Flag<["-"], "objcmt-migrate-readwrite-property">, Flags<[CC1Option]>,
571  HelpText<"Enable migration to modern ObjC readwrite property">,
572  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ReadwriteProperty">;
573def objcmt_migrate_property_dot_syntax : Flag<["-"], "objcmt-migrate-property-dot-syntax">, Flags<[CC1Option]>,
574  HelpText<"Enable migration of setter/getter messages to property-dot syntax">,
575  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_PropertyDotSyntax">;
576def objcmt_migrate_annotation : Flag<["-"], "objcmt-migrate-annotation">, Flags<[CC1Option]>,
577  HelpText<"Enable migration to property and method annotations">,
578  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Annotation">;
579def objcmt_migrate_instancetype : Flag<["-"], "objcmt-migrate-instancetype">, Flags<[CC1Option]>,
580  HelpText<"Enable migration to infer instancetype for method result type">,
581  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Instancetype">;
582def objcmt_migrate_nsmacros : Flag<["-"], "objcmt-migrate-ns-macros">, Flags<[CC1Option]>,
583  HelpText<"Enable migration to NS_ENUM/NS_OPTIONS macros">,
584  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_NsMacros">;
585def objcmt_migrate_protocol_conformance : Flag<["-"], "objcmt-migrate-protocol-conformance">, Flags<[CC1Option]>,
586  HelpText<"Enable migration to add protocol conformance on classes">,
587  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ProtocolConformance">;
588def objcmt_atomic_property : Flag<["-"], "objcmt-atomic-property">, Flags<[CC1Option]>,
589  HelpText<"Make migration to 'atomic' properties">,
590  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_AtomicProperty">;
591def objcmt_returns_innerpointer_property : Flag<["-"], "objcmt-returns-innerpointer-property">, Flags<[CC1Option]>,
592  HelpText<"Enable migration to annotate property with NS_RETURNS_INNER_POINTER">,
593  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ReturnsInnerPointerProperty">;
594def objcmt_ns_nonatomic_iosonly: Flag<["-"], "objcmt-ns-nonatomic-iosonly">, Flags<[CC1Option]>,
595  HelpText<"Enable migration to use NS_NONATOMIC_IOSONLY macro for setting property's 'atomic' attribute">,
596  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_NsAtomicIOSOnlyProperty">;
597def objcmt_migrate_designated_init : Flag<["-"], "objcmt-migrate-designated-init">, Flags<[CC1Option]>,
598  HelpText<"Enable migration to infer NS_DESIGNATED_INITIALIZER for initializer methods">,
599  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_DesignatedInitializer">;
600
601def objcmt_whitelist_dir_path: Joined<["-"], "objcmt-whitelist-dir-path=">, Flags<[CC1Option]>,
602  HelpText<"Only modify files with a filename contained in the provided directory path">,
603  MarshallingInfoString<FrontendOpts<"ObjCMTWhiteListPath">>;
604// The misspelt "white-list" [sic] alias is due for removal.
605def : Joined<["-"], "objcmt-white-list-dir-path=">, Flags<[CC1Option]>,
606    Alias<objcmt_whitelist_dir_path>;
607
608// Make sure all other -ccc- options are rejected.
609def ccc_ : Joined<["-"], "ccc-">, Group<internal_Group>, Flags<[Unsupported]>;
610
611// Standard Options
612
613def _HASH_HASH_HASH : Flag<["-"], "###">, Flags<[NoXarchOption, CoreOption, FlangOption]>,
614    HelpText<"Print (but do not run) the commands to run for this compilation">;
615def _DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>,
616    Flags<[NoXarchOption, CoreOption]>;
617def A : JoinedOrSeparate<["-"], "A">, Flags<[RenderJoined]>, Group<gfortran_Group>;
618def B : JoinedOrSeparate<["-"], "B">, MetaVarName<"<prefix>">,
619    HelpText<"Search $prefix/$triple-$file and $prefix$file for executables, libraries, "
620    "includes, and data files used by the compiler. $prefix may or may not be a directory">;
621def gcc_toolchain : Joined<["--"], "gcc-toolchain=">, Flags<[NoXarchOption]>,
622  HelpText<"Search for GCC installation in the specified directory on targets which commonly use GCC. "
623  "The directory usually contains 'lib{,32,64}/gcc{,-cross}/$triple' and 'include'. If specified, "
624  "sysroot is skipped for GCC detection. Note: executables (e.g. ld) used by the compiler are not "
625  "overridden by the selected GCC installation">;
626def CC : Flag<["-"], "CC">, Flags<[CC1Option]>, Group<Preprocessor_Group>,
627    HelpText<"Include comments from within macros in preprocessed output">,
628    MarshallingInfoFlag<PreprocessorOutputOpts<"ShowMacroComments">>;
629def C : Flag<["-"], "C">, Flags<[CC1Option]>, Group<Preprocessor_Group>,
630    HelpText<"Include comments in preprocessed output">,
631    MarshallingInfoFlag<PreprocessorOutputOpts<"ShowComments">>;
632def D : JoinedOrSeparate<["-"], "D">, Group<Preprocessor_Group>,
633    Flags<[CC1Option, FlangOption, FC1Option]>, MetaVarName<"<macro>=<value>">,
634    HelpText<"Define <macro> to <value> (or 1 if <value> omitted)">;
635def E : Flag<["-"], "E">, Flags<[NoXarchOption,CC1Option, FlangOption, FC1Option]>, Group<Action_Group>,
636    HelpText<"Only run the preprocessor">;
637def F : JoinedOrSeparate<["-"], "F">, Flags<[RenderJoined,CC1Option]>,
638    HelpText<"Add directory to framework include search path">;
639def G : JoinedOrSeparate<["-"], "G">, Flags<[NoXarchOption]>, Group<m_Group>,
640    MetaVarName<"<size>">, HelpText<"Put objects of at most <size> bytes "
641    "into small data section (MIPS / Hexagon)">;
642def G_EQ : Joined<["-"], "G=">, Flags<[NoXarchOption]>, Group<m_Group>, Alias<G>;
643def H : Flag<["-"], "H">, Flags<[CC1Option]>, Group<Preprocessor_Group>,
644    HelpText<"Show header includes and nesting depth">,
645    MarshallingInfoFlag<DependencyOutputOpts<"ShowHeaderIncludes">>;
646def fshow_skipped_includes : Flag<["-"], "fshow-skipped-includes">,
647  Flags<[CC1Option]>, HelpText<"Show skipped includes in -H output.">,
648  DocBrief<[{#include files may be "skipped" due to include guard optimization
649             or #pragma once. This flag makes -H show also such includes.}]>,
650  MarshallingInfoFlag<DependencyOutputOpts<"ShowSkippedHeaderIncludes">>;
651
652def I_ : Flag<["-"], "I-">, Group<I_Group>,
653    HelpText<"Restrict all prior -I flags to double-quoted inclusion and "
654             "remove current directory from include path">;
655def I : JoinedOrSeparate<["-"], "I">, Group<I_Group>,
656    Flags<[CC1Option,CC1AsOption,FlangOption,FC1Option]>, MetaVarName<"<dir>">,
657    HelpText<"Add directory to the end of the list of include search paths">,
658    DocBrief<[{Add directory to include search path. For C++ inputs, if
659there are multiple -I options, these directories are searched
660in the order they are given before the standard system directories
661are searched. If the same directory is in the SYSTEM include search
662paths, for example if also specified with -isystem, the -I option
663will be ignored}]>;
664def L : JoinedOrSeparate<["-"], "L">, Flags<[RenderJoined]>, Group<Link_Group>,
665    MetaVarName<"<dir>">, HelpText<"Add directory to library search path">;
666def MD : Flag<["-"], "MD">, Group<M_Group>,
667    HelpText<"Write a depfile containing user and system headers">;
668def MMD : Flag<["-"], "MMD">, Group<M_Group>,
669    HelpText<"Write a depfile containing user headers">;
670def M : Flag<["-"], "M">, Group<M_Group>,
671    HelpText<"Like -MD, but also implies -E and writes to stdout by default">;
672def MM : Flag<["-"], "MM">, Group<M_Group>,
673    HelpText<"Like -MMD, but also implies -E and writes to stdout by default">;
674def MF : JoinedOrSeparate<["-"], "MF">, Group<M_Group>,
675    HelpText<"Write depfile output from -MMD, -MD, -MM, or -M to <file>">,
676    MetaVarName<"<file>">;
677def MG : Flag<["-"], "MG">, Group<M_Group>, Flags<[CC1Option]>,
678    HelpText<"Add missing headers to depfile">,
679    MarshallingInfoFlag<DependencyOutputOpts<"AddMissingHeaderDeps">>;
680def MJ : JoinedOrSeparate<["-"], "MJ">, Group<M_Group>,
681    HelpText<"Write a compilation database entry per input">;
682def MP : Flag<["-"], "MP">, Group<M_Group>, Flags<[CC1Option]>,
683    HelpText<"Create phony target for each dependency (other than main file)">,
684    MarshallingInfoFlag<DependencyOutputOpts<"UsePhonyTargets">>;
685def MQ : JoinedOrSeparate<["-"], "MQ">, Group<M_Group>, Flags<[CC1Option]>,
686    HelpText<"Specify name of main file output to quote in depfile">;
687def MT : JoinedOrSeparate<["-"], "MT">, Group<M_Group>, Flags<[CC1Option]>,
688    HelpText<"Specify name of main file output in depfile">,
689    MarshallingInfoStringVector<DependencyOutputOpts<"Targets">>;
690def MV : Flag<["-"], "MV">, Group<M_Group>, Flags<[CC1Option]>,
691    HelpText<"Use NMake/Jom format for the depfile">,
692    MarshallingInfoFlag<DependencyOutputOpts<"OutputFormat">, "DependencyOutputFormat::Make">,
693    Normalizer<"makeFlagToValueNormalizer(DependencyOutputFormat::NMake)">;
694def Mach : Flag<["-"], "Mach">, Group<Link_Group>;
695def O0 : Flag<["-"], "O0">, Group<O_Group>, Flags<[CC1Option, HelpHidden]>;
696def O4 : Flag<["-"], "O4">, Group<O_Group>, Flags<[CC1Option, HelpHidden]>;
697def ObjCXX : Flag<["-"], "ObjC++">, Flags<[NoXarchOption]>,
698  HelpText<"Treat source input files as Objective-C++ inputs">;
699def ObjC : Flag<["-"], "ObjC">, Flags<[NoXarchOption]>,
700  HelpText<"Treat source input files as Objective-C inputs">;
701def O : Joined<["-"], "O">, Group<O_Group>, Flags<[CC1Option]>;
702def O_flag : Flag<["-"], "O">, Flags<[CC1Option]>, Alias<O>, AliasArgs<["1"]>;
703def Ofast : Joined<["-"], "Ofast">, Group<O_Group>, Flags<[CC1Option]>;
704def P : Flag<["-"], "P">, Flags<[CC1Option]>, Group<Preprocessor_Group>,
705  HelpText<"Disable linemarker output in -E mode">,
706  MarshallingInfoNegativeFlag<PreprocessorOutputOpts<"ShowLineMarkers">>;
707def Qy : Flag<["-"], "Qy">, Flags<[CC1Option]>,
708  HelpText<"Emit metadata containing compiler name and version">;
709def Qn : Flag<["-"], "Qn">, Flags<[CC1Option]>,
710  HelpText<"Do not emit metadata containing compiler name and version">;
711def : Flag<["-"], "fident">, Group<f_Group>, Alias<Qy>,
712  Flags<[CoreOption, CC1Option]>;
713def : Flag<["-"], "fno-ident">, Group<f_Group>, Alias<Qn>,
714  Flags<[CoreOption, CC1Option]>;
715def Qunused_arguments : Flag<["-"], "Qunused-arguments">, Flags<[NoXarchOption, CoreOption]>,
716  HelpText<"Don't emit warning for unused driver arguments">;
717def Q : Flag<["-"], "Q">, IgnoredGCCCompat;
718def Rpass_EQ : Joined<["-"], "Rpass=">, Group<R_value_Group>, Flags<[CC1Option]>,
719  HelpText<"Report transformations performed by optimization passes whose "
720           "name matches the given POSIX regular expression">;
721def Rpass_missed_EQ : Joined<["-"], "Rpass-missed=">, Group<R_value_Group>,
722  Flags<[CC1Option]>,
723  HelpText<"Report missed transformations by optimization passes whose "
724           "name matches the given POSIX regular expression">;
725def Rpass_analysis_EQ : Joined<["-"], "Rpass-analysis=">, Group<R_value_Group>,
726  Flags<[CC1Option]>,
727  HelpText<"Report transformation analysis from optimization passes whose "
728           "name matches the given POSIX regular expression">;
729def R_Joined : Joined<["-"], "R">, Group<R_Group>, Flags<[CC1Option, CoreOption]>,
730  MetaVarName<"<remark>">, HelpText<"Enable the specified remark">;
731def S : Flag<["-"], "S">, Flags<[NoXarchOption,CC1Option]>, Group<Action_Group>,
732  HelpText<"Only run preprocess and compilation steps">;
733def Tbss : JoinedOrSeparate<["-"], "Tbss">, Group<T_Group>,
734  MetaVarName<"<addr>">, HelpText<"Set starting address of BSS to <addr>">;
735def Tdata : JoinedOrSeparate<["-"], "Tdata">, Group<T_Group>,
736  MetaVarName<"<addr>">, HelpText<"Set starting address of DATA to <addr>">;
737def Ttext : JoinedOrSeparate<["-"], "Ttext">, Group<T_Group>,
738  MetaVarName<"<addr>">, HelpText<"Set starting address of TEXT to <addr>">;
739def T : JoinedOrSeparate<["-"], "T">, Group<T_Group>,
740  MetaVarName<"<script>">, HelpText<"Specify <script> as linker script">;
741def U : JoinedOrSeparate<["-"], "U">, Group<Preprocessor_Group>,
742  Flags<[CC1Option, FlangOption, FC1Option]>, MetaVarName<"<macro>">, HelpText<"Undefine macro <macro>">;
743def V : JoinedOrSeparate<["-"], "V">, Flags<[NoXarchOption, Unsupported]>;
744def Wa_COMMA : CommaJoined<["-"], "Wa,">,
745  HelpText<"Pass the comma separated arguments in <arg> to the assembler">,
746  MetaVarName<"<arg>">;
747def Wall : Flag<["-"], "Wall">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
748def WCL4 : Flag<["-"], "WCL4">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
749def Wdeprecated : Flag<["-"], "Wdeprecated">, Group<W_Group>, Flags<[CC1Option]>,
750  HelpText<"Enable warnings for deprecated constructs and define __DEPRECATED">;
751def Wno_deprecated : Flag<["-"], "Wno-deprecated">, Group<W_Group>, Flags<[CC1Option]>;
752def Wl_COMMA : CommaJoined<["-"], "Wl,">, Flags<[LinkerInput, RenderAsInput]>,
753  HelpText<"Pass the comma separated arguments in <arg> to the linker">,
754  MetaVarName<"<arg>">, Group<Link_Group>;
755// FIXME: This is broken; these should not be Joined arguments.
756def Wno_nonportable_cfstrings : Joined<["-"], "Wno-nonportable-cfstrings">, Group<W_Group>,
757  Flags<[CC1Option]>;
758def Wnonportable_cfstrings : Joined<["-"], "Wnonportable-cfstrings">, Group<W_Group>,
759  Flags<[CC1Option]>;
760def Wp_COMMA : CommaJoined<["-"], "Wp,">,
761  HelpText<"Pass the comma separated arguments in <arg> to the preprocessor">,
762  MetaVarName<"<arg>">, Group<Preprocessor_Group>;
763def Wundef_prefix_EQ : CommaJoined<["-"], "Wundef-prefix=">, Group<W_value_Group>,
764  Flags<[CC1Option, CoreOption, HelpHidden]>, MetaVarName<"<arg>">,
765  HelpText<"Enable warnings for undefined macros with a prefix in the comma separated list <arg>">,
766  MarshallingInfoStringVector<DiagnosticOpts<"UndefPrefixes">>;
767def Wwrite_strings : Flag<["-"], "Wwrite-strings">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
768def Wno_write_strings : Flag<["-"], "Wno-write-strings">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
769def W_Joined : Joined<["-"], "W">, Group<W_Group>, Flags<[CC1Option, CoreOption, FC1Option, FlangOption]>,
770  MetaVarName<"<warning>">, HelpText<"Enable the specified warning">;
771def Xanalyzer : Separate<["-"], "Xanalyzer">,
772  HelpText<"Pass <arg> to the static analyzer">, MetaVarName<"<arg>">,
773  Group<StaticAnalyzer_Group>;
774def Xarch__ : JoinedAndSeparate<["-"], "Xarch_">, Flags<[NoXarchOption]>;
775def Xarch_host : Separate<["-"], "Xarch_host">, Flags<[NoXarchOption]>,
776  HelpText<"Pass <arg> to the CUDA/HIP host compilation">, MetaVarName<"<arg>">;
777def Xarch_device : Separate<["-"], "Xarch_device">, Flags<[NoXarchOption]>,
778  HelpText<"Pass <arg> to the CUDA/HIP device compilation">, MetaVarName<"<arg>">;
779def Xassembler : Separate<["-"], "Xassembler">,
780  HelpText<"Pass <arg> to the assembler">, MetaVarName<"<arg>">,
781  Group<CompileOnly_Group>;
782def Xclang : Separate<["-"], "Xclang">,
783  HelpText<"Pass <arg> to the clang compiler">, MetaVarName<"<arg>">,
784  Flags<[NoXarchOption, CoreOption]>, Group<CompileOnly_Group>;
785def Xcuda_fatbinary : Separate<["-"], "Xcuda-fatbinary">,
786  HelpText<"Pass <arg> to fatbinary invocation">, MetaVarName<"<arg>">;
787def Xcuda_ptxas : Separate<["-"], "Xcuda-ptxas">,
788  HelpText<"Pass <arg> to the ptxas assembler">, MetaVarName<"<arg>">;
789def Xopenmp_target : Separate<["-"], "Xopenmp-target">,
790  HelpText<"Pass <arg> to the target offloading toolchain.">, MetaVarName<"<arg>">;
791def Xopenmp_target_EQ : JoinedAndSeparate<["-"], "Xopenmp-target=">,
792  HelpText<"Pass <arg> to the target offloading toolchain identified by <triple>.">,
793  MetaVarName<"<triple> <arg>">;
794def z : Separate<["-"], "z">, Flags<[LinkerInput, RenderAsInput]>,
795  HelpText<"Pass -z <arg> to the linker">, MetaVarName<"<arg>">,
796  Group<Link_Group>;
797def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, RenderAsInput]>,
798  HelpText<"Pass <arg> to the linker">, MetaVarName<"<arg>">,
799  Group<Link_Group>;
800def Xpreprocessor : Separate<["-"], "Xpreprocessor">, Group<Preprocessor_Group>,
801  HelpText<"Pass <arg> to the preprocessor">, MetaVarName<"<arg>">;
802def X_Flag : Flag<["-"], "X">, Group<Link_Group>;
803def X_Joined : Joined<["-"], "X">, IgnoredGCCCompat;
804def Z_Flag : Flag<["-"], "Z">, Group<Link_Group>;
805// FIXME: All we do with this is reject it. Remove.
806def Z_Joined : Joined<["-"], "Z">;
807def all__load : Flag<["-"], "all_load">;
808def allowable__client : Separate<["-"], "allowable_client">;
809def ansi : Flag<["-", "--"], "ansi">, Group<CompileOnly_Group>;
810def arch__errors__fatal : Flag<["-"], "arch_errors_fatal">;
811def arch : Separate<["-"], "arch">, Flags<[NoXarchOption]>;
812def arch__only : Separate<["-"], "arch_only">;
813def a : Joined<["-"], "a">;
814def autocomplete : Joined<["--"], "autocomplete=">;
815def bind__at__load : Flag<["-"], "bind_at_load">;
816def bundle__loader : Separate<["-"], "bundle_loader">;
817def bundle : Flag<["-"], "bundle">;
818def b : JoinedOrSeparate<["-"], "b">, Flags<[Unsupported]>;
819def cl_opt_disable : Flag<["-"], "cl-opt-disable">, Group<opencl_Group>, Flags<[CC1Option]>,
820  HelpText<"OpenCL only. This option disables all optimizations. By default optimizations are enabled.">;
821def cl_strict_aliasing : Flag<["-"], "cl-strict-aliasing">, Group<opencl_Group>, Flags<[CC1Option]>,
822  HelpText<"OpenCL only. This option is added for compatibility with OpenCL 1.0.">;
823def cl_single_precision_constant : Flag<["-"], "cl-single-precision-constant">, Group<opencl_Group>, Flags<[CC1Option]>,
824  HelpText<"OpenCL only. Treat double precision floating-point constant as single precision constant.">,
825  MarshallingInfoFlag<LangOpts<"SinglePrecisionConstants">>;
826def cl_finite_math_only : Flag<["-"], "cl-finite-math-only">, Group<opencl_Group>, Flags<[CC1Option]>,
827  HelpText<"OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.">,
828  MarshallingInfoFlag<LangOpts<"CLFiniteMathOnly">>;
829def cl_kernel_arg_info : Flag<["-"], "cl-kernel-arg-info">, Group<opencl_Group>, Flags<[CC1Option]>,
830  HelpText<"OpenCL only. Generate kernel argument metadata.">,
831  MarshallingInfoFlag<CodeGenOpts<"EmitOpenCLArgMetadata">>;
832def cl_unsafe_math_optimizations : Flag<["-"], "cl-unsafe-math-optimizations">, Group<opencl_Group>, Flags<[CC1Option]>,
833  HelpText<"OpenCL only. Allow unsafe floating-point optimizations.  Also implies -cl-no-signed-zeros and -cl-mad-enable.">,
834  MarshallingInfoFlag<LangOpts<"CLUnsafeMath">>;
835def cl_fast_relaxed_math : Flag<["-"], "cl-fast-relaxed-math">, Group<opencl_Group>, Flags<[CC1Option]>,
836  HelpText<"OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines __FAST_RELAXED_MATH__.">,
837  MarshallingInfoFlag<LangOpts<"FastRelaxedMath">>;
838def cl_mad_enable : Flag<["-"], "cl-mad-enable">, Group<opencl_Group>, Flags<[CC1Option]>,
839  HelpText<"OpenCL only. Allow use of less precise MAD computations in the generated binary.">,
840  MarshallingInfoFlag<CodeGenOpts<"LessPreciseFPMAD">>,
841  ImpliedByAnyOf<[cl_unsafe_math_optimizations.KeyPath, cl_fast_relaxed_math.KeyPath]>;
842def cl_no_signed_zeros : Flag<["-"], "cl-no-signed-zeros">, Group<opencl_Group>, Flags<[CC1Option]>,
843  HelpText<"OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.">,
844  MarshallingInfoFlag<LangOpts<"CLNoSignedZero">>;
845def cl_std_EQ : Joined<["-"], "cl-std=">, Group<opencl_Group>, Flags<[CC1Option]>,
846  HelpText<"OpenCL language standard to compile for.">, Values<"cl,CL,cl1.0,CL1.0,cl1.1,CL1.1,cl1.2,CL1.2,cl2.0,CL2.0,cl3.0,CL3.0,clc++,CLC++">;
847def cl_denorms_are_zero : Flag<["-"], "cl-denorms-are-zero">, Group<opencl_Group>,
848  HelpText<"OpenCL only. Allow denormals to be flushed to zero.">;
849def cl_fp32_correctly_rounded_divide_sqrt : Flag<["-"], "cl-fp32-correctly-rounded-divide-sqrt">, Group<opencl_Group>, Flags<[CC1Option]>,
850  HelpText<"OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.">,
851  MarshallingInfoFlag<CodeGenOpts<"OpenCLCorrectlyRoundedDivSqrt">>;
852def cl_uniform_work_group_size : Flag<["-"], "cl-uniform-work-group-size">, Group<opencl_Group>, Flags<[CC1Option]>,
853  HelpText<"OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel">,
854  MarshallingInfoFlag<CodeGenOpts<"UniformWGSize">>;
855def cl_no_stdinc : Flag<["-"], "cl-no-stdinc">, Group<opencl_Group>,
856  HelpText<"OpenCL only. Disables all standard includes containing non-native compiler types and functions.">;
857def client__name : JoinedOrSeparate<["-"], "client_name">;
858def combine : Flag<["-", "--"], "combine">, Flags<[NoXarchOption, Unsupported]>;
859def compatibility__version : JoinedOrSeparate<["-"], "compatibility_version">;
860def config : Separate<["--"], "config">, Flags<[NoXarchOption]>,
861  HelpText<"Specifies configuration file">;
862def config_system_dir_EQ : Joined<["--"], "config-system-dir=">, Flags<[NoXarchOption, HelpHidden]>,
863  HelpText<"System directory for configuration files">;
864def config_user_dir_EQ : Joined<["--"], "config-user-dir=">, Flags<[NoXarchOption, HelpHidden]>,
865  HelpText<"User directory for configuration files">;
866def coverage : Flag<["-", "--"], "coverage">, Group<Link_Group>, Flags<[CoreOption]>;
867def cpp_precomp : Flag<["-"], "cpp-precomp">, Group<clang_ignored_f_Group>;
868def current__version : JoinedOrSeparate<["-"], "current_version">;
869def cxx_isystem : JoinedOrSeparate<["-"], "cxx-isystem">, Group<clang_i_Group>,
870  HelpText<"Add directory to the C++ SYSTEM include search path">, Flags<[CC1Option]>,
871  MetaVarName<"<directory>">;
872def c : Flag<["-"], "c">, Flags<[NoXarchOption, FlangOption]>, Group<Action_Group>,
873  HelpText<"Only run preprocess, compile, and assemble steps">;
874def fconvergent_functions : Flag<["-"], "fconvergent-functions">, Group<f_Group>, Flags<[CC1Option]>,
875  HelpText<"Assume functions may be convergent">;
876
877def gpu_use_aux_triple_only : Flag<["--"], "gpu-use-aux-triple-only">,
878  InternalDriverOpt, HelpText<"Prepare '-aux-triple' only without populating "
879                              "'-aux-target-cpu' and '-aux-target-feature'.">;
880def cuda_device_only : Flag<["--"], "cuda-device-only">,
881  HelpText<"Compile CUDA code for device only">;
882def cuda_host_only : Flag<["--"], "cuda-host-only">,
883  HelpText<"Compile CUDA code for host only.  Has no effect on non-CUDA "
884           "compilations.">;
885def cuda_compile_host_device : Flag<["--"], "cuda-compile-host-device">,
886  HelpText<"Compile CUDA code for both host and device (default).  Has no "
887           "effect on non-CUDA compilations.">;
888def cuda_include_ptx_EQ : Joined<["--"], "cuda-include-ptx=">, Flags<[NoXarchOption]>,
889  HelpText<"Include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">;
890def no_cuda_include_ptx_EQ : Joined<["--"], "no-cuda-include-ptx=">, Flags<[NoXarchOption]>,
891  HelpText<"Do not include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">;
892def offload_arch_EQ : Joined<["--"], "offload-arch=">, Flags<[NoXarchOption]>,
893  HelpText<"CUDA offloading device architecture (e.g. sm_35), or HIP offloading target ID in the form of a "
894           "device architecture followed by target ID features delimited by a colon. Each target ID feature "
895           "is a pre-defined string followed by a plus or minus sign (e.g. gfx908:xnack+:sramecc-).  May be "
896           "specified more than once.">;
897def cuda_gpu_arch_EQ : Joined<["--"], "cuda-gpu-arch=">, Flags<[NoXarchOption]>,
898  Alias<offload_arch_EQ>;
899def hip_link : Flag<["--"], "hip-link">,
900  HelpText<"Link clang-offload-bundler bundles for HIP">;
901def no_offload_arch_EQ : Joined<["--"], "no-offload-arch=">, Flags<[NoXarchOption]>,
902  HelpText<"Remove CUDA/HIP offloading device architecture (e.g. sm_35, gfx906) from the list of devices to compile for. "
903           "'all' resets the list to its default value.">;
904def emit_static_lib : Flag<["--"], "emit-static-lib">,
905  HelpText<"Enable linker job to emit a static library.">;
906def no_cuda_gpu_arch_EQ : Joined<["--"], "no-cuda-gpu-arch=">, Flags<[NoXarchOption]>,
907  Alias<no_offload_arch_EQ>;
908def cuda_noopt_device_debug : Flag<["--"], "cuda-noopt-device-debug">,
909  HelpText<"Enable device-side debug info generation. Disables ptxas optimizations.">;
910def no_cuda_version_check : Flag<["--"], "no-cuda-version-check">,
911  HelpText<"Don't error out if the detected version of the CUDA install is "
912           "too low for the requested CUDA gpu architecture.">;
913def no_cuda_noopt_device_debug : Flag<["--"], "no-cuda-noopt-device-debug">;
914def cuda_path_EQ : Joined<["--"], "cuda-path=">, Group<i_Group>,
915  HelpText<"CUDA installation path">;
916def cuda_path_ignore_env : Flag<["--"], "cuda-path-ignore-env">, Group<i_Group>,
917  HelpText<"Ignore environment variables to detect CUDA installation">;
918def ptxas_path_EQ : Joined<["--"], "ptxas-path=">, Group<i_Group>,
919  HelpText<"Path to ptxas (used for compiling CUDA code)">;
920def fgpu_flush_denormals_to_zero : Flag<["-"], "fgpu-flush-denormals-to-zero">,
921  HelpText<"Flush denormal floating point values to zero in CUDA/HIP device mode.">;
922def fno_gpu_flush_denormals_to_zero : Flag<["-"], "fno-gpu-flush-denormals-to-zero">;
923def fcuda_flush_denormals_to_zero : Flag<["-"], "fcuda-flush-denormals-to-zero">,
924  Alias<fgpu_flush_denormals_to_zero>;
925def fno_cuda_flush_denormals_to_zero : Flag<["-"], "fno-cuda-flush-denormals-to-zero">,
926  Alias<fno_gpu_flush_denormals_to_zero>;
927defm gpu_rdc : BoolFOption<"gpu-rdc",
928  LangOpts<"GPURelocatableDeviceCode">, DefaultFalse,
929  PosFlag<SetTrue, [CC1Option], "Generate relocatable device code, also known as separate compilation mode">,
930  NegFlag<SetFalse>>;
931def : Flag<["-"], "fcuda-rdc">, Alias<fgpu_rdc>;
932def : Flag<["-"], "fno-cuda-rdc">, Alias<fno_gpu_rdc>;
933defm cuda_short_ptr : BoolFOption<"cuda-short-ptr",
934  TargetOpts<"NVPTXUseShortPointers">, DefaultFalse,
935  PosFlag<SetTrue, [CC1Option], "Use 32-bit pointers for accessing const/local/shared address spaces">,
936  NegFlag<SetFalse>>;
937def rocm_path_EQ : Joined<["--"], "rocm-path=">, Group<i_Group>,
938  HelpText<"ROCm installation path, used for finding and automatically linking required bitcode libraries.">;
939def hip_path_EQ : Joined<["--"], "hip-path=">, Group<i_Group>,
940  HelpText<"HIP runtime installation path, used for finding HIP version and adding HIP include path.">;
941def amdgpu_arch_tool_EQ : Joined<["--"], "amdgpu-arch-tool=">, Group<i_Group>,
942  HelpText<"Tool used for detecting AMD GPU arch in the system.">;
943def rocm_device_lib_path_EQ : Joined<["--"], "rocm-device-lib-path=">, Group<Link_Group>,
944  HelpText<"ROCm device library path. Alternative to rocm-path.">;
945def : Joined<["--"], "hip-device-lib-path=">, Alias<rocm_device_lib_path_EQ>;
946def hip_device_lib_EQ : Joined<["--"], "hip-device-lib=">, Group<Link_Group>,
947  HelpText<"HIP device library">;
948def hip_version_EQ : Joined<["--"], "hip-version=">,
949  HelpText<"HIP version in the format of major.minor.patch">;
950def fhip_dump_offload_linker_script : Flag<["-"], "fhip-dump-offload-linker-script">,
951  Group<f_Group>, Flags<[NoArgumentUnused, HelpHidden]>;
952defm hip_new_launch_api : BoolFOption<"hip-new-launch-api",
953  LangOpts<"HIPUseNewLaunchAPI">, DefaultFalse,
954  PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">,
955  BothFlags<[], " new kernel launching API for HIP">>;
956defm hip_fp32_correctly_rounded_divide_sqrt : BoolFOption<"hip-fp32-correctly-rounded-divide-sqrt",
957  CodeGenOpts<"HIPCorrectlyRoundedDivSqrt">, DefaultTrue,
958  PosFlag<SetTrue, [], "Specify">,
959  NegFlag<SetFalse, [CC1Option], "Don't specify">,
960  BothFlags<[], " that single precision floating-point divide and sqrt used in "
961  "the program source are correctly rounded (HIP device compilation only)">>,
962  ShouldParseIf<hip.KeyPath>;
963defm gpu_allow_device_init : BoolFOption<"gpu-allow-device-init",
964  LangOpts<"GPUAllowDeviceInit">, DefaultFalse,
965  PosFlag<SetTrue, [CC1Option], "Allow">, NegFlag<SetFalse, [], "Don't allow">,
966  BothFlags<[], " device side init function in HIP (experimental)">>,
967  ShouldParseIf<hip.KeyPath>;
968defm gpu_defer_diag : BoolFOption<"gpu-defer-diag",
969  LangOpts<"GPUDeferDiag">, DefaultFalse,
970  PosFlag<SetTrue, [CC1Option], "Defer">, NegFlag<SetFalse, [], "Don't defer">,
971  BothFlags<[], " host/device related diagnostic messages for CUDA/HIP">>;
972defm gpu_exclude_wrong_side_overloads : BoolFOption<"gpu-exclude-wrong-side-overloads",
973  LangOpts<"GPUExcludeWrongSideOverloads">, DefaultFalse,
974  PosFlag<SetTrue, [CC1Option], "Always exclude wrong side overloads">,
975  NegFlag<SetFalse, [], "Exclude wrong side overloads only if there are same side overloads">,
976  BothFlags<[HelpHidden], " in overloading resolution for CUDA/HIP">>;
977def gpu_max_threads_per_block_EQ : Joined<["--"], "gpu-max-threads-per-block=">,
978  Flags<[CC1Option]>,
979  HelpText<"Default max threads per block for kernel launch bounds for HIP">,
980  MarshallingInfoInt<LangOpts<"GPUMaxThreadsPerBlock">, "1024">,
981  ShouldParseIf<hip.KeyPath>;
982def fgpu_inline_threshold_EQ : Joined<["-"], "fgpu-inline-threshold=">,
983  Flags<[HelpHidden]>,
984  HelpText<"Inline threshold for device compilation for CUDA/HIP">;
985def gpu_instrument_lib_EQ : Joined<["--"], "gpu-instrument-lib=">,
986  HelpText<"Instrument device library for HIP, which is a LLVM bitcode containing "
987  "__cyg_profile_func_enter and __cyg_profile_func_exit">;
988def fgpu_sanitize : Flag<["-"], "fgpu-sanitize">, Group<f_Group>,
989  HelpText<"Enable sanitizer for AMDGPU target">;
990def fno_gpu_sanitize : Flag<["-"], "fno-gpu-sanitize">, Group<f_Group>;
991def cuid_EQ : Joined<["-"], "cuid=">, Flags<[CC1Option]>,
992  HelpText<"An ID for compilation unit, which should be the same for the same "
993           "compilation unit but different for different compilation units. "
994           "It is used to externalize device-side static variables for single "
995           "source offloading languages CUDA and HIP so that they can be "
996           "accessed by the host code of the same compilation unit.">,
997  MarshallingInfoString<LangOpts<"CUID">>;
998def fuse_cuid_EQ : Joined<["-"], "fuse-cuid=">,
999  HelpText<"Method to generate ID's for compilation units for single source "
1000           "offloading languages CUDA and HIP: 'hash' (ID's generated by hashing "
1001           "file path and command line options) | 'random' (ID's generated as "
1002           "random numbers) | 'none' (disabled). Default is 'hash'. This option "
1003           "will be overriden by option '-cuid=[ID]' if it is specified." >;
1004def libomptarget_amdgcn_bc_path_EQ : Joined<["--"], "libomptarget-amdgcn-bc-path=">, Group<i_Group>,
1005  HelpText<"Path to libomptarget-amdgcn bitcode library">;
1006def libomptarget_nvptx_bc_path_EQ : Joined<["--"], "libomptarget-nvptx-bc-path=">, Group<i_Group>,
1007  HelpText<"Path to libomptarget-nvptx bitcode library">;
1008def dD : Flag<["-"], "dD">, Group<d_Group>, Flags<[CC1Option]>,
1009  HelpText<"Print macro definitions in -E mode in addition to normal output">;
1010def dI : Flag<["-"], "dI">, Group<d_Group>, Flags<[CC1Option]>,
1011  HelpText<"Print include directives in -E mode in addition to normal output">,
1012  MarshallingInfoFlag<PreprocessorOutputOpts<"ShowIncludeDirectives">>;
1013def dM : Flag<["-"], "dM">, Group<d_Group>, Flags<[CC1Option]>,
1014  HelpText<"Print macro definitions in -E mode instead of normal output">;
1015def dead__strip : Flag<["-"], "dead_strip">;
1016def dependency_file : Separate<["-"], "dependency-file">, Flags<[CC1Option]>,
1017  HelpText<"Filename (or -) to write dependency output to">,
1018  MarshallingInfoString<DependencyOutputOpts<"OutputFile">>;
1019def dependency_dot : Separate<["-"], "dependency-dot">, Flags<[CC1Option]>,
1020  HelpText<"Filename to write DOT-formatted header dependencies to">,
1021  MarshallingInfoString<DependencyOutputOpts<"DOTOutputFile">>;
1022def module_dependency_dir : Separate<["-"], "module-dependency-dir">,
1023  Flags<[CC1Option]>, HelpText<"Directory to dump module dependencies to">,
1024  MarshallingInfoString<DependencyOutputOpts<"ModuleDependencyOutputDir">>;
1025def dsym_dir : JoinedOrSeparate<["-"], "dsym-dir">,
1026  Flags<[NoXarchOption, RenderAsInput]>,
1027  HelpText<"Directory to output dSYM's (if any) to">, MetaVarName<"<dir>">;
1028def dumpmachine : Flag<["-"], "dumpmachine">;
1029def dumpspecs : Flag<["-"], "dumpspecs">, Flags<[Unsupported]>;
1030def dumpversion : Flag<["-"], "dumpversion">;
1031def dylib__file : Separate<["-"], "dylib_file">;
1032def dylinker__install__name : JoinedOrSeparate<["-"], "dylinker_install_name">;
1033def dylinker : Flag<["-"], "dylinker">;
1034def dynamiclib : Flag<["-"], "dynamiclib">;
1035def dynamic : Flag<["-"], "dynamic">, Flags<[NoArgumentUnused]>;
1036def d_Flag : Flag<["-"], "d">, Group<d_Group>;
1037def d_Joined : Joined<["-"], "d">, Group<d_Group>;
1038def emit_ast : Flag<["-"], "emit-ast">,
1039  HelpText<"Emit Clang AST files for source inputs">;
1040def emit_llvm : Flag<["-"], "emit-llvm">, Flags<[CC1Option]>, Group<Action_Group>,
1041  HelpText<"Use the LLVM representation for assembler and object files">;
1042def emit_interface_stubs : Flag<["-"], "emit-interface-stubs">, Flags<[CC1Option]>, Group<Action_Group>,
1043  HelpText<"Generate Interface Stub Files.">;
1044def emit_merged_ifs : Flag<["-"], "emit-merged-ifs">,
1045  Flags<[CC1Option]>, Group<Action_Group>,
1046  HelpText<"Generate Interface Stub Files, emit merged text not binary.">;
1047def interface_stub_version_EQ : JoinedOrSeparate<["-"], "interface-stub-version=">, Flags<[CC1Option]>;
1048def exported__symbols__list : Separate<["-"], "exported_symbols_list">;
1049def e : JoinedOrSeparate<["-"], "e">, Flags<[LinkerInput]>, Group<Link_Group>;
1050def fmax_tokens_EQ : Joined<["-"], "fmax-tokens=">, Group<f_Group>, Flags<[CC1Option]>,
1051  HelpText<"Max total number of preprocessed tokens for -Wmax-tokens.">,
1052  MarshallingInfoInt<LangOpts<"MaxTokens">>;
1053def fPIC : Flag<["-"], "fPIC">, Group<f_Group>;
1054def fno_PIC : Flag<["-"], "fno-PIC">, Group<f_Group>;
1055def fPIE : Flag<["-"], "fPIE">, Group<f_Group>;
1056def fno_PIE : Flag<["-"], "fno-PIE">, Group<f_Group>;
1057defm access_control : BoolFOption<"access-control",
1058  LangOpts<"AccessControl">, DefaultTrue,
1059  NegFlag<SetFalse, [CC1Option], "Disable C++ access control">,
1060  PosFlag<SetTrue>>;
1061def falign_functions : Flag<["-"], "falign-functions">, Group<f_Group>;
1062def falign_functions_EQ : Joined<["-"], "falign-functions=">, Group<f_Group>;
1063def fno_align_functions: Flag<["-"], "fno-align-functions">, Group<f_Group>;
1064defm allow_editor_placeholders : BoolFOption<"allow-editor-placeholders",
1065  LangOpts<"AllowEditorPlaceholders">, DefaultFalse,
1066  PosFlag<SetTrue, [CC1Option], "Treat editor placeholders as valid source code">,
1067  NegFlag<SetFalse>>;
1068def fallow_unsupported : Flag<["-"], "fallow-unsupported">, Group<f_Group>;
1069def fapple_kext : Flag<["-"], "fapple-kext">, Group<f_Group>, Flags<[CC1Option]>,
1070  HelpText<"Use Apple's kernel extensions ABI">,
1071  MarshallingInfoFlag<LangOpts<"AppleKext">>;
1072defm apple_pragma_pack : BoolFOption<"apple-pragma-pack",
1073  LangOpts<"ApplePragmaPack">, DefaultFalse,
1074  PosFlag<SetTrue, [CC1Option], "Enable Apple gcc-compatible #pragma pack handling">,
1075  NegFlag<SetFalse>>;
1076defm xl_pragma_pack : BoolFOption<"xl-pragma-pack",
1077  LangOpts<"XLPragmaPack">, DefaultFalse,
1078  PosFlag<SetTrue, [CC1Option], "Enable IBM XL #pragma pack handling">,
1079  NegFlag<SetFalse>>;
1080def shared_libsan : Flag<["-"], "shared-libsan">,
1081  HelpText<"Dynamically link the sanitizer runtime">;
1082def static_libsan : Flag<["-"], "static-libsan">,
1083  HelpText<"Statically link the sanitizer runtime">;
1084def : Flag<["-"], "shared-libasan">, Alias<shared_libsan>;
1085def fasm : Flag<["-"], "fasm">, Group<f_Group>;
1086
1087def fassume_sane_operator_new : Flag<["-"], "fassume-sane-operator-new">, Group<f_Group>;
1088def fastcp : Flag<["-"], "fastcp">, Group<f_Group>;
1089def fastf : Flag<["-"], "fastf">, Group<f_Group>;
1090def fast : Flag<["-"], "fast">, Group<f_Group>;
1091def fasynchronous_unwind_tables : Flag<["-"], "fasynchronous-unwind-tables">, Group<f_Group>;
1092
1093defm double_square_bracket_attributes : BoolFOption<"double-square-bracket-attributes",
1094  LangOpts<"DoubleSquareBracketAttributes">, Default<!strconcat(cpp11.KeyPath, "||", c2x.KeyPath)>,
1095  PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">,
1096  BothFlags<[NoXarchOption, CC1Option], " '[[]]' attributes in all C and C++ language modes">>;
1097
1098defm autolink : BoolFOption<"autolink",
1099  CodeGenOpts<"Autolink">, DefaultTrue,
1100  NegFlag<SetFalse, [CC1Option], "Disable generation of linker directives for automatic library linking">,
1101  PosFlag<SetTrue>>;
1102
1103// C++ Coroutines TS
1104defm coroutines_ts : BoolFOption<"coroutines-ts",
1105  LangOpts<"Coroutines">, Default<cpp20.KeyPath>,
1106  PosFlag<SetTrue, [CC1Option], "Enable support for the C++ Coroutines TS">,
1107  NegFlag<SetFalse>>;
1108
1109def fembed_bitcode_EQ : Joined<["-"], "fembed-bitcode=">,
1110    Group<f_Group>, Flags<[NoXarchOption, CC1Option, CC1AsOption]>, MetaVarName<"<option>">,
1111    HelpText<"Embed LLVM bitcode (option: off, all, bitcode, marker)">,
1112    Values<"off,all,bitcode,marker">, NormalizedValuesScope<"CodeGenOptions">,
1113    NormalizedValues<["Embed_Off", "Embed_All", "Embed_Bitcode", "Embed_Marker"]>,
1114    MarshallingInfoEnum<CodeGenOpts<"EmbedBitcode">, "Embed_Off">;
1115def fembed_bitcode : Flag<["-"], "fembed-bitcode">, Group<f_Group>,
1116  Alias<fembed_bitcode_EQ>, AliasArgs<["all"]>,
1117  HelpText<"Embed LLVM IR bitcode as data">;
1118def fembed_bitcode_marker : Flag<["-"], "fembed-bitcode-marker">,
1119  Alias<fembed_bitcode_EQ>, AliasArgs<["marker"]>,
1120  HelpText<"Embed placeholder LLVM IR data as a marker">;
1121defm gnu_inline_asm : BoolFOption<"gnu-inline-asm",
1122  LangOpts<"GNUAsm">, DefaultTrue,
1123  NegFlag<SetFalse, [CC1Option], "Disable GNU style inline asm">, PosFlag<SetTrue>>;
1124
1125def fprofile_sample_use : Flag<["-"], "fprofile-sample-use">, Group<f_Group>,
1126    Flags<[CoreOption]>;
1127def fno_profile_sample_use : Flag<["-"], "fno-profile-sample-use">, Group<f_Group>,
1128    Flags<[CoreOption]>;
1129def fprofile_sample_use_EQ : Joined<["-"], "fprofile-sample-use=">,
1130    Group<f_Group>, Flags<[NoXarchOption, CC1Option]>,
1131    HelpText<"Enable sample-based profile guided optimizations">,
1132    MarshallingInfoString<CodeGenOpts<"SampleProfileFile">>;
1133def fprofile_sample_accurate : Flag<["-"], "fprofile-sample-accurate">,
1134    Group<f_Group>, Flags<[NoXarchOption, CC1Option]>,
1135    HelpText<"Specifies that the sample profile is accurate">,
1136    DocBrief<[{Specifies that the sample profile is accurate. If the sample
1137               profile is accurate, callsites without profile samples are marked
1138               as cold. Otherwise, treat callsites without profile samples as if
1139               we have no profile}]>,
1140   MarshallingInfoFlag<CodeGenOpts<"ProfileSampleAccurate">>;
1141def fno_profile_sample_accurate : Flag<["-"], "fno-profile-sample-accurate">,
1142  Group<f_Group>, Flags<[NoXarchOption]>;
1143def fauto_profile : Flag<["-"], "fauto-profile">, Group<f_Group>,
1144    Alias<fprofile_sample_use>;
1145def fno_auto_profile : Flag<["-"], "fno-auto-profile">, Group<f_Group>,
1146    Alias<fno_profile_sample_use>;
1147def fauto_profile_EQ : Joined<["-"], "fauto-profile=">,
1148    Alias<fprofile_sample_use_EQ>;
1149def fauto_profile_accurate : Flag<["-"], "fauto-profile-accurate">,
1150    Group<f_Group>, Alias<fprofile_sample_accurate>;
1151def fno_auto_profile_accurate : Flag<["-"], "fno-auto-profile-accurate">,
1152    Group<f_Group>, Alias<fno_profile_sample_accurate>;
1153def fdebug_compilation_dir_EQ : Joined<["-"], "fdebug-compilation-dir=">,
1154    Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>,
1155    HelpText<"The compilation directory to embed in the debug info">,
1156    MarshallingInfoString<CodeGenOpts<"DebugCompilationDir">>;
1157def fdebug_compilation_dir : Separate<["-"], "fdebug-compilation-dir">,
1158    Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>,
1159    Alias<fdebug_compilation_dir_EQ>;
1160def fcoverage_compilation_dir_EQ : Joined<["-"], "fcoverage-compilation-dir=">,
1161    Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>,
1162    HelpText<"The compilation directory to embed in the coverage mapping.">,
1163    MarshallingInfoString<CodeGenOpts<"CoverageCompilationDir">>;
1164def ffile_compilation_dir_EQ : Joined<["-"], "ffile-compilation-dir=">, Group<f_Group>,
1165    Flags<[CoreOption]>,
1166    HelpText<"The compilation directory to embed in the debug info and coverage mapping.">;
1167defm debug_info_for_profiling : BoolFOption<"debug-info-for-profiling",
1168  CodeGenOpts<"DebugInfoForProfiling">, DefaultFalse,
1169  PosFlag<SetTrue, [CC1Option], "Emit extra debug info to make sample profile more accurate">,
1170  NegFlag<SetFalse>>;
1171def fprofile_instr_generate : Flag<["-"], "fprofile-instr-generate">,
1172    Group<f_Group>, Flags<[CoreOption]>,
1173    HelpText<"Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">;
1174def fprofile_instr_generate_EQ : Joined<["-"], "fprofile-instr-generate=">,
1175    Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<file>">,
1176    HelpText<"Generate instrumented code to collect execution counts into <file> (overridden by LLVM_PROFILE_FILE env var)">;
1177def fprofile_instr_use : Flag<["-"], "fprofile-instr-use">, Group<f_Group>,
1178    Flags<[CoreOption]>;
1179def fprofile_instr_use_EQ : Joined<["-"], "fprofile-instr-use=">,
1180    Group<f_Group>, Flags<[CoreOption]>,
1181    HelpText<"Use instrumentation data for profile-guided optimization">;
1182def fprofile_remapping_file_EQ : Joined<["-"], "fprofile-remapping-file=">,
1183    Group<f_Group>, Flags<[CC1Option, CoreOption]>, MetaVarName<"<file>">,
1184    HelpText<"Use the remappings described in <file> to match the profile data against names in the program">,
1185    MarshallingInfoString<CodeGenOpts<"ProfileRemappingFile">>;
1186defm coverage_mapping : BoolFOption<"coverage-mapping",
1187  CodeGenOpts<"CoverageMapping">, DefaultFalse,
1188  PosFlag<SetTrue, [CC1Option], "Generate coverage mapping to enable code coverage analysis">,
1189  NegFlag<SetFalse, [], "Disable code coverage analysis">, BothFlags<[CoreOption]>>;
1190def fprofile_generate : Flag<["-"], "fprofile-generate">,
1191    Group<f_Group>, Flags<[CoreOption]>,
1192    HelpText<"Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
1193def fprofile_generate_EQ : Joined<["-"], "fprofile-generate=">,
1194    Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<directory>">,
1195    HelpText<"Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
1196def fcs_profile_generate : Flag<["-"], "fcs-profile-generate">,
1197    Group<f_Group>, Flags<[CoreOption]>,
1198    HelpText<"Generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
1199def fcs_profile_generate_EQ : Joined<["-"], "fcs-profile-generate=">,
1200    Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<directory>">,
1201    HelpText<"Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
1202def fprofile_use : Flag<["-"], "fprofile-use">, Group<f_Group>,
1203    Alias<fprofile_instr_use>;
1204def fprofile_use_EQ : Joined<["-"], "fprofile-use=">,
1205    Group<f_Group>, Flags<[NoXarchOption]>, MetaVarName<"<pathname>">,
1206    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>.">;
1207def fno_profile_instr_generate : Flag<["-"], "fno-profile-instr-generate">,
1208    Group<f_Group>, Flags<[CoreOption]>,
1209    HelpText<"Disable generation of profile instrumentation.">;
1210def fno_profile_generate : Flag<["-"], "fno-profile-generate">,
1211    Group<f_Group>, Flags<[CoreOption]>,
1212    HelpText<"Disable generation of profile instrumentation.">;
1213def fno_profile_instr_use : Flag<["-"], "fno-profile-instr-use">,
1214    Group<f_Group>, Flags<[CoreOption]>,
1215    HelpText<"Disable using instrumentation data for profile-guided optimization">;
1216def fno_profile_use : Flag<["-"], "fno-profile-use">,
1217    Alias<fno_profile_instr_use>;
1218defm profile_arcs : BoolFOption<"profile-arcs",
1219  CodeGenOpts<"EmitGcovArcs">, DefaultFalse,
1220  PosFlag<SetTrue, [CC1Option, LinkOption]>, NegFlag<SetFalse>>;
1221defm test_coverage : BoolFOption<"test-coverage",
1222  CodeGenOpts<"EmitGcovNotes">, DefaultFalse,
1223  PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>;
1224def fprofile_filter_files_EQ : Joined<["-"], "fprofile-filter-files=">,
1225    Group<f_Group>, Flags<[CC1Option, CoreOption]>,
1226    HelpText<"Instrument only functions from files where names match any regex separated by a semi-colon">,
1227    MarshallingInfoString<CodeGenOpts<"ProfileFilterFiles">>,
1228    ShouldParseIf<!strconcat(fprofile_arcs.KeyPath, "||", ftest_coverage.KeyPath)>;
1229def fprofile_exclude_files_EQ : Joined<["-"], "fprofile-exclude-files=">,
1230    Group<f_Group>, Flags<[CC1Option, CoreOption]>,
1231    HelpText<"Instrument only functions from files where names don't match all the regexes separated by a semi-colon">,
1232    MarshallingInfoString<CodeGenOpts<"ProfileExcludeFiles">>,
1233    ShouldParseIf<!strconcat(fprofile_arcs.KeyPath, "||", ftest_coverage.KeyPath)>;
1234def fprofile_update_EQ : Joined<["-"], "fprofile-update=">,
1235    Group<f_Group>, Flags<[CC1Option, CoreOption]>, Values<"atomic,prefer-atomic,single">,
1236    MetaVarName<"<method>">, HelpText<"Set update method of profile counters (atomic,prefer-atomic,single)">,
1237    MarshallingInfoFlag<CodeGenOpts<"AtomicProfileUpdate">>;
1238defm pseudo_probe_for_profiling : BoolFOption<"pseudo-probe-for-profiling",
1239  CodeGenOpts<"PseudoProbeForProfiling">, DefaultFalse,
1240  PosFlag<SetTrue, [], "Emit">, NegFlag<SetFalse, [], "Do not emit">,
1241  BothFlags<[NoXarchOption, CC1Option], " pseudo probes for sample profiling">>;
1242def forder_file_instrumentation : Flag<["-"], "forder-file-instrumentation">,
1243    Group<f_Group>, Flags<[CC1Option, CoreOption]>,
1244    HelpText<"Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">;
1245def fprofile_list_EQ : Joined<["-"], "fprofile-list=">,
1246    Group<f_Group>, Flags<[CC1Option, CoreOption]>,
1247    HelpText<"Filename defining the list of functions/files to instrument">,
1248    MarshallingInfoStringVector<LangOpts<"ProfileListFiles">>;
1249
1250defm addrsig : BoolFOption<"addrsig",
1251  CodeGenOpts<"Addrsig">, DefaultFalse,
1252  PosFlag<SetTrue, [CC1Option], "Emit">, NegFlag<SetFalse, [], "Don't emit">,
1253  BothFlags<[CoreOption], " an address-significance table">>;
1254defm blocks : OptInFFlag<"blocks", "Enable the 'blocks' language feature", "", "", [CoreOption]>;
1255def fbootclasspath_EQ : Joined<["-"], "fbootclasspath=">, Group<f_Group>;
1256defm borland_extensions : BoolFOption<"borland-extensions",
1257  LangOpts<"Borland">, DefaultFalse,
1258  PosFlag<SetTrue, [CC1Option], "Accept non-standard constructs supported by the Borland compiler">,
1259  NegFlag<SetFalse>>;
1260def fbuiltin : Flag<["-"], "fbuiltin">, Group<f_Group>, Flags<[CoreOption]>;
1261def fbuiltin_module_map : Flag <["-"], "fbuiltin-module-map">, Group<f_Group>,
1262  Flags<[NoXarchOption]>, HelpText<"Load the clang builtins module map file.">;
1263defm caret_diagnostics : BoolFOption<"caret-diagnostics",
1264  DiagnosticOpts<"ShowCarets">, DefaultTrue,
1265  NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>>;
1266def fclang_abi_compat_EQ : Joined<["-"], "fclang-abi-compat=">, Group<f_clang_Group>,
1267  Flags<[CC1Option]>, MetaVarName<"<version>">, Values<"<major>.<minor>,latest">,
1268  HelpText<"Attempt to match the ABI of Clang <version>">;
1269def fclasspath_EQ : Joined<["-"], "fclasspath=">, Group<f_Group>;
1270defm color_diagnostics : OptInFFlag<"color-diagnostics", "Enable", "Disable", " colors in diagnostics",
1271  [CoreOption, FlangOption]>;
1272def fdiagnostics_color : Flag<["-"], "fdiagnostics-color">, Group<f_Group>,
1273  Flags<[CoreOption, NoXarchOption]>;
1274def fdiagnostics_color_EQ : Joined<["-"], "fdiagnostics-color=">, Group<f_Group>;
1275def fansi_escape_codes : Flag<["-"], "fansi-escape-codes">, Group<f_Group>,
1276  Flags<[CoreOption, CC1Option]>, HelpText<"Use ANSI escape codes for diagnostics">,
1277  MarshallingInfoFlag<DiagnosticOpts<"UseANSIEscapeCodes">>;
1278def fcomment_block_commands : CommaJoined<["-"], "fcomment-block-commands=">, Group<f_clang_Group>, Flags<[CC1Option]>,
1279  HelpText<"Treat each comma separated argument in <arg> as a documentation comment block command">,
1280  MetaVarName<"<arg>">, MarshallingInfoStringVector<LangOpts<"CommentOpts.BlockCommandNames">>;
1281def fparse_all_comments : Flag<["-"], "fparse-all-comments">, Group<f_clang_Group>, Flags<[CC1Option]>,
1282  MarshallingInfoFlag<LangOpts<"CommentOpts.ParseAllComments">>;
1283def frecord_command_line : Flag<["-"], "frecord-command-line">,
1284  Group<f_clang_Group>;
1285def fno_record_command_line : Flag<["-"], "fno-record-command-line">,
1286  Group<f_clang_Group>;
1287def : Flag<["-"], "frecord-gcc-switches">, Alias<frecord_command_line>;
1288def : Flag<["-"], "fno-record-gcc-switches">, Alias<fno_record_command_line>;
1289def fcommon : Flag<["-"], "fcommon">, Group<f_Group>,
1290  Flags<[CoreOption, CC1Option]>, HelpText<"Place uninitialized global variables in a common block">,
1291  MarshallingInfoNegativeFlag<CodeGenOpts<"NoCommon">>;
1292def fcompile_resource_EQ : Joined<["-"], "fcompile-resource=">, Group<f_Group>;
1293defm complete_member_pointers : BoolOption<"f", "complete-member-pointers",
1294  LangOpts<"CompleteMemberPointers">, DefaultFalse,
1295  PosFlag<SetTrue, [CC1Option], "Require">, NegFlag<SetFalse, [], "Do not require">,
1296  BothFlags<[CoreOption], " member pointer base types to be complete if they"
1297            " would be significant under the Microsoft ABI">>,
1298  Group<f_clang_Group>;
1299def fcf_runtime_abi_EQ : Joined<["-"], "fcf-runtime-abi=">, Group<f_Group>,
1300    Flags<[CC1Option]>, Values<"unspecified,standalone,objc,swift,swift-5.0,swift-4.2,swift-4.1">,
1301    NormalizedValuesScope<"LangOptions::CoreFoundationABI">,
1302    NormalizedValues<["ObjectiveC", "ObjectiveC", "ObjectiveC", "Swift5_0", "Swift5_0", "Swift4_2", "Swift4_1"]>,
1303    MarshallingInfoEnum<LangOpts<"CFRuntime">, "ObjectiveC">;
1304defm constant_cfstrings : BoolFOption<"constant-cfstrings",
1305  LangOpts<"NoConstantCFStrings">, DefaultFalse,
1306  NegFlag<SetTrue, [CC1Option], "Disable creation of CodeFoundation-type constant strings">,
1307  PosFlag<SetFalse>>;
1308def fconstant_string_class_EQ : Joined<["-"], "fconstant-string-class=">, Group<f_Group>;
1309def fconstexpr_depth_EQ : Joined<["-"], "fconstexpr-depth=">, Group<f_Group>;
1310def fconstexpr_steps_EQ : Joined<["-"], "fconstexpr-steps=">, Group<f_Group>;
1311def fexperimental_new_constant_interpreter : Flag<["-"], "fexperimental-new-constant-interpreter">, Group<f_Group>,
1312  HelpText<"Enable the experimental new constant interpreter">, Flags<[CC1Option]>,
1313  MarshallingInfoFlag<LangOpts<"EnableNewConstInterp">>;
1314def fconstexpr_backtrace_limit_EQ : Joined<["-"], "fconstexpr-backtrace-limit=">,
1315                                    Group<f_Group>;
1316def fno_crash_diagnostics : Flag<["-"], "fno-crash-diagnostics">, Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>,
1317  HelpText<"Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash">;
1318def fcrash_diagnostics_dir : Joined<["-"], "fcrash-diagnostics-dir=">,
1319  Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>,
1320  HelpText<"Put crash-report files in <dir>">, MetaVarName<"<dir>">;
1321def fcreate_profile : Flag<["-"], "fcreate-profile">, Group<f_Group>;
1322defm cxx_exceptions: BoolFOption<"cxx-exceptions",
1323  LangOpts<"CXXExceptions">, DefaultFalse,
1324  PosFlag<SetTrue, [CC1Option], "Enable C++ exceptions">, NegFlag<SetFalse>>;
1325defm async_exceptions: BoolFOption<"async-exceptions",
1326  LangOpts<"EHAsynch">, DefaultFalse,
1327  PosFlag<SetTrue, [CC1Option], "Enable EH Asynchronous exceptions">, NegFlag<SetFalse>>;
1328def fcxx_modules : Flag <["-"], "fcxx-modules">, Group<f_Group>,
1329  Flags<[NoXarchOption]>;
1330def fdebug_pass_arguments : Flag<["-"], "fdebug-pass-arguments">, Group<f_Group>;
1331def fdebug_pass_structure : Flag<["-"], "fdebug-pass-structure">, Group<f_Group>;
1332def fdepfile_entry : Joined<["-"], "fdepfile-entry=">,
1333    Group<f_clang_Group>, Flags<[CC1Option]>;
1334def fdiagnostics_fixit_info : Flag<["-"], "fdiagnostics-fixit-info">, Group<f_clang_Group>;
1335def fno_diagnostics_fixit_info : Flag<["-"], "fno-diagnostics-fixit-info">, Group<f_Group>,
1336  Flags<[CC1Option]>, HelpText<"Do not include fixit information in diagnostics">,
1337  MarshallingInfoNegativeFlag<DiagnosticOpts<"ShowFixits">>;
1338def fdiagnostics_parseable_fixits : Flag<["-"], "fdiagnostics-parseable-fixits">, Group<f_clang_Group>,
1339    Flags<[CoreOption, CC1Option]>, HelpText<"Print fix-its in machine parseable form">,
1340    MarshallingInfoFlag<DiagnosticOpts<"ShowParseableFixits">>;
1341def fdiagnostics_print_source_range_info : Flag<["-"], "fdiagnostics-print-source-range-info">,
1342    Group<f_clang_Group>,  Flags<[CC1Option]>,
1343    HelpText<"Print source range spans in numeric form">,
1344    MarshallingInfoFlag<DiagnosticOpts<"ShowSourceRanges">>;
1345defm diagnostics_show_hotness : BoolFOption<"diagnostics-show-hotness",
1346  CodeGenOpts<"DiagnosticsWithHotness">, DefaultFalse,
1347  PosFlag<SetTrue, [CC1Option], "Enable profile hotness information in diagnostic line">,
1348  NegFlag<SetFalse>>;
1349def fdiagnostics_hotness_threshold_EQ : Joined<["-"], "fdiagnostics-hotness-threshold=">,
1350    Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<value>">,
1351    HelpText<"Prevent optimization remarks from being output if they do not have at least this profile count. "
1352    "Use 'auto' to apply the threshold from profile summary">;
1353defm diagnostics_show_option : BoolFOption<"diagnostics-show-option",
1354    DiagnosticOpts<"ShowOptionNames">, DefaultTrue,
1355    NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue, [], "Print option name with mappable diagnostics">>;
1356defm diagnostics_show_note_include_stack : BoolFOption<"diagnostics-show-note-include-stack",
1357    DiagnosticOpts<"ShowNoteIncludeStack">, DefaultFalse,
1358    PosFlag<SetTrue, [], "Display include stacks for diagnostic notes">,
1359    NegFlag<SetFalse>, BothFlags<[CC1Option]>>;
1360def fdiagnostics_format_EQ : Joined<["-"], "fdiagnostics-format=">, Group<f_clang_Group>;
1361def fdiagnostics_show_category_EQ : Joined<["-"], "fdiagnostics-show-category=">, Group<f_clang_Group>;
1362def fdiagnostics_show_template_tree : Flag<["-"], "fdiagnostics-show-template-tree">,
1363    Group<f_Group>, Flags<[CC1Option]>,
1364    HelpText<"Print a template comparison tree for differing templates">,
1365    MarshallingInfoFlag<DiagnosticOpts<"ShowTemplateTree">>;
1366def fdiscard_value_names : Flag<["-"], "fdiscard-value-names">, Group<f_clang_Group>,
1367  HelpText<"Discard value names in LLVM IR">, Flags<[NoXarchOption]>;
1368def fno_discard_value_names : Flag<["-"], "fno-discard-value-names">, Group<f_clang_Group>,
1369  HelpText<"Do not discard value names in LLVM IR">, Flags<[NoXarchOption]>;
1370defm dollars_in_identifiers : BoolFOption<"dollars-in-identifiers",
1371  LangOpts<"DollarIdents">, Default<!strconcat("!", asm_preprocessor.KeyPath)>,
1372  PosFlag<SetTrue, [], "Allow">, NegFlag<SetFalse, [], "Disallow">,
1373  BothFlags<[CC1Option], " '$' in identifiers">>;
1374def fdwarf2_cfi_asm : Flag<["-"], "fdwarf2-cfi-asm">, Group<clang_ignored_f_Group>;
1375def fno_dwarf2_cfi_asm : Flag<["-"], "fno-dwarf2-cfi-asm">, Group<clang_ignored_f_Group>;
1376defm dwarf_directory_asm : BoolFOption<"dwarf-directory-asm",
1377  CodeGenOpts<"NoDwarfDirectoryAsm">, DefaultFalse,
1378  NegFlag<SetTrue, [CC1Option]>, PosFlag<SetFalse>>;
1379defm elide_constructors : BoolFOption<"elide-constructors",
1380  LangOpts<"ElideConstructors">, DefaultTrue,
1381  NegFlag<SetFalse, [CC1Option], "Disable C++ copy constructor elision">,
1382  PosFlag<SetTrue>>;
1383def fno_elide_type : Flag<["-"], "fno-elide-type">, Group<f_Group>,
1384    Flags<[CC1Option]>,
1385    HelpText<"Do not elide types when printing diagnostics">,
1386    MarshallingInfoNegativeFlag<DiagnosticOpts<"ElideType">>;
1387def feliminate_unused_debug_symbols : Flag<["-"], "feliminate-unused-debug-symbols">, Group<f_Group>;
1388defm eliminate_unused_debug_types : OptOutFFlag<"eliminate-unused-debug-types",
1389  "Do not emit ", "Emit ", " debug info for defined but unused types">;
1390def femit_all_decls : Flag<["-"], "femit-all-decls">, Group<f_Group>, Flags<[CC1Option]>,
1391  HelpText<"Emit all declarations, even if unused">,
1392  MarshallingInfoFlag<LangOpts<"EmitAllDecls">>;
1393defm emulated_tls : BoolFOption<"emulated-tls",
1394  CodeGenOpts<"EmulatedTLS">, DefaultFalse,
1395  PosFlag<SetTrue, [CC1Option], "Use emutls functions to access thread_local variables">,
1396  NegFlag<SetFalse>, BothFlags<[CC1Option]>>;
1397def fencoding_EQ : Joined<["-"], "fencoding=">, Group<f_Group>;
1398def ferror_limit_EQ : Joined<["-"], "ferror-limit=">, Group<f_Group>, Flags<[CoreOption]>;
1399defm exceptions : BoolFOption<"exceptions",
1400  LangOpts<"Exceptions">, DefaultFalse,
1401  PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
1402  BothFlags<[], " support for exception handling">>;
1403def fdwarf_exceptions : Flag<["-"], "fdwarf-exceptions">, Group<f_Group>,
1404  HelpText<"Use DWARF style exceptions">;
1405def fsjlj_exceptions : Flag<["-"], "fsjlj-exceptions">, Group<f_Group>,
1406  HelpText<"Use SjLj style exceptions">;
1407def fseh_exceptions : Flag<["-"], "fseh-exceptions">, Group<f_Group>,
1408  HelpText<"Use SEH style exceptions">;
1409def fwasm_exceptions : Flag<["-"], "fwasm-exceptions">, Group<f_Group>,
1410  HelpText<"Use WebAssembly style exceptions">;
1411def exception_model : Separate<["-"], "exception-model">,
1412  Flags<[CC1Option, NoDriverOption]>, HelpText<"The exception model: dwarf|sjlj|seh|wasm">,
1413  Values<"dwarf,sjlj,seh,wasm">,
1414  NormalizedValuesScope<"LangOptions::ExceptionHandlingKind">,
1415  NormalizedValues<["DwarfCFI", "SjLj", "WinEH", "Wasm"]>,
1416  MarshallingInfoEnum<LangOpts<"ExceptionHandling">, "None">;
1417def exception_model_EQ : Joined<["-"], "exception-model=">,
1418  Flags<[CC1Option, NoDriverOption]>, Alias<exception_model>;
1419def fignore_exceptions : Flag<["-"], "fignore-exceptions">, Group<f_Group>, Flags<[CC1Option]>,
1420  HelpText<"Enable support for ignoring exception handling constructs">,
1421  MarshallingInfoFlag<LangOpts<"IgnoreExceptions">>;
1422def fexcess_precision_EQ : Joined<["-"], "fexcess-precision=">,
1423    Group<clang_ignored_gcc_optimization_f_Group>;
1424def : Flag<["-"], "fexpensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>;
1425def : Flag<["-"], "fno-expensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>;
1426def fextdirs_EQ : Joined<["-"], "fextdirs=">, Group<f_Group>;
1427def : Flag<["-"], "fdefer-pop">, Group<clang_ignored_gcc_optimization_f_Group>;
1428def : Flag<["-"], "fno-defer-pop">, Group<clang_ignored_gcc_optimization_f_Group>;
1429def : Flag<["-"], "fextended-identifiers">, Group<clang_ignored_f_Group>;
1430def : Flag<["-"], "fno-extended-identifiers">, Group<f_Group>, Flags<[Unsupported]>;
1431def fhosted : Flag<["-"], "fhosted">, Group<f_Group>;
1432def fdenormal_fp_math_EQ : Joined<["-"], "fdenormal-fp-math=">, Group<f_Group>, Flags<[CC1Option]>;
1433def ffp_model_EQ : Joined<["-"], "ffp-model=">, Group<f_Group>, Flags<[NoXarchOption]>,
1434  HelpText<"Controls the semantics of floating-point calculations.">;
1435def ffp_exception_behavior_EQ : Joined<["-"], "ffp-exception-behavior=">, Group<f_Group>, Flags<[CC1Option]>,
1436  HelpText<"Specifies the exception behavior of floating-point operations.">,
1437  Values<"ignore,maytrap,strict">, NormalizedValuesScope<"LangOptions">,
1438  NormalizedValues<["FPE_Ignore", "FPE_MayTrap", "FPE_Strict"]>,
1439  MarshallingInfoEnum<LangOpts<"FPExceptionMode">, "FPE_Ignore">;
1440defm fast_math : BoolFOption<"fast-math",
1441  LangOpts<"FastMath">, DefaultFalse,
1442  PosFlag<SetTrue, [CC1Option], "Allow aggressive, lossy floating-point optimizations",
1443          [cl_fast_relaxed_math.KeyPath]>,
1444  NegFlag<SetFalse>>;
1445def menable_unsafe_fp_math : Flag<["-"], "menable-unsafe-fp-math">, Flags<[CC1Option]>,
1446  HelpText<"Allow unsafe floating-point math optimizations which may decrease precision">,
1447  MarshallingInfoFlag<LangOpts<"UnsafeFPMath">>,
1448  ImpliedByAnyOf<[cl_unsafe_math_optimizations.KeyPath, ffast_math.KeyPath]>;
1449defm math_errno : BoolFOption<"math-errno",
1450  LangOpts<"MathErrno">, DefaultFalse,
1451  PosFlag<SetTrue, [CC1Option], "Require math functions to indicate errors by setting errno">,
1452  NegFlag<SetFalse>>,
1453  ShouldParseIf<!strconcat("!", open_cl.KeyPath)>;
1454def fextend_args_EQ : Joined<["-"], "fextend-arguments=">, Group<f_Group>,
1455  Flags<[CC1Option, NoArgumentUnused]>,
1456  HelpText<"Controls how scalar integer arguments are extended in calls "
1457           "to unprototyped and varargs functions">,
1458  Values<"32,64">,
1459  NormalizedValues<["ExtendTo32", "ExtendTo64"]>,
1460  NormalizedValuesScope<"LangOptions::ExtendArgsKind">,
1461  MarshallingInfoEnum<LangOpts<"ExtendIntArgs">,"ExtendTo32">;
1462def fbracket_depth_EQ : Joined<["-"], "fbracket-depth=">, Group<f_Group>, Flags<[CoreOption]>;
1463def fsignaling_math : Flag<["-"], "fsignaling-math">, Group<f_Group>;
1464def fno_signaling_math : Flag<["-"], "fno-signaling-math">, Group<f_Group>;
1465defm jump_tables : BoolFOption<"jump-tables",
1466  CodeGenOpts<"NoUseJumpTables">, DefaultFalse,
1467  NegFlag<SetTrue, [CC1Option], "Do not use">, PosFlag<SetFalse, [], "Use">,
1468  BothFlags<[], " jump tables for lowering switches">>;
1469defm force_enable_int128 : BoolFOption<"force-enable-int128",
1470  TargetOpts<"ForceEnableInt128">, DefaultFalse,
1471  PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
1472  BothFlags<[], " support for int128_t type">>;
1473defm keep_static_consts : BoolFOption<"keep-static-consts",
1474  CodeGenOpts<"KeepStaticConsts">, DefaultFalse,
1475  PosFlag<SetTrue, [CC1Option], "Keep">, NegFlag<SetFalse, [], "Don't keep">,
1476  BothFlags<[NoXarchOption], " static const variables if unused">>;
1477defm fixed_point : BoolFOption<"fixed-point",
1478  LangOpts<"FixedPoint">, DefaultFalse,
1479  PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
1480  BothFlags<[], " fixed point types">>, ShouldParseIf<!strconcat("!", cplusplus.KeyPath)>;
1481defm cxx_static_destructors : BoolFOption<"c++-static-destructors",
1482  LangOpts<"RegisterStaticDestructors">, DefaultTrue,
1483  NegFlag<SetFalse, [CC1Option], "Disable C++ static destructor registration">,
1484  PosFlag<SetTrue>>;
1485def fsymbol_partition_EQ : Joined<["-"], "fsymbol-partition=">, Group<f_Group>,
1486  Flags<[CC1Option]>, MarshallingInfoString<CodeGenOpts<"SymbolPartition">>;
1487
1488defm memory_profile : OptInFFlag<"memory-profile", "Enable", "Disable", " heap memory profiling">;
1489def fmemory_profile_EQ : Joined<["-"], "fmemory-profile=">,
1490    Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<directory>">,
1491    HelpText<"Enable heap memory profiling and dump results into <directory>">;
1492
1493// Begin sanitizer flags. These should all be core options exposed in all driver
1494// modes.
1495let Flags = [CC1Option, CoreOption] in {
1496
1497def fsanitize_EQ : CommaJoined<["-"], "fsanitize=">, Group<f_clang_Group>,
1498                   MetaVarName<"<check>">,
1499                   HelpText<"Turn on runtime checks for various forms of undefined "
1500                            "or suspicious behavior. See user manual for available checks">;
1501def fno_sanitize_EQ : CommaJoined<["-"], "fno-sanitize=">, Group<f_clang_Group>,
1502                      Flags<[CoreOption, NoXarchOption]>;
1503
1504def fsanitize_ignorelist_EQ : Joined<["-"], "fsanitize-ignorelist=">,
1505  Group<f_clang_Group>, HelpText<"Path to ignorelist file for sanitizers">;
1506def : Joined<["-"], "fsanitize-blacklist=">,
1507  Group<f_clang_Group>, Flags<[HelpHidden]>, Alias<fsanitize_ignorelist_EQ>,
1508  HelpText<"Alias for -fsanitize-ignorelist=">;
1509
1510def fsanitize_system_ignorelist_EQ : Joined<["-"], "fsanitize-system-ignorelist=">,
1511  HelpText<"Path to system ignorelist file for sanitizers">, Flags<[CC1Option]>;
1512def : Joined<["-"], "fsanitize-system-blacklist=">,
1513  HelpText<"Alias for -fsanitize-system-ignorelist=">,
1514  Flags<[CC1Option, HelpHidden]>, Alias<fsanitize_system_ignorelist_EQ>;
1515
1516def fno_sanitize_ignorelist : Flag<["-"], "fno-sanitize-ignorelist">,
1517  Group<f_clang_Group>, HelpText<"Don't use ignorelist file for sanitizers">;
1518def : Flag<["-"], "fno-sanitize-blacklist">,
1519  Group<f_clang_Group>, Flags<[HelpHidden]>, Alias<fno_sanitize_ignorelist>;
1520
1521def fsanitize_coverage : CommaJoined<["-"], "fsanitize-coverage=">,
1522  Group<f_clang_Group>,
1523  HelpText<"Specify the type of coverage instrumentation for Sanitizers">;
1524def fno_sanitize_coverage : CommaJoined<["-"], "fno-sanitize-coverage=">,
1525  Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>,
1526  HelpText<"Disable features of coverage instrumentation for Sanitizers">,
1527  Values<"func,bb,edge,indirect-calls,trace-bb,trace-cmp,trace-div,trace-gep,"
1528         "8bit-counters,trace-pc,trace-pc-guard,no-prune,inline-8bit-counters,"
1529         "inline-bool-flag">;
1530def fsanitize_coverage_allowlist : Joined<["-"], "fsanitize-coverage-allowlist=">,
1531    Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>,
1532    HelpText<"Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones">,
1533    MarshallingInfoStringVector<CodeGenOpts<"SanitizeCoverageAllowlistFiles">>;
1534def : Joined<["-"], "fsanitize-coverage-whitelist=">,
1535  Group<f_clang_Group>, Flags<[CoreOption, HelpHidden]>, Alias<fsanitize_coverage_allowlist>,
1536  HelpText<"Deprecated, use -fsanitize-coverage-allowlist= instead">;
1537def fsanitize_coverage_ignorelist : Joined<["-"], "fsanitize-coverage-ignorelist=">,
1538    Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>,
1539    HelpText<"Disable sanitizer coverage instrumentation for modules and functions "
1540             "that match the provided special case list, even the allowed ones">,
1541    MarshallingInfoStringVector<CodeGenOpts<"SanitizeCoverageIgnorelistFiles">>;
1542def : Joined<["-"], "fsanitize-coverage-blocklist=">,
1543  Group<f_clang_Group>, Flags<[CoreOption, HelpHidden]>,
1544  Alias<fsanitize_coverage_ignorelist>,
1545  HelpText<"Deprecated, use -fsanitize-coverage-ignorelist= instead">;
1546def : Joined<["-"], "fsanitize-coverage-blacklist=">,
1547  Group<f_clang_Group>, Flags<[CoreOption, HelpHidden]>,
1548  Alias<fsanitize_coverage_ignorelist>,
1549  HelpText<"Deprecated, use -fsanitize-coverage-ignorelist= instead">;
1550def fsanitize_memory_track_origins_EQ : Joined<["-"], "fsanitize-memory-track-origins=">,
1551                                        Group<f_clang_Group>,
1552                                        HelpText<"Enable origins tracking in MemorySanitizer">,
1553                                        MarshallingInfoInt<CodeGenOpts<"SanitizeMemoryTrackOrigins">>;
1554def fsanitize_memory_track_origins : Flag<["-"], "fsanitize-memory-track-origins">,
1555                                     Group<f_clang_Group>,
1556                                     HelpText<"Enable origins tracking in MemorySanitizer">;
1557def fno_sanitize_memory_track_origins : Flag<["-"], "fno-sanitize-memory-track-origins">,
1558                                        Group<f_clang_Group>,
1559                                        Flags<[CoreOption, NoXarchOption]>,
1560                                        HelpText<"Disable origins tracking in MemorySanitizer">;
1561def fsanitize_hwaddress_experimental_aliasing
1562  : Flag<["-"], "fsanitize-hwaddress-experimental-aliasing">,
1563    Group<f_clang_Group>,
1564    HelpText<"Enable aliasing mode in HWAddressSanitizer">;
1565def fno_sanitize_hwaddress_experimental_aliasing
1566  : Flag<["-"], "fno-sanitize-hwaddress-experimental-aliasing">,
1567    Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>,
1568    HelpText<"Disable aliasing mode in HWAddressSanitizer">;
1569defm sanitize_memory_use_after_dtor : BoolOption<"f", "sanitize-memory-use-after-dtor",
1570  CodeGenOpts<"SanitizeMemoryUseAfterDtor">, DefaultFalse,
1571  PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
1572  BothFlags<[], " use-after-destroy detection in MemorySanitizer">>,
1573  Group<f_clang_Group>;
1574def fsanitize_address_field_padding : Joined<["-"], "fsanitize-address-field-padding=">,
1575                                        Group<f_clang_Group>,
1576                                        HelpText<"Level of field padding for AddressSanitizer">,
1577                                        MarshallingInfoInt<LangOpts<"SanitizeAddressFieldPadding">>;
1578defm sanitize_address_use_after_scope : BoolOption<"f", "sanitize-address-use-after-scope",
1579  CodeGenOpts<"SanitizeAddressUseAfterScope">, DefaultFalse,
1580  PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Disable">,
1581  BothFlags<[], " use-after-scope detection in AddressSanitizer">>,
1582  Group<f_clang_Group>;
1583defm sanitize_address_poison_custom_array_cookie : BoolOption<"f", "sanitize-address-poison-custom-array-cookie",
1584  CodeGenOpts<"SanitizeAddressPoisonCustomArrayCookie">, DefaultFalse,
1585  PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">,
1586  BothFlags<[], " poisoning array cookies when using custom operator new[] in AddressSanitizer">>,
1587  Group<f_clang_Group>;
1588def fsanitize_address_globals_dead_stripping : Flag<["-"], "fsanitize-address-globals-dead-stripping">,
1589  Group<f_clang_Group>, HelpText<"Enable linker dead stripping of globals in AddressSanitizer">,
1590  MarshallingInfoFlag<CodeGenOpts<"SanitizeAddressGlobalsDeadStripping">, "false">;
1591defm sanitize_address_use_odr_indicator : BoolOption<"f", "sanitize-address-use-odr-indicator",
1592  CodeGenOpts<"SanitizeAddressUseOdrIndicator">, DefaultFalse,
1593  PosFlag<SetTrue, [], "Enable ODR indicator globals to avoid false ODR violation"
1594            " reports in partially sanitized programs at the cost of an increase in binary size">,
1595  NegFlag<SetFalse, [], "Disable ODR indicator globals">>,
1596  Group<f_clang_Group>;
1597def sanitize_address_destructor_EQ
1598    : Joined<["-"], "fsanitize-address-destructor=">,
1599      Flags<[CC1Option]>,
1600      HelpText<"Set destructor type used in ASan instrumentation">,
1601      Group<f_clang_Group>,
1602      Values<"none,global">,
1603      NormalizedValuesScope<"llvm::AsanDtorKind">,
1604      NormalizedValues<["None", "Global"]>,
1605      MarshallingInfoEnum<CodeGenOpts<"SanitizeAddressDtor">, "Global">;
1606// Note: This flag was introduced when it was necessary to distinguish between
1607//       ABI for correct codegen.  This is no longer needed, but the flag is
1608//       not removed since targeting either ABI will behave the same.
1609//       This way we cause no disturbance to existing scripts & code, and if we
1610//       want to use this flag in the future we will cause no disturbance then
1611//       either.
1612def fsanitize_hwaddress_abi_EQ
1613    : Joined<["-"], "fsanitize-hwaddress-abi=">,
1614      Group<f_clang_Group>,
1615      HelpText<"Select the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor). This option is currently unused.">;
1616def fsanitize_recover_EQ : CommaJoined<["-"], "fsanitize-recover=">,
1617                           Group<f_clang_Group>,
1618                           HelpText<"Enable recovery for specified sanitizers">;
1619def fno_sanitize_recover_EQ : CommaJoined<["-"], "fno-sanitize-recover=">,
1620                              Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>,
1621                              HelpText<"Disable recovery for specified sanitizers">;
1622def fsanitize_recover : Flag<["-"], "fsanitize-recover">, Group<f_clang_Group>,
1623                        Alias<fsanitize_recover_EQ>, AliasArgs<["all"]>;
1624def fno_sanitize_recover : Flag<["-"], "fno-sanitize-recover">,
1625                           Flags<[CoreOption, NoXarchOption]>, Group<f_clang_Group>,
1626                           Alias<fno_sanitize_recover_EQ>, AliasArgs<["all"]>;
1627def fsanitize_trap_EQ : CommaJoined<["-"], "fsanitize-trap=">, Group<f_clang_Group>,
1628                        HelpText<"Enable trapping for specified sanitizers">;
1629def fno_sanitize_trap_EQ : CommaJoined<["-"], "fno-sanitize-trap=">, Group<f_clang_Group>,
1630                           Flags<[CoreOption, NoXarchOption]>,
1631                           HelpText<"Disable trapping for specified sanitizers">;
1632def fsanitize_trap : Flag<["-"], "fsanitize-trap">, Group<f_clang_Group>,
1633                     Alias<fsanitize_trap_EQ>, AliasArgs<["all"]>,
1634                     HelpText<"Enable trapping for all sanitizers">;
1635def fno_sanitize_trap : Flag<["-"], "fno-sanitize-trap">, Group<f_clang_Group>,
1636                        Alias<fno_sanitize_trap_EQ>, AliasArgs<["all"]>,
1637                        Flags<[CoreOption, NoXarchOption]>,
1638                        HelpText<"Disable trapping for all sanitizers">;
1639def fsanitize_undefined_trap_on_error
1640    : Flag<["-"], "fsanitize-undefined-trap-on-error">, Group<f_clang_Group>,
1641      Alias<fsanitize_trap_EQ>, AliasArgs<["undefined"]>;
1642def fno_sanitize_undefined_trap_on_error
1643    : Flag<["-"], "fno-sanitize-undefined-trap-on-error">, Group<f_clang_Group>,
1644      Alias<fno_sanitize_trap_EQ>, AliasArgs<["undefined"]>;
1645defm sanitize_minimal_runtime : BoolOption<"f", "sanitize-minimal-runtime",
1646  CodeGenOpts<"SanitizeMinimalRuntime">, DefaultFalse,
1647  PosFlag<SetTrue>, NegFlag<SetFalse>>,
1648  Group<f_clang_Group>;
1649def fsanitize_link_runtime : Flag<["-"], "fsanitize-link-runtime">,
1650                           Group<f_clang_Group>;
1651def fno_sanitize_link_runtime : Flag<["-"], "fno-sanitize-link-runtime">,
1652                              Group<f_clang_Group>;
1653def fsanitize_link_cxx_runtime : Flag<["-"], "fsanitize-link-c++-runtime">,
1654                                 Group<f_clang_Group>;
1655def fno_sanitize_link_cxx_runtime : Flag<["-"], "fno-sanitize-link-c++-runtime">,
1656                                    Group<f_clang_Group>;
1657defm sanitize_cfi_cross_dso : BoolOption<"f", "sanitize-cfi-cross-dso",
1658  CodeGenOpts<"SanitizeCfiCrossDso">, DefaultFalse,
1659  PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Disable">,
1660  BothFlags<[], " control flow integrity (CFI) checks for cross-DSO calls.">>,
1661  Group<f_clang_Group>;
1662def fsanitize_cfi_icall_generalize_pointers : Flag<["-"], "fsanitize-cfi-icall-generalize-pointers">,
1663                                              Group<f_clang_Group>,
1664                                              HelpText<"Generalize pointers in CFI indirect call type signature checks">,
1665                                              MarshallingInfoFlag<CodeGenOpts<"SanitizeCfiICallGeneralizePointers">>;
1666defm sanitize_cfi_canonical_jump_tables : BoolOption<"f", "sanitize-cfi-canonical-jump-tables",
1667  CodeGenOpts<"SanitizeCfiCanonicalJumpTables">, DefaultFalse,
1668  PosFlag<SetTrue, [], "Make">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Do not make">,
1669  BothFlags<[], " the jump table addresses canonical in the symbol table">>,
1670  Group<f_clang_Group>;
1671defm sanitize_stats : BoolOption<"f", "sanitize-stats",
1672  CodeGenOpts<"SanitizeStats">, DefaultFalse,
1673  PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Disable">,
1674  BothFlags<[], " sanitizer statistics gathering.">>,
1675  Group<f_clang_Group>;
1676def fsanitize_thread_memory_access : Flag<["-"], "fsanitize-thread-memory-access">,
1677                                     Group<f_clang_Group>,
1678                                     HelpText<"Enable memory access instrumentation in ThreadSanitizer (default)">;
1679def fno_sanitize_thread_memory_access : Flag<["-"], "fno-sanitize-thread-memory-access">,
1680                                        Group<f_clang_Group>,
1681                                        Flags<[CoreOption, NoXarchOption]>,
1682                                        HelpText<"Disable memory access instrumentation in ThreadSanitizer">;
1683def fsanitize_thread_func_entry_exit : Flag<["-"], "fsanitize-thread-func-entry-exit">,
1684                                       Group<f_clang_Group>,
1685                                       HelpText<"Enable function entry/exit instrumentation in ThreadSanitizer (default)">;
1686def fno_sanitize_thread_func_entry_exit : Flag<["-"], "fno-sanitize-thread-func-entry-exit">,
1687                                          Group<f_clang_Group>,
1688                                          Flags<[CoreOption, NoXarchOption]>,
1689                                          HelpText<"Disable function entry/exit instrumentation in ThreadSanitizer">;
1690def fsanitize_thread_atomics : Flag<["-"], "fsanitize-thread-atomics">,
1691                               Group<f_clang_Group>,
1692                               HelpText<"Enable atomic operations instrumentation in ThreadSanitizer (default)">;
1693def fno_sanitize_thread_atomics : Flag<["-"], "fno-sanitize-thread-atomics">,
1694                                  Group<f_clang_Group>,
1695                                  Flags<[CoreOption, NoXarchOption]>,
1696                                  HelpText<"Disable atomic operations instrumentation in ThreadSanitizer">;
1697def fsanitize_undefined_strip_path_components_EQ : Joined<["-"], "fsanitize-undefined-strip-path-components=">,
1698  Group<f_clang_Group>, MetaVarName<"<number>">,
1699  HelpText<"Strip (or keep only, if negative) a given number of path components "
1700           "when emitting check metadata.">,
1701  MarshallingInfoInt<CodeGenOpts<"EmitCheckPathComponentsToStrip">, "0", "int">;
1702
1703} // end -f[no-]sanitize* flags
1704
1705def funsafe_math_optimizations : Flag<["-"], "funsafe-math-optimizations">,
1706  Group<f_Group>;
1707def fno_unsafe_math_optimizations : Flag<["-"], "fno-unsafe-math-optimizations">,
1708  Group<f_Group>;
1709def fassociative_math : Flag<["-"], "fassociative-math">, Group<f_Group>;
1710def fno_associative_math : Flag<["-"], "fno-associative-math">, Group<f_Group>;
1711defm reciprocal_math : BoolFOption<"reciprocal-math",
1712  LangOpts<"AllowRecip">, DefaultFalse,
1713  PosFlag<SetTrue, [CC1Option], "Allow division operations to be reassociated",
1714          [menable_unsafe_fp_math.KeyPath]>,
1715  NegFlag<SetFalse>>;
1716def fapprox_func : Flag<["-"], "fapprox-func">, Group<f_Group>, Flags<[CC1Option, NoDriverOption]>,
1717  MarshallingInfoFlag<LangOpts<"ApproxFunc">>, ImpliedByAnyOf<[menable_unsafe_fp_math.KeyPath]>;
1718defm finite_math_only : BoolFOption<"finite-math-only",
1719  LangOpts<"FiniteMathOnly">, DefaultFalse,
1720  PosFlag<SetTrue, [CC1Option], "", [cl_finite_math_only.KeyPath, ffast_math.KeyPath]>,
1721  NegFlag<SetFalse>>;
1722defm signed_zeros : BoolFOption<"signed-zeros",
1723  LangOpts<"NoSignedZero">, DefaultFalse,
1724  NegFlag<SetTrue, [CC1Option], "Allow optimizations that ignore the sign of floating point zeros",
1725            [cl_no_signed_zeros.KeyPath, menable_unsafe_fp_math.KeyPath]>,
1726  PosFlag<SetFalse>>;
1727def fhonor_nans : Flag<["-"], "fhonor-nans">, Group<f_Group>;
1728def fno_honor_nans : Flag<["-"], "fno-honor-nans">, Group<f_Group>;
1729def fhonor_infinities : Flag<["-"], "fhonor-infinities">, Group<f_Group>;
1730def fno_honor_infinities : Flag<["-"], "fno-honor-infinities">, Group<f_Group>;
1731// This option was originally misspelt "infinites" [sic].
1732def : Flag<["-"], "fhonor-infinites">, Alias<fhonor_infinities>;
1733def : Flag<["-"], "fno-honor-infinites">, Alias<fno_honor_infinities>;
1734def frounding_math : Flag<["-"], "frounding-math">, Group<f_Group>, Flags<[CC1Option]>,
1735  MarshallingInfoFlag<LangOpts<"FPRoundingMode">, "llvm::RoundingMode::NearestTiesToEven">,
1736  Normalizer<"makeFlagToValueNormalizer(llvm::RoundingMode::Dynamic)">;
1737def fno_rounding_math : Flag<["-"], "fno-rounding-math">, Group<f_Group>, Flags<[CC1Option]>;
1738def ftrapping_math : Flag<["-"], "ftrapping-math">, Group<f_Group>;
1739def fno_trapping_math : Flag<["-"], "fno-trapping-math">, Group<f_Group>;
1740def ffp_contract : Joined<["-"], "ffp-contract=">, Group<f_Group>,
1741  Flags<[CC1Option]>, HelpText<"Form fused FP ops (e.g. FMAs):"
1742  " fast (fuses across statements disregarding pragmas)"
1743  " | on (only fuses in the same statement unless dictated by pragmas)"
1744  " | off (never fuses)"
1745  " | fast-honor-pragmas (fuses across statements unless diectated by pragmas)."
1746  " Default is 'fast' for CUDA, 'fast-honor-pragmas' for HIP, and 'on' otherwise.">,
1747  Values<"fast,on,off,fast-honor-pragmas">;
1748
1749defm strict_float_cast_overflow : BoolFOption<"strict-float-cast-overflow",
1750  CodeGenOpts<"StrictFloatCastOverflow">, DefaultTrue,
1751  NegFlag<SetFalse, [CC1Option], "Relax language rules and try to match the behavior"
1752            " of the target's native float-to-int conversion instructions">,
1753  PosFlag<SetTrue, [], "Assume that overflowing float-to-int casts are undefined (default)">>;
1754
1755def ffor_scope : Flag<["-"], "ffor-scope">, Group<f_Group>;
1756def fno_for_scope : Flag<["-"], "fno-for-scope">, Group<f_Group>;
1757
1758defm rewrite_imports : BoolFOption<"rewrite-imports",
1759  PreprocessorOutputOpts<"RewriteImports">, DefaultFalse,
1760  PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>;
1761defm rewrite_includes : BoolFOption<"rewrite-includes",
1762  PreprocessorOutputOpts<"RewriteIncludes">, DefaultFalse,
1763  PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>;
1764
1765defm delete_null_pointer_checks : BoolFOption<"delete-null-pointer-checks",
1766  CodeGenOpts<"NullPointerIsValid">, DefaultFalse,
1767  NegFlag<SetTrue, [CC1Option], "Do not treat usage of null pointers as undefined behavior">,
1768  PosFlag<SetFalse, [], "Treat usage of null pointers as undefined behavior (default)">,
1769  BothFlags<[CoreOption]>>;
1770
1771def frewrite_map_file_EQ : Joined<["-"], "frewrite-map-file=">,
1772                           Group<f_Group>,
1773                           Flags<[NoXarchOption, CC1Option]>,
1774                           MarshallingInfoStringVector<CodeGenOpts<"RewriteMapFiles">>;
1775
1776defm use_line_directives : BoolFOption<"use-line-directives",
1777  PreprocessorOutputOpts<"UseLineDirectives">, DefaultFalse,
1778  PosFlag<SetTrue, [CC1Option], "Use #line in preprocessed output">, NegFlag<SetFalse>>;
1779
1780def ffreestanding : Flag<["-"], "ffreestanding">, Group<f_Group>, Flags<[CC1Option]>,
1781  HelpText<"Assert that the compilation takes place in a freestanding environment">,
1782  MarshallingInfoFlag<LangOpts<"Freestanding">>;
1783def fgnuc_version_EQ : Joined<["-"], "fgnuc-version=">, Group<f_Group>,
1784  HelpText<"Sets various macros to claim compatibility with the given GCC version (default is 4.2.1)">,
1785  Flags<[CC1Option, CoreOption]>;
1786// We abuse '-f[no-]gnu-keywords' to force overriding all GNU-extension
1787// keywords. This behavior is provided by GCC's poorly named '-fasm' flag,
1788// while a subset (the non-C++ GNU keywords) is provided by GCC's
1789// '-fgnu-keywords'. Clang conflates the two for simplicity under the single
1790// name, as it doesn't seem a useful distinction.
1791defm gnu_keywords : BoolFOption<"gnu-keywords",
1792  LangOpts<"GNUKeywords">, Default<gnu_mode.KeyPath>,
1793  PosFlag<SetTrue, [], "Allow GNU-extension keywords regardless of language standard">,
1794  NegFlag<SetFalse>, BothFlags<[CC1Option]>>;
1795defm gnu89_inline : BoolFOption<"gnu89-inline",
1796  LangOpts<"GNUInline">, Default<!strconcat("!", c99.KeyPath, " && !", cplusplus.KeyPath)>,
1797  PosFlag<SetTrue, [CC1Option], "Use the gnu89 inline semantics">,
1798  NegFlag<SetFalse>>, ShouldParseIf<!strconcat("!", cplusplus.KeyPath)>;
1799def fgnu_runtime : Flag<["-"], "fgnu-runtime">, Group<f_Group>,
1800  HelpText<"Generate output compatible with the standard GNU Objective-C runtime">;
1801def fheinous_gnu_extensions : Flag<["-"], "fheinous-gnu-extensions">, Flags<[CC1Option]>,
1802  MarshallingInfoFlag<LangOpts<"HeinousExtensions">>;
1803def filelist : Separate<["-"], "filelist">, Flags<[LinkerInput]>,
1804               Group<Link_Group>;
1805def : Flag<["-"], "findirect-virtual-calls">, Alias<fapple_kext>;
1806def finline_functions : Flag<["-"], "finline-functions">, Group<f_clang_Group>, Flags<[CC1Option]>,
1807  HelpText<"Inline suitable functions">;
1808def finline_hint_functions: Flag<["-"], "finline-hint-functions">, Group<f_clang_Group>, Flags<[CC1Option]>,
1809  HelpText<"Inline functions which are (explicitly or implicitly) marked inline">;
1810def finline : Flag<["-"], "finline">, Group<clang_ignored_f_Group>;
1811def fglobal_isel : Flag<["-"], "fglobal-isel">, Group<f_clang_Group>,
1812  HelpText<"Enables the global instruction selector">;
1813def fexperimental_isel : Flag<["-"], "fexperimental-isel">, Group<f_clang_Group>,
1814  Alias<fglobal_isel>;
1815defm legacy_pass_manager : BoolOption<"f", "legacy-pass-manager",
1816  CodeGenOpts<"LegacyPassManager">, Default<"!static_cast<unsigned>(LLVM_ENABLE_NEW_PASS_MANAGER)">,
1817  PosFlag<SetTrue, [], "Use the legacy pass manager in LLVM">,
1818  NegFlag<SetFalse, [], "Use the new pass manager in LLVM">,
1819  BothFlags<[CC1Option]>>, Group<f_clang_Group>;
1820def fexperimental_new_pass_manager : Flag<["-"], "fexperimental-new-pass-manager">,
1821  Group<f_clang_Group>, Flags<[CC1Option]>, Alias<fno_legacy_pass_manager>;
1822def fno_experimental_new_pass_manager : Flag<["-"], "fno-experimental-new-pass-manager">,
1823  Group<f_clang_Group>, Flags<[CC1Option]>, Alias<flegacy_pass_manager>;
1824def fexperimental_strict_floating_point : Flag<["-"], "fexperimental-strict-floating-point">,
1825  Group<f_clang_Group>, Flags<[CC1Option]>,
1826  HelpText<"Enables experimental strict floating point in LLVM.">,
1827  MarshallingInfoFlag<LangOpts<"ExpStrictFP">>;
1828def finput_charset_EQ : Joined<["-"], "finput-charset=">, Flags<[FlangOption, FC1Option]>, Group<f_Group>,
1829  HelpText<"Specify the default character set for source files">;
1830def fexec_charset_EQ : Joined<["-"], "fexec-charset=">, Group<f_Group>;
1831def finstrument_functions : Flag<["-"], "finstrument-functions">, Group<f_Group>, Flags<[CC1Option]>,
1832  HelpText<"Generate calls to instrument function entry and exit">,
1833  MarshallingInfoFlag<CodeGenOpts<"InstrumentFunctions">>;
1834def finstrument_functions_after_inlining : Flag<["-"], "finstrument-functions-after-inlining">, Group<f_Group>, Flags<[CC1Option]>,
1835  HelpText<"Like -finstrument-functions, but insert the calls after inlining">,
1836  MarshallingInfoFlag<CodeGenOpts<"InstrumentFunctionsAfterInlining">>;
1837def finstrument_function_entry_bare : Flag<["-"], "finstrument-function-entry-bare">, Group<f_Group>, Flags<[CC1Option]>,
1838  HelpText<"Instrument function entry only, after inlining, without arguments to the instrumentation call">,
1839  MarshallingInfoFlag<CodeGenOpts<"InstrumentFunctionEntryBare">>;
1840def fcf_protection_EQ : Joined<["-"], "fcf-protection=">, Flags<[CoreOption, CC1Option]>, Group<f_Group>,
1841  HelpText<"Instrument control-flow architecture protection. Options: return, branch, full, none.">, Values<"return,branch,full,none">;
1842def fcf_protection : Flag<["-"], "fcf-protection">, Group<f_Group>, Flags<[CoreOption, CC1Option]>,
1843  Alias<fcf_protection_EQ>, AliasArgs<["full"]>,
1844  HelpText<"Enable cf-protection in 'full' mode">;
1845
1846defm xray_instrument : BoolFOption<"xray-instrument",
1847  LangOpts<"XRayInstrument">, DefaultFalse,
1848  PosFlag<SetTrue, [CC1Option], "Generate XRay instrumentation sleds on function entry and exit">,
1849  NegFlag<SetFalse>>;
1850
1851def fxray_instruction_threshold_EQ :
1852  JoinedOrSeparate<["-"], "fxray-instruction-threshold=">,
1853  Group<f_Group>, Flags<[CC1Option]>,
1854  HelpText<"Sets the minimum function size to instrument with XRay">,
1855  MarshallingInfoInt<CodeGenOpts<"XRayInstructionThreshold">, "200">;
1856def fxray_instruction_threshold_ :
1857  JoinedOrSeparate<["-"], "fxray-instruction-threshold">,
1858  Group<f_Group>, Flags<[CC1Option]>;
1859
1860def fxray_always_instrument :
1861  JoinedOrSeparate<["-"], "fxray-always-instrument=">,
1862  Group<f_Group>, Flags<[CC1Option]>,
1863  HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.">,
1864  MarshallingInfoStringVector<LangOpts<"XRayAlwaysInstrumentFiles">>;
1865def fxray_never_instrument :
1866  JoinedOrSeparate<["-"], "fxray-never-instrument=">,
1867  Group<f_Group>, Flags<[CC1Option]>,
1868  HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.">,
1869  MarshallingInfoStringVector<LangOpts<"XRayNeverInstrumentFiles">>;
1870def fxray_attr_list :
1871  JoinedOrSeparate<["-"], "fxray-attr-list=">,
1872  Group<f_Group>, Flags<[CC1Option]>,
1873  HelpText<"Filename defining the list of functions/types for imbuing XRay attributes.">,
1874  MarshallingInfoStringVector<LangOpts<"XRayAttrListFiles">>;
1875def fxray_modes :
1876  JoinedOrSeparate<["-"], "fxray-modes=">,
1877  Group<f_Group>, Flags<[CC1Option]>,
1878  HelpText<"List of modes to link in by default into XRay instrumented binaries.">;
1879
1880defm xray_always_emit_customevents : BoolFOption<"xray-always-emit-customevents",
1881  LangOpts<"XRayAlwaysEmitCustomEvents">, DefaultFalse,
1882  PosFlag<SetTrue, [CC1Option], "Always emit __xray_customevent(...) calls"
1883          " even if the containing function is not always instrumented">,
1884  NegFlag<SetFalse>>;
1885
1886defm xray_always_emit_typedevents : BoolFOption<"xray-always-emit-typedevents",
1887  LangOpts<"XRayAlwaysEmitTypedEvents">, DefaultFalse,
1888  PosFlag<SetTrue, [CC1Option], "Always emit __xray_typedevent(...) calls"
1889          " even if the containing function is not always instrumented">,
1890  NegFlag<SetFalse>>;
1891
1892defm xray_ignore_loops : BoolFOption<"xray-ignore-loops",
1893  CodeGenOpts<"XRayIgnoreLoops">, DefaultFalse,
1894  PosFlag<SetTrue, [CC1Option], "Don't instrument functions with loops"
1895          " unless they also meet the minimum function size">,
1896  NegFlag<SetFalse>>;
1897
1898defm xray_function_index : BoolFOption<"xray-function-index",
1899  CodeGenOpts<"XRayOmitFunctionIndex">, DefaultTrue,
1900  NegFlag<SetFalse, [CC1Option], "Omit function index section at the"
1901          " expense of single-function patching performance">,
1902  PosFlag<SetTrue>>;
1903
1904def fxray_link_deps : Flag<["-"], "fxray-link-deps">, Group<f_Group>,
1905  Flags<[CC1Option]>,
1906  HelpText<"Tells clang to add the link dependencies for XRay.">;
1907def fnoxray_link_deps : Flag<["-"], "fnoxray-link-deps">, Group<f_Group>,
1908  Flags<[CC1Option]>;
1909
1910def fxray_instrumentation_bundle :
1911  JoinedOrSeparate<["-"], "fxray-instrumentation-bundle=">,
1912  Group<f_Group>, Flags<[CC1Option]>,
1913  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'.">;
1914
1915def fxray_function_groups :
1916  Joined<["-"], "fxray-function-groups=">,
1917  Group<f_Group>, Flags<[CC1Option]>,
1918  HelpText<"Only instrument 1 of N groups">,
1919  MarshallingInfoInt<CodeGenOpts<"XRayTotalFunctionGroups">, "1">;
1920
1921def fxray_selected_function_group :
1922  Joined<["-"], "fxray-selected-function-group=">,
1923  Group<f_Group>, Flags<[CC1Option]>,
1924  HelpText<"When using -fxray-function-groups, select which group of functions to instrument. Valid range is 0 to fxray-function-groups - 1">,
1925  MarshallingInfoInt<CodeGenOpts<"XRaySelectedFunctionGroup">, "0">;
1926
1927
1928defm fine_grained_bitfield_accesses : BoolOption<"f", "fine-grained-bitfield-accesses",
1929  CodeGenOpts<"FineGrainedBitfieldAccesses">, DefaultFalse,
1930  PosFlag<SetTrue, [], "Use separate accesses for consecutive bitfield runs with legal widths and alignments.">,
1931  NegFlag<SetFalse, [], "Use large-integer access for consecutive bitfield runs.">,
1932  BothFlags<[CC1Option]>>,
1933  Group<f_clang_Group>;
1934
1935defm experimental_relative_cxx_abi_vtables : BoolFOption<"experimental-relative-c++-abi-vtables",
1936  LangOpts<"RelativeCXXABIVTables">, DefaultFalse,
1937  PosFlag<SetTrue, [], "Use">, NegFlag<SetFalse, [], "Do not use">,
1938  BothFlags<[CC1Option], " the experimental C++ class ABI for classes with virtual tables">>;
1939
1940def fcxx_abi_EQ : Joined<["-"], "fc++-abi=">,
1941                  Group<f_clang_Group>, Flags<[CC1Option]>,
1942                  HelpText<"C++ ABI to use. This will override the target C++ ABI.">;
1943
1944def flat__namespace : Flag<["-"], "flat_namespace">;
1945def flax_vector_conversions_EQ : Joined<["-"], "flax-vector-conversions=">, Group<f_Group>,
1946  HelpText<"Enable implicit vector bit-casts">, Values<"none,integer,all">, Flags<[CC1Option]>,
1947  NormalizedValues<["LangOptions::LaxVectorConversionKind::None",
1948                    "LangOptions::LaxVectorConversionKind::Integer",
1949                    "LangOptions::LaxVectorConversionKind::All"]>,
1950  MarshallingInfoEnum<LangOpts<"LaxVectorConversions">,
1951                      open_cl.KeyPath #
1952                          " ? LangOptions::LaxVectorConversionKind::None" #
1953                          " : LangOptions::LaxVectorConversionKind::All">;
1954def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group<f_Group>,
1955  Alias<flax_vector_conversions_EQ>, AliasArgs<["integer"]>;
1956def flimited_precision_EQ : Joined<["-"], "flimited-precision=">, Group<f_Group>;
1957def fapple_link_rtlib : Flag<["-"], "fapple-link-rtlib">, Group<f_Group>,
1958  HelpText<"Force linking the clang builtins runtime library">;
1959def flto_EQ : Joined<["-"], "flto=">, Flags<[CoreOption, CC1Option]>, Group<f_Group>,
1960  HelpText<"Set LTO mode to either 'full' or 'thin'">, Values<"thin,full">;
1961def flto_EQ_jobserver : Flag<["-"], "flto=jobserver">, Group<f_Group>;
1962def flto_EQ_auto : Flag<["-"], "flto=auto">, Group<f_Group>;
1963def flto : Flag<["-"], "flto">, Flags<[CoreOption, CC1Option]>, Group<f_Group>,
1964  HelpText<"Enable LTO in 'full' mode">;
1965def fno_lto : Flag<["-"], "fno-lto">, Flags<[CoreOption, CC1Option]>, Group<f_Group>,
1966  HelpText<"Disable LTO mode (default)">;
1967def foffload_lto_EQ : Joined<["-"], "foffload-lto=">, Flags<[CoreOption]>, Group<f_Group>,
1968  HelpText<"Set LTO mode to either 'full' or 'thin' for offload compilation">, Values<"thin,full">;
1969def foffload_lto : Flag<["-"], "foffload-lto">, Flags<[CoreOption]>, Group<f_Group>,
1970  HelpText<"Enable LTO in 'full' mode for offload compilation">;
1971def fno_offload_lto : Flag<["-"], "fno-offload-lto">, Flags<[CoreOption]>, Group<f_Group>,
1972  HelpText<"Disable LTO mode (default) for offload compilation">;
1973def flto_jobs_EQ : Joined<["-"], "flto-jobs=">,
1974  Flags<[CC1Option]>, Group<f_Group>,
1975  HelpText<"Controls the backend parallelism of -flto=thin (default "
1976           "of 0 means the number of threads will be derived from "
1977           "the number of CPUs detected)">;
1978def fthinlto_index_EQ : Joined<["-"], "fthinlto-index=">,
1979  Flags<[CoreOption, CC1Option]>, Group<f_Group>,
1980  HelpText<"Perform ThinLTO importing using provided function summary index">;
1981def fthin_link_bitcode_EQ : Joined<["-"], "fthin-link-bitcode=">,
1982  Flags<[CoreOption, CC1Option]>, Group<f_Group>,
1983  HelpText<"Write minimized bitcode to <file> for the ThinLTO thin link only">,
1984  MarshallingInfoString<CodeGenOpts<"ThinLinkBitcodeFile">>;
1985def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">,
1986                                Group<f_Group>, Flags<[NoXarchOption, CoreOption]>;
1987defm merge_all_constants : BoolFOption<"merge-all-constants",
1988  CodeGenOpts<"MergeAllConstants">, DefaultFalse,
1989  PosFlag<SetTrue, [CC1Option, CoreOption], "Allow">, NegFlag<SetFalse, [], "Disallow">,
1990  BothFlags<[], " merging of constants">>;
1991def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group<f_Group>, Flags<[CC1Option]>,
1992  HelpText<"Format message diagnostics so that they fit within N columns">,
1993  MarshallingInfoInt<DiagnosticOpts<"MessageLength">>;
1994def fms_compatibility : Flag<["-"], "fms-compatibility">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
1995  HelpText<"Enable full Microsoft Visual C++ compatibility">,
1996  MarshallingInfoFlag<LangOpts<"MSVCCompat">>;
1997def fms_extensions : Flag<["-"], "fms-extensions">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
1998  HelpText<"Accept some non-standard constructs supported by the Microsoft compiler">,
1999  MarshallingInfoFlag<LangOpts<"MicrosoftExt">>, ImpliedByAnyOf<[fms_compatibility.KeyPath]>;
2000defm asm_blocks : BoolFOption<"asm-blocks",
2001  LangOpts<"AsmBlocks">, Default<fms_extensions.KeyPath>,
2002  PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>;
2003def fms_volatile : Flag<["-"], "fms-volatile">, Group<f_Group>, Flags<[CC1Option]>,
2004  MarshallingInfoFlag<CodeGenOpts<"MSVolatile">>;
2005def fmsc_version : Joined<["-"], "fmsc-version=">, Group<f_Group>, Flags<[NoXarchOption, CoreOption]>,
2006  HelpText<"Microsoft compiler version number to report in _MSC_VER (0 = don't define it (default))">;
2007def fms_compatibility_version
2008    : Joined<["-"], "fms-compatibility-version=">,
2009      Group<f_Group>,
2010      Flags<[ CC1Option, CoreOption ]>,
2011      HelpText<"Dot-separated value representing the Microsoft compiler "
2012               "version number to report in _MSC_VER (0 = don't define it "
2013               "(default))">;
2014defm delayed_template_parsing : BoolFOption<"delayed-template-parsing",
2015  LangOpts<"DelayedTemplateParsing">, DefaultFalse,
2016  PosFlag<SetTrue, [CC1Option], "Parse templated function definitions at the end of the translation unit">,
2017  NegFlag<SetFalse, [NoXarchOption], "Disable delayed template parsing">,
2018  BothFlags<[CoreOption]>>;
2019def fms_memptr_rep_EQ : Joined<["-"], "fms-memptr-rep=">, Group<f_Group>, Flags<[CC1Option]>,
2020  Values<"single,multiple,virtual">, NormalizedValuesScope<"LangOptions">,
2021  NormalizedValues<["PPTMK_FullGeneralitySingleInheritance", "PPTMK_FullGeneralityMultipleInheritance",
2022                    "PPTMK_FullGeneralityVirtualInheritance"]>,
2023  MarshallingInfoEnum<LangOpts<"MSPointerToMemberRepresentationMethod">, "PPTMK_BestCase">;
2024// __declspec is enabled by default for the PS4 by the driver, and also
2025// enabled for Microsoft Extensions or Borland Extensions, here.
2026//
2027// FIXME: __declspec is also currently enabled for CUDA, but isn't really a
2028// CUDA extension. However, it is required for supporting
2029// __clang_cuda_builtin_vars.h, which uses __declspec(property). Once that has
2030// been rewritten in terms of something more generic, remove the Opts.CUDA
2031// term here.
2032defm declspec : BoolOption<"f", "declspec",
2033  LangOpts<"DeclSpecKeyword">, DefaultFalse,
2034  PosFlag<SetTrue, [], "Allow", [fms_extensions.KeyPath, fborland_extensions.KeyPath, cuda.KeyPath]>,
2035  NegFlag<SetFalse, [], "Disallow">,
2036  BothFlags<[CC1Option], " __declspec as a keyword">>, Group<f_clang_Group>;
2037def fmodules_cache_path : Joined<["-"], "fmodules-cache-path=">, Group<i_Group>,
2038  Flags<[NoXarchOption, CC1Option]>, MetaVarName<"<directory>">,
2039  HelpText<"Specify the module cache path">;
2040def fmodules_user_build_path : Separate<["-"], "fmodules-user-build-path">, Group<i_Group>,
2041  Flags<[NoXarchOption, CC1Option]>, MetaVarName<"<directory>">,
2042  HelpText<"Specify the module user build path">,
2043  MarshallingInfoString<HeaderSearchOpts<"ModuleUserBuildPath">>;
2044def fprebuilt_module_path : Joined<["-"], "fprebuilt-module-path=">, Group<i_Group>,
2045  Flags<[NoXarchOption, CC1Option]>, MetaVarName<"<directory>">,
2046  HelpText<"Specify the prebuilt module path">;
2047defm prebuilt_implicit_modules : BoolFOption<"prebuilt-implicit-modules",
2048  HeaderSearchOpts<"EnablePrebuiltImplicitModules">, DefaultFalse,
2049  PosFlag<SetTrue, [], "Look up implicit modules in the prebuilt module path">,
2050  NegFlag<SetFalse>, BothFlags<[NoXarchOption, CC1Option]>>;
2051
2052def fmodules_prune_interval : Joined<["-"], "fmodules-prune-interval=">, Group<i_Group>,
2053  Flags<[CC1Option]>, MetaVarName<"<seconds>">,
2054  HelpText<"Specify the interval (in seconds) between attempts to prune the module cache">,
2055  MarshallingInfoInt<HeaderSearchOpts<"ModuleCachePruneInterval">, "7 * 24 * 60 * 60">;
2056def fmodules_prune_after : Joined<["-"], "fmodules-prune-after=">, Group<i_Group>,
2057  Flags<[CC1Option]>, MetaVarName<"<seconds>">,
2058  HelpText<"Specify the interval (in seconds) after which a module file will be considered unused">,
2059  MarshallingInfoInt<HeaderSearchOpts<"ModuleCachePruneAfter">, "31 * 24 * 60 * 60">;
2060def fbuild_session_timestamp : Joined<["-"], "fbuild-session-timestamp=">,
2061  Group<i_Group>, Flags<[CC1Option]>, MetaVarName<"<time since Epoch in seconds>">,
2062  HelpText<"Time when the current build session started">,
2063  MarshallingInfoInt<HeaderSearchOpts<"BuildSessionTimestamp">, "0", "uint64_t">;
2064def fbuild_session_file : Joined<["-"], "fbuild-session-file=">,
2065  Group<i_Group>, MetaVarName<"<file>">,
2066  HelpText<"Use the last modification time of <file> as the build session timestamp">;
2067def fmodules_validate_once_per_build_session : Flag<["-"], "fmodules-validate-once-per-build-session">,
2068  Group<i_Group>, Flags<[CC1Option]>,
2069  HelpText<"Don't verify input files for the modules if the module has been "
2070           "successfully validated or loaded during this build session">,
2071  MarshallingInfoFlag<HeaderSearchOpts<"ModulesValidateOncePerBuildSession">>;
2072def fmodules_disable_diagnostic_validation : Flag<["-"], "fmodules-disable-diagnostic-validation">,
2073  Group<i_Group>, Flags<[CC1Option]>,
2074  HelpText<"Disable validation of the diagnostic options when loading the module">,
2075  MarshallingInfoNegativeFlag<HeaderSearchOpts<"ModulesValidateDiagnosticOptions">>;
2076defm modules_validate_system_headers : BoolOption<"f", "modules-validate-system-headers",
2077  HeaderSearchOpts<"ModulesValidateSystemHeaders">, DefaultFalse,
2078  PosFlag<SetTrue, [CC1Option], "Validate the system headers that a module depends on when loading the module">,
2079  NegFlag<SetFalse, [NoXarchOption]>>, Group<i_Group>;
2080
2081def fvalidate_ast_input_files_content:
2082  Flag <["-"], "fvalidate-ast-input-files-content">,
2083  Group<f_Group>, Flags<[CC1Option]>,
2084  HelpText<"Compute and store the hash of input files used to build an AST."
2085           " Files with mismatching mtime's are considered valid"
2086           " if both contents is identical">,
2087  MarshallingInfoFlag<HeaderSearchOpts<"ValidateASTInputFilesContent">>;
2088def fmodules_validate_input_files_content:
2089  Flag <["-"], "fmodules-validate-input-files-content">,
2090  Group<f_Group>, Flags<[NoXarchOption]>,
2091  HelpText<"Validate PCM input files based on content if mtime differs">;
2092def fno_modules_validate_input_files_content:
2093  Flag <["-"], "fno_modules-validate-input-files-content">,
2094  Group<f_Group>, Flags<[NoXarchOption]>;
2095def fpch_validate_input_files_content:
2096  Flag <["-"], "fpch-validate-input-files-content">,
2097  Group<f_Group>, Flags<[NoXarchOption]>,
2098  HelpText<"Validate PCH input files based on content if mtime differs">;
2099def fno_pch_validate_input_files_content:
2100  Flag <["-"], "fno_pch-validate-input-files-content">,
2101  Group<f_Group>, Flags<[NoXarchOption]>;
2102defm pch_instantiate_templates : BoolFOption<"pch-instantiate-templates",
2103  LangOpts<"PCHInstantiateTemplates">, DefaultFalse,
2104  PosFlag<SetTrue, [], "Instantiate templates already while building a PCH">,
2105  NegFlag<SetFalse>, BothFlags<[CC1Option, CoreOption]>>;
2106defm pch_codegen: OptInFFlag<"pch-codegen", "Generate ", "Do not generate ",
2107  "code for uses of this PCH that assumes an explicit object file will be built for the PCH">;
2108defm pch_debuginfo: OptInFFlag<"pch-debuginfo", "Generate ", "Do not generate ",
2109  "debug info for types in an object file built from this PCH and do not generate them elsewhere">;
2110
2111def fimplicit_module_maps : Flag <["-"], "fimplicit-module-maps">, Group<f_Group>,
2112  Flags<[NoXarchOption, CC1Option]>,
2113  HelpText<"Implicitly search the file system for module map files.">,
2114  MarshallingInfoFlag<HeaderSearchOpts<"ImplicitModuleMaps">>;
2115def fmodules_ts : Flag <["-"], "fmodules-ts">, Group<f_Group>,
2116  Flags<[CC1Option]>, HelpText<"Enable support for the C++ Modules TS">,
2117  MarshallingInfoFlag<LangOpts<"ModulesTS">>;
2118defm modules : BoolFOption<"modules",
2119  LangOpts<"Modules">, Default<!strconcat(fmodules_ts.KeyPath, "||", cpp_modules.KeyPath)>,
2120  PosFlag<SetTrue, [CC1Option], "Enable the 'modules' language feature">,
2121  NegFlag<SetFalse>, BothFlags<[NoXarchOption]>>;
2122def fmodule_maps : Flag <["-"], "fmodule-maps">, Alias<fimplicit_module_maps>;
2123def fmodule_name_EQ : Joined<["-"], "fmodule-name=">, Group<f_Group>,
2124  Flags<[NoXarchOption,CC1Option]>, MetaVarName<"<name>">,
2125  HelpText<"Specify the name of the module to build">,
2126  MarshallingInfoString<LangOpts<"ModuleName">>;
2127def fmodule_implementation_of : Separate<["-"], "fmodule-implementation-of">,
2128  Flags<[CC1Option]>, Alias<fmodule_name_EQ>;
2129def fsystem_module : Flag<["-"], "fsystem-module">, Flags<[CC1Option]>,
2130  HelpText<"Build this module as a system module. Only used with -emit-module">,
2131  MarshallingInfoFlag<FrontendOpts<"IsSystemModule">>;
2132def fmodule_map_file : Joined<["-"], "fmodule-map-file=">,
2133  Group<f_Group>, Flags<[NoXarchOption,CC1Option]>, MetaVarName<"<file>">,
2134  HelpText<"Load this module map file">,
2135  MarshallingInfoStringVector<FrontendOpts<"ModuleMapFiles">>;
2136def fmodule_file : Joined<["-"], "fmodule-file=">,
2137  Group<i_Group>, Flags<[NoXarchOption,CC1Option]>, MetaVarName<"[<name>=]<file>">,
2138  HelpText<"Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.">;
2139def fmodules_ignore_macro : Joined<["-"], "fmodules-ignore-macro=">, Group<f_Group>, Flags<[CC1Option]>,
2140  HelpText<"Ignore the definition of the given macro when building and loading modules">;
2141def fmodules_strict_decluse : Flag <["-"], "fmodules-strict-decluse">, Group<f_Group>,
2142  Flags<[NoXarchOption,CC1Option]>,
2143  HelpText<"Like -fmodules-decluse but requires all headers to be in modules">,
2144  MarshallingInfoFlag<LangOpts<"ModulesStrictDeclUse">>;
2145defm modules_decluse : BoolFOption<"modules-decluse",
2146  LangOpts<"ModulesDeclUse">, Default<fmodules_strict_decluse.KeyPath>,
2147  PosFlag<SetTrue, [CC1Option], "Require declaration of modules used within a module">,
2148  NegFlag<SetFalse>, BothFlags<[NoXarchOption]>>;
2149defm modules_search_all : BoolFOption<"modules-search-all",
2150  LangOpts<"ModulesSearchAll">, DefaultFalse,
2151  PosFlag<SetTrue, [], "Search even non-imported modules to resolve references">,
2152  NegFlag<SetFalse>, BothFlags<[NoXarchOption, CC1Option]>>,
2153  ShouldParseIf<fmodules.KeyPath>;
2154defm implicit_modules : BoolFOption<"implicit-modules",
2155  LangOpts<"ImplicitModules">, DefaultTrue,
2156  NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>, BothFlags<[NoXarchOption]>>;
2157def fretain_comments_from_system_headers : Flag<["-"], "fretain-comments-from-system-headers">, Group<f_Group>, Flags<[CC1Option]>,
2158  MarshallingInfoFlag<LangOpts<"RetainCommentsFromSystemHeaders">>;
2159
2160def fmudflapth : Flag<["-"], "fmudflapth">, Group<f_Group>;
2161def fmudflap : Flag<["-"], "fmudflap">, Group<f_Group>;
2162def fnested_functions : Flag<["-"], "fnested-functions">, Group<f_Group>;
2163def fnext_runtime : Flag<["-"], "fnext-runtime">, Group<f_Group>;
2164def fno_asm : Flag<["-"], "fno-asm">, Group<f_Group>;
2165def fno_asynchronous_unwind_tables : Flag<["-"], "fno-asynchronous-unwind-tables">, Group<f_Group>;
2166def fno_assume_sane_operator_new : Flag<["-"], "fno-assume-sane-operator-new">, Group<f_Group>,
2167  HelpText<"Don't assume that C++'s global operator new can't alias any pointer">,
2168  Flags<[CC1Option]>, MarshallingInfoNegativeFlag<CodeGenOpts<"AssumeSaneOperatorNew">>;
2169def fno_builtin : Flag<["-"], "fno-builtin">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
2170  HelpText<"Disable implicit builtin knowledge of functions">;
2171def fno_builtin_ : Joined<["-"], "fno-builtin-">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
2172  HelpText<"Disable implicit builtin knowledge of a specific function">;
2173def fno_diagnostics_color : Flag<["-"], "fno-diagnostics-color">, Group<f_Group>,
2174  Flags<[CoreOption, NoXarchOption]>;
2175def fno_common : Flag<["-"], "fno-common">, Group<f_Group>, Flags<[CC1Option]>,
2176    HelpText<"Compile common globals like normal definitions">;
2177def fno_cxx_modules : Flag <["-"], "fno-cxx-modules">, Group<f_Group>,
2178  Flags<[NoXarchOption]>;
2179defm digraphs : BoolFOption<"digraphs",
2180  LangOpts<"Digraphs">, Default<std#".hasDigraphs()">,
2181  PosFlag<SetTrue, [], "Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default)">,
2182  NegFlag<SetFalse, [], "Disallow alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:'">,
2183  BothFlags<[CC1Option]>>;
2184def fno_eliminate_unused_debug_symbols : Flag<["-"], "fno-eliminate-unused-debug-symbols">, Group<f_Group>;
2185def fno_inline_functions : Flag<["-"], "fno-inline-functions">, Group<f_clang_Group>, Flags<[CC1Option]>;
2186def fno_inline : Flag<["-"], "fno-inline">, Group<f_clang_Group>, Flags<[CC1Option]>;
2187def fno_global_isel : Flag<["-"], "fno-global-isel">, Group<f_clang_Group>,
2188  HelpText<"Disables the global instruction selector">;
2189def fno_experimental_isel : Flag<["-"], "fno-experimental-isel">, Group<f_clang_Group>,
2190  Alias<fno_global_isel>;
2191def fveclib : Joined<["-"], "fveclib=">, Group<f_Group>, Flags<[CC1Option]>,
2192    HelpText<"Use the given vector functions library">,
2193    Values<"Accelerate,libmvec,MASSV,SVML,Darwin_libsystem_m,none">,
2194    NormalizedValuesScope<"CodeGenOptions">,
2195    NormalizedValues<["Accelerate", "LIBMVEC", "MASSV", "SVML",
2196                      "Darwin_libsystem_m", "NoLibrary"]>,
2197    MarshallingInfoEnum<CodeGenOpts<"VecLib">, "NoLibrary">;
2198def fno_lax_vector_conversions : Flag<["-"], "fno-lax-vector-conversions">, Group<f_Group>,
2199  Alias<flax_vector_conversions_EQ>, AliasArgs<["none"]>;
2200def fno_implicit_module_maps : Flag <["-"], "fno-implicit-module-maps">, Group<f_Group>,
2201  Flags<[NoXarchOption]>;
2202def fno_module_maps : Flag <["-"], "fno-module-maps">, Alias<fno_implicit_module_maps>;
2203def fno_modules_strict_decluse : Flag <["-"], "fno-strict-modules-decluse">, Group<f_Group>,
2204  Flags<[NoXarchOption]>;
2205def fmodule_file_deps : Flag <["-"], "fmodule-file-deps">, Group<f_Group>,
2206  Flags<[NoXarchOption]>;
2207def fno_module_file_deps : Flag <["-"], "fno-module-file-deps">, Group<f_Group>,
2208  Flags<[NoXarchOption]>;
2209def fno_ms_extensions : Flag<["-"], "fno-ms-extensions">, Group<f_Group>,
2210  Flags<[CoreOption]>;
2211def fno_ms_compatibility : Flag<["-"], "fno-ms-compatibility">, Group<f_Group>,
2212  Flags<[CoreOption]>;
2213def fno_objc_legacy_dispatch : Flag<["-"], "fno-objc-legacy-dispatch">, Group<f_Group>;
2214def fno_objc_weak : Flag<["-"], "fno-objc-weak">, Group<f_Group>, Flags<[CC1Option]>;
2215def fno_omit_frame_pointer : Flag<["-"], "fno-omit-frame-pointer">, Group<f_Group>;
2216def fno_operator_names : Flag<["-"], "fno-operator-names">, Group<f_Group>,
2217  HelpText<"Do not treat C++ operator name keywords as synonyms for operators">,
2218  Flags<[CC1Option]>, MarshallingInfoNegativeFlag<LangOpts<"CXXOperatorNames">, cplusplus.KeyPath>;
2219def fdiagnostics_absolute_paths : Flag<["-"], "fdiagnostics-absolute-paths">, Group<f_Group>,
2220  Flags<[CC1Option, CoreOption]>, HelpText<"Print absolute paths in diagnostics">,
2221  MarshallingInfoFlag<DiagnosticOpts<"AbsolutePath">>;
2222def fno_stack_protector : Flag<["-"], "fno-stack-protector">, Group<f_Group>,
2223  HelpText<"Disable the use of stack protectors">;
2224def fno_strict_aliasing : Flag<["-"], "fno-strict-aliasing">, Group<f_Group>,
2225  Flags<[NoXarchOption, CoreOption]>;
2226def fstruct_path_tbaa : Flag<["-"], "fstruct-path-tbaa">, Group<f_Group>;
2227def fno_struct_path_tbaa : Flag<["-"], "fno-struct-path-tbaa">, Group<f_Group>;
2228def fno_strict_enums : Flag<["-"], "fno-strict-enums">, Group<f_Group>;
2229def fno_strict_overflow : Flag<["-"], "fno-strict-overflow">, Group<f_Group>;
2230def fno_temp_file : Flag<["-"], "fno-temp-file">, Group<f_Group>,
2231  Flags<[CC1Option, CoreOption]>, HelpText<
2232  "Directly create compilation output files. This may lead to incorrect incremental builds if the compiler crashes">,
2233  MarshallingInfoNegativeFlag<FrontendOpts<"UseTemporary">>;
2234defm use_cxa_atexit : BoolFOption<"use-cxa-atexit",
2235  CodeGenOpts<"CXAAtExit">, DefaultTrue,
2236  NegFlag<SetFalse, [CC1Option], "Don't use __cxa_atexit for calling destructors">,
2237  PosFlag<SetTrue>>;
2238def fno_unit_at_a_time : Flag<["-"], "fno-unit-at-a-time">, Group<f_Group>;
2239def fno_unwind_tables : Flag<["-"], "fno-unwind-tables">, Group<f_Group>;
2240def fno_verbose_asm : Flag<["-"], "fno-verbose-asm">, Group<f_Group>, Flags<[CC1Option]>,
2241  MarshallingInfoNegativeFlag<CodeGenOpts<"AsmVerbose">>;
2242def fno_working_directory : Flag<["-"], "fno-working-directory">, Group<f_Group>;
2243def fno_wrapv : Flag<["-"], "fno-wrapv">, Group<f_Group>;
2244def fobjc_arc : Flag<["-"], "fobjc-arc">, Group<f_Group>, Flags<[CC1Option]>,
2245  HelpText<"Synthesize retain and release calls for Objective-C pointers">;
2246def fno_objc_arc : Flag<["-"], "fno-objc-arc">, Group<f_Group>;
2247defm objc_encode_cxx_class_template_spec : BoolFOption<"objc-encode-cxx-class-template-spec",
2248  LangOpts<"EncodeCXXClassTemplateSpec">, DefaultFalse,
2249  PosFlag<SetTrue, [CC1Option], "Fully encode c++ class template specialization">,
2250  NegFlag<SetFalse>>;
2251defm objc_convert_messages_to_runtime_calls : BoolFOption<"objc-convert-messages-to-runtime-calls",
2252  CodeGenOpts<"ObjCConvertMessagesToRuntimeCalls">, DefaultTrue,
2253  NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>>;
2254defm objc_arc_exceptions : BoolFOption<"objc-arc-exceptions",
2255  CodeGenOpts<"ObjCAutoRefCountExceptions">, DefaultFalse,
2256  PosFlag<SetTrue, [CC1Option], "Use EH-safe code when synthesizing retains and releases in -fobjc-arc">,
2257  NegFlag<SetFalse>>;
2258def fobjc_atdefs : Flag<["-"], "fobjc-atdefs">, Group<clang_ignored_f_Group>;
2259def fobjc_call_cxx_cdtors : Flag<["-"], "fobjc-call-cxx-cdtors">, Group<clang_ignored_f_Group>;
2260defm objc_exceptions : BoolFOption<"objc-exceptions",
2261  LangOpts<"ObjCExceptions">, DefaultFalse,
2262  PosFlag<SetTrue, [CC1Option], "Enable Objective-C exceptions">, NegFlag<SetFalse>>;
2263defm application_extension : BoolFOption<"application-extension",
2264  LangOpts<"AppExt">, DefaultFalse,
2265  PosFlag<SetTrue, [CC1Option], "Restrict code to those available for App Extensions">,
2266  NegFlag<SetFalse>>;
2267defm relaxed_template_template_args : BoolFOption<"relaxed-template-template-args",
2268  LangOpts<"RelaxedTemplateTemplateArgs">, DefaultFalse,
2269  PosFlag<SetTrue, [CC1Option], "Enable C++17 relaxed template template argument matching">,
2270  NegFlag<SetFalse>>;
2271defm sized_deallocation : BoolFOption<"sized-deallocation",
2272  LangOpts<"SizedDeallocation">, DefaultFalse,
2273  PosFlag<SetTrue, [CC1Option], "Enable C++14 sized global deallocation functions">,
2274  NegFlag<SetFalse>>;
2275defm aligned_allocation : BoolFOption<"aligned-allocation",
2276  LangOpts<"AlignedAllocation">, Default<cpp17.KeyPath>,
2277  PosFlag<SetTrue, [], "Enable C++17 aligned allocation functions">,
2278  NegFlag<SetFalse>, BothFlags<[CC1Option]>>;
2279def fnew_alignment_EQ : Joined<["-"], "fnew-alignment=">,
2280  HelpText<"Specifies the largest alignment guaranteed by '::operator new(size_t)'">,
2281  MetaVarName<"<align>">, Group<f_Group>, Flags<[CC1Option]>,
2282  MarshallingInfoInt<LangOpts<"NewAlignOverride">>;
2283def : Separate<["-"], "fnew-alignment">, Alias<fnew_alignment_EQ>;
2284def : Flag<["-"], "faligned-new">, Alias<faligned_allocation>;
2285def : Flag<["-"], "fno-aligned-new">, Alias<fno_aligned_allocation>;
2286def faligned_new_EQ : Joined<["-"], "faligned-new=">;
2287
2288def fobjc_legacy_dispatch : Flag<["-"], "fobjc-legacy-dispatch">, Group<f_Group>;
2289def fobjc_new_property : Flag<["-"], "fobjc-new-property">, Group<clang_ignored_f_Group>;
2290defm objc_infer_related_result_type : BoolFOption<"objc-infer-related-result-type",
2291  LangOpts<"ObjCInferRelatedResultType">, DefaultTrue,
2292  NegFlag<SetFalse, [CC1Option], "do not infer Objective-C related result type based on method family">,
2293  PosFlag<SetTrue>>;
2294def fobjc_link_runtime: Flag<["-"], "fobjc-link-runtime">, Group<f_Group>;
2295def fobjc_weak : Flag<["-"], "fobjc-weak">, Group<f_Group>, Flags<[CC1Option]>,
2296  HelpText<"Enable ARC-style weak references in Objective-C">;
2297
2298// Objective-C ABI options.
2299def fobjc_runtime_EQ : Joined<["-"], "fobjc-runtime=">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
2300  HelpText<"Specify the target Objective-C runtime kind and version">;
2301def fobjc_abi_version_EQ : Joined<["-"], "fobjc-abi-version=">, Group<f_Group>;
2302def fobjc_nonfragile_abi_version_EQ : Joined<["-"], "fobjc-nonfragile-abi-version=">, Group<f_Group>;
2303def fobjc_nonfragile_abi : Flag<["-"], "fobjc-nonfragile-abi">, Group<f_Group>;
2304def fno_objc_nonfragile_abi : Flag<["-"], "fno-objc-nonfragile-abi">, Group<f_Group>;
2305
2306def fobjc_sender_dependent_dispatch : Flag<["-"], "fobjc-sender-dependent-dispatch">, Group<f_Group>;
2307def fobjc_disable_direct_methods_for_testing :
2308  Flag<["-"], "fobjc-disable-direct-methods-for-testing">,
2309  Group<f_Group>, Flags<[CC1Option]>,
2310  HelpText<"Ignore attribute objc_direct so that direct methods can be tested">,
2311  MarshallingInfoFlag<LangOpts<"ObjCDisableDirectMethodsForTesting">>;
2312
2313def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group<f_Group>;
2314def fopenmp : Flag<["-"], "fopenmp">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, FlangOption, FC1Option]>,
2315  HelpText<"Parse OpenMP pragmas and generate parallel code.">;
2316def fno_openmp : Flag<["-"], "fno-openmp">, Group<f_Group>, Flags<[NoArgumentUnused]>;
2317def fopenmp_version_EQ : Joined<["-"], "fopenmp-version=">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>;
2318def fopenmp_EQ : Joined<["-"], "fopenmp=">, Group<f_Group>;
2319def fopenmp_use_tls : Flag<["-"], "fopenmp-use-tls">, Group<f_Group>,
2320  Flags<[NoArgumentUnused, HelpHidden]>;
2321def fnoopenmp_use_tls : Flag<["-"], "fnoopenmp-use-tls">, Group<f_Group>,
2322  Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2323def fopenmp_targets_EQ : CommaJoined<["-"], "fopenmp-targets=">, Flags<[NoXarchOption, CC1Option]>,
2324  HelpText<"Specify comma-separated list of triples OpenMP offloading targets to be supported">;
2325def fopenmp_relocatable_target : Flag<["-"], "fopenmp-relocatable-target">,
2326  Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2327def fnoopenmp_relocatable_target : Flag<["-"], "fnoopenmp-relocatable-target">,
2328  Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2329def fopenmp_simd : Flag<["-"], "fopenmp-simd">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>,
2330  HelpText<"Emit OpenMP code only for SIMD-based constructs.">;
2331def fopenmp_enable_irbuilder : Flag<["-"], "fopenmp-enable-irbuilder">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>,
2332  HelpText<"Use the experimental OpenMP-IR-Builder codegen path.">;
2333def fno_openmp_simd : Flag<["-"], "fno-openmp-simd">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>;
2334def fopenmp_cuda_mode : Flag<["-"], "fopenmp-cuda-mode">, Group<f_Group>,
2335  Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2336def fno_openmp_cuda_mode : Flag<["-"], "fno-openmp-cuda-mode">, Group<f_Group>,
2337  Flags<[NoArgumentUnused, HelpHidden]>;
2338def fopenmp_cuda_force_full_runtime : Flag<["-"], "fopenmp-cuda-force-full-runtime">, Group<f_Group>,
2339  Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2340def fno_openmp_cuda_force_full_runtime : Flag<["-"], "fno-openmp-cuda-force-full-runtime">, Group<f_Group>,
2341  Flags<[NoArgumentUnused, HelpHidden]>;
2342def fopenmp_cuda_number_of_sm_EQ : Joined<["-"], "fopenmp-cuda-number-of-sm=">, Group<f_Group>,
2343  Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2344def fopenmp_cuda_blocks_per_sm_EQ : Joined<["-"], "fopenmp-cuda-blocks-per-sm=">, Group<f_Group>,
2345  Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2346def fopenmp_cuda_teams_reduction_recs_num_EQ : Joined<["-"], "fopenmp-cuda-teams-reduction-recs-num=">, Group<f_Group>,
2347  Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2348defm openmp_optimistic_collapse : BoolFOption<"openmp-optimistic-collapse",
2349  LangOpts<"OpenMPOptimisticCollapse">, DefaultFalse,
2350  PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>, BothFlags<[NoArgumentUnused, HelpHidden]>>;
2351def fopenmp_cuda_parallel_target_regions : Flag<["-"], "fopenmp-cuda-parallel-target-regions">, Group<f_Group>,
2352  Flags<[CC1Option, NoArgumentUnused, HelpHidden]>,
2353  HelpText<"Support parallel execution of target regions on Cuda-based devices.">;
2354def fno_openmp_cuda_parallel_target_regions : Flag<["-"], "fno-openmp-cuda-parallel-target-regions">, Group<f_Group>,
2355  Flags<[NoArgumentUnused, HelpHidden]>,
2356  HelpText<"Support only serial execution of target regions on Cuda-based devices.">;
2357def static_openmp: Flag<["-"], "static-openmp">,
2358  HelpText<"Use the static host OpenMP runtime while linking.">;
2359def fno_optimize_sibling_calls : Flag<["-"], "fno-optimize-sibling-calls">, Group<f_Group>;
2360def foptimize_sibling_calls : Flag<["-"], "foptimize-sibling-calls">, Group<f_Group>;
2361defm escaping_block_tail_calls : BoolFOption<"escaping-block-tail-calls",
2362  CodeGenOpts<"NoEscapingBlockTailCalls">, DefaultFalse,
2363  NegFlag<SetTrue, [CC1Option]>, PosFlag<SetFalse>>;
2364def force__cpusubtype__ALL : Flag<["-"], "force_cpusubtype_ALL">;
2365def force__flat__namespace : Flag<["-"], "force_flat_namespace">;
2366def force__load : Separate<["-"], "force_load">;
2367def force_addr : Joined<["-"], "fforce-addr">, Group<clang_ignored_f_Group>;
2368def foutput_class_dir_EQ : Joined<["-"], "foutput-class-dir=">, Group<f_Group>;
2369def fpack_struct : Flag<["-"], "fpack-struct">, Group<f_Group>;
2370def fno_pack_struct : Flag<["-"], "fno-pack-struct">, Group<f_Group>;
2371def fpack_struct_EQ : Joined<["-"], "fpack-struct=">, Group<f_Group>, Flags<[CC1Option]>,
2372  HelpText<"Specify the default maximum struct packing alignment">,
2373  MarshallingInfoInt<LangOpts<"PackStruct">>;
2374def fmax_type_align_EQ : Joined<["-"], "fmax-type-align=">, Group<f_Group>, Flags<[CC1Option]>,
2375  HelpText<"Specify the maximum alignment to enforce on pointers lacking an explicit alignment">,
2376  MarshallingInfoInt<LangOpts<"MaxTypeAlign">>;
2377def fno_max_type_align : Flag<["-"], "fno-max-type-align">, Group<f_Group>;
2378defm pascal_strings : BoolFOption<"pascal-strings",
2379  LangOpts<"PascalStrings">, DefaultFalse,
2380  PosFlag<SetTrue, [CC1Option], "Recognize and construct Pascal-style string literals">,
2381  NegFlag<SetFalse>>;
2382// Note: This flag has different semantics in the driver and in -cc1. The driver accepts -fpatchable-function-entry=M,N
2383// and forwards it to -cc1 as -fpatchable-function-entry=M and -fpatchable-function-entry-offset=N. In -cc1, both flags
2384// are treated as a single integer.
2385def fpatchable_function_entry_EQ : Joined<["-"], "fpatchable-function-entry=">, Group<f_Group>, Flags<[CC1Option]>,
2386  MetaVarName<"<N,M>">, HelpText<"Generate M NOPs before function entry and N-M NOPs after function entry">,
2387  MarshallingInfoInt<CodeGenOpts<"PatchableFunctionEntryCount">>;
2388def fpcc_struct_return : Flag<["-"], "fpcc-struct-return">, Group<f_Group>, Flags<[CC1Option]>,
2389  HelpText<"Override the default ABI to return all structs on the stack">;
2390def fpch_preprocess : Flag<["-"], "fpch-preprocess">, Group<f_Group>;
2391def fpic : Flag<["-"], "fpic">, Group<f_Group>;
2392def fno_pic : Flag<["-"], "fno-pic">, Group<f_Group>;
2393def fpie : Flag<["-"], "fpie">, Group<f_Group>;
2394def fno_pie : Flag<["-"], "fno-pie">, Group<f_Group>;
2395def fdirect_access_external_data : Flag<["-"], "fdirect-access-external-data">, Group<f_Group>, Flags<[CC1Option]>,
2396  HelpText<"Don't use GOT indirection to reference external data symbols">;
2397def fno_direct_access_external_data : Flag<["-"], "fno-direct-access-external-data">, Group<f_Group>, Flags<[CC1Option]>,
2398  HelpText<"Use GOT indirection to reference external data symbols">;
2399defm plt : BoolFOption<"plt",
2400  CodeGenOpts<"NoPLT">, DefaultFalse,
2401  NegFlag<SetTrue, [CC1Option], "Use GOT indirection instead of PLT to make external function calls (x86 only)">,
2402  PosFlag<SetFalse>>;
2403defm ropi : BoolFOption<"ropi",
2404  LangOpts<"ROPI">, DefaultFalse,
2405  PosFlag<SetTrue, [CC1Option], "Generate read-only position independent code (ARM only)">,
2406  NegFlag<SetFalse>>;
2407defm rwpi : BoolFOption<"rwpi",
2408  LangOpts<"RWPI">, DefaultFalse,
2409  PosFlag<SetTrue, [CC1Option], "Generate read-write position independent code (ARM only)">,
2410  NegFlag<SetFalse>>;
2411def fplugin_EQ : Joined<["-"], "fplugin=">, Group<f_Group>, Flags<[NoXarchOption]>, MetaVarName<"<dsopath>">,
2412  HelpText<"Load the named plugin (dynamic shared object)">;
2413def fpass_plugin_EQ : Joined<["-"], "fpass-plugin=">,
2414  Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<dsopath>">,
2415  HelpText<"Load pass plugin from a dynamic shared object file (only with new pass manager).">,
2416  MarshallingInfoStringVector<CodeGenOpts<"PassPlugins">>;
2417defm preserve_as_comments : BoolFOption<"preserve-as-comments",
2418  CodeGenOpts<"PreserveAsmComments">, DefaultTrue,
2419  NegFlag<SetFalse, [CC1Option], "Do not preserve comments in inline assembly">,
2420  PosFlag<SetTrue>>;
2421def framework : Separate<["-"], "framework">, Flags<[LinkerInput]>;
2422def frandom_seed_EQ : Joined<["-"], "frandom-seed=">, Group<clang_ignored_f_Group>;
2423def freg_struct_return : Flag<["-"], "freg-struct-return">, Group<f_Group>, Flags<[CC1Option]>,
2424  HelpText<"Override the default ABI to return small structs in registers">;
2425defm rtti : BoolFOption<"rtti",
2426  LangOpts<"RTTI">, Default<cplusplus.KeyPath>,
2427  NegFlag<SetFalse, [CC1Option], "Disable generation of rtti information">,
2428  PosFlag<SetTrue>>, ShouldParseIf<cplusplus.KeyPath>;
2429defm rtti_data : BoolFOption<"rtti-data",
2430  LangOpts<"RTTIData">, Default<frtti.KeyPath>,
2431  NegFlag<SetFalse, [CC1Option], "Disable generation of RTTI data">,
2432  PosFlag<SetTrue>>, ShouldParseIf<frtti.KeyPath>;
2433def : Flag<["-"], "fsched-interblock">, Group<clang_ignored_f_Group>;
2434defm short_enums : BoolFOption<"short-enums",
2435  LangOpts<"ShortEnums">, DefaultFalse,
2436  PosFlag<SetTrue, [CC1Option], "Allocate to an enum type only as many bytes as it"
2437           " needs for the declared range of possible values">,
2438  NegFlag<SetFalse>>;
2439defm char8__t : BoolFOption<"char8_t",
2440  LangOpts<"Char8">, Default<cpp20.KeyPath>,
2441  PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">,
2442  BothFlags<[CC1Option], " C++ builtin type char8_t">>;
2443def fshort_wchar : Flag<["-"], "fshort-wchar">, Group<f_Group>,
2444  HelpText<"Force wchar_t to be a short unsigned int">;
2445def fno_short_wchar : Flag<["-"], "fno-short-wchar">, Group<f_Group>,
2446  HelpText<"Force wchar_t to be an unsigned int">;
2447def fshow_overloads_EQ : Joined<["-"], "fshow-overloads=">, Group<f_Group>, Flags<[CC1Option]>,
2448  HelpText<"Which overload candidates to show when overload resolution fails: "
2449           "best|all; defaults to all">, Values<"best,all">,
2450  NormalizedValues<["Ovl_Best", "Ovl_All"]>,
2451  MarshallingInfoEnum<DiagnosticOpts<"ShowOverloads">, "Ovl_All">;
2452defm show_column : BoolFOption<"show-column",
2453  DiagnosticOpts<"ShowColumn">, DefaultTrue,
2454  NegFlag<SetFalse, [CC1Option], "Do not include column number on diagnostics">,
2455  PosFlag<SetTrue>>;
2456defm show_source_location : BoolFOption<"show-source-location",
2457  DiagnosticOpts<"ShowLocation">, DefaultTrue,
2458  NegFlag<SetFalse, [CC1Option], "Do not include source location information with diagnostics">,
2459  PosFlag<SetTrue>>;
2460defm spell_checking : BoolFOption<"spell-checking",
2461  LangOpts<"SpellChecking">, DefaultTrue,
2462  NegFlag<SetFalse, [CC1Option], "Disable spell-checking">, PosFlag<SetTrue>>;
2463def fspell_checking_limit_EQ : Joined<["-"], "fspell-checking-limit=">, Group<f_Group>;
2464def fsigned_bitfields : Flag<["-"], "fsigned-bitfields">, Group<f_Group>;
2465defm signed_char : BoolFOption<"signed-char",
2466  LangOpts<"CharIsSigned">, DefaultTrue,
2467  NegFlag<SetFalse, [CC1Option], "char is unsigned">, PosFlag<SetTrue, [], "char is signed">>,
2468  ShouldParseIf<!strconcat("!", open_cl.KeyPath)>;
2469defm split_stack : BoolFOption<"split-stack",
2470  CodeGenOpts<"EnableSegmentedStacks">, DefaultFalse,
2471  NegFlag<SetFalse, [], "Wouldn't use segmented stack">,
2472  PosFlag<SetTrue, [CC1Option], "Use segmented stack">>;
2473def fstack_protector_all : Flag<["-"], "fstack-protector-all">, Group<f_Group>,
2474  HelpText<"Enable stack protectors for all functions">;
2475defm stack_clash_protection : BoolFOption<"stack-clash-protection",
2476  CodeGenOpts<"StackClashProtector">, DefaultFalse,
2477  PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
2478  BothFlags<[], " stack clash protection">>;
2479def fstack_protector_strong : Flag<["-"], "fstack-protector-strong">, Group<f_Group>,
2480  HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. "
2481           "Compared to -fstack-protector, this uses a stronger heuristic "
2482           "that includes functions containing arrays of any size (and any type), "
2483           "as well as any calls to alloca or the taking of an address from a local variable">;
2484def fstack_protector : Flag<["-"], "fstack-protector">, Group<f_Group>,
2485  HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. "
2486           "This uses a loose heuristic which considers functions vulnerable if they "
2487           "contain a char (or 8bit integer) array or constant sized calls to alloca "
2488           ", which are of greater size than ssp-buffer-size (default: 8 bytes). All "
2489           "variable sized calls to alloca are considered vulnerable. A function with "
2490           "a stack protector has a guard value added to the stack frame that is "
2491           "checked on function exit. The guard value must be positioned in the "
2492           "stack frame such that a buffer overflow from a vulnerable variable will "
2493           "overwrite the guard value before overwriting the function's return "
2494           "address. The reference stack guard value is stored in a global variable.">;
2495def ftrivial_auto_var_init : Joined<["-"], "ftrivial-auto-var-init=">, Group<f_Group>,
2496  Flags<[CC1Option, CoreOption]>, HelpText<"Initialize trivial automatic stack variables: uninitialized (default)"
2497  " | pattern">, Values<"uninitialized,zero,pattern">,
2498  NormalizedValuesScope<"LangOptions::TrivialAutoVarInitKind">,
2499  NormalizedValues<["Uninitialized", "Zero", "Pattern"]>,
2500  MarshallingInfoEnum<LangOpts<"TrivialAutoVarInit">, "Uninitialized">;
2501def enable_trivial_var_init_zero : Flag<["-"], "enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang">,
2502  Flags<[CC1Option, CoreOption]>,
2503  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">;
2504def ftrivial_auto_var_init_stop_after : Joined<["-"], "ftrivial-auto-var-init-stop-after=">, Group<f_Group>,
2505  Flags<[CC1Option, CoreOption]>, HelpText<"Stop initializing trivial automatic stack variables after the specified number of instances">,
2506  MarshallingInfoInt<LangOpts<"TrivialAutoVarInitStopAfter">>;
2507def fstandalone_debug : Flag<["-"], "fstandalone-debug">, Group<f_Group>, Flags<[CoreOption]>,
2508  HelpText<"Emit full debug info for all types used by the program">;
2509def fno_standalone_debug : Flag<["-"], "fno-standalone-debug">, Group<f_Group>, Flags<[CoreOption]>,
2510  HelpText<"Limit debug information produced to reduce size of debug binary">;
2511def flimit_debug_info : Flag<["-"], "flimit-debug-info">, Flags<[CoreOption]>, Alias<fno_standalone_debug>;
2512def fno_limit_debug_info : Flag<["-"], "fno-limit-debug-info">, Flags<[CoreOption]>, Alias<fstandalone_debug>;
2513def fdebug_macro : Flag<["-"], "fdebug-macro">, Group<f_Group>, Flags<[CoreOption]>,
2514  HelpText<"Emit macro debug information">;
2515def fno_debug_macro : Flag<["-"], "fno-debug-macro">, Group<f_Group>, Flags<[CoreOption]>,
2516  HelpText<"Do not emit macro debug information">;
2517def fstrict_aliasing : Flag<["-"], "fstrict-aliasing">, Group<f_Group>,
2518  Flags<[NoXarchOption, CoreOption]>;
2519def fstrict_enums : Flag<["-"], "fstrict-enums">, Group<f_Group>, Flags<[CC1Option]>,
2520  HelpText<"Enable optimizations based on the strict definition of an enum's "
2521           "value range">,
2522  MarshallingInfoFlag<CodeGenOpts<"StrictEnums">>;
2523defm strict_vtable_pointers : BoolFOption<"strict-vtable-pointers",
2524  CodeGenOpts<"StrictVTablePointers">, DefaultFalse,
2525  PosFlag<SetTrue, [CC1Option], "Enable optimizations based on the strict rules for"
2526            " overwriting polymorphic C++ objects">,
2527  NegFlag<SetFalse>>;
2528def fstrict_overflow : Flag<["-"], "fstrict-overflow">, Group<f_Group>;
2529def fsyntax_only : Flag<["-"], "fsyntax-only">,
2530  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option]>, Group<Action_Group>;
2531def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group<f_Group>;
2532def ftemplate_depth_EQ : Joined<["-"], "ftemplate-depth=">, Group<f_Group>;
2533def ftemplate_depth_ : Joined<["-"], "ftemplate-depth-">, Group<f_Group>;
2534def ftemplate_backtrace_limit_EQ : Joined<["-"], "ftemplate-backtrace-limit=">,
2535                                   Group<f_Group>;
2536def foperator_arrow_depth_EQ : Joined<["-"], "foperator-arrow-depth=">,
2537                               Group<f_Group>;
2538
2539def fsave_optimization_record : Flag<["-"], "fsave-optimization-record">,
2540  Group<f_Group>, HelpText<"Generate a YAML optimization record file">;
2541def fsave_optimization_record_EQ : Joined<["-"], "fsave-optimization-record=">,
2542  Group<f_Group>, HelpText<"Generate an optimization record file in a specific format">,
2543  MetaVarName<"<format>">;
2544def fno_save_optimization_record : Flag<["-"], "fno-save-optimization-record">,
2545  Group<f_Group>, Flags<[NoArgumentUnused]>;
2546def foptimization_record_file_EQ : Joined<["-"], "foptimization-record-file=">,
2547  Group<f_Group>,
2548  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.">,
2549  MetaVarName<"<file>">;
2550def foptimization_record_passes_EQ : Joined<["-"], "foptimization-record-passes=">,
2551  Group<f_Group>,
2552  HelpText<"Only include passes which match a specified regular expression in the generated optimization record (by default, include all passes)">,
2553  MetaVarName<"<regex>">;
2554
2555def fvectorize : Flag<["-"], "fvectorize">, Group<f_Group>,
2556  HelpText<"Enable the loop vectorization passes">;
2557def fno_vectorize : Flag<["-"], "fno-vectorize">, Group<f_Group>;
2558def : Flag<["-"], "ftree-vectorize">, Alias<fvectorize>;
2559def : Flag<["-"], "fno-tree-vectorize">, Alias<fno_vectorize>;
2560def fslp_vectorize : Flag<["-"], "fslp-vectorize">, Group<f_Group>,
2561  HelpText<"Enable the superword-level parallelism vectorization passes">;
2562def fno_slp_vectorize : Flag<["-"], "fno-slp-vectorize">, Group<f_Group>;
2563def : Flag<["-"], "ftree-slp-vectorize">, Alias<fslp_vectorize>;
2564def : Flag<["-"], "fno-tree-slp-vectorize">, Alias<fno_slp_vectorize>;
2565def Wlarge_by_value_copy_def : Flag<["-"], "Wlarge-by-value-copy">,
2566  HelpText<"Warn if a function definition returns or accepts an object larger "
2567           "in bytes than a given value">, Flags<[HelpHidden]>;
2568def Wlarge_by_value_copy_EQ : Joined<["-"], "Wlarge-by-value-copy=">, Flags<[CC1Option]>,
2569  MarshallingInfoInt<LangOpts<"NumLargeByValueCopy">>;
2570
2571// These "special" warning flags are effectively processed as f_Group flags by the driver:
2572// Just silence warnings about -Wlarger-than for now.
2573def Wlarger_than_EQ : Joined<["-"], "Wlarger-than=">, Group<clang_ignored_f_Group>;
2574def Wlarger_than_ : Joined<["-"], "Wlarger-than-">, Alias<Wlarger_than_EQ>;
2575def Wframe_larger_than_EQ : Joined<["-"], "Wframe-larger-than=">, Group<f_Group>, Flags<[NoXarchOption]>;
2576
2577def : Flag<["-"], "fterminated-vtables">, Alias<fapple_kext>;
2578defm threadsafe_statics : BoolFOption<"threadsafe-statics",
2579  LangOpts<"ThreadsafeStatics">, DefaultTrue,
2580  NegFlag<SetFalse, [CC1Option], "Do not emit code to make initialization of local statics thread safe">,
2581  PosFlag<SetTrue>>;
2582def ftime_report : Flag<["-"], "ftime-report">, Group<f_Group>, Flags<[CC1Option]>,
2583  MarshallingInfoFlag<CodeGenOpts<"TimePasses">>;
2584def ftime_report_EQ: Joined<["-"], "ftime-report=">, Group<f_Group>,
2585  Flags<[CC1Option]>, Values<"per-pass,per-pass-run">,
2586  MarshallingInfoFlag<CodeGenOpts<"TimePassesPerRun">>,
2587  HelpText<"(For new pass manager) \"per-pass\": one report for each pass; "
2588           "\"per-pass-run\": one report for each pass invocation">;
2589def ftime_trace : Flag<["-"], "ftime-trace">, Group<f_Group>,
2590  HelpText<"Turn on time profiler. Generates JSON file based on output filename.">,
2591  DocBrief<[{
2592Turn on time profiler. Generates JSON file based on output filename. Results
2593can be analyzed with chrome://tracing or `Speedscope App
2594<https://www.speedscope.app>`_ for flamegraph visualization.}]>,
2595  Flags<[CC1Option, CoreOption]>,
2596  MarshallingInfoFlag<FrontendOpts<"TimeTrace">>;
2597def ftime_trace_granularity_EQ : Joined<["-"], "ftime-trace-granularity=">, Group<f_Group>,
2598  HelpText<"Minimum time granularity (in microseconds) traced by time profiler">,
2599  Flags<[CC1Option, CoreOption]>,
2600  MarshallingInfoInt<FrontendOpts<"TimeTraceGranularity">, "500u">;
2601def fproc_stat_report : Joined<["-"], "fproc-stat-report">, Group<f_Group>,
2602  HelpText<"Print subprocess statistics">;
2603def fproc_stat_report_EQ : Joined<["-"], "fproc-stat-report=">, Group<f_Group>,
2604  HelpText<"Save subprocess statistics to the given file">;
2605def ftlsmodel_EQ : Joined<["-"], "ftls-model=">, Group<f_Group>, Flags<[CC1Option]>,
2606  Values<"global-dynamic,local-dynamic,initial-exec,local-exec">,
2607  NormalizedValuesScope<"CodeGenOptions">,
2608  NormalizedValues<["GeneralDynamicTLSModel", "LocalDynamicTLSModel", "InitialExecTLSModel", "LocalExecTLSModel"]>,
2609  MarshallingInfoEnum<CodeGenOpts<"DefaultTLSModel">, "GeneralDynamicTLSModel">;
2610def ftrapv : Flag<["-"], "ftrapv">, Group<f_Group>, Flags<[CC1Option]>,
2611  HelpText<"Trap on integer overflow">;
2612def ftrapv_handler_EQ : Joined<["-"], "ftrapv-handler=">, Group<f_Group>,
2613  MetaVarName<"<function name>">,
2614  HelpText<"Specify the function to be called on overflow">;
2615def ftrapv_handler : Separate<["-"], "ftrapv-handler">, Group<f_Group>, Flags<[CC1Option]>;
2616def ftrap_function_EQ : Joined<["-"], "ftrap-function=">, Group<f_Group>, Flags<[CC1Option]>,
2617  HelpText<"Issue call to specified function rather than a trap instruction">,
2618  MarshallingInfoString<CodeGenOpts<"TrapFuncName">>;
2619def funit_at_a_time : Flag<["-"], "funit-at-a-time">, Group<f_Group>;
2620def funroll_loops : Flag<["-"], "funroll-loops">, Group<f_Group>,
2621  HelpText<"Turn on loop unroller">, Flags<[CC1Option]>;
2622def fno_unroll_loops : Flag<["-"], "fno-unroll-loops">, Group<f_Group>,
2623  HelpText<"Turn off loop unroller">, Flags<[CC1Option]>;
2624defm reroll_loops : BoolFOption<"reroll-loops",
2625  CodeGenOpts<"RerollLoops">, DefaultFalse,
2626  PosFlag<SetTrue, [CC1Option], "Turn on loop reroller">, NegFlag<SetFalse>>;
2627def ffinite_loops: Flag<["-"],  "ffinite-loops">, Group<f_Group>,
2628  HelpText<"Assume all loops are finite.">, Flags<[CC1Option]>;
2629def fno_finite_loops: Flag<["-"], "fno-finite-loops">, Group<f_Group>,
2630  HelpText<"Do not assume that any loop is finite.">, Flags<[CC1Option]>;
2631
2632def ftrigraphs : Flag<["-"], "ftrigraphs">, Group<f_Group>,
2633  HelpText<"Process trigraph sequences">, Flags<[CC1Option]>;
2634def fno_trigraphs : Flag<["-"], "fno-trigraphs">, Group<f_Group>,
2635  HelpText<"Do not process trigraph sequences">, Flags<[CC1Option]>;
2636def funsigned_bitfields : Flag<["-"], "funsigned-bitfields">, Group<f_Group>;
2637def funsigned_char : Flag<["-"], "funsigned-char">, Group<f_Group>;
2638def fno_unsigned_char : Flag<["-"], "fno-unsigned-char">;
2639def funwind_tables : Flag<["-"], "funwind-tables">, Group<f_Group>;
2640defm register_global_dtors_with_atexit : BoolFOption<"register-global-dtors-with-atexit",
2641  CodeGenOpts<"RegisterGlobalDtorsWithAtExit">, DefaultFalse,
2642  PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">,
2643  BothFlags<[], " atexit or __cxa_atexit to register global destructors">>;
2644defm use_init_array : BoolFOption<"use-init-array",
2645  CodeGenOpts<"UseInitArray">, DefaultTrue,
2646  NegFlag<SetFalse, [CC1Option], "Use .ctors/.dtors instead of .init_array/.fini_array">,
2647  PosFlag<SetTrue>>;
2648def fno_var_tracking : Flag<["-"], "fno-var-tracking">, Group<clang_ignored_f_Group>;
2649def fverbose_asm : Flag<["-"], "fverbose-asm">, Group<f_Group>,
2650  HelpText<"Generate verbose assembly output">;
2651def dA : Flag<["-"], "dA">, Alias<fverbose_asm>;
2652defm visibility_from_dllstorageclass : BoolFOption<"visibility-from-dllstorageclass",
2653  LangOpts<"VisibilityFromDLLStorageClass">, DefaultFalse,
2654  PosFlag<SetTrue, [CC1Option], "Set the visiblity of symbols in the generated code from their DLL storage class">,
2655  NegFlag<SetFalse>>;
2656def fvisibility_dllexport_EQ : Joined<["-"], "fvisibility-dllexport=">, Group<f_Group>, Flags<[CC1Option]>,
2657  HelpText<"The visibility for dllexport defintions [-fvisibility-from-dllstorageclass]">,
2658  MarshallingInfoVisibility<LangOpts<"DLLExportVisibility">, "DefaultVisibility">,
2659  ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>;
2660def fvisibility_nodllstorageclass_EQ : Joined<["-"], "fvisibility-nodllstorageclass=">, Group<f_Group>, Flags<[CC1Option]>,
2661  HelpText<"The visibility for defintiions without an explicit DLL export class [-fvisibility-from-dllstorageclass]">,
2662  MarshallingInfoVisibility<LangOpts<"NoDLLStorageClassVisibility">, "HiddenVisibility">,
2663  ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>;
2664def fvisibility_externs_dllimport_EQ : Joined<["-"], "fvisibility-externs-dllimport=">, Group<f_Group>, Flags<[CC1Option]>,
2665  HelpText<"The visibility for dllimport external declarations [-fvisibility-from-dllstorageclass]">,
2666  MarshallingInfoVisibility<LangOpts<"ExternDeclDLLImportVisibility">, "DefaultVisibility">,
2667  ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>;
2668def fvisibility_externs_nodllstorageclass_EQ : Joined<["-"], "fvisibility-externs-nodllstorageclass=">, Group<f_Group>, Flags<[CC1Option]>,
2669  HelpText<"The visibility for external declarations without an explicit DLL dllstorageclass [-fvisibility-from-dllstorageclass]">,
2670  MarshallingInfoVisibility<LangOpts<"ExternDeclNoDLLStorageClassVisibility">, "HiddenVisibility">,
2671  ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>;
2672def fvisibility_EQ : Joined<["-"], "fvisibility=">, Group<f_Group>,
2673  HelpText<"Set the default symbol visibility for all global declarations">, Values<"hidden,default">;
2674def fvisibility_inlines_hidden : Flag<["-"], "fvisibility-inlines-hidden">, Group<f_Group>,
2675  HelpText<"Give inline C++ member functions hidden visibility by default">,
2676  Flags<[CC1Option]>, MarshallingInfoFlag<LangOpts<"InlineVisibilityHidden">>;
2677defm visibility_inlines_hidden_static_local_var : BoolFOption<"visibility-inlines-hidden-static-local-var",
2678  LangOpts<"VisibilityInlinesHiddenStaticLocalVar">, DefaultFalse,
2679  PosFlag<SetTrue, [CC1Option], "When -fvisibility-inlines-hidden is enabled, static variables in"
2680            " inline C++ member functions will also be given hidden visibility by default">,
2681  NegFlag<SetFalse, [], "Disables -fvisibility-inlines-hidden-static-local-var"
2682         " (this is the default on non-darwin targets)">, BothFlags<[CC1Option]>>;
2683def fvisibility_ms_compat : Flag<["-"], "fvisibility-ms-compat">, Group<f_Group>,
2684  HelpText<"Give global types 'default' visibility and global functions and "
2685           "variables 'hidden' visibility by default">;
2686def fvisibility_global_new_delete_hidden : Flag<["-"], "fvisibility-global-new-delete-hidden">, Group<f_Group>,
2687  HelpText<"Give global C++ operator new and delete declarations hidden visibility">, Flags<[CC1Option]>,
2688  MarshallingInfoFlag<LangOpts<"GlobalAllocationFunctionVisibilityHidden">>;
2689defm whole_program_vtables : BoolFOption<"whole-program-vtables",
2690  CodeGenOpts<"WholeProgramVTables">, DefaultFalse,
2691  PosFlag<SetTrue, [CC1Option], "Enables whole-program vtable optimization. Requires -flto">,
2692  NegFlag<SetFalse>, BothFlags<[CoreOption]>>;
2693defm split_lto_unit : BoolFOption<"split-lto-unit",
2694  CodeGenOpts<"EnableSplitLTOUnit">, DefaultFalse,
2695  PosFlag<SetTrue, [CC1Option], "Enables splitting of the LTO unit">,
2696  NegFlag<SetFalse>, BothFlags<[CoreOption]>>;
2697defm force_emit_vtables : BoolFOption<"force-emit-vtables",
2698  CodeGenOpts<"ForceEmitVTables">, DefaultFalse,
2699  PosFlag<SetTrue, [CC1Option], "Emits more virtual tables to improve devirtualization">,
2700  NegFlag<SetFalse>, BothFlags<[CoreOption]>>;
2701defm virtual_function_elimination : BoolFOption<"virtual-function-elimination",
2702  CodeGenOpts<"VirtualFunctionElimination">, DefaultFalse,
2703  PosFlag<SetTrue, [CC1Option], "Enables dead virtual function elimination optimization. Requires -flto=full">,
2704  NegFlag<SetFalse>, BothFlags<[CoreOption]>>;
2705
2706def fwrapv : Flag<["-"], "fwrapv">, Group<f_Group>, Flags<[CC1Option]>,
2707  HelpText<"Treat signed integer overflow as two's complement">;
2708def fwritable_strings : Flag<["-"], "fwritable-strings">, Group<f_Group>, Flags<[CC1Option]>,
2709  HelpText<"Store string literals as writable data">,
2710  MarshallingInfoFlag<LangOpts<"WritableStrings">>;
2711defm zero_initialized_in_bss : BoolFOption<"zero-initialized-in-bss",
2712  CodeGenOpts<"NoZeroInitializedInBSS">, DefaultFalse,
2713  NegFlag<SetTrue, [CC1Option], "Don't place zero initialized data in BSS">,
2714  PosFlag<SetFalse>>;
2715defm function_sections : BoolFOption<"function-sections",
2716  CodeGenOpts<"FunctionSections">, DefaultFalse,
2717  PosFlag<SetTrue, [CC1Option], "Place each function in its own section">,
2718  NegFlag<SetFalse>>;
2719def fbasic_block_sections_EQ : Joined<["-"], "fbasic-block-sections=">, Group<f_Group>,
2720  Flags<[CC1Option, CC1AsOption]>,
2721  HelpText<"Place each function's basic blocks in unique sections (ELF Only) : all | labels | none | list=<file>">,
2722  DocBrief<[{Generate labels for each basic block or place each basic block or a subset of basic blocks in its own section.}]>,
2723  Values<"all,labels,none,list=">,
2724  MarshallingInfoString<CodeGenOpts<"BBSections">, [{"none"}]>;
2725defm data_sections : BoolFOption<"data-sections",
2726  CodeGenOpts<"DataSections">, DefaultFalse,
2727  PosFlag<SetTrue, [CC1Option], "Place each data in its own section">, NegFlag<SetFalse>>;
2728defm stack_size_section : BoolFOption<"stack-size-section",
2729  CodeGenOpts<"StackSizeSection">, DefaultFalse,
2730  PosFlag<SetTrue, [CC1Option], "Emit section containing metadata on function stack sizes">,
2731  NegFlag<SetFalse>>;
2732def fstack_usage : Flag<["-"], "fstack-usage">, Group<f_Group>,
2733  HelpText<"Emit .su file containing information on function stack sizes">;
2734def stack_usage_file : Separate<["-"], "stack-usage-file">,
2735  Flags<[CC1Option, NoDriverOption]>,
2736  HelpText<"Filename (or -) to write stack usage output to">,
2737  MarshallingInfoString<CodeGenOpts<"StackUsageOutput">>;
2738
2739defm unique_basic_block_section_names : BoolFOption<"unique-basic-block-section-names",
2740  CodeGenOpts<"UniqueBasicBlockSectionNames">, DefaultFalse,
2741  PosFlag<SetTrue, [CC1Option], "Use unique names for basic block sections (ELF Only)">,
2742  NegFlag<SetFalse>>;
2743defm unique_internal_linkage_names : BoolFOption<"unique-internal-linkage-names",
2744  CodeGenOpts<"UniqueInternalLinkageNames">, DefaultFalse,
2745  PosFlag<SetTrue, [CC1Option], "Uniqueify Internal Linkage Symbol Names by appending"
2746            " the MD5 hash of the module path">,
2747  NegFlag<SetFalse>>;
2748defm unique_section_names : BoolFOption<"unique-section-names",
2749  CodeGenOpts<"UniqueSectionNames">, DefaultTrue,
2750  NegFlag<SetFalse, [CC1Option], "Don't use unique names for text and data sections">,
2751  PosFlag<SetTrue>>;
2752
2753defm split_machine_functions: BoolFOption<"split-machine-functions",
2754  CodeGenOpts<"SplitMachineFunctions">, DefaultFalse,
2755  PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
2756  BothFlags<[], " late function splitting using profile information (x86 ELF)">>;
2757
2758defm strict_return : BoolFOption<"strict-return",
2759  CodeGenOpts<"StrictReturn">, DefaultTrue,
2760  NegFlag<SetFalse, [CC1Option], "Don't treat control flow paths that fall off the end"
2761            " of a non-void function as unreachable">,
2762  PosFlag<SetTrue>>;
2763
2764def fenable_matrix : Flag<["-"], "fenable-matrix">, Group<f_Group>,
2765    Flags<[CC1Option]>,
2766    HelpText<"Enable matrix data type and related builtin functions">,
2767    MarshallingInfoFlag<LangOpts<"MatrixTypes">>;
2768
2769
2770def fdebug_types_section: Flag <["-"], "fdebug-types-section">, Group<f_Group>,
2771  HelpText<"Place debug types in their own section (ELF Only)">;
2772def fno_debug_types_section: Flag<["-"], "fno-debug-types-section">, Group<f_Group>;
2773defm debug_ranges_base_address : BoolFOption<"debug-ranges-base-address",
2774  CodeGenOpts<"DebugRangesBaseAddress">, DefaultFalse,
2775  PosFlag<SetTrue, [CC1Option], "Use DWARF base address selection entries in .debug_ranges">,
2776  NegFlag<SetFalse>>;
2777defm split_dwarf_inlining : BoolFOption<"split-dwarf-inlining",
2778  CodeGenOpts<"SplitDwarfInlining">, DefaultFalse,
2779  NegFlag<SetFalse, []>,
2780  PosFlag<SetTrue, [CC1Option], "Provide minimal debug info in the object/executable"
2781          " to facilitate online symbolication/stack traces in the absence of"
2782          " .dwo/.dwp files when using Split DWARF">>;
2783def fdebug_default_version: Joined<["-"], "fdebug-default-version=">, Group<f_Group>,
2784  HelpText<"Default DWARF version to use, if a -g option caused DWARF debug info to be produced">;
2785def fdebug_prefix_map_EQ
2786  : Joined<["-"], "fdebug-prefix-map=">, Group<f_Group>,
2787    Flags<[CC1Option,CC1AsOption]>,
2788    HelpText<"remap file source paths in debug info">;
2789def fcoverage_prefix_map_EQ
2790  : Joined<["-"], "fcoverage-prefix-map=">, Group<f_Group>,
2791    Flags<[CC1Option]>,
2792    HelpText<"remap file source paths in coverage mapping">;
2793def ffile_prefix_map_EQ
2794  : Joined<["-"], "ffile-prefix-map=">, Group<f_Group>,
2795    HelpText<"remap file source paths in debug info and predefined preprocessor macros">;
2796def fmacro_prefix_map_EQ
2797  : Joined<["-"], "fmacro-prefix-map=">, Group<Preprocessor_Group>, Flags<[CC1Option]>,
2798    HelpText<"remap file source paths in predefined preprocessor macros">;
2799defm force_dwarf_frame : BoolFOption<"force-dwarf-frame",
2800  CodeGenOpts<"ForceDwarfFrameSection">, DefaultFalse,
2801  PosFlag<SetTrue, [CC1Option], "Always emit a debug frame section">, NegFlag<SetFalse>>;
2802def g_Flag : Flag<["-"], "g">, Group<g_Group>,
2803  HelpText<"Generate source-level debug information">;
2804def gline_tables_only : Flag<["-"], "gline-tables-only">, Group<gN_Group>,
2805  Flags<[CoreOption]>, HelpText<"Emit debug line number tables only">;
2806def gline_directives_only : Flag<["-"], "gline-directives-only">, Group<gN_Group>,
2807  Flags<[CoreOption]>, HelpText<"Emit debug line info directives only">;
2808def gmlt : Flag<["-"], "gmlt">, Alias<gline_tables_only>;
2809def g0 : Flag<["-"], "g0">, Group<gN_Group>;
2810def g1 : Flag<["-"], "g1">, Group<gN_Group>, Alias<gline_tables_only>;
2811def g2 : Flag<["-"], "g2">, Group<gN_Group>;
2812def g3 : Flag<["-"], "g3">, Group<gN_Group>;
2813def ggdb : Flag<["-"], "ggdb">, Group<gTune_Group>;
2814def ggdb0 : Flag<["-"], "ggdb0">, Group<ggdbN_Group>;
2815def ggdb1 : Flag<["-"], "ggdb1">, Group<ggdbN_Group>;
2816def ggdb2 : Flag<["-"], "ggdb2">, Group<ggdbN_Group>;
2817def ggdb3 : Flag<["-"], "ggdb3">, Group<ggdbN_Group>;
2818def glldb : Flag<["-"], "glldb">, Group<gTune_Group>;
2819def gsce : Flag<["-"], "gsce">, Group<gTune_Group>;
2820def gdbx : Flag<["-"], "gdbx">, Group<gTune_Group>;
2821// Equivalent to our default dwarf version. Forces usual dwarf emission when
2822// CodeView is enabled.
2823def gdwarf : Flag<["-"], "gdwarf">, Group<g_Group>, Flags<[CoreOption]>,
2824  HelpText<"Generate source-level debug information with the default dwarf version">;
2825def gdwarf_2 : Flag<["-"], "gdwarf-2">, Group<g_Group>,
2826  HelpText<"Generate source-level debug information with dwarf version 2">;
2827def gdwarf_3 : Flag<["-"], "gdwarf-3">, Group<g_Group>,
2828  HelpText<"Generate source-level debug information with dwarf version 3">;
2829def gdwarf_4 : Flag<["-"], "gdwarf-4">, Group<g_Group>,
2830  HelpText<"Generate source-level debug information with dwarf version 4">;
2831def gdwarf_5 : Flag<["-"], "gdwarf-5">, Group<g_Group>,
2832  HelpText<"Generate source-level debug information with dwarf version 5">;
2833def gdwarf64 : Flag<["-"], "gdwarf64">, Group<g_Group>,
2834  Flags<[CC1Option, CC1AsOption]>,
2835  HelpText<"Enables DWARF64 format for ELF binaries, if debug information emission is enabled.">,
2836  MarshallingInfoFlag<CodeGenOpts<"Dwarf64">>;
2837def gdwarf32 : Flag<["-"], "gdwarf32">, Group<g_Group>,
2838  Flags<[CC1Option, CC1AsOption]>,
2839  HelpText<"Enables DWARF32 format for ELF binaries, if debug information emission is enabled.">;
2840
2841def gcodeview : Flag<["-"], "gcodeview">,
2842  HelpText<"Generate CodeView debug information">,
2843  Flags<[CC1Option, CC1AsOption, CoreOption]>,
2844  MarshallingInfoFlag<CodeGenOpts<"EmitCodeView">>;
2845defm codeview_ghash : BoolOption<"g", "codeview-ghash",
2846  CodeGenOpts<"CodeViewGHash">, DefaultFalse,
2847  PosFlag<SetTrue, [CC1Option], "Emit type record hashes in a .debug$H section">,
2848  NegFlag<SetFalse>, BothFlags<[CoreOption]>>;
2849defm inline_line_tables : BoolGOption<"inline-line-tables",
2850  CodeGenOpts<"NoInlineLineTables">, DefaultFalse,
2851  NegFlag<SetTrue, [CC1Option], "Don't emit inline line tables.">,
2852  PosFlag<SetFalse>, BothFlags<[CoreOption]>>;
2853
2854def gfull : Flag<["-"], "gfull">, Group<g_Group>;
2855def gused : Flag<["-"], "gused">, Group<g_Group>;
2856def gstabs : Joined<["-"], "gstabs">, Group<g_Group>, Flags<[Unsupported]>;
2857def gcoff : Joined<["-"], "gcoff">, Group<g_Group>, Flags<[Unsupported]>;
2858def gxcoff : Joined<["-"], "gxcoff">, Group<g_Group>, Flags<[Unsupported]>;
2859def gvms : Joined<["-"], "gvms">, Group<g_Group>, Flags<[Unsupported]>;
2860def gtoggle : Flag<["-"], "gtoggle">, Group<g_flags_Group>, Flags<[Unsupported]>;
2861def grecord_command_line : Flag<["-"], "grecord-command-line">,
2862  Group<g_flags_Group>;
2863def gno_record_command_line : Flag<["-"], "gno-record-command-line">,
2864  Group<g_flags_Group>;
2865def : Flag<["-"], "grecord-gcc-switches">, Alias<grecord_command_line>;
2866def : Flag<["-"], "gno-record-gcc-switches">, Alias<gno_record_command_line>;
2867defm strict_dwarf : BoolOption<"g", "strict-dwarf",
2868  CodeGenOpts<"DebugStrictDwarf">, DefaultFalse,
2869  PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>, BothFlags<[CoreOption]>>,
2870  Group<g_flags_Group>;
2871defm column_info : BoolOption<"g", "column-info",
2872  CodeGenOpts<"DebugColumnInfo">, DefaultTrue,
2873  NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>, BothFlags<[CoreOption]>>,
2874  Group<g_flags_Group>;
2875def gsplit_dwarf : Flag<["-"], "gsplit-dwarf">, Group<g_flags_Group>;
2876def gsplit_dwarf_EQ : Joined<["-"], "gsplit-dwarf=">, Group<g_flags_Group>,
2877  HelpText<"Set DWARF fission mode to either 'split' or 'single'">,
2878  Values<"split,single">;
2879def gno_split_dwarf : Flag<["-"], "gno-split-dwarf">, Group<g_flags_Group>;
2880def ggnu_pubnames : Flag<["-"], "ggnu-pubnames">, Group<g_flags_Group>, Flags<[CC1Option]>;
2881def gno_gnu_pubnames : Flag<["-"], "gno-gnu-pubnames">, Group<g_flags_Group>;
2882def gpubnames : Flag<["-"], "gpubnames">, Group<g_flags_Group>, Flags<[CC1Option]>;
2883def gno_pubnames : Flag<["-"], "gno-pubnames">, Group<g_flags_Group>;
2884def gdwarf_aranges : Flag<["-"], "gdwarf-aranges">, Group<g_flags_Group>;
2885def gmodules : Flag <["-"], "gmodules">, Group<gN_Group>,
2886  HelpText<"Generate debug info with external references to clang modules"
2887           " or precompiled headers">;
2888def gz_EQ : Joined<["-"], "gz=">, Group<g_flags_Group>,
2889    HelpText<"DWARF debug sections compression type">;
2890def gz : Flag<["-"], "gz">, Alias<gz_EQ>, AliasArgs<["zlib"]>, Group<g_flags_Group>;
2891def gembed_source : Flag<["-"], "gembed-source">, Group<g_flags_Group>, Flags<[CC1Option]>,
2892    HelpText<"Embed source text in DWARF debug sections">,
2893    MarshallingInfoFlag<CodeGenOpts<"EmbedSource">>;
2894def gno_embed_source : Flag<["-"], "gno-embed-source">, Group<g_flags_Group>,
2895    Flags<[NoXarchOption]>,
2896    HelpText<"Restore the default behavior of not embedding source text in DWARF debug sections">;
2897def headerpad__max__install__names : Joined<["-"], "headerpad_max_install_names">;
2898def help : Flag<["-", "--"], "help">, Flags<[CC1Option,CC1AsOption, FC1Option,
2899    FlangOption]>, HelpText<"Display available options">,
2900    MarshallingInfoFlag<FrontendOpts<"ShowHelp">>;
2901def ibuiltininc : Flag<["-"], "ibuiltininc">,
2902  HelpText<"Enable builtin #include directories even when -nostdinc is used "
2903           "before or after -ibuiltininc. "
2904           "Using -nobuiltininc after the option disables it">;
2905def index_header_map : Flag<["-"], "index-header-map">, Flags<[CC1Option]>,
2906  HelpText<"Make the next included directory (-I or -F) an indexer header map">;
2907def idirafter : JoinedOrSeparate<["-"], "idirafter">, Group<clang_i_Group>, Flags<[CC1Option]>,
2908  HelpText<"Add directory to AFTER include search path">;
2909def iframework : JoinedOrSeparate<["-"], "iframework">, Group<clang_i_Group>, Flags<[CC1Option]>,
2910  HelpText<"Add directory to SYSTEM framework search path">;
2911def iframeworkwithsysroot : JoinedOrSeparate<["-"], "iframeworkwithsysroot">,
2912  Group<clang_i_Group>,
2913  HelpText<"Add directory to SYSTEM framework search path, "
2914           "absolute paths are relative to -isysroot">,
2915  MetaVarName<"<directory>">, Flags<[CC1Option]>;
2916def imacros : JoinedOrSeparate<["-", "--"], "imacros">, Group<clang_i_Group>, Flags<[CC1Option]>,
2917  HelpText<"Include macros from file before parsing">, MetaVarName<"<file>">,
2918  MarshallingInfoStringVector<PreprocessorOpts<"MacroIncludes">>;
2919def image__base : Separate<["-"], "image_base">;
2920def include_ : JoinedOrSeparate<["-", "--"], "include">, Group<clang_i_Group>, EnumName<"include">,
2921    MetaVarName<"<file>">, HelpText<"Include file before parsing">, Flags<[CC1Option]>;
2922def include_pch : Separate<["-"], "include-pch">, Group<clang_i_Group>, Flags<[CC1Option]>,
2923  HelpText<"Include precompiled header file">, MetaVarName<"<file>">,
2924  MarshallingInfoString<PreprocessorOpts<"ImplicitPCHInclude">>;
2925def relocatable_pch : Flag<["-", "--"], "relocatable-pch">, Flags<[CC1Option]>,
2926  HelpText<"Whether to build a relocatable precompiled header">,
2927  MarshallingInfoFlag<FrontendOpts<"RelocatablePCH">>;
2928def verify_pch : Flag<["-"], "verify-pch">, Group<Action_Group>, Flags<[CC1Option]>,
2929  HelpText<"Load and verify that a pre-compiled header file is not stale">;
2930def init : Separate<["-"], "init">;
2931def install__name : Separate<["-"], "install_name">;
2932def iprefix : JoinedOrSeparate<["-"], "iprefix">, Group<clang_i_Group>, Flags<[CC1Option]>,
2933  HelpText<"Set the -iwithprefix/-iwithprefixbefore prefix">, MetaVarName<"<dir>">;
2934def iquote : JoinedOrSeparate<["-"], "iquote">, Group<clang_i_Group>, Flags<[CC1Option]>,
2935  HelpText<"Add directory to QUOTE include search path">, MetaVarName<"<directory>">;
2936def isysroot : JoinedOrSeparate<["-"], "isysroot">, Group<clang_i_Group>, Flags<[CC1Option]>,
2937  HelpText<"Set the system root directory (usually /)">, MetaVarName<"<dir>">,
2938  MarshallingInfoString<HeaderSearchOpts<"Sysroot">, [{"/"}]>;
2939def isystem : JoinedOrSeparate<["-"], "isystem">, Group<clang_i_Group>,
2940  Flags<[CC1Option]>,
2941  HelpText<"Add directory to SYSTEM include search path">, MetaVarName<"<directory>">;
2942def isystem_after : JoinedOrSeparate<["-"], "isystem-after">,
2943  Group<clang_i_Group>, Flags<[NoXarchOption]>, MetaVarName<"<directory>">,
2944  HelpText<"Add directory to end of the SYSTEM include search path">;
2945def iwithprefixbefore : JoinedOrSeparate<["-"], "iwithprefixbefore">, Group<clang_i_Group>,
2946  HelpText<"Set directory to include search path with prefix">, MetaVarName<"<dir>">,
2947  Flags<[CC1Option]>;
2948def iwithprefix : JoinedOrSeparate<["-"], "iwithprefix">, Group<clang_i_Group>, Flags<[CC1Option]>,
2949  HelpText<"Set directory to SYSTEM include search path with prefix">, MetaVarName<"<dir>">;
2950def iwithsysroot : JoinedOrSeparate<["-"], "iwithsysroot">, Group<clang_i_Group>,
2951  HelpText<"Add directory to SYSTEM include search path, "
2952           "absolute paths are relative to -isysroot">, MetaVarName<"<directory>">,
2953  Flags<[CC1Option]>;
2954def ivfsoverlay : JoinedOrSeparate<["-"], "ivfsoverlay">, Group<clang_i_Group>, Flags<[CC1Option]>,
2955  HelpText<"Overlay the virtual filesystem described by file over the real file system">;
2956def imultilib : Separate<["-"], "imultilib">, Group<gfortran_Group>;
2957def keep__private__externs : Flag<["-"], "keep_private_externs">;
2958def l : JoinedOrSeparate<["-"], "l">, Flags<[LinkerInput, RenderJoined]>,
2959        Group<Link_Group>;
2960def lazy__framework : Separate<["-"], "lazy_framework">, Flags<[LinkerInput]>;
2961def lazy__library : Separate<["-"], "lazy_library">, Flags<[LinkerInput]>;
2962def mlittle_endian : Flag<["-"], "mlittle-endian">, Flags<[NoXarchOption]>;
2963def EL : Flag<["-"], "EL">, Alias<mlittle_endian>;
2964def mbig_endian : Flag<["-"], "mbig-endian">, Flags<[NoXarchOption]>;
2965def EB : Flag<["-"], "EB">, Alias<mbig_endian>;
2966def m16 : Flag<["-"], "m16">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>;
2967def m32 : Flag<["-"], "m32">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>;
2968def mqdsp6_compat : Flag<["-"], "mqdsp6-compat">, Group<m_Group>, Flags<[NoXarchOption,CC1Option]>,
2969  HelpText<"Enable hexagon-qdsp6 backward compatibility">,
2970  MarshallingInfoFlag<LangOpts<"HexagonQdsp6Compat">>;
2971def m64 : Flag<["-"], "m64">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>;
2972def mx32 : Flag<["-"], "mx32">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>;
2973def mabi_EQ : Joined<["-"], "mabi=">, Group<m_Group>;
2974def miamcu : Flag<["-"], "miamcu">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>,
2975  HelpText<"Use Intel MCU ABI">;
2976def mno_iamcu : Flag<["-"], "mno-iamcu">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>;
2977def malign_functions_EQ : Joined<["-"], "malign-functions=">, Group<clang_ignored_m_Group>;
2978def malign_loops_EQ : Joined<["-"], "malign-loops=">, Group<clang_ignored_m_Group>;
2979def malign_jumps_EQ : Joined<["-"], "malign-jumps=">, Group<clang_ignored_m_Group>;
2980def malign_branch_EQ : CommaJoined<["-"], "malign-branch=">, Group<m_Group>, Flags<[NoXarchOption]>,
2981  HelpText<"Specify types of branches to align">;
2982def malign_branch_boundary_EQ : Joined<["-"], "malign-branch-boundary=">, Group<m_Group>, Flags<[NoXarchOption]>,
2983  HelpText<"Specify the boundary's size to align branches">;
2984def mpad_max_prefix_size_EQ : Joined<["-"], "mpad-max-prefix-size=">, Group<m_Group>, Flags<[NoXarchOption]>,
2985  HelpText<"Specify maximum number of prefixes to use for padding">;
2986def mbranches_within_32B_boundaries : Flag<["-"], "mbranches-within-32B-boundaries">, Flags<[NoXarchOption]>, Group<m_Group>,
2987  HelpText<"Align selected branches (fused, jcc, jmp) within 32-byte boundary">;
2988def mfancy_math_387 : Flag<["-"], "mfancy-math-387">, Group<clang_ignored_m_Group>;
2989def mlong_calls : Flag<["-"], "mlong-calls">, Group<m_Group>,
2990  HelpText<"Generate branches with extended addressability, usually via indirect jumps.">;
2991def mdouble_EQ : Joined<["-"], "mdouble=">, Group<m_Group>, Values<"32,64">, Flags<[CC1Option]>,
2992  HelpText<"Force double to be 32 bits or 64 bits">,
2993  MarshallingInfoInt<LangOpts<"DoubleSize">, "0">;
2994def LongDouble_Group : OptionGroup<"<LongDouble group>">, Group<m_Group>,
2995  DocName<"Long double flags">,
2996  DocBrief<[{Selects the long double implementation}]>;
2997def mlong_double_64 : Flag<["-"], "mlong-double-64">, Group<LongDouble_Group>, Flags<[CC1Option]>,
2998  HelpText<"Force long double to be 64 bits">;
2999def mlong_double_80 : Flag<["-"], "mlong-double-80">, Group<LongDouble_Group>, Flags<[CC1Option]>,
3000  HelpText<"Force long double to be 80 bits, padded to 128 bits for storage">;
3001def mlong_double_128 : Flag<["-"], "mlong-double-128">, Group<LongDouble_Group>, Flags<[CC1Option]>,
3002  HelpText<"Force long double to be 128 bits">;
3003def mno_long_calls : Flag<["-"], "mno-long-calls">, Group<m_Group>,
3004  HelpText<"Restore the default behaviour of not generating long calls">;
3005def mexecute_only : Flag<["-"], "mexecute-only">, Group<m_arm_Features_Group>,
3006  HelpText<"Disallow generation of data access to code sections (ARM only)">;
3007def mno_execute_only : Flag<["-"], "mno-execute-only">, Group<m_arm_Features_Group>,
3008  HelpText<"Allow generation of data access to code sections (ARM only)">;
3009def mtp_mode_EQ : Joined<["-"], "mtp=">, Group<m_arm_Features_Group>, Values<"soft,cp15,el0,el1,el2,el3">,
3010  HelpText<"Thread pointer access method (AArch32/AArch64 only)">;
3011def mpure_code : Flag<["-"], "mpure-code">, Alias<mexecute_only>; // Alias for GCC compatibility
3012def mno_pure_code : Flag<["-"], "mno-pure-code">, Alias<mno_execute_only>;
3013def mtvos_version_min_EQ : Joined<["-"], "mtvos-version-min=">, Group<m_Group>;
3014def mappletvos_version_min_EQ : Joined<["-"], "mappletvos-version-min=">, Alias<mtvos_version_min_EQ>;
3015def mtvos_simulator_version_min_EQ : Joined<["-"], "mtvos-simulator-version-min=">;
3016def mappletvsimulator_version_min_EQ : Joined<["-"], "mappletvsimulator-version-min=">, Alias<mtvos_simulator_version_min_EQ>;
3017def mwatchos_version_min_EQ : Joined<["-"], "mwatchos-version-min=">, Group<m_Group>;
3018def mwatchos_simulator_version_min_EQ : Joined<["-"], "mwatchos-simulator-version-min=">;
3019def mwatchsimulator_version_min_EQ : Joined<["-"], "mwatchsimulator-version-min=">, Alias<mwatchos_simulator_version_min_EQ>;
3020def march_EQ : Joined<["-"], "march=">, Group<m_Group>, Flags<[CoreOption]>;
3021def masm_EQ : Joined<["-"], "masm=">, Group<m_Group>, Flags<[NoXarchOption]>;
3022def mcmodel_EQ : Joined<["-"], "mcmodel=">, Group<m_Group>, Flags<[CC1Option]>,
3023  MarshallingInfoString<TargetOpts<"CodeModel">, [{"default"}]>;
3024def mtls_size_EQ : Joined<["-"], "mtls-size=">, Group<m_Group>, Flags<[NoXarchOption, CC1Option]>,
3025  HelpText<"Specify bit size of immediate TLS offsets (AArch64 ELF only): "
3026           "12 (for 4KB) | 24 (for 16MB, default) | 32 (for 4GB) | 48 (for 256TB, needs -mcmodel=large)">,
3027  MarshallingInfoInt<CodeGenOpts<"TLSSize">>;
3028def mimplicit_it_EQ : Joined<["-"], "mimplicit-it=">, Group<m_Group>;
3029def mdefault_build_attributes : Joined<["-"], "mdefault-build-attributes">, Group<m_Group>;
3030def mno_default_build_attributes : Joined<["-"], "mno-default-build-attributes">, Group<m_Group>;
3031def mconstant_cfstrings : Flag<["-"], "mconstant-cfstrings">, Group<clang_ignored_m_Group>;
3032def mconsole : Joined<["-"], "mconsole">, Group<m_Group>, Flags<[NoXarchOption]>;
3033def mwindows : Joined<["-"], "mwindows">, Group<m_Group>, Flags<[NoXarchOption]>;
3034def mdll : Joined<["-"], "mdll">, Group<m_Group>, Flags<[NoXarchOption]>;
3035def municode : Joined<["-"], "municode">, Group<m_Group>, Flags<[NoXarchOption]>;
3036def mthreads : Joined<["-"], "mthreads">, Group<m_Group>, Flags<[NoXarchOption]>;
3037def mcpu_EQ : Joined<["-"], "mcpu=">, Group<m_Group>;
3038def mmcu_EQ : Joined<["-"], "mmcu=">, Group<m_Group>;
3039def msim : Flag<["-"], "msim">, Group<m_Group>;
3040def mdynamic_no_pic : Joined<["-"], "mdynamic-no-pic">, Group<m_Group>;
3041def mfix_and_continue : Flag<["-"], "mfix-and-continue">, Group<clang_ignored_m_Group>;
3042def mieee_fp : Flag<["-"], "mieee-fp">, Group<clang_ignored_m_Group>;
3043def minline_all_stringops : Flag<["-"], "minline-all-stringops">, Group<clang_ignored_m_Group>;
3044def mno_inline_all_stringops : Flag<["-"], "mno-inline-all-stringops">, Group<clang_ignored_m_Group>;
3045def malign_double : Flag<["-"], "malign-double">, Group<m_Group>, Flags<[CC1Option]>,
3046  HelpText<"Align doubles to two words in structs (x86 only)">,
3047  MarshallingInfoFlag<LangOpts<"AlignDouble">>;
3048def mfloat_abi_EQ : Joined<["-"], "mfloat-abi=">, Group<m_Group>, Values<"soft,softfp,hard">;
3049def mfpmath_EQ : Joined<["-"], "mfpmath=">, Group<m_Group>;
3050def mfpu_EQ : Joined<["-"], "mfpu=">, Group<m_Group>;
3051def mhwdiv_EQ : Joined<["-"], "mhwdiv=">, Group<m_Group>;
3052def mhwmult_EQ : Joined<["-"], "mhwmult=">, Group<m_Group>;
3053def mglobal_merge : Flag<["-"], "mglobal-merge">, Group<m_Group>, Flags<[CC1Option]>,
3054  HelpText<"Enable merging of globals">;
3055def mhard_float : Flag<["-"], "mhard-float">, Group<m_Group>;
3056def miphoneos_version_min_EQ : Joined<["-"], "miphoneos-version-min=">, Group<m_Group>;
3057def mios_version_min_EQ : Joined<["-"], "mios-version-min=">,
3058  Alias<miphoneos_version_min_EQ>, HelpText<"Set iOS deployment target">;
3059def mios_simulator_version_min_EQ : Joined<["-"], "mios-simulator-version-min=">;
3060def miphonesimulator_version_min_EQ : Joined<["-"], "miphonesimulator-version-min=">, Alias<mios_simulator_version_min_EQ>;
3061def mkernel : Flag<["-"], "mkernel">, Group<m_Group>;
3062def mlinker_version_EQ : Joined<["-"], "mlinker-version=">,
3063  Flags<[NoXarchOption]>;
3064def mllvm : Separate<["-"], "mllvm">, Flags<[CC1Option,CC1AsOption,CoreOption]>,
3065  HelpText<"Additional arguments to forward to LLVM's option processing">,
3066  MarshallingInfoStringVector<FrontendOpts<"LLVMArgs">>;
3067def mmacosx_version_min_EQ : Joined<["-"], "mmacosx-version-min=">,
3068  Group<m_Group>, HelpText<"Set Mac OS X deployment target">;
3069def mmacos_version_min_EQ : Joined<["-"], "mmacos-version-min=">,
3070  Group<m_Group>, Alias<mmacosx_version_min_EQ>;
3071def mms_bitfields : Flag<["-"], "mms-bitfields">, Group<m_Group>, Flags<[CC1Option]>,
3072  HelpText<"Set the default structure layout to be compatible with the Microsoft compiler standard">,
3073  MarshallingInfoFlag<LangOpts<"MSBitfields">>;
3074def moutline : Flag<["-"], "moutline">, Group<f_clang_Group>, Flags<[CC1Option]>,
3075    HelpText<"Enable function outlining (AArch64 only)">;
3076def mno_outline : Flag<["-"], "mno-outline">, Group<f_clang_Group>, Flags<[CC1Option]>,
3077    HelpText<"Disable function outlining (AArch64 only)">;
3078def mno_ms_bitfields : Flag<["-"], "mno-ms-bitfields">, Group<m_Group>,
3079  HelpText<"Do not set the default structure layout to be compatible with the Microsoft compiler standard">;
3080def mstackrealign : Flag<["-"], "mstackrealign">, Group<m_Group>, Flags<[CC1Option]>,
3081  HelpText<"Force realign the stack at entry to every function">,
3082  MarshallingInfoFlag<CodeGenOpts<"StackRealignment">>;
3083def mstack_alignment : Joined<["-"], "mstack-alignment=">, Group<m_Group>, Flags<[CC1Option]>,
3084  HelpText<"Set the stack alignment">,
3085  MarshallingInfoInt<CodeGenOpts<"StackAlignment">>;
3086def mstack_probe_size : Joined<["-"], "mstack-probe-size=">, Group<m_Group>, Flags<[CC1Option]>,
3087  HelpText<"Set the stack probe size">,
3088  MarshallingInfoInt<CodeGenOpts<"StackProbeSize">, "4096">;
3089def mstack_arg_probe : Flag<["-"], "mstack-arg-probe">, Group<m_Group>,
3090  HelpText<"Enable stack probes">;
3091def mno_stack_arg_probe : Flag<["-"], "mno-stack-arg-probe">, Group<m_Group>, Flags<[CC1Option]>,
3092  HelpText<"Disable stack probes which are enabled by default">,
3093  MarshallingInfoFlag<CodeGenOpts<"NoStackArgProbe">>;
3094def mthread_model : Separate<["-"], "mthread-model">, Group<m_Group>, Flags<[CC1Option]>,
3095  HelpText<"The thread model to use, e.g. posix, single (posix by default)">, Values<"posix,single">,
3096  NormalizedValues<["POSIX", "Single"]>, NormalizedValuesScope<"LangOptions::ThreadModelKind">,
3097  MarshallingInfoEnum<LangOpts<"ThreadModel">, "POSIX">;
3098def meabi : Separate<["-"], "meabi">, Group<m_Group>, Flags<[CC1Option]>,
3099  HelpText<"Set EABI type, e.g. 4, 5 or gnu (default depends on triple)">, Values<"default,4,5,gnu">,
3100  MarshallingInfoEnum<TargetOpts<"EABIVersion">, "Default">,
3101  NormalizedValuesScope<"llvm::EABI">,
3102  NormalizedValues<["Default", "EABI4", "EABI5", "GNU"]>;
3103
3104def mno_constant_cfstrings : Flag<["-"], "mno-constant-cfstrings">, Group<m_Group>;
3105def mno_global_merge : Flag<["-"], "mno-global-merge">, Group<m_Group>, Flags<[CC1Option]>,
3106  HelpText<"Disable merging of globals">;
3107def mno_pascal_strings : Flag<["-"], "mno-pascal-strings">,
3108  Alias<fno_pascal_strings>;
3109def mno_red_zone : Flag<["-"], "mno-red-zone">, Group<m_Group>;
3110def mno_tls_direct_seg_refs : Flag<["-"], "mno-tls-direct-seg-refs">, Group<m_Group>, Flags<[CC1Option]>,
3111  HelpText<"Disable direct TLS access through segment registers">,
3112  MarshallingInfoFlag<CodeGenOpts<"IndirectTlsSegRefs">>;
3113def mno_relax_all : Flag<["-"], "mno-relax-all">, Group<m_Group>;
3114def mno_rtd: Flag<["-"], "mno-rtd">, Group<m_Group>;
3115def mno_soft_float : Flag<["-"], "mno-soft-float">, Group<m_Group>;
3116def mno_stackrealign : Flag<["-"], "mno-stackrealign">, Group<m_Group>;
3117
3118def mretpoline : Flag<["-"], "mretpoline">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>;
3119def mno_retpoline : Flag<["-"], "mno-retpoline">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>;
3120defm speculative_load_hardening : BoolOption<"m", "speculative-load-hardening",
3121  CodeGenOpts<"SpeculativeLoadHardening">, DefaultFalse,
3122  PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>, BothFlags<[CoreOption]>>,
3123  Group<m_Group>;
3124def mlvi_hardening : Flag<["-"], "mlvi-hardening">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>,
3125  HelpText<"Enable all mitigations for Load Value Injection (LVI)">;
3126def mno_lvi_hardening : Flag<["-"], "mno-lvi-hardening">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>,
3127  HelpText<"Disable mitigations for Load Value Injection (LVI)">;
3128def mlvi_cfi : Flag<["-"], "mlvi-cfi">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>,
3129  HelpText<"Enable only control-flow mitigations for Load Value Injection (LVI)">;
3130def mno_lvi_cfi : Flag<["-"], "mno-lvi-cfi">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>,
3131  HelpText<"Disable control-flow mitigations for Load Value Injection (LVI)">;
3132def m_seses : Flag<["-"], "mseses">, Group<m_Group>, Flags<[CoreOption, NoXarchOption]>,
3133  HelpText<"Enable speculative execution side effect suppression (SESES). "
3134    "Includes LVI control flow integrity mitigations">;
3135def mno_seses : Flag<["-"], "mno-seses">, Group<m_Group>, Flags<[CoreOption, NoXarchOption]>,
3136  HelpText<"Disable speculative execution side effect suppression (SESES)">;
3137
3138def mrelax : Flag<["-"], "mrelax">, Group<m_Group>,
3139  HelpText<"Enable linker relaxation">;
3140def mno_relax : Flag<["-"], "mno-relax">, Group<m_Group>,
3141  HelpText<"Disable linker relaxation">;
3142def msmall_data_limit_EQ : Joined<["-"], "msmall-data-limit=">, Group<m_Group>,
3143  Alias<G>,
3144  HelpText<"Put global and static data smaller than the limit into a special section">;
3145def msave_restore : Flag<["-"], "msave-restore">, Group<m_riscv_Features_Group>,
3146  HelpText<"Enable using library calls for save and restore">;
3147def mno_save_restore : Flag<["-"], "mno-save-restore">, Group<m_riscv_Features_Group>,
3148  HelpText<"Disable using library calls for save and restore">;
3149def mcmodel_EQ_medlow : Flag<["-"], "mcmodel=medlow">, Group<m_riscv_Features_Group>,
3150  Flags<[CC1Option]>, Alias<mcmodel_EQ>, AliasArgs<["small"]>,
3151  HelpText<"Equivalent to -mcmodel=small, compatible with RISC-V gcc.">;
3152def mcmodel_EQ_medany : Flag<["-"], "mcmodel=medany">, Group<m_riscv_Features_Group>,
3153  Flags<[CC1Option]>, Alias<mcmodel_EQ>, AliasArgs<["medium"]>,
3154  HelpText<"Equivalent to -mcmodel=medium, compatible with RISC-V gcc.">;
3155def menable_experimental_extensions : Flag<["-"], "menable-experimental-extensions">, Group<m_Group>,
3156  HelpText<"Enable use of experimental RISC-V extensions.">;
3157
3158def munaligned_access : Flag<["-"], "munaligned-access">, Group<m_arm_Features_Group>,
3159  HelpText<"Allow memory accesses to be unaligned (AArch32/AArch64 only)">;
3160def mno_unaligned_access : Flag<["-"], "mno-unaligned-access">, Group<m_arm_Features_Group>,
3161  HelpText<"Force all memory accesses to be aligned (AArch32/AArch64 only)">;
3162def mstrict_align : Flag<["-"], "mstrict-align">, Alias<mno_unaligned_access>, Flags<[CC1Option,HelpHidden]>,
3163  HelpText<"Force all memory accesses to be aligned (same as mno-unaligned-access)">;
3164def mno_thumb : Flag<["-"], "mno-thumb">, Group<m_arm_Features_Group>;
3165def mrestrict_it: Flag<["-"], "mrestrict-it">, Group<m_arm_Features_Group>,
3166  HelpText<"Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode.">;
3167def mno_restrict_it: Flag<["-"], "mno-restrict-it">, Group<m_arm_Features_Group>,
3168  HelpText<"Allow generation of deprecated IT blocks for ARMv8. It is off by default for ARMv8 Thumb mode">;
3169def marm : Flag<["-"], "marm">, Alias<mno_thumb>;
3170def ffixed_r9 : Flag<["-"], "ffixed-r9">, Group<m_arm_Features_Group>,
3171  HelpText<"Reserve the r9 register (ARM only)">;
3172def mno_movt : Flag<["-"], "mno-movt">, Group<m_arm_Features_Group>,
3173  HelpText<"Disallow use of movt/movw pairs (ARM only)">;
3174def mcrc : Flag<["-"], "mcrc">, Group<m_Group>,
3175  HelpText<"Allow use of CRC instructions (ARM/Mips only)">;
3176def mnocrc : Flag<["-"], "mnocrc">, Group<m_arm_Features_Group>,
3177  HelpText<"Disallow use of CRC instructions (ARM only)">;
3178def mno_neg_immediates: Flag<["-"], "mno-neg-immediates">, Group<m_arm_Features_Group>,
3179  HelpText<"Disallow converting instructions with negative immediates to their negation or inversion.">;
3180def mcmse : Flag<["-"], "mcmse">, Group<m_arm_Features_Group>,
3181  Flags<[NoXarchOption,CC1Option]>,
3182  HelpText<"Allow use of CMSE (Armv8-M Security Extensions)">,
3183  MarshallingInfoFlag<LangOpts<"Cmse">>;
3184def ForceAAPCSBitfieldLoad : Flag<["-"], "faapcs-bitfield-load">, Group<m_arm_Features_Group>,
3185  Flags<[NoXarchOption,CC1Option]>,
3186  HelpText<"Follows the AAPCS standard that all volatile bit-field write generates at least one load. (ARM only).">,
3187  MarshallingInfoFlag<CodeGenOpts<"ForceAAPCSBitfieldLoad">>;
3188defm aapcs_bitfield_width : BoolOption<"f", "aapcs-bitfield-width",
3189  CodeGenOpts<"AAPCSBitfieldWidth">, DefaultTrue,
3190  NegFlag<SetFalse, [], "Do not follow">, PosFlag<SetTrue, [], "Follow">,
3191  BothFlags<[NoXarchOption, CC1Option], " the AAPCS standard requirement stating that"
3192            " volatile bit-field width is dictated by the field container type. (ARM only).">>,
3193  Group<m_arm_Features_Group>;
3194
3195def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group<m_aarch64_Features_Group>,
3196  HelpText<"Generate code which only uses the general purpose registers (AArch64 only)">;
3197def mfix_cortex_a53_835769 : Flag<["-"], "mfix-cortex-a53-835769">,
3198  Group<m_aarch64_Features_Group>,
3199  HelpText<"Workaround Cortex-A53 erratum 835769 (AArch64 only)">;
3200def mno_fix_cortex_a53_835769 : Flag<["-"], "mno-fix-cortex-a53-835769">,
3201  Group<m_aarch64_Features_Group>,
3202  HelpText<"Don't workaround Cortex-A53 erratum 835769 (AArch64 only)">;
3203def mmark_bti_property : Flag<["-"], "mmark-bti-property">,
3204  Group<m_aarch64_Features_Group>,
3205  HelpText<"Add .note.gnu.property with BTI to assembly files (AArch64 only)">;
3206foreach i = {1-31} in
3207  def ffixed_x#i : Flag<["-"], "ffixed-x"#i>, Group<m_Group>,
3208    HelpText<"Reserve the x"#i#" register (AArch64/RISC-V only)">;
3209
3210foreach i = {8-15,18} in
3211  def fcall_saved_x#i : Flag<["-"], "fcall-saved-x"#i>, Group<m_aarch64_Features_Group>,
3212    HelpText<"Make the x"#i#" register call-saved (AArch64 only)">;
3213
3214def msve_vector_bits_EQ : Joined<["-"], "msve-vector-bits=">,
3215  Group<m_aarch64_Features_Group>, Flags<[NoXarchOption,CC1Option]>,
3216  HelpText<"Specify the size in bits of an SVE vector register. Defaults to the"
3217           " vector length agnostic value of \"scalable\". (AArch64 only)">,
3218  Values<"128,256,512,1024,2048,scalable">,
3219  NormalizedValues<["128", "256", "512", "1024", "2048", "0"]>,
3220  MarshallingInfoEnum<LangOpts<"ArmSveVectorBits">, "0">;
3221
3222def msign_return_address_EQ : Joined<["-"], "msign-return-address=">,
3223  Flags<[CC1Option]>, Group<m_Group>, Values<"none,all,non-leaf">,
3224  HelpText<"Select return address signing scope">;
3225def mbranch_protection_EQ : Joined<["-"], "mbranch-protection=">,
3226  HelpText<"Enforce targets of indirect branches and function returns">;
3227
3228def mharden_sls_EQ : Joined<["-"], "mharden-sls=">,
3229  HelpText<"Select straight-line speculation hardening scope">;
3230
3231def msimd128 : Flag<["-"], "msimd128">, Group<m_wasm_Features_Group>;
3232def mno_simd128 : Flag<["-"], "mno-simd128">, Group<m_wasm_Features_Group>;
3233def mnontrapping_fptoint : Flag<["-"], "mnontrapping-fptoint">, Group<m_wasm_Features_Group>;
3234def mno_nontrapping_fptoint : Flag<["-"], "mno-nontrapping-fptoint">, Group<m_wasm_Features_Group>;
3235def msign_ext : Flag<["-"], "msign-ext">, Group<m_wasm_Features_Group>;
3236def mno_sign_ext : Flag<["-"], "mno-sign-ext">, Group<m_wasm_Features_Group>;
3237def mexception_handing : Flag<["-"], "mexception-handling">, Group<m_wasm_Features_Group>;
3238def mno_exception_handing : Flag<["-"], "mno-exception-handling">, Group<m_wasm_Features_Group>;
3239def matomics : Flag<["-"], "matomics">, Group<m_wasm_Features_Group>;
3240def mno_atomics : Flag<["-"], "mno-atomics">, Group<m_wasm_Features_Group>;
3241def mbulk_memory : Flag<["-"], "mbulk-memory">, Group<m_wasm_Features_Group>;
3242def mno_bulk_memory : Flag<["-"], "mno-bulk-memory">, Group<m_wasm_Features_Group>;
3243def mmutable_globals : Flag<["-"], "mmutable-globals">, Group<m_wasm_Features_Group>;
3244def mno_mutable_globals : Flag<["-"], "mno-mutable-globals">, Group<m_wasm_Features_Group>;
3245def mmultivalue : Flag<["-"], "mmultivalue">, Group<m_wasm_Features_Group>;
3246def mno_multivalue : Flag<["-"], "mno-multivalue">, Group<m_wasm_Features_Group>;
3247def mtail_call : Flag<["-"], "mtail-call">, Group<m_wasm_Features_Group>;
3248def mno_tail_call : Flag<["-"], "mno-tail-call">, Group<m_wasm_Features_Group>;
3249def mreference_types : Flag<["-"], "mreference-types">, Group<m_wasm_Features_Group>;
3250def mno_reference_types : Flag<["-"], "mno-reference-types">, Group<m_wasm_Features_Group>;
3251def mexec_model_EQ : Joined<["-"], "mexec-model=">, Group<m_wasm_Features_Driver_Group>,
3252                     Values<"command,reactor">,
3253                     HelpText<"Execution model (WebAssembly only)">;
3254
3255defm amdgpu_ieee : BoolOption<"m", "amdgpu-ieee",
3256  CodeGenOpts<"EmitIEEENaNCompliantInsts">, DefaultTrue,
3257  PosFlag<SetTrue, [], "Sets the IEEE bit in the expected default floating point "
3258  " mode register. Floating point opcodes that support exception flag "
3259  "gathering quiet and propagate signaling NaN inputs per IEEE 754-2008. "
3260  "This option changes the ABI. (AMDGPU only)">,
3261  NegFlag<SetFalse, [CC1Option]>>, Group<m_Group>;
3262
3263def mcode_object_version_EQ : Joined<["-"], "mcode-object-version=">, Group<m_Group>,
3264  HelpText<"Specify code object ABI version. Defaults to 3. (AMDGPU only)">,
3265  MetaVarName<"<version>">, Values<"2,3,4">;
3266
3267defm code_object_v3_legacy : SimpleMFlag<"code-object-v3",
3268  "Legacy option to specify code object ABI V3",
3269  "Legacy option to specify code object ABI V2",
3270  " (AMDGPU only)">;
3271defm cumode : SimpleMFlag<"cumode",
3272  "Specify CU wavefront", "Specify WGP wavefront",
3273  " execution mode (AMDGPU only)", m_amdgpu_Features_Group>;
3274defm tgsplit : SimpleMFlag<"tgsplit", "Enable", "Disable",
3275  " threadgroup split execution mode (AMDGPU only)", m_amdgpu_Features_Group>;
3276defm wavefrontsize64 : SimpleMFlag<"wavefrontsize64",
3277  "Specify wavefront size 64", "Specify wavefront size 32",
3278  " mode (AMDGPU only)">;
3279
3280defm unsafe_fp_atomics : BoolOption<"m", "unsafe-fp-atomics",
3281  TargetOpts<"AllowAMDGPUUnsafeFPAtomics">, DefaultFalse,
3282  PosFlag<SetTrue, [CC1Option], "Enable unsafe floating point atomic instructions (AMDGPU only)">,
3283  NegFlag<SetFalse>>, Group<m_Group>;
3284
3285def faltivec : Flag<["-"], "faltivec">, Group<f_Group>, Flags<[NoXarchOption]>;
3286def fno_altivec : Flag<["-"], "fno-altivec">, Group<f_Group>, Flags<[NoXarchOption]>;
3287def maltivec : Flag<["-"], "maltivec">, Group<m_ppc_Features_Group>;
3288def mno_altivec : Flag<["-"], "mno-altivec">, Group<m_ppc_Features_Group>;
3289def mpcrel: Flag<["-"], "mpcrel">, Group<m_ppc_Features_Group>;
3290def mno_pcrel: Flag<["-"], "mno-pcrel">, Group<m_ppc_Features_Group>;
3291def mprefixed: Flag<["-"], "mprefixed">, Group<m_ppc_Features_Group>;
3292def mno_prefixed: Flag<["-"], "mno-prefixed">, Group<m_ppc_Features_Group>;
3293def mspe : Flag<["-"], "mspe">, Group<m_ppc_Features_Group>;
3294def mno_spe : Flag<["-"], "mno-spe">, Group<m_ppc_Features_Group>;
3295def mefpu2 : Flag<["-"], "mefpu2">, Group<m_ppc_Features_Group>;
3296def mabi_EQ_vec_extabi : Flag<["-"], "mabi=vec-extabi">, Group<m_Group>, Flags<[CC1Option]>,
3297  HelpText<"Enable the extended Altivec ABI on AIX (AIX only). Uses volatile and nonvolatile vector registers">,
3298  MarshallingInfoFlag<LangOpts<"EnableAIXExtendedAltivecABI">>;
3299def mabi_EQ_vec_default : Flag<["-"], "mabi=vec-default">, Group<m_Group>, Flags<[CC1Option]>,
3300  HelpText<"Enable the default Altivec ABI on AIX (AIX only). Uses only volatile vector registers.">;
3301def mvsx : Flag<["-"], "mvsx">, Group<m_ppc_Features_Group>;
3302def mno_vsx : Flag<["-"], "mno-vsx">, Group<m_ppc_Features_Group>;
3303def msecure_plt : Flag<["-"], "msecure-plt">, Group<m_ppc_Features_Group>;
3304def mpower8_vector : Flag<["-"], "mpower8-vector">,
3305    Group<m_ppc_Features_Group>;
3306def mno_power8_vector : Flag<["-"], "mno-power8-vector">,
3307    Group<m_ppc_Features_Group>;
3308def mpower9_vector : Flag<["-"], "mpower9-vector">,
3309    Group<m_ppc_Features_Group>;
3310def mno_power9_vector : Flag<["-"], "mno-power9-vector">,
3311    Group<m_ppc_Features_Group>;
3312def mpower10_vector : Flag<["-"], "mpower10-vector">,
3313    Group<m_ppc_Features_Group>;
3314def mno_power10_vector : Flag<["-"], "mno-power10-vector">,
3315    Group<m_ppc_Features_Group>;
3316def mpower8_crypto : Flag<["-"], "mcrypto">,
3317    Group<m_ppc_Features_Group>;
3318def mnopower8_crypto : Flag<["-"], "mno-crypto">,
3319    Group<m_ppc_Features_Group>;
3320def mdirect_move : Flag<["-"], "mdirect-move">,
3321    Group<m_ppc_Features_Group>;
3322def mnodirect_move : Flag<["-"], "mno-direct-move">,
3323    Group<m_ppc_Features_Group>;
3324def mpaired_vector_memops: Flag<["-"], "mpaired-vector-memops">,
3325    Group<m_ppc_Features_Group>;
3326def mnopaired_vector_memops: Flag<["-"], "mno-paired-vector-memops">,
3327    Group<m_ppc_Features_Group>;
3328def mhtm : Flag<["-"], "mhtm">, Group<m_ppc_Features_Group>;
3329def mno_htm : Flag<["-"], "mno-htm">, Group<m_ppc_Features_Group>;
3330def mfprnd : Flag<["-"], "mfprnd">, Group<m_ppc_Features_Group>;
3331def mno_fprnd : Flag<["-"], "mno-fprnd">, Group<m_ppc_Features_Group>;
3332def mcmpb : Flag<["-"], "mcmpb">, Group<m_ppc_Features_Group>;
3333def mno_cmpb : Flag<["-"], "mno-cmpb">, Group<m_ppc_Features_Group>;
3334def misel : Flag<["-"], "misel">, Group<m_ppc_Features_Group>;
3335def mno_isel : Flag<["-"], "mno-isel">, Group<m_ppc_Features_Group>;
3336def mmfocrf : Flag<["-"], "mmfocrf">, Group<m_ppc_Features_Group>;
3337def mmfcrf : Flag<["-"], "mmfcrf">, Alias<mmfocrf>;
3338def mno_mfocrf : Flag<["-"], "mno-mfocrf">, Group<m_ppc_Features_Group>;
3339def mno_mfcrf : Flag<["-"], "mno-mfcrf">, Alias<mno_mfocrf>;
3340def mpopcntd : Flag<["-"], "mpopcntd">, Group<m_ppc_Features_Group>;
3341def mno_popcntd : Flag<["-"], "mno-popcntd">, Group<m_ppc_Features_Group>;
3342def mcrbits : Flag<["-"], "mcrbits">, Group<m_ppc_Features_Group>;
3343def mno_crbits : Flag<["-"], "mno-crbits">, Group<m_ppc_Features_Group>;
3344def minvariant_function_descriptors :
3345  Flag<["-"], "minvariant-function-descriptors">, Group<m_ppc_Features_Group>;
3346def mno_invariant_function_descriptors :
3347  Flag<["-"], "mno-invariant-function-descriptors">,
3348  Group<m_ppc_Features_Group>;
3349def mfloat128: Flag<["-"], "mfloat128">,
3350    Group<m_ppc_Features_Group>;
3351def mno_float128 : Flag<["-"], "mno-float128">,
3352    Group<m_ppc_Features_Group>;
3353def mlongcall: Flag<["-"], "mlongcall">,
3354    Group<m_ppc_Features_Group>;
3355def mno_longcall : Flag<["-"], "mno-longcall">,
3356    Group<m_ppc_Features_Group>;
3357def mmma: Flag<["-"], "mmma">, Group<m_ppc_Features_Group>;
3358def mno_mma: Flag<["-"], "mno-mma">, Group<m_ppc_Features_Group>;
3359def mrop_protect : Flag<["-"], "mrop-protect">,
3360    Group<m_ppc_Features_Group>;
3361def mprivileged : Flag<["-"], "mprivileged">,
3362    Group<m_ppc_Features_Group>;
3363def maix_struct_return : Flag<["-"], "maix-struct-return">,
3364  Group<m_Group>, Flags<[CC1Option]>,
3365  HelpText<"Return all structs in memory (PPC32 only)">;
3366def msvr4_struct_return : Flag<["-"], "msvr4-struct-return">,
3367  Group<m_Group>, Flags<[CC1Option]>,
3368  HelpText<"Return small structs in registers (PPC32 only)">;
3369
3370def mvx : Flag<["-"], "mvx">, Group<m_Group>;
3371def mno_vx : Flag<["-"], "mno-vx">, Group<m_Group>;
3372
3373defm zvector : BoolFOption<"zvector",
3374  LangOpts<"ZVector">, DefaultFalse,
3375  PosFlag<SetTrue, [CC1Option], "Enable System z vector language extension">,
3376  NegFlag<SetFalse>>;
3377def mzvector : Flag<["-"], "mzvector">, Alias<fzvector>;
3378def mno_zvector : Flag<["-"], "mno-zvector">, Alias<fno_zvector>;
3379
3380def mignore_xcoff_visibility : Flag<["-"], "mignore-xcoff-visibility">, Group<m_Group>,
3381HelpText<"Not emit the visibility attribute for asm in AIX OS or give all symbols 'unspecified' visibility in XCOFF object file">,
3382  Flags<[CC1Option]>;
3383defm backchain : BoolOption<"m", "backchain",
3384  CodeGenOpts<"Backchain">, DefaultFalse,
3385  PosFlag<SetTrue, [], "Link stack frames through backchain on System Z">,
3386  NegFlag<SetFalse>, BothFlags<[NoXarchOption,CC1Option]>>, Group<m_Group>;
3387
3388def mno_warn_nonportable_cfstrings : Flag<["-"], "mno-warn-nonportable-cfstrings">, Group<m_Group>;
3389def mno_omit_leaf_frame_pointer : Flag<["-"], "mno-omit-leaf-frame-pointer">, Group<m_Group>;
3390def momit_leaf_frame_pointer : Flag<["-"], "momit-leaf-frame-pointer">, Group<m_Group>,
3391  HelpText<"Omit frame pointer setup for leaf functions">;
3392def moslib_EQ : Joined<["-"], "moslib=">, Group<m_Group>;
3393def mpascal_strings : Flag<["-"], "mpascal-strings">, Alias<fpascal_strings>;
3394def mred_zone : Flag<["-"], "mred-zone">, Group<m_Group>;
3395def mtls_direct_seg_refs : Flag<["-"], "mtls-direct-seg-refs">, Group<m_Group>,
3396  HelpText<"Enable direct TLS access through segment registers (default)">;
3397def mregparm_EQ : Joined<["-"], "mregparm=">, Group<m_Group>;
3398def mrelax_all : Flag<["-"], "mrelax-all">, Group<m_Group>, Flags<[CC1Option,CC1AsOption]>,
3399  HelpText<"(integrated-as) Relax all machine instructions">,
3400  MarshallingInfoFlag<CodeGenOpts<"RelaxAll">>;
3401def mincremental_linker_compatible : Flag<["-"], "mincremental-linker-compatible">, Group<m_Group>,
3402  Flags<[CC1Option,CC1AsOption]>,
3403  HelpText<"(integrated-as) Emit an object file which can be used with an incremental linker">,
3404  MarshallingInfoFlag<CodeGenOpts<"IncrementalLinkerCompatible">>;
3405def mno_incremental_linker_compatible : Flag<["-"], "mno-incremental-linker-compatible">, Group<m_Group>,
3406  HelpText<"(integrated-as) Emit an object file which cannot be used with an incremental linker">;
3407def mrtd : Flag<["-"], "mrtd">, Group<m_Group>, Flags<[CC1Option]>,
3408  HelpText<"Make StdCall calling convention the default">;
3409def msmall_data_threshold_EQ : Joined <["-"], "msmall-data-threshold=">,
3410  Group<m_Group>, Alias<G>;
3411def msoft_float : Flag<["-"], "msoft-float">, Group<m_Group>, Flags<[CC1Option]>,
3412  HelpText<"Use software floating point">,
3413  MarshallingInfoFlag<CodeGenOpts<"SoftFloat">>;
3414def moutline_atomics : Flag<["-"], "moutline-atomics">, Group<f_clang_Group>, Flags<[CC1Option]>,
3415  HelpText<"Generate local calls to out-of-line atomic operations">;
3416def mno_outline_atomics : Flag<["-"], "mno-outline-atomics">, Group<f_clang_Group>, Flags<[CC1Option]>,
3417  HelpText<"Don't generate local calls to out-of-line atomic operations">;
3418def mno_implicit_float : Flag<["-"], "mno-implicit-float">, Group<m_Group>,
3419  HelpText<"Don't generate implicit floating point instructions">;
3420def mimplicit_float : Flag<["-"], "mimplicit-float">, Group<m_Group>;
3421def mrecip : Flag<["-"], "mrecip">, Group<m_Group>;
3422def mrecip_EQ : CommaJoined<["-"], "mrecip=">, Group<m_Group>, Flags<[CC1Option]>,
3423  MarshallingInfoStringVector<CodeGenOpts<"Reciprocals">>;
3424def mprefer_vector_width_EQ : Joined<["-"], "mprefer-vector-width=">, Group<m_Group>, Flags<[CC1Option]>,
3425  HelpText<"Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.">,
3426  MarshallingInfoString<CodeGenOpts<"PreferVectorWidth">>;
3427def mstack_protector_guard_EQ : Joined<["-"], "mstack-protector-guard=">, Group<m_Group>, Flags<[CC1Option]>,
3428  HelpText<"Use the given guard (global, tls) for addressing the stack-protector guard">,
3429  MarshallingInfoString<CodeGenOpts<"StackProtectorGuard">>;
3430def mstack_protector_guard_offset_EQ : Joined<["-"], "mstack-protector-guard-offset=">, Group<m_Group>, Flags<[CC1Option]>,
3431  HelpText<"Use the given offset for addressing the stack-protector guard">,
3432  MarshallingInfoInt<CodeGenOpts<"StackProtectorGuardOffset">, "INT_MAX", "int">;
3433def mstack_protector_guard_reg_EQ : Joined<["-"], "mstack-protector-guard-reg=">, Group<m_Group>, Flags<[CC1Option]>,
3434  HelpText<"Use the given reg for addressing the stack-protector guard">,
3435  MarshallingInfoString<CodeGenOpts<"StackProtectorGuardReg">>;
3436def mfentry : Flag<["-"], "mfentry">, HelpText<"Insert calls to fentry at function entry (x86/SystemZ only)">,
3437  Flags<[CC1Option]>, Group<m_Group>,
3438  MarshallingInfoFlag<CodeGenOpts<"CallFEntry">>;
3439def mnop_mcount : Flag<["-"], "mnop-mcount">, HelpText<"Generate mcount/__fentry__ calls as nops. To activate they need to be patched in.">,
3440  Flags<[CC1Option]>, Group<m_Group>,
3441  MarshallingInfoFlag<CodeGenOpts<"MNopMCount">>;
3442def mrecord_mcount : Flag<["-"], "mrecord-mcount">, HelpText<"Generate a __mcount_loc section entry for each __fentry__ call.">,
3443  Flags<[CC1Option]>, Group<m_Group>,
3444  MarshallingInfoFlag<CodeGenOpts<"RecordMCount">>;
3445def mpacked_stack : Flag<["-"], "mpacked-stack">, HelpText<"Use packed stack layout (SystemZ only).">,
3446  Flags<[CC1Option]>, Group<m_Group>,
3447  MarshallingInfoFlag<CodeGenOpts<"PackedStack">>;
3448def mno_packed_stack : Flag<["-"], "mno-packed-stack">, Flags<[CC1Option]>, Group<m_Group>;
3449def mips16 : Flag<["-"], "mips16">, Group<m_mips_Features_Group>;
3450def mno_mips16 : Flag<["-"], "mno-mips16">, Group<m_mips_Features_Group>;
3451def mmicromips : Flag<["-"], "mmicromips">, Group<m_mips_Features_Group>;
3452def mno_micromips : Flag<["-"], "mno-micromips">, Group<m_mips_Features_Group>;
3453def mxgot : Flag<["-"], "mxgot">, Group<m_mips_Features_Group>;
3454def mno_xgot : Flag<["-"], "mno-xgot">, Group<m_mips_Features_Group>;
3455def mldc1_sdc1 : Flag<["-"], "mldc1-sdc1">, Group<m_mips_Features_Group>;
3456def mno_ldc1_sdc1 : Flag<["-"], "mno-ldc1-sdc1">, Group<m_mips_Features_Group>;
3457def mcheck_zero_division : Flag<["-"], "mcheck-zero-division">,
3458                           Group<m_mips_Features_Group>;
3459def mno_check_zero_division : Flag<["-"], "mno-check-zero-division">,
3460                              Group<m_mips_Features_Group>;
3461def mcompact_branches_EQ : Joined<["-"], "mcompact-branches=">,
3462                           Group<m_mips_Features_Group>;
3463def mbranch_likely : Flag<["-"], "mbranch-likely">, Group<m_Group>,
3464  IgnoredGCCCompat;
3465def mno_branch_likely : Flag<["-"], "mno-branch-likely">, Group<m_Group>,
3466  IgnoredGCCCompat;
3467def mindirect_jump_EQ : Joined<["-"], "mindirect-jump=">,
3468  Group<m_mips_Features_Group>,
3469  HelpText<"Change indirect jump instructions to inhibit speculation">;
3470def mdsp : Flag<["-"], "mdsp">, Group<m_mips_Features_Group>;
3471def mno_dsp : Flag<["-"], "mno-dsp">, Group<m_mips_Features_Group>;
3472def mdspr2 : Flag<["-"], "mdspr2">, Group<m_mips_Features_Group>;
3473def mno_dspr2 : Flag<["-"], "mno-dspr2">, Group<m_mips_Features_Group>;
3474def msingle_float : Flag<["-"], "msingle-float">, Group<m_mips_Features_Group>;
3475def mdouble_float : Flag<["-"], "mdouble-float">, Group<m_mips_Features_Group>;
3476def mmadd4 : Flag<["-"], "mmadd4">, Group<m_mips_Features_Group>,
3477  HelpText<"Enable the generation of 4-operand madd.s, madd.d and related instructions.">;
3478def mno_madd4 : Flag<["-"], "mno-madd4">, Group<m_mips_Features_Group>,
3479  HelpText<"Disable the generation of 4-operand madd.s, madd.d and related instructions.">;
3480def mmsa : Flag<["-"], "mmsa">, Group<m_mips_Features_Group>,
3481  HelpText<"Enable MSA ASE (MIPS only)">;
3482def mno_msa : Flag<["-"], "mno-msa">, Group<m_mips_Features_Group>,
3483  HelpText<"Disable MSA ASE (MIPS only)">;
3484def mmt : Flag<["-"], "mmt">, Group<m_mips_Features_Group>,
3485  HelpText<"Enable MT ASE (MIPS only)">;
3486def mno_mt : Flag<["-"], "mno-mt">, Group<m_mips_Features_Group>,
3487  HelpText<"Disable MT ASE (MIPS only)">;
3488def mfp64 : Flag<["-"], "mfp64">, Group<m_mips_Features_Group>,
3489  HelpText<"Use 64-bit floating point registers (MIPS only)">;
3490def mfp32 : Flag<["-"], "mfp32">, Group<m_mips_Features_Group>,
3491  HelpText<"Use 32-bit floating point registers (MIPS only)">;
3492def mgpopt : Flag<["-"], "mgpopt">, Group<m_mips_Features_Group>,
3493  HelpText<"Use GP relative accesses for symbols known to be in a small"
3494           " data section (MIPS)">;
3495def mno_gpopt : Flag<["-"], "mno-gpopt">, Group<m_mips_Features_Group>,
3496  HelpText<"Do not use GP relative accesses for symbols known to be in a small"
3497           " data section (MIPS)">;
3498def mlocal_sdata : Flag<["-"], "mlocal-sdata">,
3499  Group<m_mips_Features_Group>,
3500  HelpText<"Extend the -G behaviour to object local data (MIPS)">;
3501def mno_local_sdata : Flag<["-"], "mno-local-sdata">,
3502  Group<m_mips_Features_Group>,
3503  HelpText<"Do not extend the -G behaviour to object local data (MIPS)">;
3504def mextern_sdata : Flag<["-"], "mextern-sdata">,
3505  Group<m_mips_Features_Group>,
3506  HelpText<"Assume that externally defined data is in the small data if it"
3507           " meets the -G <size> threshold (MIPS)">;
3508def mno_extern_sdata : Flag<["-"], "mno-extern-sdata">,
3509  Group<m_mips_Features_Group>,
3510  HelpText<"Do not assume that externally defined data is in the small data if"
3511           " it meets the -G <size> threshold (MIPS)">;
3512def membedded_data : Flag<["-"], "membedded-data">,
3513  Group<m_mips_Features_Group>,
3514  HelpText<"Place constants in the .rodata section instead of the .sdata "
3515           "section even if they meet the -G <size> threshold (MIPS)">;
3516def mno_embedded_data : Flag<["-"], "mno-embedded-data">,
3517  Group<m_mips_Features_Group>,
3518  HelpText<"Do not place constants in the .rodata section instead of the "
3519           ".sdata if they meet the -G <size> threshold (MIPS)">;
3520def mnan_EQ : Joined<["-"], "mnan=">, Group<m_mips_Features_Group>;
3521def mabs_EQ : Joined<["-"], "mabs=">, Group<m_mips_Features_Group>;
3522def mabicalls : Flag<["-"], "mabicalls">, Group<m_mips_Features_Group>,
3523  HelpText<"Enable SVR4-style position-independent code (Mips only)">;
3524def mno_abicalls : Flag<["-"], "mno-abicalls">, Group<m_mips_Features_Group>,
3525  HelpText<"Disable SVR4-style position-independent code (Mips only)">;
3526def mno_crc : Flag<["-"], "mno-crc">, Group<m_mips_Features_Group>,
3527  HelpText<"Disallow use of CRC instructions (Mips only)">;
3528def mvirt : Flag<["-"], "mvirt">, Group<m_mips_Features_Group>;
3529def mno_virt : Flag<["-"], "mno-virt">, Group<m_mips_Features_Group>;
3530def mginv : Flag<["-"], "mginv">, Group<m_mips_Features_Group>;
3531def mno_ginv : Flag<["-"], "mno-ginv">, Group<m_mips_Features_Group>;
3532def mips1 : Flag<["-"], "mips1">,
3533  Alias<march_EQ>, AliasArgs<["mips1"]>, Group<m_mips_Features_Group>,
3534  HelpText<"Equivalent to -march=mips1">, Flags<[HelpHidden]>;
3535def mips2 : Flag<["-"], "mips2">,
3536  Alias<march_EQ>, AliasArgs<["mips2"]>, Group<m_mips_Features_Group>,
3537  HelpText<"Equivalent to -march=mips2">, Flags<[HelpHidden]>;
3538def mips3 : Flag<["-"], "mips3">,
3539  Alias<march_EQ>, AliasArgs<["mips3"]>, Group<m_mips_Features_Group>,
3540  HelpText<"Equivalent to -march=mips3">, Flags<[HelpHidden]>;
3541def mips4 : Flag<["-"], "mips4">,
3542  Alias<march_EQ>, AliasArgs<["mips4"]>, Group<m_mips_Features_Group>,
3543  HelpText<"Equivalent to -march=mips4">, Flags<[HelpHidden]>;
3544def mips5 : Flag<["-"], "mips5">,
3545  Alias<march_EQ>, AliasArgs<["mips5"]>, Group<m_mips_Features_Group>,
3546  HelpText<"Equivalent to -march=mips5">, Flags<[HelpHidden]>;
3547def mips32 : Flag<["-"], "mips32">,
3548  Alias<march_EQ>, AliasArgs<["mips32"]>, Group<m_mips_Features_Group>,
3549  HelpText<"Equivalent to -march=mips32">, Flags<[HelpHidden]>;
3550def mips32r2 : Flag<["-"], "mips32r2">,
3551  Alias<march_EQ>, AliasArgs<["mips32r2"]>, Group<m_mips_Features_Group>,
3552  HelpText<"Equivalent to -march=mips32r2">, Flags<[HelpHidden]>;
3553def mips32r3 : Flag<["-"], "mips32r3">,
3554  Alias<march_EQ>, AliasArgs<["mips32r3"]>, Group<m_mips_Features_Group>,
3555  HelpText<"Equivalent to -march=mips32r3">, Flags<[HelpHidden]>;
3556def mips32r5 : Flag<["-"], "mips32r5">,
3557  Alias<march_EQ>, AliasArgs<["mips32r5"]>, Group<m_mips_Features_Group>,
3558  HelpText<"Equivalent to -march=mips32r5">, Flags<[HelpHidden]>;
3559def mips32r6 : Flag<["-"], "mips32r6">,
3560  Alias<march_EQ>, AliasArgs<["mips32r6"]>, Group<m_mips_Features_Group>,
3561  HelpText<"Equivalent to -march=mips32r6">, Flags<[HelpHidden]>;
3562def mips64 : Flag<["-"], "mips64">,
3563  Alias<march_EQ>, AliasArgs<["mips64"]>, Group<m_mips_Features_Group>,
3564  HelpText<"Equivalent to -march=mips64">, Flags<[HelpHidden]>;
3565def mips64r2 : Flag<["-"], "mips64r2">,
3566  Alias<march_EQ>, AliasArgs<["mips64r2"]>, Group<m_mips_Features_Group>,
3567  HelpText<"Equivalent to -march=mips64r2">, Flags<[HelpHidden]>;
3568def mips64r3 : Flag<["-"], "mips64r3">,
3569  Alias<march_EQ>, AliasArgs<["mips64r3"]>, Group<m_mips_Features_Group>,
3570  HelpText<"Equivalent to -march=mips64r3">, Flags<[HelpHidden]>;
3571def mips64r5 : Flag<["-"], "mips64r5">,
3572  Alias<march_EQ>, AliasArgs<["mips64r5"]>, Group<m_mips_Features_Group>,
3573  HelpText<"Equivalent to -march=mips64r5">, Flags<[HelpHidden]>;
3574def mips64r6 : Flag<["-"], "mips64r6">,
3575  Alias<march_EQ>, AliasArgs<["mips64r6"]>, Group<m_mips_Features_Group>,
3576  HelpText<"Equivalent to -march=mips64r6">, Flags<[HelpHidden]>;
3577def mfpxx : Flag<["-"], "mfpxx">, Group<m_mips_Features_Group>,
3578  HelpText<"Avoid FPU mode dependent operations when used with the O32 ABI">,
3579  Flags<[HelpHidden]>;
3580def modd_spreg : Flag<["-"], "modd-spreg">, Group<m_mips_Features_Group>,
3581  HelpText<"Enable odd single-precision floating point registers">,
3582  Flags<[HelpHidden]>;
3583def mno_odd_spreg : Flag<["-"], "mno-odd-spreg">, Group<m_mips_Features_Group>,
3584  HelpText<"Disable odd single-precision floating point registers">,
3585  Flags<[HelpHidden]>;
3586def mrelax_pic_calls : Flag<["-"], "mrelax-pic-calls">,
3587  Group<m_mips_Features_Group>,
3588  HelpText<"Produce relaxation hints for linkers to try optimizing PIC "
3589           "call sequences into direct calls (MIPS only)">, Flags<[HelpHidden]>;
3590def mno_relax_pic_calls : Flag<["-"], "mno-relax-pic-calls">,
3591  Group<m_mips_Features_Group>,
3592  HelpText<"Do not produce relaxation hints for linkers to try optimizing PIC "
3593           "call sequences into direct calls (MIPS only)">, Flags<[HelpHidden]>;
3594def mglibc : Flag<["-"], "mglibc">, Group<m_libc_Group>, Flags<[HelpHidden]>;
3595def muclibc : Flag<["-"], "muclibc">, Group<m_libc_Group>, Flags<[HelpHidden]>;
3596def module_file_info : Flag<["-"], "module-file-info">, Flags<[NoXarchOption,CC1Option]>, Group<Action_Group>,
3597  HelpText<"Provide information about a particular module file">;
3598def mthumb : Flag<["-"], "mthumb">, Group<m_Group>;
3599def mtune_EQ : Joined<["-"], "mtune=">, Group<m_Group>,
3600  HelpText<"Only supported on X86 and RISC-V. Otherwise accepted for compatibility with GCC.">;
3601def multi__module : Flag<["-"], "multi_module">;
3602def multiply__defined__unused : Separate<["-"], "multiply_defined_unused">;
3603def multiply__defined : Separate<["-"], "multiply_defined">;
3604def mwarn_nonportable_cfstrings : Flag<["-"], "mwarn-nonportable-cfstrings">, Group<m_Group>;
3605def no_canonical_prefixes : Flag<["-"], "no-canonical-prefixes">, Flags<[HelpHidden, CoreOption]>,
3606  HelpText<"Use relative instead of canonical paths">;
3607def no_cpp_precomp : Flag<["-"], "no-cpp-precomp">, Group<clang_ignored_f_Group>;
3608def no_integrated_cpp : Flag<["-", "--"], "no-integrated-cpp">, Flags<[NoXarchOption]>;
3609def no_pedantic : Flag<["-", "--"], "no-pedantic">, Group<pedantic_Group>;
3610def no__dead__strip__inits__and__terms : Flag<["-"], "no_dead_strip_inits_and_terms">;
3611def nobuiltininc : Flag<["-"], "nobuiltininc">, Flags<[CC1Option, CoreOption]>,
3612  HelpText<"Disable builtin #include directories">,
3613  MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseBuiltinIncludes">>;
3614def nogpuinc : Flag<["-"], "nogpuinc">, HelpText<"Do not add include paths for CUDA/HIP and"
3615  " do not include the default CUDA/HIP wrapper headers">;
3616def : Flag<["-"], "nocudainc">, Alias<nogpuinc>;
3617def nogpulib : Flag<["-"], "nogpulib">,
3618  HelpText<"Do not link device library for CUDA/HIP device compilation">;
3619def : Flag<["-"], "nocudalib">, Alias<nogpulib>;
3620def nodefaultlibs : Flag<["-"], "nodefaultlibs">;
3621def nofixprebinding : Flag<["-"], "nofixprebinding">;
3622def nolibc : Flag<["-"], "nolibc">;
3623def nomultidefs : Flag<["-"], "nomultidefs">;
3624def nopie : Flag<["-"], "nopie">;
3625def no_pie : Flag<["-"], "no-pie">, Alias<nopie>;
3626def noprebind : Flag<["-"], "noprebind">;
3627def noprofilelib : Flag<["-"], "noprofilelib">;
3628def noseglinkedit : Flag<["-"], "noseglinkedit">;
3629def nostartfiles : Flag<["-"], "nostartfiles">, Group<Link_Group>;
3630def nostdinc : Flag<["-"], "nostdinc">, Flags<[CoreOption]>;
3631def nostdlibinc : Flag<["-"], "nostdlibinc">;
3632def nostdincxx : Flag<["-"], "nostdinc++">, Flags<[CC1Option]>,
3633  HelpText<"Disable standard #include directories for the C++ standard library">,
3634  MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseStandardCXXIncludes">>;
3635def nostdlib : Flag<["-"], "nostdlib">, Group<Link_Group>;
3636def nostdlibxx : Flag<["-"], "nostdlib++">;
3637def object : Flag<["-"], "object">;
3638def o : JoinedOrSeparate<["-"], "o">, Flags<[NoXarchOption, RenderAsInput,
3639  CC1Option, CC1AsOption, FC1Option, FlangOption]>,
3640  HelpText<"Write output to <file>">, MetaVarName<"<file>">,
3641  MarshallingInfoString<FrontendOpts<"OutputFile">>;
3642def pagezero__size : JoinedOrSeparate<["-"], "pagezero_size">;
3643def pass_exit_codes : Flag<["-", "--"], "pass-exit-codes">, Flags<[Unsupported]>;
3644def pedantic_errors : Flag<["-", "--"], "pedantic-errors">, Group<pedantic_Group>, Flags<[CC1Option]>,
3645  MarshallingInfoFlag<DiagnosticOpts<"PedanticErrors">>;
3646def pedantic : Flag<["-", "--"], "pedantic">, Group<pedantic_Group>, Flags<[CC1Option,FlangOption,FC1Option]>,
3647  HelpText<"Warn on language extensions">, MarshallingInfoFlag<DiagnosticOpts<"Pedantic">>;
3648def pg : Flag<["-"], "pg">, HelpText<"Enable mcount instrumentation">, Flags<[CC1Option]>,
3649  MarshallingInfoFlag<CodeGenOpts<"InstrumentForProfiling">>;
3650def pipe : Flag<["-", "--"], "pipe">,
3651  HelpText<"Use pipes between commands, when possible">;
3652def prebind__all__twolevel__modules : Flag<["-"], "prebind_all_twolevel_modules">;
3653def prebind : Flag<["-"], "prebind">;
3654def preload : Flag<["-"], "preload">;
3655def print_file_name_EQ : Joined<["-", "--"], "print-file-name=">,
3656  HelpText<"Print the full library path of <file>">, MetaVarName<"<file>">;
3657def print_ivar_layout : Flag<["-"], "print-ivar-layout">, Flags<[CC1Option]>,
3658  HelpText<"Enable Objective-C Ivar layout bitmap print trace">,
3659  MarshallingInfoFlag<LangOpts<"ObjCGCBitmapPrint">>;
3660def print_libgcc_file_name : Flag<["-", "--"], "print-libgcc-file-name">,
3661  HelpText<"Print the library path for the currently used compiler runtime "
3662           "library (\"libgcc.a\" or \"libclang_rt.builtins.*.a\")">;
3663def print_multi_directory : Flag<["-", "--"], "print-multi-directory">;
3664def print_multi_lib : Flag<["-", "--"], "print-multi-lib">;
3665def print_multi_os_directory : Flag<["-", "--"], "print-multi-os-directory">,
3666  Flags<[Unsupported]>;
3667def print_target_triple : Flag<["-", "--"], "print-target-triple">,
3668  HelpText<"Print the normalized target triple">;
3669def print_effective_triple : Flag<["-", "--"], "print-effective-triple">,
3670  HelpText<"Print the effective target triple">;
3671def print_multiarch : Flag<["-", "--"], "print-multiarch">,
3672  HelpText<"Print the multiarch target triple">;
3673def print_prog_name_EQ : Joined<["-", "--"], "print-prog-name=">,
3674  HelpText<"Print the full program path of <name>">, MetaVarName<"<name>">;
3675def print_resource_dir : Flag<["-", "--"], "print-resource-dir">,
3676  HelpText<"Print the resource directory pathname">;
3677def print_search_dirs : Flag<["-", "--"], "print-search-dirs">,
3678  HelpText<"Print the paths used for finding libraries and programs">;
3679def print_targets : Flag<["-", "--"], "print-targets">,
3680  HelpText<"Print the registered targets">;
3681def print_rocm_search_dirs : Flag<["-", "--"], "print-rocm-search-dirs">,
3682  HelpText<"Print the paths used for finding ROCm installation">;
3683def print_runtime_dir : Flag<["-", "--"], "print-runtime-dir">,
3684  HelpText<"Print the directory pathname containing clangs runtime libraries">;
3685def private__bundle : Flag<["-"], "private_bundle">;
3686def pthreads : Flag<["-"], "pthreads">;
3687defm pthread : BoolOption<"", "pthread",
3688  LangOpts<"POSIXThreads">, DefaultFalse,
3689  PosFlag<SetTrue, [], "Support POSIX threads in generated code">,
3690  NegFlag<SetFalse>, BothFlags<[CC1Option]>>;
3691def p : Flag<["-"], "p">;
3692def pie : Flag<["-"], "pie">, Group<Link_Group>;
3693def static_pie : Flag<["-"], "static-pie">, Group<Link_Group>;
3694def read__only__relocs : Separate<["-"], "read_only_relocs">;
3695def remap : Flag<["-"], "remap">;
3696def rewrite_objc : Flag<["-"], "rewrite-objc">, Flags<[NoXarchOption,CC1Option]>,
3697  HelpText<"Rewrite Objective-C source to C++">, Group<Action_Group>;
3698def rewrite_legacy_objc : Flag<["-"], "rewrite-legacy-objc">, Flags<[NoXarchOption]>,
3699  HelpText<"Rewrite Legacy Objective-C source to C++">;
3700def rdynamic : Flag<["-"], "rdynamic">, Group<Link_Group>;
3701def resource_dir : Separate<["-"], "resource-dir">,
3702  Flags<[NoXarchOption, CC1Option, CoreOption, HelpHidden]>,
3703  HelpText<"The directory which holds the compiler resource files">,
3704  MarshallingInfoString<HeaderSearchOpts<"ResourceDir">>;
3705def resource_dir_EQ : Joined<["-"], "resource-dir=">, Flags<[NoXarchOption, CoreOption]>,
3706  Alias<resource_dir>;
3707def rpath : Separate<["-"], "rpath">, Flags<[LinkerInput]>, Group<Link_Group>;
3708def rtlib_EQ : Joined<["-", "--"], "rtlib=">,
3709  HelpText<"Compiler runtime library to use">;
3710def frtlib_add_rpath: Flag<["-"], "frtlib-add-rpath">, Flags<[NoArgumentUnused]>,
3711  HelpText<"Add -rpath with architecture-specific resource directory to the linker flags">;
3712def fno_rtlib_add_rpath: Flag<["-"], "fno-rtlib-add-rpath">, Flags<[NoArgumentUnused]>,
3713  HelpText<"Do not add -rpath with architecture-specific resource directory to the linker flags">;
3714def r : Flag<["-"], "r">, Flags<[LinkerInput,NoArgumentUnused]>,
3715        Group<Link_Group>;
3716def save_temps_EQ : Joined<["-", "--"], "save-temps=">, Flags<[CC1Option, NoXarchOption]>,
3717  HelpText<"Save intermediate compilation results.">;
3718def save_temps : Flag<["-", "--"], "save-temps">, Flags<[NoXarchOption]>,
3719  Alias<save_temps_EQ>, AliasArgs<["cwd"]>,
3720  HelpText<"Save intermediate compilation results">;
3721def save_stats_EQ : Joined<["-", "--"], "save-stats=">, Flags<[NoXarchOption]>,
3722  HelpText<"Save llvm statistics.">;
3723def save_stats : Flag<["-", "--"], "save-stats">, Flags<[NoXarchOption]>,
3724  Alias<save_stats_EQ>, AliasArgs<["cwd"]>,
3725  HelpText<"Save llvm statistics.">;
3726def via_file_asm : Flag<["-", "--"], "via-file-asm">, InternalDebugOpt,
3727  HelpText<"Write assembly to file for input to assemble jobs">;
3728def sectalign : MultiArg<["-"], "sectalign", 3>;
3729def sectcreate : MultiArg<["-"], "sectcreate", 3>;
3730def sectobjectsymbols : MultiArg<["-"], "sectobjectsymbols", 2>;
3731def sectorder : MultiArg<["-"], "sectorder", 3>;
3732def seg1addr : JoinedOrSeparate<["-"], "seg1addr">;
3733def seg__addr__table__filename : Separate<["-"], "seg_addr_table_filename">;
3734def seg__addr__table : Separate<["-"], "seg_addr_table">;
3735def segaddr : MultiArg<["-"], "segaddr", 2>;
3736def segcreate : MultiArg<["-"], "segcreate", 3>;
3737def seglinkedit : Flag<["-"], "seglinkedit">;
3738def segprot : MultiArg<["-"], "segprot", 3>;
3739def segs__read__only__addr : Separate<["-"], "segs_read_only_addr">;
3740def segs__read__write__addr : Separate<["-"], "segs_read_write_addr">;
3741def segs__read__ : Joined<["-"], "segs_read_">;
3742def shared_libgcc : Flag<["-"], "shared-libgcc">;
3743def shared : Flag<["-", "--"], "shared">, Group<Link_Group>;
3744def single__module : Flag<["-"], "single_module">;
3745def specs_EQ : Joined<["-", "--"], "specs=">, Group<Link_Group>;
3746def specs : Separate<["-", "--"], "specs">, Flags<[Unsupported]>;
3747def static_libgcc : Flag<["-"], "static-libgcc">;
3748def static_libstdcxx : Flag<["-"], "static-libstdc++">;
3749def static : Flag<["-", "--"], "static">, Group<Link_Group>, Flags<[NoArgumentUnused]>;
3750def std_default_EQ : Joined<["-"], "std-default=">;
3751def std_EQ : Joined<["-", "--"], "std=">, Flags<[CC1Option,FlangOption,FC1Option]>,
3752  Group<CompileOnly_Group>, HelpText<"Language standard to compile for">,
3753  ValuesCode<[{
3754    const char *Values =
3755    #define LANGSTANDARD(id, name, lang, desc, features) name ","
3756    #define LANGSTANDARD_ALIAS(id, alias) alias ","
3757    #include "clang/Basic/LangStandards.def"
3758    ;
3759  }]>;
3760def stdlib_EQ : Joined<["-", "--"], "stdlib=">, Flags<[CC1Option]>,
3761  HelpText<"C++ standard library to use">, Values<"libc++,libstdc++,platform">;
3762def stdlibxx_isystem : JoinedOrSeparate<["-"], "stdlib++-isystem">,
3763  Group<clang_i_Group>,
3764  HelpText<"Use directory as the C++ standard library include path">,
3765  Flags<[NoXarchOption]>, MetaVarName<"<directory>">;
3766def unwindlib_EQ : Joined<["-", "--"], "unwindlib=">, Flags<[CC1Option]>,
3767  HelpText<"Unwind library to use">, Values<"libgcc,unwindlib,platform">;
3768def sub__library : JoinedOrSeparate<["-"], "sub_library">;
3769def sub__umbrella : JoinedOrSeparate<["-"], "sub_umbrella">;
3770def system_header_prefix : Joined<["--"], "system-header-prefix=">,
3771  Group<clang_i_Group>, Flags<[CC1Option]>, MetaVarName<"<prefix>">,
3772  HelpText<"Treat all #include paths starting with <prefix> as including a "
3773           "system header.">;
3774def : Separate<["--"], "system-header-prefix">, Alias<system_header_prefix>;
3775def no_system_header_prefix : Joined<["--"], "no-system-header-prefix=">,
3776  Group<clang_i_Group>, Flags<[CC1Option]>, MetaVarName<"<prefix>">,
3777  HelpText<"Treat all #include paths starting with <prefix> as not including a "
3778           "system header.">;
3779def : Separate<["--"], "no-system-header-prefix">, Alias<no_system_header_prefix>;
3780def s : Flag<["-"], "s">, Group<Link_Group>;
3781def target : Joined<["--"], "target=">, Flags<[NoXarchOption, CoreOption]>,
3782  HelpText<"Generate code for the given target">;
3783def print_supported_cpus : Flag<["-", "--"], "print-supported-cpus">,
3784  Group<CompileOnly_Group>, Flags<[CC1Option, CoreOption]>,
3785  HelpText<"Print supported cpu models for the given target (if target is not specified,"
3786           " it will print the supported cpus for the default target)">,
3787  MarshallingInfoFlag<FrontendOpts<"PrintSupportedCPUs">>;
3788def mcpu_EQ_QUESTION : Flag<["-"], "mcpu=?">, Alias<print_supported_cpus>;
3789def mtune_EQ_QUESTION : Flag<["-"], "mtune=?">, Alias<print_supported_cpus>;
3790def time : Flag<["-"], "time">,
3791  HelpText<"Time individual commands">;
3792def traditional_cpp : Flag<["-", "--"], "traditional-cpp">, Flags<[CC1Option]>,
3793  HelpText<"Enable some traditional CPP emulation">,
3794  MarshallingInfoFlag<LangOpts<"TraditionalCPP">>;
3795def traditional : Flag<["-", "--"], "traditional">;
3796def trigraphs : Flag<["-", "--"], "trigraphs">, Alias<ftrigraphs>,
3797  HelpText<"Process trigraph sequences">;
3798def twolevel__namespace__hints : Flag<["-"], "twolevel_namespace_hints">;
3799def twolevel__namespace : Flag<["-"], "twolevel_namespace">;
3800def t : Flag<["-"], "t">, Group<Link_Group>;
3801def umbrella : Separate<["-"], "umbrella">;
3802def undefined : JoinedOrSeparate<["-"], "undefined">, Group<u_Group>;
3803def undef : Flag<["-"], "undef">, Group<u_Group>, Flags<[CC1Option]>,
3804  HelpText<"undef all system defines">,
3805  MarshallingInfoNegativeFlag<PreprocessorOpts<"UsePredefines">>;
3806def unexported__symbols__list : Separate<["-"], "unexported_symbols_list">;
3807def u : JoinedOrSeparate<["-"], "u">, Group<u_Group>;
3808def v : Flag<["-"], "v">, Flags<[CC1Option, CoreOption]>,
3809  HelpText<"Show commands to run and use verbose output">,
3810  MarshallingInfoFlag<HeaderSearchOpts<"Verbose">>;
3811def verify_debug_info : Flag<["--"], "verify-debug-info">, Flags<[NoXarchOption]>,
3812  HelpText<"Verify the binary representation of debug output">;
3813def weak_l : Joined<["-"], "weak-l">, Flags<[LinkerInput]>;
3814def weak__framework : Separate<["-"], "weak_framework">, Flags<[LinkerInput]>;
3815def weak__library : Separate<["-"], "weak_library">, Flags<[LinkerInput]>;
3816def weak__reference__mismatches : Separate<["-"], "weak_reference_mismatches">;
3817def whatsloaded : Flag<["-"], "whatsloaded">;
3818def why_load : Flag<["-"], "why_load">;
3819def whyload : Flag<["-"], "whyload">, Alias<why_load>;
3820def w : Flag<["-"], "w">, HelpText<"Suppress all warnings">, Flags<[CC1Option]>,
3821  MarshallingInfoFlag<DiagnosticOpts<"IgnoreWarnings">>;
3822def x : JoinedOrSeparate<["-"], "x">, Flags<[NoXarchOption,CC1Option]>,
3823  HelpText<"Treat subsequent input files as having type <language>">,
3824  MetaVarName<"<language>">;
3825def y : Joined<["-"], "y">;
3826
3827defm integrated_as : BoolFOption<"integrated-as",
3828  CodeGenOpts<"DisableIntegratedAS">, DefaultFalse,
3829  NegFlag<SetTrue, [CC1Option], "Disable">, PosFlag<SetFalse, [], "Enable">,
3830  BothFlags<[], " the integrated assembler">>;
3831
3832def fintegrated_cc1 : Flag<["-"], "fintegrated-cc1">,
3833                      Flags<[CoreOption, NoXarchOption]>, Group<f_Group>,
3834                      HelpText<"Run cc1 in-process">;
3835def fno_integrated_cc1 : Flag<["-"], "fno-integrated-cc1">,
3836                         Flags<[CoreOption, NoXarchOption]>, Group<f_Group>,
3837                         HelpText<"Spawn a separate process for each cc1">;
3838
3839def : Flag<["-"], "integrated-as">, Alias<fintegrated_as>, Flags<[NoXarchOption]>;
3840def : Flag<["-"], "no-integrated-as">, Alias<fno_integrated_as>,
3841      Flags<[CC1Option, NoXarchOption]>;
3842
3843def working_directory : JoinedOrSeparate<["-"], "working-directory">, Flags<[CC1Option]>,
3844  HelpText<"Resolve file paths relative to the specified directory">,
3845  MarshallingInfoString<FileSystemOpts<"WorkingDir">>;
3846def working_directory_EQ : Joined<["-"], "working-directory=">, Flags<[CC1Option]>,
3847  Alias<working_directory>;
3848
3849// Double dash options, which are usually an alias for one of the previous
3850// options.
3851
3852def _mhwdiv_EQ : Joined<["--"], "mhwdiv=">, Alias<mhwdiv_EQ>;
3853def _mhwdiv : Separate<["--"], "mhwdiv">, Alias<mhwdiv_EQ>;
3854def _CLASSPATH_EQ : Joined<["--"], "CLASSPATH=">, Alias<fclasspath_EQ>;
3855def _CLASSPATH : Separate<["--"], "CLASSPATH">, Alias<fclasspath_EQ>;
3856def _all_warnings : Flag<["--"], "all-warnings">, Alias<Wall>;
3857def _analyzer_no_default_checks : Flag<["--"], "analyzer-no-default-checks">, Flags<[NoXarchOption]>;
3858def _analyzer_output : JoinedOrSeparate<["--"], "analyzer-output">, Flags<[NoXarchOption]>,
3859  HelpText<"Static analyzer report output format (html|plist|plist-multi-file|plist-html|sarif|sarif-html|text).">;
3860def _analyze : Flag<["--"], "analyze">, Flags<[NoXarchOption, CoreOption]>,
3861  HelpText<"Run the static analyzer">;
3862def _assemble : Flag<["--"], "assemble">, Alias<S>;
3863def _assert_EQ : Joined<["--"], "assert=">, Alias<A>;
3864def _assert : Separate<["--"], "assert">, Alias<A>;
3865def _bootclasspath_EQ : Joined<["--"], "bootclasspath=">, Alias<fbootclasspath_EQ>;
3866def _bootclasspath : Separate<["--"], "bootclasspath">, Alias<fbootclasspath_EQ>;
3867def _classpath_EQ : Joined<["--"], "classpath=">, Alias<fclasspath_EQ>;
3868def _classpath : Separate<["--"], "classpath">, Alias<fclasspath_EQ>;
3869def _comments_in_macros : Flag<["--"], "comments-in-macros">, Alias<CC>;
3870def _comments : Flag<["--"], "comments">, Alias<C>;
3871def _compile : Flag<["--"], "compile">, Alias<c>;
3872def _constant_cfstrings : Flag<["--"], "constant-cfstrings">;
3873def _debug_EQ : Joined<["--"], "debug=">, Alias<g_Flag>;
3874def _debug : Flag<["--"], "debug">, Alias<g_Flag>;
3875def _define_macro_EQ : Joined<["--"], "define-macro=">, Alias<D>;
3876def _define_macro : Separate<["--"], "define-macro">, Alias<D>;
3877def _dependencies : Flag<["--"], "dependencies">, Alias<M>;
3878def _dyld_prefix_EQ : Joined<["--"], "dyld-prefix=">;
3879def _dyld_prefix : Separate<["--"], "dyld-prefix">, Alias<_dyld_prefix_EQ>;
3880def _encoding_EQ : Joined<["--"], "encoding=">, Alias<fencoding_EQ>;
3881def _encoding : Separate<["--"], "encoding">, Alias<fencoding_EQ>;
3882def _entry : Flag<["--"], "entry">, Alias<e>;
3883def _extdirs_EQ : Joined<["--"], "extdirs=">, Alias<fextdirs_EQ>;
3884def _extdirs : Separate<["--"], "extdirs">, Alias<fextdirs_EQ>;
3885def _extra_warnings : Flag<["--"], "extra-warnings">, Alias<W_Joined>;
3886def _for_linker_EQ : Joined<["--"], "for-linker=">, Alias<Xlinker>;
3887def _for_linker : Separate<["--"], "for-linker">, Alias<Xlinker>;
3888def _force_link_EQ : Joined<["--"], "force-link=">, Alias<u>;
3889def _force_link : Separate<["--"], "force-link">, Alias<u>;
3890def _help_hidden : Flag<["--"], "help-hidden">,
3891  HelpText<"Display help for hidden options">;
3892def _imacros_EQ : Joined<["--"], "imacros=">, Alias<imacros>;
3893def _include_barrier : Flag<["--"], "include-barrier">, Alias<I_>;
3894def _include_directory_after_EQ : Joined<["--"], "include-directory-after=">, Alias<idirafter>;
3895def _include_directory_after : Separate<["--"], "include-directory-after">, Alias<idirafter>;
3896def _include_directory_EQ : Joined<["--"], "include-directory=">, Alias<I>;
3897def _include_directory : Separate<["--"], "include-directory">, Alias<I>;
3898def _include_prefix_EQ : Joined<["--"], "include-prefix=">, Alias<iprefix>;
3899def _include_prefix : Separate<["--"], "include-prefix">, Alias<iprefix>;
3900def _include_with_prefix_after_EQ : Joined<["--"], "include-with-prefix-after=">, Alias<iwithprefix>;
3901def _include_with_prefix_after : Separate<["--"], "include-with-prefix-after">, Alias<iwithprefix>;
3902def _include_with_prefix_before_EQ : Joined<["--"], "include-with-prefix-before=">, Alias<iwithprefixbefore>;
3903def _include_with_prefix_before : Separate<["--"], "include-with-prefix-before">, Alias<iwithprefixbefore>;
3904def _include_with_prefix_EQ : Joined<["--"], "include-with-prefix=">, Alias<iwithprefix>;
3905def _include_with_prefix : Separate<["--"], "include-with-prefix">, Alias<iwithprefix>;
3906def _include_EQ : Joined<["--"], "include=">, Alias<include_>;
3907def _language_EQ : Joined<["--"], "language=">, Alias<x>;
3908def _language : Separate<["--"], "language">, Alias<x>;
3909def _library_directory_EQ : Joined<["--"], "library-directory=">, Alias<L>;
3910def _library_directory : Separate<["--"], "library-directory">, Alias<L>;
3911def _no_line_commands : Flag<["--"], "no-line-commands">, Alias<P>;
3912def _no_standard_includes : Flag<["--"], "no-standard-includes">, Alias<nostdinc>;
3913def _no_standard_libraries : Flag<["--"], "no-standard-libraries">, Alias<nostdlib>;
3914def _no_undefined : Flag<["--"], "no-undefined">, Flags<[LinkerInput]>;
3915def _no_warnings : Flag<["--"], "no-warnings">, Alias<w>;
3916def _optimize_EQ : Joined<["--"], "optimize=">, Alias<O>;
3917def _optimize : Flag<["--"], "optimize">, Alias<O>;
3918def _output_class_directory_EQ : Joined<["--"], "output-class-directory=">, Alias<foutput_class_dir_EQ>;
3919def _output_class_directory : Separate<["--"], "output-class-directory">, Alias<foutput_class_dir_EQ>;
3920def _output_EQ : Joined<["--"], "output=">, Alias<o>;
3921def _output : Separate<["--"], "output">, Alias<o>;
3922def _param : Separate<["--"], "param">, Group<CompileOnly_Group>;
3923def _param_EQ : Joined<["--"], "param=">, Alias<_param>;
3924def _precompile : Flag<["--"], "precompile">, Flags<[NoXarchOption]>,
3925  Group<Action_Group>, HelpText<"Only precompile the input">;
3926def _prefix_EQ : Joined<["--"], "prefix=">, Alias<B>;
3927def _prefix : Separate<["--"], "prefix">, Alias<B>;
3928def _preprocess : Flag<["--"], "preprocess">, Alias<E>;
3929def _print_diagnostic_categories : Flag<["--"], "print-diagnostic-categories">;
3930def _print_file_name : Separate<["--"], "print-file-name">, Alias<print_file_name_EQ>;
3931def _print_missing_file_dependencies : Flag<["--"], "print-missing-file-dependencies">, Alias<MG>;
3932def _print_prog_name : Separate<["--"], "print-prog-name">, Alias<print_prog_name_EQ>;
3933def _profile_blocks : Flag<["--"], "profile-blocks">, Alias<a>;
3934def _profile : Flag<["--"], "profile">, Alias<p>;
3935def _resource_EQ : Joined<["--"], "resource=">, Alias<fcompile_resource_EQ>;
3936def _resource : Separate<["--"], "resource">, Alias<fcompile_resource_EQ>;
3937def _rtlib : Separate<["--"], "rtlib">, Alias<rtlib_EQ>;
3938def _serialize_diags : Separate<["-", "--"], "serialize-diagnostics">, Flags<[NoXarchOption]>,
3939  HelpText<"Serialize compiler diagnostics to a file">;
3940// We give --version different semantics from -version.
3941def _version : Flag<["--"], "version">,
3942  Flags<[CoreOption, CC1Option, FC1Option, FlangOption]>,
3943  HelpText<"Print version information">;
3944def _signed_char : Flag<["--"], "signed-char">, Alias<fsigned_char>;
3945def _std : Separate<["--"], "std">, Alias<std_EQ>;
3946def _stdlib : Separate<["--"], "stdlib">, Alias<stdlib_EQ>;
3947def _sysroot_EQ : Joined<["--"], "sysroot=">;
3948def _sysroot : Separate<["--"], "sysroot">, Alias<_sysroot_EQ>;
3949def _target_help : Flag<["--"], "target-help">;
3950def _trace_includes : Flag<["--"], "trace-includes">, Alias<H>;
3951def _undefine_macro_EQ : Joined<["--"], "undefine-macro=">, Alias<U>;
3952def _undefine_macro : Separate<["--"], "undefine-macro">, Alias<U>;
3953def _unsigned_char : Flag<["--"], "unsigned-char">, Alias<funsigned_char>;
3954def _user_dependencies : Flag<["--"], "user-dependencies">, Alias<MM>;
3955def _verbose : Flag<["--"], "verbose">, Alias<v>;
3956def _warn__EQ : Joined<["--"], "warn-=">, Alias<W_Joined>;
3957def _warn_ : Joined<["--"], "warn-">, Alias<W_Joined>;
3958def _write_dependencies : Flag<["--"], "write-dependencies">, Alias<MD>;
3959def _write_user_dependencies : Flag<["--"], "write-user-dependencies">, Alias<MMD>;
3960def _ : Joined<["--"], "">, Flags<[Unsupported]>;
3961
3962// Hexagon feature flags.
3963def mieee_rnd_near : Flag<["-"], "mieee-rnd-near">,
3964  Group<m_hexagon_Features_Group>;
3965def mv5 : Flag<["-"], "mv5">, Group<m_hexagon_Features_Group>, Alias<mcpu_EQ>,
3966  AliasArgs<["hexagonv5"]>;
3967def mv55 : Flag<["-"], "mv55">, Group<m_hexagon_Features_Group>,
3968  Alias<mcpu_EQ>, AliasArgs<["hexagonv55"]>;
3969def mv60 : Flag<["-"], "mv60">, Group<m_hexagon_Features_Group>,
3970  Alias<mcpu_EQ>, AliasArgs<["hexagonv60"]>;
3971def mv62 : Flag<["-"], "mv62">, Group<m_hexagon_Features_Group>,
3972  Alias<mcpu_EQ>, AliasArgs<["hexagonv62"]>;
3973def mv65 : Flag<["-"], "mv65">, Group<m_hexagon_Features_Group>,
3974  Alias<mcpu_EQ>, AliasArgs<["hexagonv65"]>;
3975def mv66 : Flag<["-"], "mv66">, Group<m_hexagon_Features_Group>,
3976  Alias<mcpu_EQ>, AliasArgs<["hexagonv66"]>;
3977def mv67 : Flag<["-"], "mv67">, Group<m_hexagon_Features_Group>,
3978  Alias<mcpu_EQ>, AliasArgs<["hexagonv67"]>;
3979def mv67t : Flag<["-"], "mv67t">, Group<m_hexagon_Features_Group>,
3980  Alias<mcpu_EQ>, AliasArgs<["hexagonv67t"]>;
3981def mv68 : Flag<["-"], "mv68">, Group<m_hexagon_Features_Group>,
3982  Alias<mcpu_EQ>, AliasArgs<["hexagonv68"]>;
3983def mhexagon_hvx : Flag<["-"], "mhvx">, Group<m_hexagon_Features_HVX_Group>,
3984  HelpText<"Enable Hexagon Vector eXtensions">;
3985def mhexagon_hvx_EQ : Joined<["-"], "mhvx=">,
3986  Group<m_hexagon_Features_HVX_Group>,
3987  HelpText<"Enable Hexagon Vector eXtensions">;
3988def mno_hexagon_hvx : Flag<["-"], "mno-hvx">,
3989  Group<m_hexagon_Features_HVX_Group>,
3990  HelpText<"Disable Hexagon Vector eXtensions">;
3991def mhexagon_hvx_length_EQ : Joined<["-"], "mhvx-length=">,
3992  Group<m_hexagon_Features_HVX_Group>, HelpText<"Set Hexagon Vector Length">,
3993  Values<"64B,128B">;
3994def ffixed_r19: Flag<["-"], "ffixed-r19">,
3995  HelpText<"Reserve register r19 (Hexagon only)">;
3996def mmemops : Flag<["-"], "mmemops">, Group<m_hexagon_Features_Group>,
3997  Flags<[CC1Option]>, HelpText<"Enable generation of memop instructions">;
3998def mno_memops : Flag<["-"], "mno-memops">, Group<m_hexagon_Features_Group>,
3999  Flags<[CC1Option]>, HelpText<"Disable generation of memop instructions">;
4000def mpackets : Flag<["-"], "mpackets">, Group<m_hexagon_Features_Group>,
4001  Flags<[CC1Option]>, HelpText<"Enable generation of instruction packets">;
4002def mno_packets : Flag<["-"], "mno-packets">, Group<m_hexagon_Features_Group>,
4003  Flags<[CC1Option]>, HelpText<"Disable generation of instruction packets">;
4004def mnvj : Flag<["-"], "mnvj">, Group<m_hexagon_Features_Group>,
4005  Flags<[CC1Option]>, HelpText<"Enable generation of new-value jumps">;
4006def mno_nvj : Flag<["-"], "mno-nvj">, Group<m_hexagon_Features_Group>,
4007  Flags<[CC1Option]>, HelpText<"Disable generation of new-value jumps">;
4008def mnvs : Flag<["-"], "mnvs">, Group<m_hexagon_Features_Group>,
4009  Flags<[CC1Option]>, HelpText<"Enable generation of new-value stores">;
4010def mno_nvs : Flag<["-"], "mno-nvs">, Group<m_hexagon_Features_Group>,
4011  Flags<[CC1Option]>, HelpText<"Disable generation of new-value stores">;
4012
4013// M68k features flags
4014def m68000 : Flag<["-"], "m68000">, Group<m_m68k_Features_Group>;
4015def m68010 : Flag<["-"], "m68010">, Group<m_m68k_Features_Group>;
4016def m68020 : Flag<["-"], "m68020">, Group<m_m68k_Features_Group>;
4017def m68030 : Flag<["-"], "m68030">, Group<m_m68k_Features_Group>;
4018def m68040 : Flag<["-"], "m68040">, Group<m_m68k_Features_Group>;
4019def m68060 : Flag<["-"], "m68060">, Group<m_m68k_Features_Group>;
4020
4021foreach i = {0-6} in
4022  def ffixed_a#i : Flag<["-"], "ffixed-a"#i>, Group<m_m68k_Features_Group>,
4023    HelpText<"Reserve the a"#i#" register (M68k only)">;
4024foreach i = {0-7} in
4025  def ffixed_d#i : Flag<["-"], "ffixed-d"#i>, Group<m_m68k_Features_Group>,
4026    HelpText<"Reserve the d"#i#" register (M68k only)">;
4027
4028// X86 feature flags
4029def mx87 : Flag<["-"], "mx87">, Group<m_x86_Features_Group>;
4030def mno_x87 : Flag<["-"], "mno-x87">, Group<m_x86_Features_Group>;
4031def m80387 : Flag<["-"], "m80387">, Alias<mx87>;
4032def mno_80387 : Flag<["-"], "mno-80387">, Alias<mno_x87>;
4033def mmmx : Flag<["-"], "mmmx">, Group<m_x86_Features_Group>;
4034def mno_mmx : Flag<["-"], "mno-mmx">, Group<m_x86_Features_Group>;
4035def m3dnow : Flag<["-"], "m3dnow">, Group<m_x86_Features_Group>;
4036def mno_3dnow : Flag<["-"], "mno-3dnow">, Group<m_x86_Features_Group>;
4037def m3dnowa : Flag<["-"], "m3dnowa">, Group<m_x86_Features_Group>;
4038def mno_3dnowa : Flag<["-"], "mno-3dnowa">, Group<m_x86_Features_Group>;
4039def mamx_bf16 : Flag<["-"], "mamx-bf16">, Group<m_x86_Features_Group>;
4040def mno_amx_bf16 : Flag<["-"], "mno-amx-bf16">, Group<m_x86_Features_Group>;
4041def mtamx_int8 : Flag<["-"], "mamx-int8">, Group<m_x86_Features_Group>;
4042def mno_amx_int8 : Flag<["-"], "mno-amx-int8">, Group<m_x86_Features_Group>;
4043def mamx_tile : Flag<["-"], "mamx-tile">, Group<m_x86_Features_Group>;
4044def mno_amx_tile : Flag<["-"], "mno-amx-tile">, Group<m_x86_Features_Group>;
4045def msse : Flag<["-"], "msse">, Group<m_x86_Features_Group>;
4046def mno_sse : Flag<["-"], "mno-sse">, Group<m_x86_Features_Group>;
4047def msse2 : Flag<["-"], "msse2">, Group<m_x86_Features_Group>;
4048def mno_sse2 : Flag<["-"], "mno-sse2">, Group<m_x86_Features_Group>;
4049def msse3 : Flag<["-"], "msse3">, Group<m_x86_Features_Group>;
4050def mno_sse3 : Flag<["-"], "mno-sse3">, Group<m_x86_Features_Group>;
4051def mssse3 : Flag<["-"], "mssse3">, Group<m_x86_Features_Group>;
4052def mno_ssse3 : Flag<["-"], "mno-ssse3">, Group<m_x86_Features_Group>;
4053def msse4_1 : Flag<["-"], "msse4.1">, Group<m_x86_Features_Group>;
4054def mno_sse4_1 : Flag<["-"], "mno-sse4.1">, Group<m_x86_Features_Group>;
4055def msse4_2 : Flag<["-"], "msse4.2">, Group<m_x86_Features_Group>;
4056def mno_sse4_2 : Flag<["-"], "mno-sse4.2">, Group<m_x86_Features_Group>;
4057def msse4 : Flag<["-"], "msse4">, Alias<msse4_2>;
4058// -mno-sse4 turns off sse4.1 which has the effect of turning off everything
4059// later than 4.1. -msse4 turns on 4.2 which has the effect of turning on
4060// everything earlier than 4.2.
4061def mno_sse4 : Flag<["-"], "mno-sse4">, Alias<mno_sse4_1>;
4062def msse4a : Flag<["-"], "msse4a">, Group<m_x86_Features_Group>;
4063def mno_sse4a : Flag<["-"], "mno-sse4a">, Group<m_x86_Features_Group>;
4064def mavx : Flag<["-"], "mavx">, Group<m_x86_Features_Group>;
4065def mno_avx : Flag<["-"], "mno-avx">, Group<m_x86_Features_Group>;
4066def mavx2 : Flag<["-"], "mavx2">, Group<m_x86_Features_Group>;
4067def mno_avx2 : Flag<["-"], "mno-avx2">, Group<m_x86_Features_Group>;
4068def mavx512f : Flag<["-"], "mavx512f">, Group<m_x86_Features_Group>;
4069def mno_avx512f : Flag<["-"], "mno-avx512f">, Group<m_x86_Features_Group>;
4070def mavx512bf16 : Flag<["-"], "mavx512bf16">, Group<m_x86_Features_Group>;
4071def mno_avx512bf16 : Flag<["-"], "mno-avx512bf16">, Group<m_x86_Features_Group>;
4072def mavx512bitalg : Flag<["-"], "mavx512bitalg">, Group<m_x86_Features_Group>;
4073def mno_avx512bitalg : Flag<["-"], "mno-avx512bitalg">, Group<m_x86_Features_Group>;
4074def mavx512bw : Flag<["-"], "mavx512bw">, Group<m_x86_Features_Group>;
4075def mno_avx512bw : Flag<["-"], "mno-avx512bw">, Group<m_x86_Features_Group>;
4076def mavx512cd : Flag<["-"], "mavx512cd">, Group<m_x86_Features_Group>;
4077def mno_avx512cd : Flag<["-"], "mno-avx512cd">, Group<m_x86_Features_Group>;
4078def mavx512dq : Flag<["-"], "mavx512dq">, Group<m_x86_Features_Group>;
4079def mno_avx512dq : Flag<["-"], "mno-avx512dq">, Group<m_x86_Features_Group>;
4080def mavx512er : Flag<["-"], "mavx512er">, Group<m_x86_Features_Group>;
4081def mno_avx512er : Flag<["-"], "mno-avx512er">, Group<m_x86_Features_Group>;
4082def mavx512ifma : Flag<["-"], "mavx512ifma">, Group<m_x86_Features_Group>;
4083def mno_avx512ifma : Flag<["-"], "mno-avx512ifma">, Group<m_x86_Features_Group>;
4084def mavx512pf : Flag<["-"], "mavx512pf">, Group<m_x86_Features_Group>;
4085def mno_avx512pf : Flag<["-"], "mno-avx512pf">, Group<m_x86_Features_Group>;
4086def mavx512vbmi : Flag<["-"], "mavx512vbmi">, Group<m_x86_Features_Group>;
4087def mno_avx512vbmi : Flag<["-"], "mno-avx512vbmi">, Group<m_x86_Features_Group>;
4088def mavx512vbmi2 : Flag<["-"], "mavx512vbmi2">, Group<m_x86_Features_Group>;
4089def mno_avx512vbmi2 : Flag<["-"], "mno-avx512vbmi2">, Group<m_x86_Features_Group>;
4090def mavx512vl : Flag<["-"], "mavx512vl">, Group<m_x86_Features_Group>;
4091def mno_avx512vl : Flag<["-"], "mno-avx512vl">, Group<m_x86_Features_Group>;
4092def mavx512vnni : Flag<["-"], "mavx512vnni">, Group<m_x86_Features_Group>;
4093def mno_avx512vnni : Flag<["-"], "mno-avx512vnni">, Group<m_x86_Features_Group>;
4094def mavx512vpopcntdq : Flag<["-"], "mavx512vpopcntdq">, Group<m_x86_Features_Group>;
4095def mno_avx512vpopcntdq : Flag<["-"], "mno-avx512vpopcntdq">, Group<m_x86_Features_Group>;
4096def mavx512vp2intersect : Flag<["-"], "mavx512vp2intersect">, Group<m_x86_Features_Group>;
4097def mno_avx512vp2intersect : Flag<["-"], "mno-avx512vp2intersect">, Group<m_x86_Features_Group>;
4098def mavxvnni : Flag<["-"], "mavxvnni">, Group<m_x86_Features_Group>;
4099def mno_avxvnni : Flag<["-"], "mno-avxvnni">, Group<m_x86_Features_Group>;
4100def madx : Flag<["-"], "madx">, Group<m_x86_Features_Group>;
4101def mno_adx : Flag<["-"], "mno-adx">, Group<m_x86_Features_Group>;
4102def maes : Flag<["-"], "maes">, Group<m_x86_Features_Group>;
4103def mno_aes : Flag<["-"], "mno-aes">, Group<m_x86_Features_Group>;
4104def mbmi : Flag<["-"], "mbmi">, Group<m_x86_Features_Group>;
4105def mno_bmi : Flag<["-"], "mno-bmi">, Group<m_x86_Features_Group>;
4106def mbmi2 : Flag<["-"], "mbmi2">, Group<m_x86_Features_Group>;
4107def mno_bmi2 : Flag<["-"], "mno-bmi2">, Group<m_x86_Features_Group>;
4108def mcldemote : Flag<["-"], "mcldemote">, Group<m_x86_Features_Group>;
4109def mno_cldemote : Flag<["-"], "mno-cldemote">, Group<m_x86_Features_Group>;
4110def mclflushopt : Flag<["-"], "mclflushopt">, Group<m_x86_Features_Group>;
4111def mno_clflushopt : Flag<["-"], "mno-clflushopt">, Group<m_x86_Features_Group>;
4112def mclwb : Flag<["-"], "mclwb">, Group<m_x86_Features_Group>;
4113def mno_clwb : Flag<["-"], "mno-clwb">, Group<m_x86_Features_Group>;
4114def mwbnoinvd : Flag<["-"], "mwbnoinvd">, Group<m_x86_Features_Group>;
4115def mno_wbnoinvd : Flag<["-"], "mno-wbnoinvd">, Group<m_x86_Features_Group>;
4116def mclzero : Flag<["-"], "mclzero">, Group<m_x86_Features_Group>;
4117def mno_clzero : Flag<["-"], "mno-clzero">, Group<m_x86_Features_Group>;
4118def mcx16 : Flag<["-"], "mcx16">, Group<m_x86_Features_Group>;
4119def mno_cx16 : Flag<["-"], "mno-cx16">, Group<m_x86_Features_Group>;
4120def menqcmd : Flag<["-"], "menqcmd">, Group<m_x86_Features_Group>;
4121def mno_enqcmd : Flag<["-"], "mno-enqcmd">, Group<m_x86_Features_Group>;
4122def mf16c : Flag<["-"], "mf16c">, Group<m_x86_Features_Group>;
4123def mno_f16c : Flag<["-"], "mno-f16c">, Group<m_x86_Features_Group>;
4124def mfma : Flag<["-"], "mfma">, Group<m_x86_Features_Group>;
4125def mno_fma : Flag<["-"], "mno-fma">, Group<m_x86_Features_Group>;
4126def mfma4 : Flag<["-"], "mfma4">, Group<m_x86_Features_Group>;
4127def mno_fma4 : Flag<["-"], "mno-fma4">, Group<m_x86_Features_Group>;
4128def mfsgsbase : Flag<["-"], "mfsgsbase">, Group<m_x86_Features_Group>;
4129def mno_fsgsbase : Flag<["-"], "mno-fsgsbase">, Group<m_x86_Features_Group>;
4130def mfxsr : Flag<["-"], "mfxsr">, Group<m_x86_Features_Group>;
4131def mno_fxsr : Flag<["-"], "mno-fxsr">, Group<m_x86_Features_Group>;
4132def minvpcid : Flag<["-"], "minvpcid">, Group<m_x86_Features_Group>;
4133def mno_invpcid : Flag<["-"], "mno-invpcid">, Group<m_x86_Features_Group>;
4134def mgfni : Flag<["-"], "mgfni">, Group<m_x86_Features_Group>;
4135def mno_gfni : Flag<["-"], "mno-gfni">, Group<m_x86_Features_Group>;
4136def mhreset : Flag<["-"], "mhreset">, Group<m_x86_Features_Group>;
4137def mno_hreset : Flag<["-"], "mno-hreset">, Group<m_x86_Features_Group>;
4138def mkl : Flag<["-"], "mkl">, Group<m_x86_Features_Group>;
4139def mno_kl : Flag<["-"], "mno-kl">, Group<m_x86_Features_Group>;
4140def mwidekl : Flag<["-"], "mwidekl">, Group<m_x86_Features_Group>;
4141def mno_widekl : Flag<["-"], "mno-widekl">, Group<m_x86_Features_Group>;
4142def mlwp : Flag<["-"], "mlwp">, Group<m_x86_Features_Group>;
4143def mno_lwp : Flag<["-"], "mno-lwp">, Group<m_x86_Features_Group>;
4144def mlzcnt : Flag<["-"], "mlzcnt">, Group<m_x86_Features_Group>;
4145def mno_lzcnt : Flag<["-"], "mno-lzcnt">, Group<m_x86_Features_Group>;
4146def mmovbe : Flag<["-"], "mmovbe">, Group<m_x86_Features_Group>;
4147def mno_movbe : Flag<["-"], "mno-movbe">, Group<m_x86_Features_Group>;
4148def mmovdiri : Flag<["-"], "mmovdiri">, Group<m_x86_Features_Group>;
4149def mno_movdiri : Flag<["-"], "mno-movdiri">, Group<m_x86_Features_Group>;
4150def mmovdir64b : Flag<["-"], "mmovdir64b">, Group<m_x86_Features_Group>;
4151def mno_movdir64b : Flag<["-"], "mno-movdir64b">, Group<m_x86_Features_Group>;
4152def mmwaitx : Flag<["-"], "mmwaitx">, Group<m_x86_Features_Group>;
4153def mno_mwaitx : Flag<["-"], "mno-mwaitx">, Group<m_x86_Features_Group>;
4154def mpku : Flag<["-"], "mpku">, Group<m_x86_Features_Group>;
4155def mno_pku : Flag<["-"], "mno-pku">, Group<m_x86_Features_Group>;
4156def mpclmul : Flag<["-"], "mpclmul">, Group<m_x86_Features_Group>;
4157def mno_pclmul : Flag<["-"], "mno-pclmul">, Group<m_x86_Features_Group>;
4158def mpconfig : Flag<["-"], "mpconfig">, Group<m_x86_Features_Group>;
4159def mno_pconfig : Flag<["-"], "mno-pconfig">, Group<m_x86_Features_Group>;
4160def mpopcnt : Flag<["-"], "mpopcnt">, Group<m_x86_Features_Group>;
4161def mno_popcnt : Flag<["-"], "mno-popcnt">, Group<m_x86_Features_Group>;
4162def mprefetchwt1 : Flag<["-"], "mprefetchwt1">, Group<m_x86_Features_Group>;
4163def mno_prefetchwt1 : Flag<["-"], "mno-prefetchwt1">, Group<m_x86_Features_Group>;
4164def mprfchw : Flag<["-"], "mprfchw">, Group<m_x86_Features_Group>;
4165def mno_prfchw : Flag<["-"], "mno-prfchw">, Group<m_x86_Features_Group>;
4166def mptwrite : Flag<["-"], "mptwrite">, Group<m_x86_Features_Group>;
4167def mno_ptwrite : Flag<["-"], "mno-ptwrite">, Group<m_x86_Features_Group>;
4168def mrdpid : Flag<["-"], "mrdpid">, Group<m_x86_Features_Group>;
4169def mno_rdpid : Flag<["-"], "mno-rdpid">, Group<m_x86_Features_Group>;
4170def mrdrnd : Flag<["-"], "mrdrnd">, Group<m_x86_Features_Group>;
4171def mno_rdrnd : Flag<["-"], "mno-rdrnd">, Group<m_x86_Features_Group>;
4172def mrtm : Flag<["-"], "mrtm">, Group<m_x86_Features_Group>;
4173def mno_rtm : Flag<["-"], "mno-rtm">, Group<m_x86_Features_Group>;
4174def mrdseed : Flag<["-"], "mrdseed">, Group<m_x86_Features_Group>;
4175def mno_rdseed : Flag<["-"], "mno-rdseed">, Group<m_x86_Features_Group>;
4176def msahf : Flag<["-"], "msahf">, Group<m_x86_Features_Group>;
4177def mno_sahf : Flag<["-"], "mno-sahf">, Group<m_x86_Features_Group>;
4178def mserialize : Flag<["-"], "mserialize">, Group<m_x86_Features_Group>;
4179def mno_serialize : Flag<["-"], "mno-serialize">, Group<m_x86_Features_Group>;
4180def msgx : Flag<["-"], "msgx">, Group<m_x86_Features_Group>;
4181def mno_sgx : Flag<["-"], "mno-sgx">, Group<m_x86_Features_Group>;
4182def msha : Flag<["-"], "msha">, Group<m_x86_Features_Group>;
4183def mno_sha : Flag<["-"], "mno-sha">, Group<m_x86_Features_Group>;
4184def mtbm : Flag<["-"], "mtbm">, Group<m_x86_Features_Group>;
4185def mno_tbm : Flag<["-"], "mno-tbm">, Group<m_x86_Features_Group>;
4186def mtsxldtrk : Flag<["-"], "mtsxldtrk">, Group<m_x86_Features_Group>;
4187def mno_tsxldtrk : Flag<["-"], "mno-tsxldtrk">, Group<m_x86_Features_Group>;
4188def muintr : Flag<["-"], "muintr">, Group<m_x86_Features_Group>;
4189def mno_uintr : Flag<["-"], "mno-uintr">, Group<m_x86_Features_Group>;
4190def mvaes : Flag<["-"], "mvaes">, Group<m_x86_Features_Group>;
4191def mno_vaes : Flag<["-"], "mno-vaes">, Group<m_x86_Features_Group>;
4192def mvpclmulqdq : Flag<["-"], "mvpclmulqdq">, Group<m_x86_Features_Group>;
4193def mno_vpclmulqdq : Flag<["-"], "mno-vpclmulqdq">, Group<m_x86_Features_Group>;
4194def mwaitpkg : Flag<["-"], "mwaitpkg">, Group<m_x86_Features_Group>;
4195def mno_waitpkg : Flag<["-"], "mno-waitpkg">, Group<m_x86_Features_Group>;
4196def mxop : Flag<["-"], "mxop">, Group<m_x86_Features_Group>;
4197def mno_xop : Flag<["-"], "mno-xop">, Group<m_x86_Features_Group>;
4198def mxsave : Flag<["-"], "mxsave">, Group<m_x86_Features_Group>;
4199def mno_xsave : Flag<["-"], "mno-xsave">, Group<m_x86_Features_Group>;
4200def mxsavec : Flag<["-"], "mxsavec">, Group<m_x86_Features_Group>;
4201def mno_xsavec : Flag<["-"], "mno-xsavec">, Group<m_x86_Features_Group>;
4202def mxsaveopt : Flag<["-"], "mxsaveopt">, Group<m_x86_Features_Group>;
4203def mno_xsaveopt : Flag<["-"], "mno-xsaveopt">, Group<m_x86_Features_Group>;
4204def mxsaves : Flag<["-"], "mxsaves">, Group<m_x86_Features_Group>;
4205def mno_xsaves : Flag<["-"], "mno-xsaves">, Group<m_x86_Features_Group>;
4206def mshstk : Flag<["-"], "mshstk">, Group<m_x86_Features_Group>;
4207def mno_shstk : Flag<["-"], "mno-shstk">, Group<m_x86_Features_Group>;
4208def mretpoline_external_thunk : Flag<["-"], "mretpoline-external-thunk">, Group<m_x86_Features_Group>;
4209def mno_retpoline_external_thunk : Flag<["-"], "mno-retpoline-external-thunk">, Group<m_x86_Features_Group>;
4210def mvzeroupper : Flag<["-"], "mvzeroupper">, Group<m_x86_Features_Group>;
4211def mno_vzeroupper : Flag<["-"], "mno-vzeroupper">, Group<m_x86_Features_Group>;
4212
4213// These are legacy user-facing driver-level option spellings. They are always
4214// aliases for options that are spelled using the more common Unix / GNU flag
4215// style of double-dash and equals-joined flags.
4216def gcc_toolchain_legacy_spelling : Separate<["-"], "gcc-toolchain">, Alias<gcc_toolchain>;
4217def target_legacy_spelling : Separate<["-"], "target">, Alias<target>;
4218
4219// Special internal option to handle -Xlinker --no-demangle.
4220def Z_Xlinker__no_demangle : Flag<["-"], "Z-Xlinker-no-demangle">,
4221    Flags<[Unsupported, NoArgumentUnused]>;
4222
4223// Special internal option to allow forwarding arbitrary arguments to linker.
4224def Zlinker_input : Separate<["-"], "Zlinker-input">,
4225    Flags<[Unsupported, NoArgumentUnused]>;
4226
4227// Reserved library options.
4228def Z_reserved_lib_stdcxx : Flag<["-"], "Z-reserved-lib-stdc++">,
4229    Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, Group<reserved_lib_Group>;
4230def Z_reserved_lib_cckext : Flag<["-"], "Z-reserved-lib-cckext">,
4231    Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, Group<reserved_lib_Group>;
4232
4233// Ignored options
4234multiclass BooleanFFlag<string name> {
4235  def f#NAME : Flag<["-"], "f"#name>;
4236  def fno_#NAME : Flag<["-"], "fno-"#name>;
4237}
4238
4239defm : BooleanFFlag<"keep-inline-functions">, Group<clang_ignored_gcc_optimization_f_Group>;
4240
4241def fprofile_dir : Joined<["-"], "fprofile-dir=">, Group<f_Group>;
4242
4243// The default value matches BinutilsVersion in MCAsmInfo.h.
4244def fbinutils_version_EQ : Joined<["-"], "fbinutils-version=">,
4245  MetaVarName<"<major.minor>">, Group<f_Group>, Flags<[CC1Option]>,
4246  HelpText<"Produced object files can use all ELF features supported by this "
4247  "binutils version and newer. If -fno-integrated-as is specified, the "
4248  "generated assembly will consider GNU as support. 'none' means that all ELF "
4249  "features can be used, regardless of binutils support. Defaults to 2.26.">;
4250def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group<f_Group>, Flags<[CoreOption, LinkOption]>;
4251def ld_path_EQ : Joined<["--"], "ld-path=">, Group<Link_Group>;
4252
4253defm align_labels : BooleanFFlag<"align-labels">, Group<clang_ignored_gcc_optimization_f_Group>;
4254def falign_labels_EQ : Joined<["-"], "falign-labels=">, Group<clang_ignored_gcc_optimization_f_Group>;
4255defm align_loops : BooleanFFlag<"align-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
4256def falign_loops_EQ : Joined<["-"], "falign-loops=">, Group<clang_ignored_gcc_optimization_f_Group>;
4257defm align_jumps : BooleanFFlag<"align-jumps">, Group<clang_ignored_gcc_optimization_f_Group>;
4258def falign_jumps_EQ : Joined<["-"], "falign-jumps=">, Group<clang_ignored_gcc_optimization_f_Group>;
4259
4260// FIXME: This option should be supported and wired up to our diognostics, but
4261// ignore it for now to avoid breaking builds that use it.
4262def fdiagnostics_show_location_EQ : Joined<["-"], "fdiagnostics-show-location=">, Group<clang_ignored_f_Group>;
4263
4264defm fcheck_new : BooleanFFlag<"check-new">, Group<clang_ignored_f_Group>;
4265defm caller_saves : BooleanFFlag<"caller-saves">, Group<clang_ignored_gcc_optimization_f_Group>;
4266defm reorder_blocks : BooleanFFlag<"reorder-blocks">, Group<clang_ignored_gcc_optimization_f_Group>;
4267defm branch_count_reg : BooleanFFlag<"branch-count-reg">, Group<clang_ignored_gcc_optimization_f_Group>;
4268defm default_inline : BooleanFFlag<"default-inline">, Group<clang_ignored_gcc_optimization_f_Group>;
4269defm fat_lto_objects : BooleanFFlag<"fat-lto-objects">, Group<clang_ignored_gcc_optimization_f_Group>;
4270defm float_store : BooleanFFlag<"float-store">, Group<clang_ignored_gcc_optimization_f_Group>;
4271defm friend_injection : BooleanFFlag<"friend-injection">, Group<clang_ignored_f_Group>;
4272defm function_attribute_list : BooleanFFlag<"function-attribute-list">, Group<clang_ignored_f_Group>;
4273defm gcse : BooleanFFlag<"gcse">, Group<clang_ignored_gcc_optimization_f_Group>;
4274defm gcse_after_reload: BooleanFFlag<"gcse-after-reload">, Group<clang_ignored_gcc_optimization_f_Group>;
4275defm gcse_las: BooleanFFlag<"gcse-las">, Group<clang_ignored_gcc_optimization_f_Group>;
4276defm gcse_sm: BooleanFFlag<"gcse-sm">, Group<clang_ignored_gcc_optimization_f_Group>;
4277defm gnu : BooleanFFlag<"gnu">, Group<clang_ignored_f_Group>;
4278defm implicit_templates : BooleanFFlag<"implicit-templates">, Group<clang_ignored_f_Group>;
4279defm implement_inlines : BooleanFFlag<"implement-inlines">, Group<clang_ignored_f_Group>;
4280defm merge_constants : BooleanFFlag<"merge-constants">, Group<clang_ignored_gcc_optimization_f_Group>;
4281defm modulo_sched : BooleanFFlag<"modulo-sched">, Group<clang_ignored_gcc_optimization_f_Group>;
4282defm modulo_sched_allow_regmoves : BooleanFFlag<"modulo-sched-allow-regmoves">,
4283    Group<clang_ignored_gcc_optimization_f_Group>;
4284defm inline_functions_called_once : BooleanFFlag<"inline-functions-called-once">,
4285    Group<clang_ignored_gcc_optimization_f_Group>;
4286def finline_limit_EQ : Joined<["-"], "finline-limit=">, Group<clang_ignored_gcc_optimization_f_Group>;
4287defm finline_limit : BooleanFFlag<"inline-limit">, Group<clang_ignored_gcc_optimization_f_Group>;
4288defm inline_small_functions : BooleanFFlag<"inline-small-functions">,
4289    Group<clang_ignored_gcc_optimization_f_Group>;
4290defm ipa_cp : BooleanFFlag<"ipa-cp">,
4291    Group<clang_ignored_gcc_optimization_f_Group>;
4292defm ivopts : BooleanFFlag<"ivopts">, Group<clang_ignored_gcc_optimization_f_Group>;
4293defm semantic_interposition : BoolFOption<"semantic-interposition",
4294  LangOpts<"SemanticInterposition">, DefaultFalse,
4295  PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>;
4296defm non_call_exceptions : BooleanFFlag<"non-call-exceptions">, Group<clang_ignored_f_Group>;
4297defm peel_loops : BooleanFFlag<"peel-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
4298defm permissive : BooleanFFlag<"permissive">, Group<clang_ignored_f_Group>;
4299defm prefetch_loop_arrays : BooleanFFlag<"prefetch-loop-arrays">, Group<clang_ignored_gcc_optimization_f_Group>;
4300defm printf : BooleanFFlag<"printf">, Group<clang_ignored_f_Group>;
4301defm profile : BooleanFFlag<"profile">, Group<clang_ignored_f_Group>;
4302defm profile_correction : BooleanFFlag<"profile-correction">, Group<clang_ignored_gcc_optimization_f_Group>;
4303defm profile_generate_sampling : BooleanFFlag<"profile-generate-sampling">, Group<clang_ignored_f_Group>;
4304defm profile_reusedist : BooleanFFlag<"profile-reusedist">, Group<clang_ignored_f_Group>;
4305defm profile_values : BooleanFFlag<"profile-values">, Group<clang_ignored_gcc_optimization_f_Group>;
4306defm regs_graph : BooleanFFlag<"regs-graph">, Group<clang_ignored_f_Group>;
4307defm rename_registers : BooleanFFlag<"rename-registers">, Group<clang_ignored_gcc_optimization_f_Group>;
4308defm ripa : BooleanFFlag<"ripa">, Group<clang_ignored_f_Group>;
4309defm schedule_insns : BooleanFFlag<"schedule-insns">, Group<clang_ignored_gcc_optimization_f_Group>;
4310defm schedule_insns2 : BooleanFFlag<"schedule-insns2">, Group<clang_ignored_gcc_optimization_f_Group>;
4311defm see : BooleanFFlag<"see">, Group<clang_ignored_f_Group>;
4312defm signaling_nans : BooleanFFlag<"signaling-nans">, Group<clang_ignored_gcc_optimization_f_Group>;
4313defm single_precision_constant : BooleanFFlag<"single-precision-constant">,
4314    Group<clang_ignored_gcc_optimization_f_Group>;
4315defm spec_constr_count : BooleanFFlag<"spec-constr-count">, Group<clang_ignored_f_Group>;
4316defm stack_check : BooleanFFlag<"stack-check">, Group<clang_ignored_f_Group>;
4317defm strength_reduce :
4318    BooleanFFlag<"strength-reduce">, Group<clang_ignored_gcc_optimization_f_Group>;
4319defm tls_model : BooleanFFlag<"tls-model">, Group<clang_ignored_f_Group>;
4320defm tracer : BooleanFFlag<"tracer">, Group<clang_ignored_gcc_optimization_f_Group>;
4321defm tree_dce : BooleanFFlag<"tree-dce">, Group<clang_ignored_gcc_optimization_f_Group>;
4322defm tree_salias : BooleanFFlag<"tree-salias">, Group<clang_ignored_f_Group>;
4323defm tree_ter : BooleanFFlag<"tree-ter">, Group<clang_ignored_gcc_optimization_f_Group>;
4324defm tree_vectorizer_verbose : BooleanFFlag<"tree-vectorizer-verbose">, Group<clang_ignored_f_Group>;
4325defm tree_vrp : BooleanFFlag<"tree-vrp">, Group<clang_ignored_gcc_optimization_f_Group>;
4326defm unroll_all_loops : BooleanFFlag<"unroll-all-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
4327defm unsafe_loop_optimizations : BooleanFFlag<"unsafe-loop-optimizations">,
4328    Group<clang_ignored_gcc_optimization_f_Group>;
4329defm unswitch_loops : BooleanFFlag<"unswitch-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
4330defm use_linker_plugin : BooleanFFlag<"use-linker-plugin">, Group<clang_ignored_gcc_optimization_f_Group>;
4331defm vect_cost_model : BooleanFFlag<"vect-cost-model">, Group<clang_ignored_gcc_optimization_f_Group>;
4332defm variable_expansion_in_unroller : BooleanFFlag<"variable-expansion-in-unroller">,
4333    Group<clang_ignored_gcc_optimization_f_Group>;
4334defm web : BooleanFFlag<"web">, Group<clang_ignored_gcc_optimization_f_Group>;
4335defm whole_program : BooleanFFlag<"whole-program">, Group<clang_ignored_gcc_optimization_f_Group>;
4336defm devirtualize : BooleanFFlag<"devirtualize">, Group<clang_ignored_gcc_optimization_f_Group>;
4337defm devirtualize_speculatively : BooleanFFlag<"devirtualize-speculatively">,
4338    Group<clang_ignored_gcc_optimization_f_Group>;
4339
4340// Generic gfortran options.
4341def A_DASH : Joined<["-"], "A-">, Group<gfortran_Group>;
4342def static_libgfortran : Flag<["-"], "static-libgfortran">, Group<gfortran_Group>;
4343
4344// "f" options with values for gfortran.
4345def fblas_matmul_limit_EQ : Joined<["-"], "fblas-matmul-limit=">, Group<gfortran_Group>;
4346def fcheck_EQ : Joined<["-"], "fcheck=">, Group<gfortran_Group>;
4347def fcoarray_EQ : Joined<["-"], "fcoarray=">, Group<gfortran_Group>;
4348def fconvert_EQ : Joined<["-"], "fconvert=">, Group<gfortran_Group>;
4349def ffpe_trap_EQ : Joined<["-"], "ffpe-trap=">, Group<gfortran_Group>;
4350def ffree_line_length_VALUE : Joined<["-"], "ffree-line-length-">, Group<gfortran_Group>;
4351def finit_character_EQ : Joined<["-"], "finit-character=">, Group<gfortran_Group>;
4352def finit_integer_EQ : Joined<["-"], "finit-integer=">, Group<gfortran_Group>;
4353def finit_logical_EQ : Joined<["-"], "finit-logical=">, Group<gfortran_Group>;
4354def finit_real_EQ : Joined<["-"], "finit-real=">, Group<gfortran_Group>;
4355def fmax_array_constructor_EQ : Joined<["-"], "fmax-array-constructor=">, Group<gfortran_Group>;
4356def fmax_errors_EQ : Joined<["-"], "fmax-errors=">, Group<gfortran_Group>;
4357def fmax_stack_var_size_EQ : Joined<["-"], "fmax-stack-var-size=">, Group<gfortran_Group>;
4358def fmax_subrecord_length_EQ : Joined<["-"], "fmax-subrecord-length=">, Group<gfortran_Group>;
4359def frecord_marker_EQ : Joined<["-"], "frecord-marker=">, Group<gfortran_Group>;
4360
4361// "f" flags for gfortran.
4362defm aggressive_function_elimination : BooleanFFlag<"aggressive-function-elimination">, Group<gfortran_Group>;
4363defm align_commons : BooleanFFlag<"align-commons">, Group<gfortran_Group>;
4364defm all_intrinsics : BooleanFFlag<"all-intrinsics">, Group<gfortran_Group>;
4365defm automatic : BooleanFFlag<"automatic">, Group<gfortran_Group>;
4366defm backtrace : BooleanFFlag<"backtrace">, Group<gfortran_Group>;
4367defm bounds_check : BooleanFFlag<"bounds-check">, Group<gfortran_Group>;
4368defm check_array_temporaries : BooleanFFlag<"check-array-temporaries">, Group<gfortran_Group>;
4369defm cray_pointer : BooleanFFlag<"cray-pointer">, Group<gfortran_Group>;
4370defm d_lines_as_code : BooleanFFlag<"d-lines-as-code">, Group<gfortran_Group>;
4371defm d_lines_as_comments : BooleanFFlag<"d-lines-as-comments">, Group<gfortran_Group>;
4372defm dollar_ok : BooleanFFlag<"dollar-ok">, Group<gfortran_Group>;
4373defm dump_fortran_optimized : BooleanFFlag<"dump-fortran-optimized">, Group<gfortran_Group>;
4374defm dump_fortran_original : BooleanFFlag<"dump-fortran-original">, Group<gfortran_Group>;
4375defm dump_parse_tree : BooleanFFlag<"dump-parse-tree">, Group<gfortran_Group>;
4376defm external_blas : BooleanFFlag<"external-blas">, Group<gfortran_Group>;
4377defm f2c : BooleanFFlag<"f2c">, Group<gfortran_Group>;
4378defm frontend_optimize : BooleanFFlag<"frontend-optimize">, Group<gfortran_Group>;
4379defm init_local_zero : BooleanFFlag<"init-local-zero">, Group<gfortran_Group>;
4380defm integer_4_integer_8 : BooleanFFlag<"integer-4-integer-8">, Group<gfortran_Group>;
4381defm max_identifier_length : BooleanFFlag<"max-identifier-length">, Group<gfortran_Group>;
4382defm module_private : BooleanFFlag<"module-private">, Group<gfortran_Group>;
4383defm pack_derived : BooleanFFlag<"pack-derived">, Group<gfortran_Group>;
4384defm protect_parens : BooleanFFlag<"protect-parens">, Group<gfortran_Group>;
4385defm range_check : BooleanFFlag<"range-check">, Group<gfortran_Group>;
4386defm real_4_real_10 : BooleanFFlag<"real-4-real-10">, Group<gfortran_Group>;
4387defm real_4_real_16 : BooleanFFlag<"real-4-real-16">, Group<gfortran_Group>;
4388defm real_4_real_8 : BooleanFFlag<"real-4-real-8">, Group<gfortran_Group>;
4389defm real_8_real_10 : BooleanFFlag<"real-8-real-10">, Group<gfortran_Group>;
4390defm real_8_real_16 : BooleanFFlag<"real-8-real-16">, Group<gfortran_Group>;
4391defm real_8_real_4 : BooleanFFlag<"real-8-real-4">, Group<gfortran_Group>;
4392defm realloc_lhs : BooleanFFlag<"realloc-lhs">, Group<gfortran_Group>;
4393defm recursive : BooleanFFlag<"recursive">, Group<gfortran_Group>;
4394defm repack_arrays : BooleanFFlag<"repack-arrays">, Group<gfortran_Group>;
4395defm second_underscore : BooleanFFlag<"second-underscore">, Group<gfortran_Group>;
4396defm sign_zero : BooleanFFlag<"sign-zero">, Group<gfortran_Group>;
4397defm stack_arrays : BooleanFFlag<"stack-arrays">, Group<gfortran_Group>;
4398defm underscoring : BooleanFFlag<"underscoring">, Group<gfortran_Group>;
4399defm whole_file : BooleanFFlag<"whole-file">, Group<gfortran_Group>;
4400
4401// C++ SYCL options
4402def fsycl : Flag<["-"], "fsycl">, Flags<[NoXarchOption, CoreOption]>,
4403  Group<sycl_Group>, HelpText<"Enables SYCL kernels compilation for device">;
4404def fno_sycl : Flag<["-"], "fno-sycl">, Flags<[NoXarchOption, CoreOption]>,
4405  Group<sycl_Group>, HelpText<"Disables SYCL kernels compilation for device">;
4406
4407//===----------------------------------------------------------------------===//
4408// FLangOption + CoreOption + NoXarchOption
4409//===----------------------------------------------------------------------===//
4410let Flags = [FlangOption, FlangOnlyOption, NoXarchOption, CoreOption] in {
4411def Xflang : Separate<["-"], "Xflang">,
4412  HelpText<"Pass <arg> to the flang compiler">, MetaVarName<"<arg>">,
4413  Flags<[NoXarchOption, CoreOption]>, Group<CompileOnly_Group>;
4414}
4415
4416//===----------------------------------------------------------------------===//
4417// FlangOption and FC1 Options
4418//===----------------------------------------------------------------------===//
4419let Flags = [FC1Option, FlangOption, FlangOnlyOption] in {
4420
4421def cpp : Flag<["-"], "cpp">, Group<f_Group>,
4422  HelpText<"Enable predefined and command line preprocessor macros">;
4423def nocpp : Flag<["-"], "nocpp">, Group<f_Group>,
4424  HelpText<"Disable predefined and command line preprocessor macros">;
4425def module_dir : Separate<["-"], "module-dir">, MetaVarName<"<dir>">,
4426  HelpText<"Put MODULE files in <dir>">,
4427  DocBrief<[{This option specifies where to put .mod files for compiled modules.
4428It is also added to the list of directories to be searched by an USE statement.
4429The default is the current directory.}]>;
4430
4431def ffixed_form : Flag<["-"], "ffixed-form">, Group<f_Group>,
4432  HelpText<"Process source files in fixed form">;
4433def ffree_form : Flag<["-"], "ffree-form">, Group<f_Group>,
4434  HelpText<"Process source files in free form">;
4435def ffixed_line_length_EQ : Joined<["-"], "ffixed-line-length=">, Group<f_Group>,
4436  HelpText<"Use <value> as character line width in fixed mode">,
4437  DocBrief<[{Set column after which characters are ignored in typical fixed-form lines in the source
4438file}]>;
4439def ffixed_line_length_VALUE : Joined<["-"], "ffixed-line-length-">, Group<f_Group>, Alias<ffixed_line_length_EQ>;
4440def fopenacc : Flag<["-"], "fopenacc">, Group<f_Group>,
4441  HelpText<"Enable OpenACC">;
4442def fdefault_double_8 : Flag<["-"],"fdefault-double-8">, Group<f_Group>,
4443  HelpText<"Set the default double precision kind to an 8 byte wide type">;
4444def fdefault_integer_8 : Flag<["-"],"fdefault-integer-8">, Group<f_Group>,
4445  HelpText<"Set the default integer kind to an 8 byte wide type">;
4446def fdefault_real_8 : Flag<["-"],"fdefault-real-8">, Group<f_Group>,
4447  HelpText<"Set the default real kind to an 8 byte wide type">;
4448def flarge_sizes : Flag<["-"],"flarge-sizes">, Group<f_Group>,
4449  HelpText<"Use INTEGER(KIND=8) for the result type in size-related intrinsics">;
4450def fbackslash : Flag<["-"], "fbackslash">, Group<f_Group>,
4451  HelpText<"Specify that backslash in string introduces an escape character">,
4452  DocBrief<[{Change the interpretation of backslashes in string literals from
4453a single backslash character to "C-style" escape characters.}]>;
4454def fno_backslash : Flag<["-"], "fno-backslash">, Group<f_Group>;
4455def fxor_operator : Flag<["-"], "fxor-operator">, Group<f_Group>,
4456  HelpText<"Enable .XOR. as a synonym of .NEQV.">;
4457def fno_xor_operator : Flag<["-"], "fno-xor-operator">, Group<f_Group>;
4458def flogical_abbreviations : Flag<["-"], "flogical-abbreviations">, Group<f_Group>,
4459  HelpText<"Enable logical abbreviations">;
4460def fno_logical_abbreviations : Flag<["-"], "fno-logical-abbreviations">, Group<f_Group>;
4461def fimplicit_none : Flag<["-"], "fimplicit-none">, Group<f_Group>,
4462  HelpText<"No implicit typing allowed unless overridden by IMPLICIT statements">;
4463def fno_implicit_none : Flag<["-"], "fno-implicit-none">, Group<f_Group>;
4464def falternative_parameter_statement : Flag<["-"], "falternative-parameter-statement">, Group<f_Group>,
4465  HelpText<"Enable the old style PARAMETER statement">;
4466def fintrinsic_modules_path : Separate<["-"], "fintrinsic-modules-path">,  Group<f_Group>, MetaVarName<"<dir>">,
4467  HelpText<"Specify where to find the compiled intrinsic modules">,
4468  DocBrief<[{This option specifies the location of pre-compiled intrinsic modules,
4469  if they are not in the default location expected by the compiler.}]>;
4470}
4471
4472def J : JoinedOrSeparate<["-"], "J">,
4473  Flags<[RenderJoined, FlangOption, FC1Option, FlangOnlyOption]>,
4474  Group<gfortran_Group>,
4475  Alias<module_dir>;
4476
4477//===----------------------------------------------------------------------===//
4478// FC1 Options
4479//===----------------------------------------------------------------------===//
4480let Flags = [FC1Option, FlangOnlyOption] in {
4481
4482def fget_definition : MultiArg<["-"], "fget-definition", 3>,
4483  HelpText<"Get the symbol definition from <line> <start-column> <end-column>">,
4484  Group<Action_Group>;
4485def test_io : Flag<["-"], "test-io">, Group<Action_Group>,
4486  HelpText<"Run the InputOuputTest action. Use for development and testing only.">;
4487def fdebug_unparse_no_sema : Flag<["-"], "fdebug-unparse-no-sema">, Group<Action_Group>,
4488  HelpText<"Unparse and stop (skips the semantic checks)">,
4489  DocBrief<[{Only run the parser, then unparse the parse-tree and output the
4490generated Fortran source file. Semantic checks are disabled.}]>;
4491def fdebug_unparse : Flag<["-"], "fdebug-unparse">, Group<Action_Group>,
4492  HelpText<"Unparse and stop.">,
4493  DocBrief<[{Run the parser and the semantic checks. Then unparse the
4494parse-tree and output the generated Fortran source file.}]>;
4495def fdebug_unparse_with_symbols : Flag<["-"], "fdebug-unparse-with-symbols">, Group<Action_Group>,
4496  HelpText<"Unparse and stop.">;
4497def fdebug_dump_symbols : Flag<["-"], "fdebug-dump-symbols">, Group<Action_Group>,
4498  HelpText<"Dump symbols after the semantic analysis">;
4499def fdebug_dump_parse_tree : Flag<["-"], "fdebug-dump-parse-tree">, Group<Action_Group>,
4500  HelpText<"Dump the parse tree">,
4501  DocBrief<[{Run the Parser and the semantic checks, and then output the
4502parse tree.}]>;
4503def fdebug_dump_parse_tree_no_sema : Flag<["-"], "fdebug-dump-parse-tree-no-sema">, Group<Action_Group>,
4504  HelpText<"Dump the parse tree (skips the semantic checks)">,
4505  DocBrief<[{Run the Parser and then output the parse tree. Semantic
4506checks are disabled.}]>;
4507def fdebug_dump_provenance : Flag<["-"], "fdebug-dump-provenance">, Group<Action_Group>,
4508  HelpText<"Dump provenance">;
4509def fdebug_dump_parsing_log : Flag<["-"], "fdebug-dump-parsing-log">, Group<Action_Group>,
4510  HelpText<"Run instrumented parse and dump the parsing log">;
4511def fdebug_measure_parse_tree : Flag<["-"], "fdebug-measure-parse-tree">, Group<Action_Group>,
4512  HelpText<"Measure the parse tree">;
4513def fdebug_pre_fir_tree : Flag<["-"], "fdebug-pre-fir-tree">, Group<Action_Group>,
4514  HelpText<"Dump the pre-FIR tree">;
4515def fdebug_module_writer : Flag<["-"],"fdebug-module-writer">,
4516  HelpText<"Enable debug messages while writing module files">;
4517def fget_symbols_sources : Flag<["-"], "fget-symbols-sources">, Group<Action_Group>,
4518  HelpText<"Dump symbols and their source code locations">;
4519
4520}
4521
4522//===----------------------------------------------------------------------===//
4523// CC1 Options
4524//===----------------------------------------------------------------------===//
4525
4526let Flags = [CC1Option, NoDriverOption] in {
4527
4528//===----------------------------------------------------------------------===//
4529// Target Options
4530//===----------------------------------------------------------------------===//
4531
4532let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
4533
4534def target_cpu : Separate<["-"], "target-cpu">,
4535  HelpText<"Target a specific cpu type">,
4536  MarshallingInfoString<TargetOpts<"CPU">>;
4537def tune_cpu : Separate<["-"], "tune-cpu">,
4538  HelpText<"Tune for a specific cpu type">,
4539  MarshallingInfoString<TargetOpts<"TuneCPU">>;
4540def target_feature : Separate<["-"], "target-feature">,
4541  HelpText<"Target specific attributes">,
4542  MarshallingInfoStringVector<TargetOpts<"FeaturesAsWritten">>;
4543def triple : Separate<["-"], "triple">,
4544  HelpText<"Specify target triple (e.g. i686-apple-darwin9)">,
4545  MarshallingInfoString<TargetOpts<"Triple">, "llvm::Triple::normalize(llvm::sys::getDefaultTargetTriple())">,
4546  AlwaysEmit, Normalizer<"normalizeTriple">;
4547def target_abi : Separate<["-"], "target-abi">,
4548  HelpText<"Target a particular ABI type">,
4549  MarshallingInfoString<TargetOpts<"ABI">>;
4550def target_sdk_version_EQ : Joined<["-"], "target-sdk-version=">,
4551  HelpText<"The version of target SDK used for compilation">;
4552
4553}
4554
4555def target_linker_version : Separate<["-"], "target-linker-version">,
4556  HelpText<"Target linker version">,
4557  MarshallingInfoString<TargetOpts<"LinkerVersion">>;
4558def triple_EQ : Joined<["-"], "triple=">, Alias<triple>;
4559def mfpmath : Separate<["-"], "mfpmath">,
4560  HelpText<"Which unit to use for fp math">,
4561  MarshallingInfoString<TargetOpts<"FPMath">>;
4562
4563defm padding_on_unsigned_fixed_point : BoolOption<"f", "padding-on-unsigned-fixed-point",
4564  LangOpts<"PaddingOnUnsignedFixedPoint">, DefaultFalse,
4565  PosFlag<SetTrue, [], "Force each unsigned fixed point type to have an extra bit of padding to align their scales with those of signed fixed point types">,
4566  NegFlag<SetFalse>>,
4567  ShouldParseIf<ffixed_point.KeyPath>;
4568
4569//===----------------------------------------------------------------------===//
4570// Analyzer Options
4571//===----------------------------------------------------------------------===//
4572
4573def analysis_UnoptimizedCFG : Flag<["-"], "unoptimized-cfg">,
4574  HelpText<"Generate unoptimized CFGs for all analyses">,
4575  MarshallingInfoFlag<AnalyzerOpts<"UnoptimizedCFG">>;
4576def analysis_CFGAddImplicitDtors : Flag<["-"], "cfg-add-implicit-dtors">,
4577  HelpText<"Add C++ implicit destructors to CFGs for all analyses">;
4578
4579def analyzer_store : Separate<["-"], "analyzer-store">,
4580  HelpText<"Source Code Analysis - Abstract Memory Store Models">;
4581def analyzer_store_EQ : Joined<["-"], "analyzer-store=">, Alias<analyzer_store>;
4582
4583def analyzer_constraints : Separate<["-"], "analyzer-constraints">,
4584  HelpText<"Source Code Analysis - Symbolic Constraint Engines">;
4585def analyzer_constraints_EQ : Joined<["-"], "analyzer-constraints=">,
4586  Alias<analyzer_constraints>;
4587
4588def analyzer_output : Separate<["-"], "analyzer-output">,
4589  HelpText<"Source Code Analysis - Output Options">;
4590def analyzer_output_EQ : Joined<["-"], "analyzer-output=">,
4591  Alias<analyzer_output>;
4592
4593def analyzer_purge : Separate<["-"], "analyzer-purge">,
4594  HelpText<"Source Code Analysis - Dead Symbol Removal Frequency">;
4595def analyzer_purge_EQ : Joined<["-"], "analyzer-purge=">, Alias<analyzer_purge>;
4596
4597def analyzer_opt_analyze_headers : Flag<["-"], "analyzer-opt-analyze-headers">,
4598  HelpText<"Force the static analyzer to analyze functions defined in header files">,
4599  MarshallingInfoFlag<AnalyzerOpts<"AnalyzeAll">>;
4600def analyzer_opt_analyze_nested_blocks : Flag<["-"], "analyzer-opt-analyze-nested-blocks">,
4601  HelpText<"Analyze the definitions of blocks in addition to functions">,
4602  MarshallingInfoFlag<AnalyzerOpts<"AnalyzeNestedBlocks">>;
4603def analyzer_display_progress : Flag<["-"], "analyzer-display-progress">,
4604  HelpText<"Emit verbose output about the analyzer's progress">,
4605  MarshallingInfoFlag<AnalyzerOpts<"AnalyzerDisplayProgress">>;
4606def analyze_function : Separate<["-"], "analyze-function">,
4607  HelpText<"Run analysis on specific function (for C++ include parameters in name)">,
4608  MarshallingInfoString<AnalyzerOpts<"AnalyzeSpecificFunction">>;
4609def analyze_function_EQ : Joined<["-"], "analyze-function=">, Alias<analyze_function>;
4610def trim_egraph : Flag<["-"], "trim-egraph">,
4611  HelpText<"Only show error-related paths in the analysis graph">,
4612  MarshallingInfoFlag<AnalyzerOpts<"TrimGraph">>;
4613def analyzer_viz_egraph_graphviz : Flag<["-"], "analyzer-viz-egraph-graphviz">,
4614  HelpText<"Display exploded graph using GraphViz">,
4615  MarshallingInfoFlag<AnalyzerOpts<"visualizeExplodedGraphWithGraphViz">>;
4616def analyzer_dump_egraph : Separate<["-"], "analyzer-dump-egraph">,
4617  HelpText<"Dump exploded graph to the specified file">,
4618  MarshallingInfoString<AnalyzerOpts<"DumpExplodedGraphTo">>;
4619def analyzer_dump_egraph_EQ : Joined<["-"], "analyzer-dump-egraph=">, Alias<analyzer_dump_egraph>;
4620
4621def analyzer_inline_max_stack_depth : Separate<["-"], "analyzer-inline-max-stack-depth">,
4622  HelpText<"Bound on stack depth while inlining (4 by default)">,
4623  // Cap the stack depth at 4 calls (5 stack frames, base + 4 calls).
4624  MarshallingInfoInt<AnalyzerOpts<"InlineMaxStackDepth">, "5">;
4625def analyzer_inline_max_stack_depth_EQ : Joined<["-"], "analyzer-inline-max-stack-depth=">,
4626  Alias<analyzer_inline_max_stack_depth>;
4627
4628def analyzer_inlining_mode : Separate<["-"], "analyzer-inlining-mode">,
4629  HelpText<"Specify the function selection heuristic used during inlining">;
4630def analyzer_inlining_mode_EQ : Joined<["-"], "analyzer-inlining-mode=">, Alias<analyzer_inlining_mode>;
4631
4632def analyzer_disable_retry_exhausted : Flag<["-"], "analyzer-disable-retry-exhausted">,
4633  HelpText<"Do not re-analyze paths leading to exhausted nodes with a different strategy (may decrease code coverage)">,
4634  MarshallingInfoFlag<AnalyzerOpts<"NoRetryExhausted">>;
4635
4636def analyzer_max_loop : Separate<["-"], "analyzer-max-loop">,
4637  HelpText<"The maximum number of times the analyzer will go through a loop">,
4638  MarshallingInfoInt<AnalyzerOpts<"maxBlockVisitOnPath">, "4">;
4639def analyzer_stats : Flag<["-"], "analyzer-stats">,
4640  HelpText<"Print internal analyzer statistics.">,
4641  MarshallingInfoFlag<AnalyzerOpts<"PrintStats">>;
4642
4643def analyzer_checker : Separate<["-"], "analyzer-checker">,
4644  HelpText<"Choose analyzer checkers to enable">,
4645  ValuesCode<[{
4646    const char *Values =
4647    #define GET_CHECKERS
4648    #define CHECKER(FULLNAME, CLASS, HT, DOC_URI, IS_HIDDEN)  FULLNAME ","
4649    #include "clang/StaticAnalyzer/Checkers/Checkers.inc"
4650    #undef GET_CHECKERS
4651    #define GET_PACKAGES
4652    #define PACKAGE(FULLNAME)  FULLNAME ","
4653    #include "clang/StaticAnalyzer/Checkers/Checkers.inc"
4654    #undef GET_PACKAGES
4655    ;
4656  }]>;
4657def analyzer_checker_EQ : Joined<["-"], "analyzer-checker=">,
4658  Alias<analyzer_checker>;
4659
4660def analyzer_disable_checker : Separate<["-"], "analyzer-disable-checker">,
4661  HelpText<"Choose analyzer checkers to disable">;
4662def analyzer_disable_checker_EQ : Joined<["-"], "analyzer-disable-checker=">,
4663  Alias<analyzer_disable_checker>;
4664
4665def analyzer_disable_all_checks : Flag<["-"], "analyzer-disable-all-checks">,
4666  HelpText<"Disable all static analyzer checks">,
4667  MarshallingInfoFlag<AnalyzerOpts<"DisableAllCheckers">>;
4668
4669def analyzer_checker_help : Flag<["-"], "analyzer-checker-help">,
4670  HelpText<"Display the list of analyzer checkers that are available">,
4671  MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerHelp">>;
4672
4673def analyzer_checker_help_alpha : Flag<["-"], "analyzer-checker-help-alpha">,
4674  HelpText<"Display the list of in development analyzer checkers. These "
4675           "are NOT considered safe, they are unstable and will emit incorrect "
4676           "reports. Enable ONLY FOR DEVELOPMENT purposes">,
4677  MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerHelpAlpha">>;
4678
4679def analyzer_checker_help_developer : Flag<["-"], "analyzer-checker-help-developer">,
4680  HelpText<"Display the list of developer-only checkers such as modeling "
4681           "and debug checkers">,
4682  MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerHelpDeveloper">>;
4683
4684def analyzer_config_help : Flag<["-"], "analyzer-config-help">,
4685  HelpText<"Display the list of -analyzer-config options. These are meant for "
4686           "development purposes only!">,
4687  MarshallingInfoFlag<AnalyzerOpts<"ShowConfigOptionsList">>;
4688
4689def analyzer_list_enabled_checkers : Flag<["-"], "analyzer-list-enabled-checkers">,
4690  HelpText<"Display the list of enabled analyzer checkers">,
4691  MarshallingInfoFlag<AnalyzerOpts<"ShowEnabledCheckerList">>;
4692
4693def analyzer_config : Separate<["-"], "analyzer-config">,
4694  HelpText<"Choose analyzer options to enable">;
4695
4696def analyzer_checker_option_help : Flag<["-"], "analyzer-checker-option-help">,
4697  HelpText<"Display the list of checker and package options">,
4698  MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionList">>;
4699
4700def analyzer_checker_option_help_alpha : Flag<["-"], "analyzer-checker-option-help-alpha">,
4701  HelpText<"Display the list of in development checker and package options. "
4702           "These are NOT considered safe, they are unstable and will emit "
4703           "incorrect reports. Enable ONLY FOR DEVELOPMENT purposes">,
4704  MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionAlphaList">>;
4705
4706def analyzer_checker_option_help_developer : Flag<["-"], "analyzer-checker-option-help-developer">,
4707  HelpText<"Display the list of checker and package options meant for "
4708           "development purposes only">,
4709  MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionDeveloperList">>;
4710
4711def analyzer_config_compatibility_mode : Separate<["-"], "analyzer-config-compatibility-mode">,
4712  HelpText<"Don't emit errors on invalid analyzer-config inputs">,
4713  Values<"true,false">, NormalizedValues<[[{false}], [{true}]]>,
4714  MarshallingInfoEnum<AnalyzerOpts<"ShouldEmitErrorsOnInvalidConfigValue">, [{true}]>;
4715
4716def analyzer_config_compatibility_mode_EQ : Joined<["-"], "analyzer-config-compatibility-mode=">,
4717  Alias<analyzer_config_compatibility_mode>;
4718
4719def analyzer_werror : Flag<["-"], "analyzer-werror">,
4720  HelpText<"Emit analyzer results as errors rather than warnings">,
4721  MarshallingInfoFlag<AnalyzerOpts<"AnalyzerWerror">>;
4722
4723//===----------------------------------------------------------------------===//
4724// Migrator Options
4725//===----------------------------------------------------------------------===//
4726def migrator_no_nsalloc_error : Flag<["-"], "no-ns-alloc-error">,
4727  HelpText<"Do not error on use of NSAllocateCollectable/NSReallocateCollectable">,
4728  MarshallingInfoFlag<MigratorOpts<"NoNSAllocReallocError">>;
4729
4730def migrator_no_finalize_removal : Flag<["-"], "no-finalize-removal">,
4731  HelpText<"Do not remove finalize method in gc mode">,
4732  MarshallingInfoFlag<MigratorOpts<"NoFinalizeRemoval">>;
4733
4734//===----------------------------------------------------------------------===//
4735// CodeGen Options
4736//===----------------------------------------------------------------------===//
4737
4738let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
4739def debug_info_kind_EQ : Joined<["-"], "debug-info-kind=">;
4740def debug_info_macro : Flag<["-"], "debug-info-macro">,
4741  HelpText<"Emit macro debug information">,
4742  MarshallingInfoFlag<CodeGenOpts<"MacroDebugInfo">>;
4743def default_function_attr : Separate<["-"], "default-function-attr">,
4744  HelpText<"Apply given attribute to all functions">,
4745  MarshallingInfoStringVector<CodeGenOpts<"DefaultFunctionAttrs">>;
4746def dwarf_version_EQ : Joined<["-"], "dwarf-version=">,
4747  MarshallingInfoInt<CodeGenOpts<"DwarfVersion">>;
4748def debugger_tuning_EQ : Joined<["-"], "debugger-tuning=">,
4749  Values<"gdb,lldb,sce,dbx">,
4750  NormalizedValuesScope<"llvm::DebuggerKind">, NormalizedValues<["GDB", "LLDB", "SCE", "DBX"]>,
4751  MarshallingInfoEnum<CodeGenOpts<"DebuggerTuning">, "Default">;
4752def dwarf_debug_flags : Separate<["-"], "dwarf-debug-flags">,
4753  HelpText<"The string to embed in the Dwarf debug flags record.">,
4754  MarshallingInfoString<CodeGenOpts<"DwarfDebugFlags">>;
4755def record_command_line : Separate<["-"], "record-command-line">,
4756  HelpText<"The string to embed in the .LLVM.command.line section.">,
4757  MarshallingInfoString<CodeGenOpts<"RecordCommandLine">>;
4758def compress_debug_sections_EQ : Joined<["-", "--"], "compress-debug-sections=">,
4759    HelpText<"DWARF debug sections compression type">, Values<"none,zlib,zlib-gnu">,
4760    NormalizedValuesScope<"llvm::DebugCompressionType">, NormalizedValues<["None", "Z", "GNU"]>,
4761    MarshallingInfoEnum<CodeGenOpts<"CompressDebugSections">, "None">;
4762def compress_debug_sections : Flag<["-", "--"], "compress-debug-sections">,
4763  Alias<compress_debug_sections_EQ>, AliasArgs<["zlib"]>;
4764def mno_exec_stack : Flag<["-"], "mnoexecstack">,
4765  HelpText<"Mark the file as not needing an executable stack">,
4766  MarshallingInfoFlag<CodeGenOpts<"NoExecStack">>;
4767def massembler_no_warn : Flag<["-"], "massembler-no-warn">,
4768  HelpText<"Make assembler not emit warnings">,
4769  MarshallingInfoFlag<CodeGenOpts<"NoWarn">>;
4770def massembler_fatal_warnings : Flag<["-"], "massembler-fatal-warnings">,
4771  HelpText<"Make assembler warnings fatal">,
4772  MarshallingInfoFlag<CodeGenOpts<"FatalWarnings">>;
4773def mrelax_relocations : Flag<["--"], "mrelax-relocations">,
4774    HelpText<"Use relaxable elf relocations">,
4775    MarshallingInfoFlag<CodeGenOpts<"RelaxELFRelocations">>;
4776def msave_temp_labels : Flag<["-"], "msave-temp-labels">,
4777  HelpText<"Save temporary labels in the symbol table. "
4778           "Note this may change .s semantics and shouldn't generally be used "
4779           "on compiler-generated code.">,
4780  MarshallingInfoFlag<CodeGenOpts<"SaveTempLabels">>;
4781def mrelocation_model : Separate<["-"], "mrelocation-model">,
4782  HelpText<"The relocation model to use">, Values<"static,pic,ropi,rwpi,ropi-rwpi,dynamic-no-pic">,
4783  NormalizedValuesScope<"llvm::Reloc">,
4784  NormalizedValues<["Static", "PIC_", "ROPI", "RWPI", "ROPI_RWPI", "DynamicNoPIC"]>,
4785  MarshallingInfoEnum<CodeGenOpts<"RelocationModel">, "PIC_">;
4786def fno_math_builtin : Flag<["-"], "fno-math-builtin">,
4787  HelpText<"Disable implicit builtin knowledge of math functions">,
4788  MarshallingInfoFlag<LangOpts<"NoMathBuiltin">>;
4789def fuse_ctor_homing: Flag<["-"], "fuse-ctor-homing">,
4790    HelpText<"Use constructor homing if we are using limited debug info already">;
4791}
4792
4793def disable_llvm_verifier : Flag<["-"], "disable-llvm-verifier">,
4794  HelpText<"Don't run the LLVM IR verifier pass">,
4795  MarshallingInfoNegativeFlag<CodeGenOpts<"VerifyModule">>;
4796def disable_llvm_passes : Flag<["-"], "disable-llvm-passes">,
4797  HelpText<"Use together with -emit-llvm to get pristine LLVM IR from the "
4798           "frontend by not running any LLVM passes at all">,
4799  MarshallingInfoFlag<CodeGenOpts<"DisableLLVMPasses">>;
4800def disable_llvm_optzns : Flag<["-"], "disable-llvm-optzns">,
4801  Alias<disable_llvm_passes>;
4802def disable_lifetimemarkers : Flag<["-"], "disable-lifetime-markers">,
4803  HelpText<"Disable lifetime-markers emission even when optimizations are "
4804           "enabled">,
4805  MarshallingInfoFlag<CodeGenOpts<"DisableLifetimeMarkers">>;
4806def disable_O0_optnone : Flag<["-"], "disable-O0-optnone">,
4807  HelpText<"Disable adding the optnone attribute to functions at O0">,
4808  MarshallingInfoFlag<CodeGenOpts<"DisableO0ImplyOptNone">>;
4809def disable_red_zone : Flag<["-"], "disable-red-zone">,
4810  HelpText<"Do not emit code that uses the red zone.">,
4811  MarshallingInfoFlag<CodeGenOpts<"DisableRedZone">>;
4812def dwarf_ext_refs : Flag<["-"], "dwarf-ext-refs">,
4813  HelpText<"Generate debug info with external references to clang modules"
4814           " or precompiled headers">,
4815  MarshallingInfoFlag<CodeGenOpts<"DebugTypeExtRefs">>;
4816def dwarf_explicit_import : Flag<["-"], "dwarf-explicit-import">,
4817  HelpText<"Generate explicit import from anonymous namespace to containing"
4818           " scope">,
4819  MarshallingInfoFlag<CodeGenOpts<"DebugExplicitImport">>;
4820def debug_forward_template_params : Flag<["-"], "debug-forward-template-params">,
4821  HelpText<"Emit complete descriptions of template parameters in forward"
4822           " declarations">,
4823  MarshallingInfoFlag<CodeGenOpts<"DebugFwdTemplateParams">>;
4824def fforbid_guard_variables : Flag<["-"], "fforbid-guard-variables">,
4825  HelpText<"Emit an error if a C++ static local initializer would need a guard variable">,
4826  MarshallingInfoFlag<CodeGenOpts<"ForbidGuardVariables">>;
4827def no_implicit_float : Flag<["-"], "no-implicit-float">,
4828  HelpText<"Don't generate implicit floating point instructions">,
4829  MarshallingInfoFlag<CodeGenOpts<"NoImplicitFloat">>;
4830def fdump_vtable_layouts : Flag<["-"], "fdump-vtable-layouts">,
4831  HelpText<"Dump the layouts of all vtables that will be emitted in a translation unit">,
4832  MarshallingInfoFlag<LangOpts<"DumpVTableLayouts">>;
4833def fmerge_functions : Flag<["-"], "fmerge-functions">,
4834  HelpText<"Permit merging of identical functions when optimizing.">,
4835  MarshallingInfoFlag<CodeGenOpts<"MergeFunctions">>;
4836def coverage_data_file : Separate<["-"], "coverage-data-file">,
4837  HelpText<"Emit coverage data to this filename.">,
4838  MarshallingInfoString<CodeGenOpts<"CoverageDataFile">>,
4839  ShouldParseIf<!strconcat(fprofile_arcs.KeyPath, "||", ftest_coverage.KeyPath)>;
4840def coverage_data_file_EQ : Joined<["-"], "coverage-data-file=">,
4841  Alias<coverage_data_file>;
4842def coverage_notes_file : Separate<["-"], "coverage-notes-file">,
4843  HelpText<"Emit coverage notes to this filename.">,
4844  MarshallingInfoString<CodeGenOpts<"CoverageNotesFile">>,
4845  ShouldParseIf<!strconcat(fprofile_arcs.KeyPath, "||", ftest_coverage.KeyPath)>;
4846def coverage_notes_file_EQ : Joined<["-"], "coverage-notes-file=">,
4847  Alias<coverage_notes_file>;
4848def coverage_version_EQ : Joined<["-"], "coverage-version=">,
4849  HelpText<"Four-byte version string for gcov files.">;
4850def dump_coverage_mapping : Flag<["-"], "dump-coverage-mapping">,
4851  HelpText<"Dump the coverage mapping records, for testing">,
4852  MarshallingInfoFlag<CodeGenOpts<"DumpCoverageMapping">>;
4853def fuse_register_sized_bitfield_access: Flag<["-"], "fuse-register-sized-bitfield-access">,
4854  HelpText<"Use register sized accesses to bit-fields, when possible.">,
4855  MarshallingInfoFlag<CodeGenOpts<"UseRegisterSizedBitfieldAccess">>;
4856def relaxed_aliasing : Flag<["-"], "relaxed-aliasing">,
4857  HelpText<"Turn off Type Based Alias Analysis">,
4858  MarshallingInfoFlag<CodeGenOpts<"RelaxedAliasing">>;
4859def no_struct_path_tbaa : Flag<["-"], "no-struct-path-tbaa">,
4860  HelpText<"Turn off struct-path aware Type Based Alias Analysis">,
4861  MarshallingInfoNegativeFlag<CodeGenOpts<"StructPathTBAA">>;
4862def new_struct_path_tbaa : Flag<["-"], "new-struct-path-tbaa">,
4863  HelpText<"Enable enhanced struct-path aware Type Based Alias Analysis">;
4864def mdebug_pass : Separate<["-"], "mdebug-pass">,
4865  HelpText<"Enable additional debug output">,
4866  MarshallingInfoString<CodeGenOpts<"DebugPass">>;
4867def mframe_pointer_EQ : Joined<["-"], "mframe-pointer=">,
4868  HelpText<"Specify which frame pointers to retain (all, non-leaf, none).">, Values<"all,non-leaf,none">,
4869  NormalizedValuesScope<"CodeGenOptions::FramePointerKind">, NormalizedValues<["All", "NonLeaf", "None"]>,
4870  MarshallingInfoEnum<CodeGenOpts<"FramePointer">, "None">;
4871def mdisable_tail_calls : Flag<["-"], "mdisable-tail-calls">,
4872  HelpText<"Disable tail call optimization, keeping the call stack accurate">,
4873  MarshallingInfoFlag<CodeGenOpts<"DisableTailCalls">>;
4874def menable_no_infinities : Flag<["-"], "menable-no-infs">,
4875  HelpText<"Allow optimization to assume there are no infinities.">,
4876  MarshallingInfoFlag<LangOpts<"NoHonorInfs">>, ImpliedByAnyOf<[ffinite_math_only.KeyPath]>;
4877def menable_no_nans : Flag<["-"], "menable-no-nans">,
4878  HelpText<"Allow optimization to assume there are no NaNs.">,
4879  MarshallingInfoFlag<LangOpts<"NoHonorNaNs">>, ImpliedByAnyOf<[ffinite_math_only.KeyPath]>;
4880def mreassociate : Flag<["-"], "mreassociate">,
4881  HelpText<"Allow reassociation transformations for floating-point instructions">,
4882  MarshallingInfoFlag<LangOpts<"AllowFPReassoc">>, ImpliedByAnyOf<[menable_unsafe_fp_math.KeyPath]>;
4883def mabi_EQ_ieeelongdouble : Flag<["-"], "mabi=ieeelongdouble">,
4884  HelpText<"Use IEEE 754 quadruple-precision for long double">,
4885  MarshallingInfoFlag<LangOpts<"PPCIEEELongDouble">>;
4886def mfloat_abi : Separate<["-"], "mfloat-abi">,
4887  HelpText<"The float ABI to use">,
4888  MarshallingInfoString<CodeGenOpts<"FloatABI">>;
4889def mtp : Separate<["-"], "mtp">,
4890  HelpText<"Mode for reading thread pointer">;
4891def mlimit_float_precision : Separate<["-"], "mlimit-float-precision">,
4892  HelpText<"Limit float precision to the given value">,
4893  MarshallingInfoString<CodeGenOpts<"LimitFloatPrecision">>;
4894def mregparm : Separate<["-"], "mregparm">,
4895  HelpText<"Limit the number of registers available for integer arguments">,
4896  MarshallingInfoInt<CodeGenOpts<"NumRegisterParameters">>;
4897def msmall_data_limit : Separate<["-"], "msmall-data-limit">,
4898  HelpText<"Put global and static data smaller than the limit into a special section">,
4899  MarshallingInfoInt<CodeGenOpts<"SmallDataLimit">>;
4900def munwind_tables : Flag<["-"], "munwind-tables">,
4901  HelpText<"Generate unwinding tables for all functions">,
4902  MarshallingInfoFlag<CodeGenOpts<"UnwindTables">>;
4903def mconstructor_aliases : Flag<["-"], "mconstructor-aliases">,
4904  HelpText<"Emit complete constructors and destructors as aliases when possible">,
4905  MarshallingInfoFlag<CodeGenOpts<"CXXCtorDtorAliases">>;
4906def mlink_bitcode_file : Separate<["-"], "mlink-bitcode-file">,
4907  HelpText<"Link the given bitcode file before performing optimizations.">;
4908def mlink_builtin_bitcode : Separate<["-"], "mlink-builtin-bitcode">,
4909  HelpText<"Link and internalize needed symbols from the given bitcode file "
4910           "before performing optimizations.">;
4911def mlink_cuda_bitcode : Separate<["-"], "mlink-cuda-bitcode">,
4912  Alias<mlink_builtin_bitcode>;
4913def vectorize_loops : Flag<["-"], "vectorize-loops">,
4914  HelpText<"Run the Loop vectorization passes">,
4915  MarshallingInfoFlag<CodeGenOpts<"VectorizeLoop">>;
4916def vectorize_slp : Flag<["-"], "vectorize-slp">,
4917  HelpText<"Run the SLP vectorization passes">,
4918  MarshallingInfoFlag<CodeGenOpts<"VectorizeSLP">>;
4919def dependent_lib : Joined<["--"], "dependent-lib=">,
4920  HelpText<"Add dependent library">,
4921  MarshallingInfoStringVector<CodeGenOpts<"DependentLibraries">>;
4922def linker_option : Joined<["--"], "linker-option=">,
4923  HelpText<"Add linker option">,
4924  MarshallingInfoStringVector<CodeGenOpts<"LinkerOptions">>;
4925def fsanitize_coverage_type : Joined<["-"], "fsanitize-coverage-type=">,
4926                              HelpText<"Sanitizer coverage type">,
4927                              MarshallingInfoInt<CodeGenOpts<"SanitizeCoverageType">>;
4928def fsanitize_coverage_indirect_calls
4929    : Flag<["-"], "fsanitize-coverage-indirect-calls">,
4930      HelpText<"Enable sanitizer coverage for indirect calls">,
4931      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageIndirectCalls">>;
4932def fsanitize_coverage_trace_bb
4933    : Flag<["-"], "fsanitize-coverage-trace-bb">,
4934      HelpText<"Enable basic block tracing in sanitizer coverage">,
4935      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceBB">>;
4936def fsanitize_coverage_trace_cmp
4937    : Flag<["-"], "fsanitize-coverage-trace-cmp">,
4938      HelpText<"Enable cmp instruction tracing in sanitizer coverage">,
4939      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceCmp">>;
4940def fsanitize_coverage_trace_div
4941    : Flag<["-"], "fsanitize-coverage-trace-div">,
4942      HelpText<"Enable div instruction tracing in sanitizer coverage">,
4943      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceDiv">>;
4944def fsanitize_coverage_trace_gep
4945    : Flag<["-"], "fsanitize-coverage-trace-gep">,
4946      HelpText<"Enable gep instruction tracing in sanitizer coverage">,
4947      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceGep">>;
4948def fsanitize_coverage_8bit_counters
4949    : Flag<["-"], "fsanitize-coverage-8bit-counters">,
4950      HelpText<"Enable frequency counters in sanitizer coverage">,
4951      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverage8bitCounters">>;
4952def fsanitize_coverage_inline_8bit_counters
4953    : Flag<["-"], "fsanitize-coverage-inline-8bit-counters">,
4954      HelpText<"Enable inline 8-bit counters in sanitizer coverage">,
4955      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageInline8bitCounters">>;
4956def fsanitize_coverage_inline_bool_flag
4957    : Flag<["-"], "fsanitize-coverage-inline-bool-flag">,
4958      HelpText<"Enable inline bool flag in sanitizer coverage">,
4959      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageInlineBoolFlag">>;
4960def fsanitize_coverage_pc_table
4961    : Flag<["-"], "fsanitize-coverage-pc-table">,
4962      HelpText<"Create a table of coverage-instrumented PCs">,
4963      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoveragePCTable">>;
4964def fsanitize_coverage_trace_pc
4965    : Flag<["-"], "fsanitize-coverage-trace-pc">,
4966      HelpText<"Enable PC tracing in sanitizer coverage">,
4967      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTracePC">>;
4968def fsanitize_coverage_trace_pc_guard
4969    : Flag<["-"], "fsanitize-coverage-trace-pc-guard">,
4970      HelpText<"Enable PC tracing with guard in sanitizer coverage">,
4971      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTracePCGuard">>;
4972def fsanitize_coverage_no_prune
4973    : Flag<["-"], "fsanitize-coverage-no-prune">,
4974      HelpText<"Disable coverage pruning (i.e. instrument all blocks/edges)">,
4975      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageNoPrune">>;
4976def fsanitize_coverage_stack_depth
4977    : Flag<["-"], "fsanitize-coverage-stack-depth">,
4978      HelpText<"Enable max stack depth tracing">,
4979      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageStackDepth">>;
4980def fpatchable_function_entry_offset_EQ
4981    : Joined<["-"], "fpatchable-function-entry-offset=">, MetaVarName<"<M>">,
4982      HelpText<"Generate M NOPs before function entry">,
4983      MarshallingInfoInt<CodeGenOpts<"PatchableFunctionEntryOffset">>;
4984def fprofile_instrument_EQ : Joined<["-"], "fprofile-instrument=">,
4985    HelpText<"Enable PGO instrumentation. The accepted value is clang, llvm, "
4986             "or none">, Values<"none,clang,llvm,csllvm">,
4987    NormalizedValuesScope<"CodeGenOptions">,
4988    NormalizedValues<["ProfileNone", "ProfileClangInstr", "ProfileIRInstr", "ProfileCSIRInstr"]>,
4989    MarshallingInfoEnum<CodeGenOpts<"ProfileInstr">, "ProfileNone">;
4990def fprofile_instrument_path_EQ : Joined<["-"], "fprofile-instrument-path=">,
4991    HelpText<"Generate instrumented code to collect execution counts into "
4992             "<file> (overridden by LLVM_PROFILE_FILE env var)">,
4993    MarshallingInfoString<CodeGenOpts<"InstrProfileOutput">>;
4994def fprofile_instrument_use_path_EQ :
4995    Joined<["-"], "fprofile-instrument-use-path=">,
4996    HelpText<"Specify the profile path in PGO use compilation">,
4997    MarshallingInfoString<CodeGenOpts<"ProfileInstrumentUsePath">>;
4998def flto_visibility_public_std:
4999    Flag<["-"], "flto-visibility-public-std">,
5000    HelpText<"Use public LTO visibility for classes in std and stdext namespaces">,
5001    MarshallingInfoFlag<CodeGenOpts<"LTOVisibilityPublicStd">>;
5002defm lto_unit : BoolOption<"f", "lto-unit",
5003  CodeGenOpts<"LTOUnit">, DefaultFalse,
5004  PosFlag<SetTrue, [CC1Option], "Emit IR to support LTO unit features (CFI, whole program vtable opt)">,
5005  NegFlag<SetFalse>>;
5006defm debug_pass_manager : BoolOption<"f", "debug-pass-manager",
5007  CodeGenOpts<"DebugPassManager">, DefaultFalse,
5008  PosFlag<SetTrue, [], "Prints debug information for the new pass manager">,
5009  NegFlag<SetFalse, [], "Disables debug printing for the new pass manager">>;
5010def fexperimental_debug_variable_locations : Flag<["-"],
5011    "fexperimental-debug-variable-locations">,
5012    HelpText<"Use experimental new value-tracking variable locations">,
5013    MarshallingInfoFlag<CodeGenOpts<"ValueTrackingVariableLocations">>;
5014def fverify_debuginfo_preserve
5015    : Flag<["-"], "fverify-debuginfo-preserve">,
5016      HelpText<"Enable Debug Info Metadata preservation testing in "
5017               "optimizations.">,
5018      MarshallingInfoFlag<CodeGenOpts<"EnableDIPreservationVerify">>;
5019def fverify_debuginfo_preserve_export
5020    : Joined<["-"], "fverify-debuginfo-preserve-export=">,
5021      MetaVarName<"<file>">,
5022      HelpText<"Export debug info (by testing original Debug Info) failures "
5023               "into specified (JSON) file (should be abs path as we use "
5024               "append mode to insert new JSON objects).">,
5025      MarshallingInfoString<CodeGenOpts<"DIBugsReportFilePath">>;
5026// The driver option takes the key as a parameter to the -msign-return-address=
5027// and -mbranch-protection= options, but CC1 has a separate option so we
5028// don't have to parse the parameter twice.
5029def msign_return_address_key_EQ : Joined<["-"], "msign-return-address-key=">,
5030    Values<"a_key,b_key">;
5031def mbranch_target_enforce : Flag<["-"], "mbranch-target-enforce">,
5032  MarshallingInfoFlag<LangOpts<"BranchTargetEnforcement">>;
5033def fno_dllexport_inlines : Flag<["-"], "fno-dllexport-inlines">,
5034  MarshallingInfoNegativeFlag<LangOpts<"DllExportInlines">>;
5035def cfguard_no_checks : Flag<["-"], "cfguard-no-checks">,
5036    HelpText<"Emit Windows Control Flow Guard tables only (no checks)">,
5037    MarshallingInfoFlag<CodeGenOpts<"ControlFlowGuardNoChecks">>;
5038def cfguard : Flag<["-"], "cfguard">,
5039    HelpText<"Emit Windows Control Flow Guard tables and checks">,
5040    MarshallingInfoFlag<CodeGenOpts<"ControlFlowGuard">>;
5041def ehcontguard : Flag<["-"], "ehcontguard">,
5042    HelpText<"Emit Windows EH Continuation Guard tables">,
5043    MarshallingInfoFlag<CodeGenOpts<"EHContGuard">>;
5044
5045def fdenormal_fp_math_f32_EQ : Joined<["-"], "fdenormal-fp-math-f32=">,
5046   Group<f_Group>;
5047
5048//===----------------------------------------------------------------------===//
5049// Dependency Output Options
5050//===----------------------------------------------------------------------===//
5051
5052def sys_header_deps : Flag<["-"], "sys-header-deps">,
5053  HelpText<"Include system headers in dependency output">,
5054  MarshallingInfoFlag<DependencyOutputOpts<"IncludeSystemHeaders">>;
5055def module_file_deps : Flag<["-"], "module-file-deps">,
5056  HelpText<"Include module files in dependency output">,
5057  MarshallingInfoFlag<DependencyOutputOpts<"IncludeModuleFiles">>;
5058def header_include_file : Separate<["-"], "header-include-file">,
5059  HelpText<"Filename (or -) to write header include output to">,
5060  MarshallingInfoString<DependencyOutputOpts<"HeaderIncludeOutputFile">>;
5061def show_includes : Flag<["--"], "show-includes">,
5062  HelpText<"Print cl.exe style /showIncludes to stdout">;
5063
5064//===----------------------------------------------------------------------===//
5065// Diagnostic Options
5066//===----------------------------------------------------------------------===//
5067
5068def diagnostic_log_file : Separate<["-"], "diagnostic-log-file">,
5069  HelpText<"Filename (or -) to log diagnostics to">,
5070  MarshallingInfoString<DiagnosticOpts<"DiagnosticLogFile">>;
5071def diagnostic_serialized_file : Separate<["-"], "serialize-diagnostic-file">,
5072  MetaVarName<"<filename>">,
5073  HelpText<"File for serializing diagnostics in a binary format">;
5074
5075def fdiagnostics_format : Separate<["-"], "fdiagnostics-format">,
5076  HelpText<"Change diagnostic formatting to match IDE and command line tools">, Values<"clang,msvc,vi">,
5077  NormalizedValuesScope<"DiagnosticOptions">, NormalizedValues<["Clang", "MSVC", "Vi"]>,
5078  MarshallingInfoEnum<DiagnosticOpts<"Format">, "Clang">;
5079def fdiagnostics_show_category : Separate<["-"], "fdiagnostics-show-category">,
5080  HelpText<"Print diagnostic category">, Values<"none,id,name">,
5081  NormalizedValues<["0", "1", "2"]>,
5082  MarshallingInfoEnum<DiagnosticOpts<"ShowCategories">, "0">;
5083def fno_diagnostics_use_presumed_location : Flag<["-"], "fno-diagnostics-use-presumed-location">,
5084  HelpText<"Ignore #line directives when displaying diagnostic locations">,
5085  MarshallingInfoNegativeFlag<DiagnosticOpts<"ShowPresumedLoc">>;
5086def ftabstop : Separate<["-"], "ftabstop">, MetaVarName<"<N>">,
5087  HelpText<"Set the tab stop distance.">,
5088  MarshallingInfoInt<DiagnosticOpts<"TabStop">, "DiagnosticOptions::DefaultTabStop">;
5089def ferror_limit : Separate<["-"], "ferror-limit">, MetaVarName<"<N>">,
5090  HelpText<"Set the maximum number of errors to emit before stopping (0 = no limit).">,
5091  MarshallingInfoInt<DiagnosticOpts<"ErrorLimit">>;
5092def fmacro_backtrace_limit : Separate<["-"], "fmacro-backtrace-limit">, MetaVarName<"<N>">,
5093  HelpText<"Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit).">,
5094  MarshallingInfoInt<DiagnosticOpts<"MacroBacktraceLimit">, "DiagnosticOptions::DefaultMacroBacktraceLimit">;
5095def ftemplate_backtrace_limit : Separate<["-"], "ftemplate-backtrace-limit">, MetaVarName<"<N>">,
5096  HelpText<"Set the maximum number of entries to print in a template instantiation backtrace (0 = no limit).">,
5097  MarshallingInfoInt<DiagnosticOpts<"TemplateBacktraceLimit">, "DiagnosticOptions::DefaultTemplateBacktraceLimit">;
5098def fconstexpr_backtrace_limit : Separate<["-"], "fconstexpr-backtrace-limit">, MetaVarName<"<N>">,
5099  HelpText<"Set the maximum number of entries to print in a constexpr evaluation backtrace (0 = no limit).">,
5100  MarshallingInfoInt<DiagnosticOpts<"ConstexprBacktraceLimit">, "DiagnosticOptions::DefaultConstexprBacktraceLimit">;
5101def fspell_checking_limit : Separate<["-"], "fspell-checking-limit">, MetaVarName<"<N>">,
5102  HelpText<"Set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit).">,
5103  MarshallingInfoInt<DiagnosticOpts<"SpellCheckingLimit">, "DiagnosticOptions::DefaultSpellCheckingLimit">;
5104def fcaret_diagnostics_max_lines :
5105  Separate<["-"], "fcaret-diagnostics-max-lines">, MetaVarName<"<N>">,
5106  HelpText<"Set the maximum number of source lines to show in a caret diagnostic">,
5107  MarshallingInfoInt<DiagnosticOpts<"SnippetLineLimit">, "DiagnosticOptions::DefaultSnippetLineLimit">;
5108def verify_EQ : CommaJoined<["-"], "verify=">,
5109  MetaVarName<"<prefixes>">,
5110  HelpText<"Verify diagnostic output using comment directives that start with"
5111           " prefixes in the comma-separated sequence <prefixes>">;
5112def verify : Flag<["-"], "verify">,
5113  HelpText<"Equivalent to -verify=expected">;
5114def verify_ignore_unexpected : Flag<["-"], "verify-ignore-unexpected">,
5115  HelpText<"Ignore unexpected diagnostic messages">;
5116def verify_ignore_unexpected_EQ : CommaJoined<["-"], "verify-ignore-unexpected=">,
5117  HelpText<"Ignore unexpected diagnostic messages">;
5118def Wno_rewrite_macros : Flag<["-"], "Wno-rewrite-macros">,
5119  HelpText<"Silence ObjC rewriting warnings">,
5120  MarshallingInfoFlag<DiagnosticOpts<"NoRewriteMacros">>;
5121
5122//===----------------------------------------------------------------------===//
5123// Frontend Options
5124//===----------------------------------------------------------------------===//
5125
5126// This isn't normally used, it is just here so we can parse a
5127// CompilerInvocation out of a driver-derived argument vector.
5128def cc1 : Flag<["-"], "cc1">;
5129def cc1as : Flag<["-"], "cc1as">;
5130
5131def ast_merge : Separate<["-"], "ast-merge">,
5132  MetaVarName<"<ast file>">,
5133  HelpText<"Merge the given AST file into the translation unit being compiled.">,
5134  MarshallingInfoStringVector<FrontendOpts<"ASTMergeFiles">>;
5135def aux_target_cpu : Separate<["-"], "aux-target-cpu">,
5136  HelpText<"Target a specific auxiliary cpu type">;
5137def aux_target_feature : Separate<["-"], "aux-target-feature">,
5138  HelpText<"Target specific auxiliary attributes">;
5139def aux_triple : Separate<["-"], "aux-triple">,
5140  HelpText<"Auxiliary target triple.">,
5141  MarshallingInfoString<FrontendOpts<"AuxTriple">>;
5142def code_completion_at : Separate<["-"], "code-completion-at">,
5143  MetaVarName<"<file>:<line>:<column>">,
5144  HelpText<"Dump code-completion information at a location">;
5145def remap_file : Separate<["-"], "remap-file">,
5146  MetaVarName<"<from>;<to>">,
5147  HelpText<"Replace the contents of the <from> file with the contents of the <to> file">;
5148def code_completion_at_EQ : Joined<["-"], "code-completion-at=">,
5149  Alias<code_completion_at>;
5150def code_completion_macros : Flag<["-"], "code-completion-macros">,
5151  HelpText<"Include macros in code-completion results">,
5152  MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeMacros">>;
5153def code_completion_patterns : Flag<["-"], "code-completion-patterns">,
5154  HelpText<"Include code patterns in code-completion results">,
5155  MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeCodePatterns">>;
5156def no_code_completion_globals : Flag<["-"], "no-code-completion-globals">,
5157  HelpText<"Do not include global declarations in code-completion results.">,
5158  MarshallingInfoNegativeFlag<FrontendOpts<"CodeCompleteOpts.IncludeGlobals">>;
5159def no_code_completion_ns_level_decls : Flag<["-"], "no-code-completion-ns-level-decls">,
5160  HelpText<"Do not include declarations inside namespaces (incl. global namespace) in the code-completion results.">,
5161  MarshallingInfoNegativeFlag<FrontendOpts<"CodeCompleteOpts.IncludeNamespaceLevelDecls">>;
5162def code_completion_brief_comments : Flag<["-"], "code-completion-brief-comments">,
5163  HelpText<"Include brief documentation comments in code-completion results.">,
5164  MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeBriefComments">>;
5165def code_completion_with_fixits : Flag<["-"], "code-completion-with-fixits">,
5166  HelpText<"Include code completion results which require small fix-its.">,
5167  MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeFixIts">>;
5168def disable_free : Flag<["-"], "disable-free">,
5169  HelpText<"Disable freeing of memory on exit">,
5170  MarshallingInfoFlag<FrontendOpts<"DisableFree">>;
5171def enable_noundef_analysis : Flag<["-"], "enable-noundef-analysis">, Group<f_Group>,
5172  HelpText<"Enable analyzing function argument and return types for mandatory definedness">,
5173  MarshallingInfoFlag<CodeGenOpts<"EnableNoundefAttrs">>;
5174def discard_value_names : Flag<["-"], "discard-value-names">,
5175  HelpText<"Discard value names in LLVM IR">,
5176  MarshallingInfoFlag<CodeGenOpts<"DiscardValueNames">>;
5177def load : Separate<["-"], "load">, MetaVarName<"<dsopath>">,
5178  HelpText<"Load the named plugin (dynamic shared object)">;
5179def plugin : Separate<["-"], "plugin">, MetaVarName<"<name>">,
5180  HelpText<"Use the named plugin action instead of the default action (use \"help\" to list available options)">;
5181def plugin_arg : JoinedAndSeparate<["-"], "plugin-arg-">,
5182    MetaVarName<"<name> <arg>">,
5183    HelpText<"Pass <arg> to plugin <name>">;
5184def add_plugin : Separate<["-"], "add-plugin">, MetaVarName<"<name>">,
5185  HelpText<"Use the named plugin action in addition to the default action">,
5186  MarshallingInfoStringVector<FrontendOpts<"AddPluginActions">>;
5187def ast_dump_filter : Separate<["-"], "ast-dump-filter">,
5188  MetaVarName<"<dump_filter>">,
5189  HelpText<"Use with -ast-dump or -ast-print to dump/print only AST declaration"
5190           " nodes having a certain substring in a qualified name. Use"
5191           " -ast-list to list all filterable declaration node names.">,
5192  MarshallingInfoString<FrontendOpts<"ASTDumpFilter">>;
5193def fno_modules_global_index : Flag<["-"], "fno-modules-global-index">,
5194  HelpText<"Do not automatically generate or update the global module index">,
5195  MarshallingInfoNegativeFlag<FrontendOpts<"UseGlobalModuleIndex">>;
5196def fno_modules_error_recovery : Flag<["-"], "fno-modules-error-recovery">,
5197  HelpText<"Do not automatically import modules for error recovery">,
5198  MarshallingInfoNegativeFlag<LangOpts<"ModulesErrorRecovery">>;
5199def fmodule_map_file_home_is_cwd : Flag<["-"], "fmodule-map-file-home-is-cwd">,
5200  HelpText<"Use the current working directory as the home directory of "
5201           "module maps specified by -fmodule-map-file=<FILE>">,
5202  MarshallingInfoFlag<HeaderSearchOpts<"ModuleMapFileHomeIsCwd">>;
5203def fmodule_feature : Separate<["-"], "fmodule-feature">,
5204  MetaVarName<"<feature>">,
5205  HelpText<"Enable <feature> in module map requires declarations">,
5206  MarshallingInfoStringVector<LangOpts<"ModuleFeatures">>;
5207def fmodules_embed_file_EQ : Joined<["-"], "fmodules-embed-file=">,
5208  MetaVarName<"<file>">,
5209  HelpText<"Embed the contents of the specified file into the module file "
5210           "being compiled.">,
5211  MarshallingInfoStringVector<FrontendOpts<"ModulesEmbedFiles">>;
5212def fmodules_embed_all_files : Joined<["-"], "fmodules-embed-all-files">,
5213  HelpText<"Embed the contents of all files read by this compilation into "
5214           "the produced module file.">,
5215  MarshallingInfoFlag<FrontendOpts<"ModulesEmbedAllFiles">>;
5216// FIXME: We only need this in C++ modules / Modules TS if we might textually
5217// enter a different module (eg, when building a header unit).
5218def fmodules_local_submodule_visibility :
5219  Flag<["-"], "fmodules-local-submodule-visibility">,
5220  HelpText<"Enforce name visibility rules across submodules of the same "
5221           "top-level module.">,
5222  MarshallingInfoFlag<LangOpts<"ModulesLocalVisibility">>,
5223  ImpliedByAnyOf<[fmodules_ts.KeyPath, cpp_modules.KeyPath]>;
5224def fmodules_codegen :
5225  Flag<["-"], "fmodules-codegen">,
5226  HelpText<"Generate code for uses of this module that assumes an explicit "
5227           "object file will be built for the module">,
5228  MarshallingInfoFlag<LangOpts<"ModulesCodegen">>;
5229def fmodules_debuginfo :
5230  Flag<["-"], "fmodules-debuginfo">,
5231  HelpText<"Generate debug info for types in an object file built from this "
5232           "module and do not generate them elsewhere">,
5233  MarshallingInfoFlag<LangOpts<"ModulesDebugInfo">>;
5234def fmodule_format_EQ : Joined<["-"], "fmodule-format=">,
5235  HelpText<"Select the container format for clang modules and PCH. "
5236           "Supported options are 'raw' and 'obj'.">,
5237  MarshallingInfoString<HeaderSearchOpts<"ModuleFormat">, [{"raw"}]>;
5238def ftest_module_file_extension_EQ :
5239  Joined<["-"], "ftest-module-file-extension=">,
5240  HelpText<"introduce a module file extension for testing purposes. "
5241           "The argument is parsed as blockname:major:minor:hashed:user info">;
5242def fconcepts_ts : Flag<["-"], "fconcepts-ts">,
5243  HelpText<"Enable C++ Extensions for Concepts. (deprecated - use -std=c++2a)">;
5244def fno_concept_satisfaction_caching : Flag<["-"],
5245                                            "fno-concept-satisfaction-caching">,
5246  HelpText<"Disable satisfaction caching for C++2a Concepts.">,
5247  MarshallingInfoNegativeFlag<LangOpts<"ConceptSatisfactionCaching">>;
5248
5249defm recovery_ast : BoolOption<"f", "recovery-ast",
5250  LangOpts<"RecoveryAST">, DefaultTrue,
5251  NegFlag<SetFalse>, PosFlag<SetTrue, [], "Preserve expressions in AST rather "
5252                              "than dropping them when encountering semantic errors">>;
5253defm recovery_ast_type : BoolOption<"f", "recovery-ast-type",
5254  LangOpts<"RecoveryASTType">, DefaultTrue,
5255  NegFlag<SetFalse>, PosFlag<SetTrue, [], "Preserve the type for recovery "
5256                              "expressions when possible">>;
5257
5258let Group = Action_Group in {
5259
5260def Eonly : Flag<["-"], "Eonly">,
5261  HelpText<"Just run preprocessor, no output (for timings)">;
5262def dump_raw_tokens : Flag<["-"], "dump-raw-tokens">,
5263  HelpText<"Lex file in raw mode and dump raw tokens">;
5264def analyze : Flag<["-"], "analyze">,
5265  HelpText<"Run static analysis engine">;
5266def dump_tokens : Flag<["-"], "dump-tokens">,
5267  HelpText<"Run preprocessor, dump internal rep of tokens">;
5268def init_only : Flag<["-"], "init-only">,
5269  HelpText<"Only execute frontend initialization">;
5270def fixit : Flag<["-"], "fixit">,
5271  HelpText<"Apply fix-it advice to the input source">;
5272def fixit_EQ : Joined<["-"], "fixit=">,
5273  HelpText<"Apply fix-it advice creating a file with the given suffix">;
5274def print_preamble : Flag<["-"], "print-preamble">,
5275  HelpText<"Print the \"preamble\" of a file, which is a candidate for implicit"
5276           " precompiled headers.">;
5277def emit_html : Flag<["-"], "emit-html">,
5278  HelpText<"Output input source as HTML">;
5279def ast_print : Flag<["-"], "ast-print">,
5280  HelpText<"Build ASTs and then pretty-print them">;
5281def ast_list : Flag<["-"], "ast-list">,
5282  HelpText<"Build ASTs and print the list of declaration node qualified names">;
5283def ast_dump : Flag<["-"], "ast-dump">,
5284  HelpText<"Build ASTs and then debug dump them">;
5285def ast_dump_EQ : Joined<["-"], "ast-dump=">,
5286  HelpText<"Build ASTs and then debug dump them in the specified format. "
5287           "Supported formats include: default, json">;
5288def ast_dump_all : Flag<["-"], "ast-dump-all">,
5289  HelpText<"Build ASTs and then debug dump them, forcing deserialization">;
5290def ast_dump_all_EQ : Joined<["-"], "ast-dump-all=">,
5291  HelpText<"Build ASTs and then debug dump them in the specified format, "
5292           "forcing deserialization. Supported formats include: default, json">;
5293def ast_dump_decl_types : Flag<["-"], "ast-dump-decl-types">,
5294  HelpText<"Include declaration types in AST dumps">,
5295  MarshallingInfoFlag<FrontendOpts<"ASTDumpDeclTypes">>;
5296def templight_dump : Flag<["-"], "templight-dump">,
5297  HelpText<"Dump templight information to stdout">;
5298def ast_dump_lookups : Flag<["-"], "ast-dump-lookups">,
5299  HelpText<"Build ASTs and then debug dump their name lookup tables">,
5300  MarshallingInfoFlag<FrontendOpts<"ASTDumpLookups">>;
5301def ast_view : Flag<["-"], "ast-view">,
5302  HelpText<"Build ASTs and view them with GraphViz">;
5303def emit_module : Flag<["-"], "emit-module">,
5304  HelpText<"Generate pre-compiled module file from a module map">;
5305def emit_module_interface : Flag<["-"], "emit-module-interface">,
5306  HelpText<"Generate pre-compiled module file from a C++ module interface">;
5307def emit_header_module : Flag<["-"], "emit-header-module">,
5308  HelpText<"Generate pre-compiled module file from a set of header files">;
5309def emit_pch : Flag<["-"], "emit-pch">,
5310  HelpText<"Generate pre-compiled header file">;
5311def emit_llvm_bc : Flag<["-"], "emit-llvm-bc">,
5312  HelpText<"Build ASTs then convert to LLVM, emit .bc file">;
5313def emit_llvm_only : Flag<["-"], "emit-llvm-only">,
5314  HelpText<"Build ASTs and convert to LLVM, discarding output">;
5315def emit_codegen_only : Flag<["-"], "emit-codegen-only">,
5316  HelpText<"Generate machine code, but discard output">;
5317def rewrite_test : Flag<["-"], "rewrite-test">,
5318  HelpText<"Rewriter playground">;
5319def rewrite_macros : Flag<["-"], "rewrite-macros">,
5320  HelpText<"Expand macros without full preprocessing">;
5321def migrate : Flag<["-"], "migrate">,
5322  HelpText<"Migrate source code">;
5323def compiler_options_dump : Flag<["-"], "compiler-options-dump">,
5324  HelpText<"Dump the compiler configuration options">;
5325def print_dependency_directives_minimized_source : Flag<["-"],
5326  "print-dependency-directives-minimized-source">,
5327  HelpText<"Print the output of the dependency directives source minimizer">;
5328}
5329
5330defm emit_llvm_uselists : BoolOption<"", "emit-llvm-uselists",
5331  CodeGenOpts<"EmitLLVMUseLists">, DefaultFalse,
5332  PosFlag<SetTrue, [], "Preserve">,
5333  NegFlag<SetFalse, [], "Don't preserve">,
5334  BothFlags<[], " order of LLVM use-lists when serializing">>;
5335
5336def mt_migrate_directory : Separate<["-"], "mt-migrate-directory">,
5337  HelpText<"Directory for temporary files produced during ARC or ObjC migration">,
5338  MarshallingInfoString<FrontendOpts<"MTMigrateDir">>;
5339
5340def arcmt_action_EQ : Joined<["-"], "arcmt-action=">, Flags<[CC1Option, NoDriverOption]>,
5341  HelpText<"The ARC migration action to take">, Values<"check,modify,migrate">,
5342  NormalizedValuesScope<"FrontendOptions">,
5343  NormalizedValues<["ARCMT_Check", "ARCMT_Modify", "ARCMT_Migrate"]>,
5344  MarshallingInfoEnum<FrontendOpts<"ARCMTAction">, "ARCMT_None">;
5345
5346def opt_record_file : Separate<["-"], "opt-record-file">,
5347  HelpText<"File name to use for YAML optimization record output">,
5348  MarshallingInfoString<CodeGenOpts<"OptRecordFile">>;
5349def opt_record_passes : Separate<["-"], "opt-record-passes">,
5350  HelpText<"Only record remark information for passes whose names match the given regular expression">;
5351def opt_record_format : Separate<["-"], "opt-record-format">,
5352  HelpText<"The format used for serializing remarks (default: YAML)">;
5353
5354def print_stats : Flag<["-"], "print-stats">,
5355  HelpText<"Print performance metrics and statistics">,
5356  MarshallingInfoFlag<FrontendOpts<"ShowStats">>;
5357def stats_file : Joined<["-"], "stats-file=">,
5358  HelpText<"Filename to write statistics to">,
5359  MarshallingInfoString<FrontendOpts<"StatsFile">>;
5360def fdump_record_layouts_simple : Flag<["-"], "fdump-record-layouts-simple">,
5361  HelpText<"Dump record layout information in a simple form used for testing">,
5362  MarshallingInfoFlag<LangOpts<"DumpRecordLayoutsSimple">>;
5363def fdump_record_layouts : Flag<["-"], "fdump-record-layouts">,
5364  HelpText<"Dump record layout information">,
5365  MarshallingInfoFlag<LangOpts<"DumpRecordLayouts">>,
5366  ImpliedByAnyOf<[fdump_record_layouts_simple.KeyPath]>;
5367def fix_what_you_can : Flag<["-"], "fix-what-you-can">,
5368  HelpText<"Apply fix-it advice even in the presence of unfixable errors">,
5369  MarshallingInfoFlag<FrontendOpts<"FixWhatYouCan">>;
5370def fix_only_warnings : Flag<["-"], "fix-only-warnings">,
5371  HelpText<"Apply fix-it advice only for warnings, not errors">,
5372  MarshallingInfoFlag<FrontendOpts<"FixOnlyWarnings">>;
5373def fixit_recompile : Flag<["-"], "fixit-recompile">,
5374  HelpText<"Apply fix-it changes and recompile">,
5375  MarshallingInfoFlag<FrontendOpts<"FixAndRecompile">>;
5376def fixit_to_temp : Flag<["-"], "fixit-to-temporary">,
5377  HelpText<"Apply fix-it changes to temporary files">,
5378  MarshallingInfoFlag<FrontendOpts<"FixToTemporaries">>;
5379
5380def foverride_record_layout_EQ : Joined<["-"], "foverride-record-layout=">,
5381  HelpText<"Override record layouts with those in the given file">,
5382  MarshallingInfoString<FrontendOpts<"OverrideRecordLayoutsFile">>;
5383def pch_through_header_EQ : Joined<["-"], "pch-through-header=">,
5384  HelpText<"Stop PCH generation after including this file.  When using a PCH, "
5385           "skip tokens until after this file is included.">,
5386  MarshallingInfoString<PreprocessorOpts<"PCHThroughHeader">>;
5387def pch_through_hdrstop_create : Flag<["-"], "pch-through-hdrstop-create">,
5388  HelpText<"When creating a PCH, stop PCH generation after #pragma hdrstop.">,
5389  MarshallingInfoFlag<PreprocessorOpts<"PCHWithHdrStopCreate">>;
5390def pch_through_hdrstop_use : Flag<["-"], "pch-through-hdrstop-use">,
5391  HelpText<"When using a PCH, skip tokens until after a #pragma hdrstop.">;
5392def fno_pch_timestamp : Flag<["-"], "fno-pch-timestamp">,
5393  HelpText<"Disable inclusion of timestamp in precompiled headers">,
5394  MarshallingInfoNegativeFlag<FrontendOpts<"IncludeTimestamps">>;
5395def building_pch_with_obj : Flag<["-"], "building-pch-with-obj">,
5396  HelpText<"This compilation is part of building a PCH with corresponding object file.">,
5397  MarshallingInfoFlag<LangOpts<"BuildingPCHWithObjectFile">>;
5398
5399def aligned_alloc_unavailable : Flag<["-"], "faligned-alloc-unavailable">,
5400  HelpText<"Aligned allocation/deallocation functions are unavailable">,
5401  MarshallingInfoFlag<LangOpts<"AlignedAllocationUnavailable">>,
5402  ShouldParseIf<faligned_allocation.KeyPath>;
5403
5404//===----------------------------------------------------------------------===//
5405// Language Options
5406//===----------------------------------------------------------------------===//
5407
5408let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
5409
5410def version : Flag<["-"], "version">,
5411  HelpText<"Print the compiler version">,
5412  MarshallingInfoFlag<FrontendOpts<"ShowVersion">>;
5413def main_file_name : Separate<["-"], "main-file-name">,
5414  HelpText<"Main file name to use for debug info and source if missing">,
5415  MarshallingInfoString<CodeGenOpts<"MainFileName">>;
5416def split_dwarf_output : Separate<["-"], "split-dwarf-output">,
5417  HelpText<"File name to use for split dwarf debug info output">,
5418  MarshallingInfoString<CodeGenOpts<"SplitDwarfOutput">>;
5419
5420}
5421
5422def fblocks_runtime_optional : Flag<["-"], "fblocks-runtime-optional">,
5423  HelpText<"Weakly link in the blocks runtime">,
5424  MarshallingInfoFlag<LangOpts<"BlocksRuntimeOptional">>;
5425def fexternc_nounwind : Flag<["-"], "fexternc-nounwind">,
5426  HelpText<"Assume all functions with C linkage do not unwind">,
5427  MarshallingInfoFlag<LangOpts<"ExternCNoUnwind">>;
5428def split_dwarf_file : Separate<["-"], "split-dwarf-file">,
5429  HelpText<"Name of the split dwarf debug info file to encode in the object file">,
5430  MarshallingInfoString<CodeGenOpts<"SplitDwarfFile">>;
5431def fno_wchar : Flag<["-"], "fno-wchar">,
5432  HelpText<"Disable C++ builtin type wchar_t">,
5433  MarshallingInfoNegativeFlag<LangOpts<"WChar">, cplusplus.KeyPath>,
5434  ShouldParseIf<cplusplus.KeyPath>;
5435def fconstant_string_class : Separate<["-"], "fconstant-string-class">,
5436  MetaVarName<"<class name>">,
5437  HelpText<"Specify the class to use for constant Objective-C string objects.">,
5438  MarshallingInfoString<LangOpts<"ObjCConstantStringClass">>;
5439def fobjc_arc_cxxlib_EQ : Joined<["-"], "fobjc-arc-cxxlib=">,
5440  HelpText<"Objective-C++ Automatic Reference Counting standard library kind">, Values<"libc++,libstdc++,none">,
5441  NormalizedValues<["ARCXX_libcxx", "ARCXX_libstdcxx", "ARCXX_nolib"]>,
5442  MarshallingInfoEnum<PreprocessorOpts<"ObjCXXARCStandardLibrary">, "ARCXX_nolib">;
5443def fobjc_runtime_has_weak : Flag<["-"], "fobjc-runtime-has-weak">,
5444  HelpText<"The target Objective-C runtime supports ARC weak operations">;
5445def fobjc_dispatch_method_EQ : Joined<["-"], "fobjc-dispatch-method=">,
5446  HelpText<"Objective-C dispatch method to use">, Values<"legacy,non-legacy,mixed">,
5447  NormalizedValuesScope<"CodeGenOptions">, NormalizedValues<["Legacy", "NonLegacy", "Mixed"]>,
5448  MarshallingInfoEnum<CodeGenOpts<"ObjCDispatchMethod">, "Legacy">;
5449def disable_objc_default_synthesize_properties : Flag<["-"], "disable-objc-default-synthesize-properties">,
5450  HelpText<"disable the default synthesis of Objective-C properties">,
5451  MarshallingInfoNegativeFlag<LangOpts<"ObjCDefaultSynthProperties">>;
5452def fencode_extended_block_signature : Flag<["-"], "fencode-extended-block-signature">,
5453  HelpText<"enable extended encoding of block type signature">,
5454  MarshallingInfoFlag<LangOpts<"EncodeExtendedBlockSig">>;
5455def function_alignment : Separate<["-"], "function-alignment">,
5456    HelpText<"default alignment for functions">,
5457    MarshallingInfoInt<LangOpts<"FunctionAlignment">>;
5458def pic_level : Separate<["-"], "pic-level">,
5459  HelpText<"Value for __PIC__">,
5460  MarshallingInfoInt<LangOpts<"PICLevel">>;
5461def pic_is_pie : Flag<["-"], "pic-is-pie">,
5462  HelpText<"File is for a position independent executable">,
5463  MarshallingInfoFlag<LangOpts<"PIE">>;
5464def fhalf_no_semantic_interposition : Flag<["-"], "fhalf-no-semantic-interposition">,
5465  HelpText<"Like -fno-semantic-interposition but don't use local aliases">,
5466  MarshallingInfoFlag<LangOpts<"HalfNoSemanticInterposition">>;
5467def fno_validate_pch : Flag<["-"], "fno-validate-pch">,
5468  HelpText<"Disable validation of precompiled headers">,
5469  MarshallingInfoFlag<PreprocessorOpts<"DisablePCHOrModuleValidation">, "DisableValidationForModuleKind::None">,
5470  Normalizer<"makeFlagToValueNormalizer(DisableValidationForModuleKind::All)">;
5471def fallow_pcm_with_errors : Flag<["-"], "fallow-pcm-with-compiler-errors">,
5472  HelpText<"Accept a PCM file that was created with compiler errors">,
5473  MarshallingInfoFlag<FrontendOpts<"AllowPCMWithCompilerErrors">>;
5474def fallow_pch_with_errors : Flag<["-"], "fallow-pch-with-compiler-errors">,
5475  HelpText<"Accept a PCH file that was created with compiler errors">,
5476  MarshallingInfoFlag<PreprocessorOpts<"AllowPCHWithCompilerErrors">>,
5477  ImpliedByAnyOf<[fallow_pcm_with_errors.KeyPath]>;
5478def dump_deserialized_pch_decls : Flag<["-"], "dump-deserialized-decls">,
5479  HelpText<"Dump declarations that are deserialized from PCH, for testing">,
5480  MarshallingInfoFlag<PreprocessorOpts<"DumpDeserializedPCHDecls">>;
5481def error_on_deserialized_pch_decl : Separate<["-"], "error-on-deserialized-decl">,
5482  HelpText<"Emit error if a specific declaration is deserialized from PCH, for testing">;
5483def error_on_deserialized_pch_decl_EQ : Joined<["-"], "error-on-deserialized-decl=">,
5484  Alias<error_on_deserialized_pch_decl>;
5485def static_define : Flag<["-"], "static-define">,
5486  HelpText<"Should __STATIC__ be defined">,
5487  MarshallingInfoFlag<LangOpts<"Static">>;
5488def stack_protector : Separate<["-"], "stack-protector">,
5489  HelpText<"Enable stack protectors">, Values<"0,1,2,3">,
5490  NormalizedValuesScope<"LangOptions">,
5491  NormalizedValues<["SSPOff", "SSPOn", "SSPStrong", "SSPReq"]>,
5492  MarshallingInfoEnum<LangOpts<"StackProtector">, "SSPOff">;
5493def stack_protector_buffer_size : Separate<["-"], "stack-protector-buffer-size">,
5494  HelpText<"Lower bound for a buffer to be considered for stack protection">,
5495  MarshallingInfoInt<CodeGenOpts<"SSPBufferSize">, "8">;
5496def fvisibility : Separate<["-"], "fvisibility">,
5497  HelpText<"Default type and symbol visibility">,
5498  MarshallingInfoVisibility<LangOpts<"ValueVisibilityMode">, "DefaultVisibility">,
5499  // Always emitting because of the relation to `-mignore-xcoff-visibility`.
5500  AlwaysEmit;
5501def ftype_visibility : Separate<["-"], "ftype-visibility">,
5502  HelpText<"Default type visibility">,
5503  MarshallingInfoVisibility<LangOpts<"TypeVisibilityMode">, fvisibility.KeyPath>;
5504def fapply_global_visibility_to_externs : Flag<["-"], "fapply-global-visibility-to-externs">,
5505  HelpText<"Apply global symbol visibility to external declarations without an explicit visibility">,
5506  MarshallingInfoFlag<LangOpts<"SetVisibilityForExternDecls">>;
5507def ftemplate_depth : Separate<["-"], "ftemplate-depth">,
5508  HelpText<"Maximum depth of recursive template instantiation">,
5509  MarshallingInfoInt<LangOpts<"InstantiationDepth">, "1024">;
5510def foperator_arrow_depth : Separate<["-"], "foperator-arrow-depth">,
5511  HelpText<"Maximum number of 'operator->'s to call for a member access">,
5512  MarshallingInfoInt<LangOpts<"ArrowDepth">, "256">;
5513def fconstexpr_depth : Separate<["-"], "fconstexpr-depth">,
5514  HelpText<"Maximum depth of recursive constexpr function calls">,
5515  MarshallingInfoInt<LangOpts<"ConstexprCallDepth">, "512">;
5516def fconstexpr_steps : Separate<["-"], "fconstexpr-steps">,
5517  HelpText<"Maximum number of steps in constexpr function evaluation">,
5518  MarshallingInfoInt<LangOpts<"ConstexprStepLimit">, "1048576">;
5519def fbracket_depth : Separate<["-"], "fbracket-depth">,
5520  HelpText<"Maximum nesting level for parentheses, brackets, and braces">,
5521  MarshallingInfoInt<LangOpts<"BracketDepth">, "256">;
5522defm const_strings : BoolOption<"f", "const-strings",
5523  LangOpts<"ConstStrings">, DefaultFalse,
5524  PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">,
5525  BothFlags<[], " a const qualified type for string literals in C and ObjC">>;
5526def fno_bitfield_type_align : Flag<["-"], "fno-bitfield-type-align">,
5527  HelpText<"Ignore bit-field types when aligning structures">,
5528  MarshallingInfoFlag<LangOpts<"NoBitFieldTypeAlign">>;
5529def ffake_address_space_map : Flag<["-"], "ffake-address-space-map">,
5530  HelpText<"Use a fake address space map; OpenCL testing purposes only">,
5531  MarshallingInfoFlag<LangOpts<"FakeAddressSpaceMap">>;
5532def faddress_space_map_mangling_EQ : Joined<["-"], "faddress-space-map-mangling=">, MetaVarName<"<yes|no|target>">,
5533  HelpText<"Set the mode for address space map based mangling; OpenCL testing purposes only">,
5534  Values<"target,no,yes">, NormalizedValuesScope<"LangOptions">,
5535  NormalizedValues<["ASMM_Target", "ASMM_Off", "ASMM_On"]>,
5536  MarshallingInfoEnum<LangOpts<"AddressSpaceMapMangling">, "ASMM_Target">;
5537def funknown_anytype : Flag<["-"], "funknown-anytype">,
5538  HelpText<"Enable parser support for the __unknown_anytype type; for testing purposes only">,
5539  MarshallingInfoFlag<LangOpts<"ParseUnknownAnytype">>;
5540def fdebugger_support : Flag<["-"], "fdebugger-support">,
5541  HelpText<"Enable special debugger support behavior">,
5542  MarshallingInfoFlag<LangOpts<"DebuggerSupport">>;
5543def fdebugger_cast_result_to_id : Flag<["-"], "fdebugger-cast-result-to-id">,
5544  HelpText<"Enable casting unknown expression results to id">,
5545  MarshallingInfoFlag<LangOpts<"DebuggerCastResultToId">>;
5546def fdebugger_objc_literal : Flag<["-"], "fdebugger-objc-literal">,
5547  HelpText<"Enable special debugger support for Objective-C subscripting and literals">,
5548  MarshallingInfoFlag<LangOpts<"DebuggerObjCLiteral">>;
5549defm deprecated_macro : BoolOption<"f", "deprecated-macro",
5550  LangOpts<"Deprecated">, DefaultFalse,
5551  PosFlag<SetTrue, [], "Defines">, NegFlag<SetFalse, [], "Undefines">,
5552  BothFlags<[], " the __DEPRECATED macro">>;
5553def fobjc_subscripting_legacy_runtime : Flag<["-"], "fobjc-subscripting-legacy-runtime">,
5554  HelpText<"Allow Objective-C array and dictionary subscripting in legacy runtime">;
5555// TODO: Enforce values valid for MSVtorDispMode.
5556def vtordisp_mode_EQ : Joined<["-"], "vtordisp-mode=">,
5557  HelpText<"Control vtordisp placement on win32 targets">,
5558  MarshallingInfoInt<LangOpts<"VtorDispMode">, "1">;
5559def fnative_half_type: Flag<["-"], "fnative-half-type">,
5560  HelpText<"Use the native half type for __fp16 instead of promoting to float">,
5561  MarshallingInfoFlag<LangOpts<"NativeHalfType">>,
5562  ImpliedByAnyOf<[open_cl.KeyPath, render_script.KeyPath]>;
5563def fnative_half_arguments_and_returns : Flag<["-"], "fnative-half-arguments-and-returns">,
5564  HelpText<"Use the native __fp16 type for arguments and returns (and skip ABI-specific lowering)">,
5565  MarshallingInfoFlag<LangOpts<"NativeHalfArgsAndReturns">>,
5566  ImpliedByAnyOf<[open_cl.KeyPath, render_script.KeyPath]>;
5567def fallow_half_arguments_and_returns : Flag<["-"], "fallow-half-arguments-and-returns">,
5568  HelpText<"Allow function arguments and returns of type half">,
5569  MarshallingInfoFlag<LangOpts<"HalfArgsAndReturns">>,
5570  ImpliedByAnyOf<[fnative_half_arguments_and_returns.KeyPath]>;
5571def fdefault_calling_conv_EQ : Joined<["-"], "fdefault-calling-conv=">,
5572  HelpText<"Set default calling convention">, Values<"cdecl,fastcall,stdcall,vectorcall,regcall">,
5573  NormalizedValuesScope<"LangOptions">,
5574  NormalizedValues<["DCC_CDecl", "DCC_FastCall", "DCC_StdCall", "DCC_VectorCall", "DCC_RegCall"]>,
5575  MarshallingInfoEnum<LangOpts<"DefaultCallingConv">, "DCC_None">;
5576
5577// These options cannot be marshalled, because they are used to set up the LangOptions defaults.
5578def finclude_default_header : Flag<["-"], "finclude-default-header">,
5579  HelpText<"Include default header file for OpenCL">;
5580def fdeclare_opencl_builtins : Flag<["-"], "fdeclare-opencl-builtins">,
5581  HelpText<"Add OpenCL builtin function declarations (experimental)">;
5582
5583def fpreserve_vec3_type : Flag<["-"], "fpreserve-vec3-type">,
5584  HelpText<"Preserve 3-component vector type">,
5585  MarshallingInfoFlag<CodeGenOpts<"PreserveVec3Type">>;
5586def fwchar_type_EQ : Joined<["-"], "fwchar-type=">,
5587  HelpText<"Select underlying type for wchar_t">, Values<"char,short,int">,
5588  NormalizedValues<["1", "2", "4"]>,
5589  MarshallingInfoEnum<LangOpts<"WCharSize">, "0">;
5590defm signed_wchar : BoolOption<"f", "signed-wchar",
5591  LangOpts<"WCharIsSigned">, DefaultTrue,
5592  NegFlag<SetFalse, [CC1Option], "Use an unsigned">, PosFlag<SetTrue, [], "Use a signed">,
5593  BothFlags<[], " type for wchar_t">>;
5594def fcompatibility_qualified_id_block_param_type_checking : Flag<["-"], "fcompatibility-qualified-id-block-type-checking">,
5595  HelpText<"Allow using blocks with parameters of more specific type than "
5596           "the type system guarantees when a parameter is qualified id">,
5597  MarshallingInfoFlag<LangOpts<"CompatibilityQualifiedIdBlockParamTypeChecking">>;
5598def fpass_by_value_is_noalias: Flag<["-"], "fpass-by-value-is-noalias">,
5599  HelpText<"Allows assuming by-value parameters do not alias any other value. "
5600           "Has no effect on non-trivially-copyable classes in C++.">, Group<f_Group>,
5601  MarshallingInfoFlag<CodeGenOpts<"PassByValueIsNoAlias">>;
5602
5603// FIXME: Remove these entirely once functionality/tests have been excised.
5604def fobjc_gc_only : Flag<["-"], "fobjc-gc-only">, Group<f_Group>,
5605  HelpText<"Use GC exclusively for Objective-C related memory management">;
5606def fobjc_gc : Flag<["-"], "fobjc-gc">, Group<f_Group>,
5607  HelpText<"Enable Objective-C garbage collection">;
5608
5609//===----------------------------------------------------------------------===//
5610// Header Search Options
5611//===----------------------------------------------------------------------===//
5612
5613def nostdsysteminc : Flag<["-"], "nostdsysteminc">,
5614  HelpText<"Disable standard system #include directories">,
5615  MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseStandardSystemIncludes">>;
5616def fdisable_module_hash : Flag<["-"], "fdisable-module-hash">,
5617  HelpText<"Disable the module hash">,
5618  MarshallingInfoFlag<HeaderSearchOpts<"DisableModuleHash">>;
5619def fmodules_hash_content : Flag<["-"], "fmodules-hash-content">,
5620  HelpText<"Enable hashing the content of a module file">,
5621  MarshallingInfoFlag<HeaderSearchOpts<"ModulesHashContent">>;
5622def fmodules_strict_context_hash : Flag<["-"], "fmodules-strict-context-hash">,
5623  HelpText<"Enable hashing of all compiler options that could impact the "
5624           "semantics of a module in an implicit build">,
5625  MarshallingInfoFlag<HeaderSearchOpts<"ModulesStrictContextHash">>;
5626def c_isystem : JoinedOrSeparate<["-"], "c-isystem">, MetaVarName<"<directory>">,
5627  HelpText<"Add directory to the C SYSTEM include search path">;
5628def objc_isystem : JoinedOrSeparate<["-"], "objc-isystem">,
5629  MetaVarName<"<directory>">,
5630  HelpText<"Add directory to the ObjC SYSTEM include search path">;
5631def objcxx_isystem : JoinedOrSeparate<["-"], "objcxx-isystem">,
5632  MetaVarName<"<directory>">,
5633  HelpText<"Add directory to the ObjC++ SYSTEM include search path">;
5634def internal_isystem : JoinedOrSeparate<["-"], "internal-isystem">,
5635  MetaVarName<"<directory>">,
5636  HelpText<"Add directory to the internal system include search path; these "
5637           "are assumed to not be user-provided and are used to model system "
5638           "and standard headers' paths.">;
5639def internal_externc_isystem : JoinedOrSeparate<["-"], "internal-externc-isystem">,
5640  MetaVarName<"<directory>">,
5641  HelpText<"Add directory to the internal system include search path with "
5642           "implicit extern \"C\" semantics; these are assumed to not be "
5643           "user-provided and are used to model system and standard headers' "
5644           "paths.">;
5645
5646//===----------------------------------------------------------------------===//
5647// Preprocessor Options
5648//===----------------------------------------------------------------------===//
5649
5650def chain_include : Separate<["-"], "chain-include">, MetaVarName<"<file>">,
5651  HelpText<"Include and chain a header file after turning it into PCH">;
5652def preamble_bytes_EQ : Joined<["-"], "preamble-bytes=">,
5653  HelpText<"Assume that the precompiled header is a precompiled preamble "
5654           "covering the first N bytes of the main file">;
5655def detailed_preprocessing_record : Flag<["-"], "detailed-preprocessing-record">,
5656  HelpText<"include a detailed record of preprocessing actions">,
5657  MarshallingInfoFlag<PreprocessorOpts<"DetailedRecord">>;
5658def setup_static_analyzer : Flag<["-"], "setup-static-analyzer">,
5659  HelpText<"Set up preprocessor for static analyzer (done automatically when static analyzer is run).">,
5660  MarshallingInfoFlag<PreprocessorOpts<"SetUpStaticAnalyzer">>;
5661def disable_pragma_debug_crash : Flag<["-"], "disable-pragma-debug-crash">,
5662  HelpText<"Disable any #pragma clang __debug that can lead to crashing behavior. This is meant for testing.">,
5663  MarshallingInfoFlag<PreprocessorOpts<"DisablePragmaDebugCrash">>;
5664
5665//===----------------------------------------------------------------------===//
5666// OpenCL Options
5667//===----------------------------------------------------------------------===//
5668
5669def cl_ext_EQ : CommaJoined<["-"], "cl-ext=">,
5670  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 '-'.">,
5671  MarshallingInfoStringVector<TargetOpts<"OpenCLExtensionsAsWritten">>;
5672
5673//===----------------------------------------------------------------------===//
5674// CUDA Options
5675//===----------------------------------------------------------------------===//
5676
5677def fcuda_is_device : Flag<["-"], "fcuda-is-device">,
5678  HelpText<"Generate code for CUDA device">,
5679  MarshallingInfoFlag<LangOpts<"CUDAIsDevice">>;
5680def fcuda_include_gpubinary : Separate<["-"], "fcuda-include-gpubinary">,
5681  HelpText<"Incorporate CUDA device-side binary into host object file.">,
5682  MarshallingInfoString<CodeGenOpts<"CudaGpuBinaryFileName">>;
5683def fcuda_allow_variadic_functions : Flag<["-"], "fcuda-allow-variadic-functions">,
5684  HelpText<"Allow variadic functions in CUDA device code.">,
5685  MarshallingInfoFlag<LangOpts<"CUDAAllowVariadicFunctions">>;
5686def fno_cuda_host_device_constexpr : Flag<["-"], "fno-cuda-host-device-constexpr">,
5687  HelpText<"Don't treat unattributed constexpr functions as __host__ __device__.">,
5688  MarshallingInfoNegativeFlag<LangOpts<"CUDAHostDeviceConstexpr">>;
5689
5690//===----------------------------------------------------------------------===//
5691// OpenMP Options
5692//===----------------------------------------------------------------------===//
5693
5694def fopenmp_is_device : Flag<["-"], "fopenmp-is-device">,
5695  HelpText<"Generate code only for an OpenMP target device.">;
5696def fopenmp_host_ir_file_path : Separate<["-"], "fopenmp-host-ir-file-path">,
5697  HelpText<"Path to the IR file produced by the frontend for the host.">;
5698
5699//===----------------------------------------------------------------------===//
5700// SYCL Options
5701//===----------------------------------------------------------------------===//
5702
5703def fsycl_is_device : Flag<["-"], "fsycl-is-device">,
5704  HelpText<"Generate code for SYCL device.">,
5705  MarshallingInfoFlag<LangOpts<"SYCLIsDevice">>;
5706def fsycl_is_host : Flag<["-"], "fsycl-is-host">,
5707  HelpText<"SYCL host compilation">,
5708  MarshallingInfoFlag<LangOpts<"SYCLIsHost">>;
5709
5710} // let Flags = [CC1Option, NoDriverOption]
5711
5712def sycl_std_EQ : Joined<["-"], "sycl-std=">, Group<sycl_Group>,
5713  Flags<[CC1Option, NoArgumentUnused, CoreOption]>,
5714  HelpText<"SYCL language standard to compile for.">,
5715  Values<"2020,2017,121,1.2.1,sycl-1.2.1">,
5716  NormalizedValues<["SYCL_2020", "SYCL_2017", "SYCL_2017", "SYCL_2017", "SYCL_2017"]>,
5717  NormalizedValuesScope<"LangOptions">,
5718  MarshallingInfoEnum<LangOpts<"SYCLVersion">, "SYCL_None">,
5719  ShouldParseIf<!strconcat(fsycl_is_device.KeyPath, "||", fsycl_is_host.KeyPath)>;
5720
5721defm cuda_approx_transcendentals : BoolFOption<"cuda-approx-transcendentals",
5722  LangOpts<"CUDADeviceApproxTranscendentals">, DefaultFalse,
5723  PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">,
5724  BothFlags<[], " approximate transcendental functions">>,
5725  ShouldParseIf<fcuda_is_device.KeyPath>;
5726
5727//===----------------------------------------------------------------------===//
5728// Frontend Options - cc1 + fc1
5729//===----------------------------------------------------------------------===//
5730let Flags = [CC1Option, FC1Option, NoDriverOption] in {
5731let Group = Action_Group in {
5732
5733def emit_obj : Flag<["-"], "emit-obj">,
5734  HelpText<"Emit native object files">;
5735
5736} // let Group = Action_Group
5737} // let Flags = [CC1Option, FC1Option, NoDriverOption]
5738
5739//===----------------------------------------------------------------------===//
5740// cc1as-only Options
5741//===----------------------------------------------------------------------===//
5742
5743let Flags = [CC1AsOption, NoDriverOption] in {
5744
5745// Language Options
5746def n : Flag<["-"], "n">,
5747  HelpText<"Don't automatically start assembly file with a text section">;
5748
5749// Frontend Options
5750def filetype : Separate<["-"], "filetype">,
5751    HelpText<"Specify the output file type ('asm', 'null', or 'obj')">;
5752
5753// Transliterate Options
5754def output_asm_variant : Separate<["-"], "output-asm-variant">,
5755    HelpText<"Select the asm variant index to use for output">;
5756def show_encoding : Flag<["-"], "show-encoding">,
5757    HelpText<"Show instruction encoding information in transliterate mode">;
5758def show_inst : Flag<["-"], "show-inst">,
5759    HelpText<"Show internal instruction representation in transliterate mode">;
5760
5761// Assemble Options
5762def dwarf_debug_producer : Separate<["-"], "dwarf-debug-producer">,
5763  HelpText<"The string to embed in the Dwarf debug AT_producer record.">;
5764
5765def defsym : Separate<["-"], "defsym">,
5766  HelpText<"Define a value for a symbol">;
5767
5768} // let Flags = [CC1AsOption]
5769
5770//===----------------------------------------------------------------------===//
5771// clang-cl Options
5772//===----------------------------------------------------------------------===//
5773
5774def cl_Group : OptionGroup<"<clang-cl options>">, Flags<[CLOption]>,
5775  HelpText<"CL.EXE COMPATIBILITY OPTIONS">;
5776
5777def cl_compile_Group : OptionGroup<"<clang-cl compile-only options>">,
5778  Group<cl_Group>;
5779
5780def cl_ignored_Group : OptionGroup<"<clang-cl ignored options>">,
5781  Group<cl_Group>;
5782
5783class CLFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
5784  Group<cl_Group>, Flags<[CLOption, NoXarchOption]>;
5785
5786class CLCompileFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
5787  Group<cl_compile_Group>, Flags<[CLOption, NoXarchOption]>;
5788
5789class CLIgnoredFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
5790  Group<cl_ignored_Group>, Flags<[CLOption, NoXarchOption]>;
5791
5792class CLJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
5793  Group<cl_Group>, Flags<[CLOption, NoXarchOption]>;
5794
5795class CLCompileJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
5796  Group<cl_compile_Group>, Flags<[CLOption, NoXarchOption]>;
5797
5798class CLIgnoredJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
5799  Group<cl_ignored_Group>, Flags<[CLOption, NoXarchOption, HelpHidden]>;
5800
5801class CLJoinedOrSeparate<string name> : Option<["/", "-"], name,
5802  KIND_JOINED_OR_SEPARATE>, Group<cl_Group>, Flags<[CLOption, NoXarchOption]>;
5803
5804class CLCompileJoinedOrSeparate<string name> : Option<["/", "-"], name,
5805  KIND_JOINED_OR_SEPARATE>, Group<cl_compile_Group>,
5806  Flags<[CLOption, NoXarchOption]>;
5807
5808class CLRemainingArgsJoined<string name> : Option<["/", "-"], name,
5809  KIND_REMAINING_ARGS_JOINED>, Group<cl_Group>, Flags<[CLOption, NoXarchOption]>;
5810
5811// Aliases:
5812// (We don't put any of these in cl_compile_Group as the options they alias are
5813// already in the right group.)
5814
5815def _SLASH_Brepro : CLFlag<"Brepro">,
5816  HelpText<"Do not write current time into COFF output (breaks link.exe /incremental)">,
5817  Alias<mno_incremental_linker_compatible>;
5818def _SLASH_Brepro_ : CLFlag<"Brepro-">,
5819  HelpText<"Write current time into COFF output (default)">,
5820  Alias<mincremental_linker_compatible>;
5821def _SLASH_C : CLFlag<"C">,
5822  HelpText<"Do not discard comments when preprocessing">, Alias<C>;
5823def _SLASH_c : CLFlag<"c">, HelpText<"Compile only">, Alias<c>;
5824def _SLASH_d1PP : CLFlag<"d1PP">,
5825  HelpText<"Retain macro definitions in /E mode">, Alias<dD>;
5826def _SLASH_d1reportAllClassLayout : CLFlag<"d1reportAllClassLayout">,
5827  HelpText<"Dump record layout information">,
5828  Alias<Xclang>, AliasArgs<["-fdump-record-layouts"]>;
5829def _SLASH_diagnostics_caret : CLFlag<"diagnostics:caret">,
5830  HelpText<"Enable caret and column diagnostics (default)">;
5831def _SLASH_diagnostics_column : CLFlag<"diagnostics:column">,
5832  HelpText<"Disable caret diagnostics but keep column info">;
5833def _SLASH_diagnostics_classic : CLFlag<"diagnostics:classic">,
5834  HelpText<"Disable column and caret diagnostics">;
5835def _SLASH_D : CLJoinedOrSeparate<"D">, HelpText<"Define macro">,
5836  MetaVarName<"<macro[=value]>">, Alias<D>;
5837def _SLASH_E : CLFlag<"E">, HelpText<"Preprocess to stdout">, Alias<E>;
5838def _SLASH_fp_except : CLFlag<"fp:except">, HelpText<"">, Alias<ftrapping_math>;
5839def _SLASH_fp_except_ : CLFlag<"fp:except-">,
5840  HelpText<"">, Alias<fno_trapping_math>;
5841def _SLASH_fp_fast : CLFlag<"fp:fast">, HelpText<"">, Alias<ffast_math>;
5842def _SLASH_fp_precise : CLFlag<"fp:precise">,
5843  HelpText<"">, Alias<fno_fast_math>;
5844def _SLASH_fp_strict : CLFlag<"fp:strict">, HelpText<"">, Alias<fno_fast_math>;
5845def _SLASH_fsanitize_EQ_address : CLFlag<"fsanitize=address">,
5846  HelpText<"Enable AddressSanitizer">,
5847  Alias<fsanitize_EQ>, AliasArgs<["address"]>;
5848def _SLASH_GA : CLFlag<"GA">, Alias<ftlsmodel_EQ>, AliasArgs<["local-exec"]>,
5849  HelpText<"Assume thread-local variables are defined in the executable">;
5850def _SLASH_GR : CLFlag<"GR">, HelpText<"Emit RTTI data (default)">;
5851def _SLASH_GR_ : CLFlag<"GR-">, HelpText<"Do not emit RTTI data">;
5852def _SLASH_GF : CLIgnoredFlag<"GF">,
5853  HelpText<"Enable string pooling (default)">;
5854def _SLASH_GF_ : CLFlag<"GF-">, HelpText<"Disable string pooling">,
5855  Alias<fwritable_strings>;
5856def _SLASH_GS : CLFlag<"GS">,
5857  HelpText<"Enable buffer security check (default)">;
5858def _SLASH_GS_ : CLFlag<"GS-">, HelpText<"Disable buffer security check">;
5859def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">,
5860  Alias<mstack_probe_size>, AliasArgs<["4096"]>;
5861def _SLASH_Gs : CLJoined<"Gs">,
5862  HelpText<"Set stack probe size (default 4096)">, Alias<mstack_probe_size>;
5863def _SLASH_Gy : CLFlag<"Gy">, HelpText<"Put each function in its own section">,
5864  Alias<ffunction_sections>;
5865def _SLASH_Gy_ : CLFlag<"Gy-">,
5866  HelpText<"Do not put each function in its own section (default)">,
5867  Alias<fno_function_sections>;
5868def _SLASH_Gw : CLFlag<"Gw">, HelpText<"Put each data item in its own section">,
5869  Alias<fdata_sections>;
5870def _SLASH_Gw_ : CLFlag<"Gw-">,
5871  HelpText<"Do not put each data item in its own section (default)">,
5872  Alias<fno_data_sections>;
5873def _SLASH_help : CLFlag<"help">, Alias<help>,
5874  HelpText<"Display available options">;
5875def _SLASH_HELP : CLFlag<"HELP">, Alias<help>;
5876def _SLASH_I : CLJoinedOrSeparate<"I">,
5877  HelpText<"Add directory to include search path">, MetaVarName<"<dir>">,
5878  Alias<I>;
5879def _SLASH_J : CLFlag<"J">, HelpText<"Make char type unsigned">,
5880  Alias<funsigned_char>;
5881
5882// The _SLASH_O option handles all the /O flags, but we also provide separate
5883// aliased options to provide separate help messages.
5884def _SLASH_O : CLJoined<"O">,
5885  HelpText<"Set multiple /O flags at once; e.g. '/O2y-' for '/O2 /Oy-'">,
5886  MetaVarName<"<flags>">;
5887def : CLFlag<"O1">, Alias<_SLASH_O>, AliasArgs<["1"]>,
5888  HelpText<"Optimize for size  (like /Og     /Os /Oy /Ob2 /GF /Gy)">;
5889def : CLFlag<"O2">, Alias<_SLASH_O>, AliasArgs<["2"]>,
5890  HelpText<"Optimize for speed (like /Og /Oi /Ot /Oy /Ob2 /GF /Gy)">;
5891def : CLFlag<"Ob0">, Alias<_SLASH_O>, AliasArgs<["b0"]>,
5892  HelpText<"Disable function inlining">;
5893def : CLFlag<"Ob1">, Alias<_SLASH_O>, AliasArgs<["b1"]>,
5894  HelpText<"Only inline functions explicitly or implicitly marked inline">;
5895def : CLFlag<"Ob2">, Alias<_SLASH_O>, AliasArgs<["b2"]>,
5896  HelpText<"Inline functions as deemed beneficial by the compiler">;
5897def : CLFlag<"Od">, Alias<_SLASH_O>, AliasArgs<["d"]>,
5898  HelpText<"Disable optimization">;
5899def : CLFlag<"Og">, Alias<_SLASH_O>, AliasArgs<["g"]>,
5900  HelpText<"No effect">;
5901def : CLFlag<"Oi">, Alias<_SLASH_O>, AliasArgs<["i"]>,
5902  HelpText<"Enable use of builtin functions">;
5903def : CLFlag<"Oi-">, Alias<_SLASH_O>, AliasArgs<["i-"]>,
5904  HelpText<"Disable use of builtin functions">;
5905def : CLFlag<"Os">, Alias<_SLASH_O>, AliasArgs<["s"]>,
5906  HelpText<"Optimize for size">;
5907def : CLFlag<"Ot">, Alias<_SLASH_O>, AliasArgs<["t"]>,
5908  HelpText<"Optimize for speed">;
5909def : CLFlag<"Ox">, Alias<_SLASH_O>, AliasArgs<["x"]>,
5910  HelpText<"Deprecated (like /Og /Oi /Ot /Oy /Ob2); use /O2">;
5911def : CLFlag<"Oy">, Alias<_SLASH_O>, AliasArgs<["y"]>,
5912  HelpText<"Enable frame pointer omission (x86 only)">;
5913def : CLFlag<"Oy-">, Alias<_SLASH_O>, AliasArgs<["y-"]>,
5914  HelpText<"Disable frame pointer omission (x86 only, default)">;
5915
5916def _SLASH_QUESTION : CLFlag<"?">, Alias<help>,
5917  HelpText<"Display available options">;
5918def _SLASH_Qvec : CLFlag<"Qvec">,
5919  HelpText<"Enable the loop vectorization passes">, Alias<fvectorize>;
5920def _SLASH_Qvec_ : CLFlag<"Qvec-">,
5921  HelpText<"Disable the loop vectorization passes">, Alias<fno_vectorize>;
5922def _SLASH_showIncludes : CLFlag<"showIncludes">,
5923  HelpText<"Print info about included files to stderr">;
5924def _SLASH_showIncludes_user : CLFlag<"showIncludes:user">,
5925  HelpText<"Like /showIncludes but omit system headers">;
5926def _SLASH_showFilenames : CLFlag<"showFilenames">,
5927  HelpText<"Print the name of each compiled file">;
5928def _SLASH_showFilenames_ : CLFlag<"showFilenames-">,
5929  HelpText<"Do not print the name of each compiled file (default)">;
5930def _SLASH_source_charset : CLCompileJoined<"source-charset:">,
5931  HelpText<"Set source encoding, supports only UTF-8">,
5932  Alias<finput_charset_EQ>;
5933def _SLASH_execution_charset : CLCompileJoined<"execution-charset:">,
5934  HelpText<"Set runtime encoding, supports only UTF-8">,
5935  Alias<fexec_charset_EQ>;
5936def _SLASH_std : CLCompileJoined<"std:">,
5937  HelpText<"Set language version (c++14,c++17,c++latest,c11,c17)">;
5938def _SLASH_U : CLJoinedOrSeparate<"U">, HelpText<"Undefine macro">,
5939  MetaVarName<"<macro>">, Alias<U>;
5940def _SLASH_validate_charset : CLFlag<"validate-charset">,
5941  Alias<W_Joined>, AliasArgs<["invalid-source-encoding"]>;
5942def _SLASH_validate_charset_ : CLFlag<"validate-charset-">,
5943  Alias<W_Joined>, AliasArgs<["no-invalid-source-encoding"]>;
5944def _SLASH_W0 : CLFlag<"W0">, HelpText<"Disable all warnings">, Alias<w>;
5945def _SLASH_W1 : CLFlag<"W1">, HelpText<"Enable -Wall">, Alias<Wall>;
5946def _SLASH_W2 : CLFlag<"W2">, HelpText<"Enable -Wall">, Alias<Wall>;
5947def _SLASH_W3 : CLFlag<"W3">, HelpText<"Enable -Wall">, Alias<Wall>;
5948def _SLASH_W4 : CLFlag<"W4">, HelpText<"Enable -Wall and -Wextra">, Alias<WCL4>;
5949def _SLASH_Wall : CLFlag<"Wall">, HelpText<"Enable -Weverything">,
5950  Alias<W_Joined>, AliasArgs<["everything"]>;
5951def _SLASH_WX : CLFlag<"WX">, HelpText<"Treat warnings as errors">,
5952  Alias<W_Joined>, AliasArgs<["error"]>;
5953def _SLASH_WX_ : CLFlag<"WX-">,
5954  HelpText<"Do not treat warnings as errors (default)">,
5955  Alias<W_Joined>, AliasArgs<["no-error"]>;
5956def _SLASH_w_flag : CLFlag<"w">, HelpText<"Disable all warnings">, Alias<w>;
5957def _SLASH_wd4005 : CLFlag<"wd4005">, Alias<W_Joined>,
5958  AliasArgs<["no-macro-redefined"]>;
5959def _SLASH_wd4018 : CLFlag<"wd4018">, Alias<W_Joined>,
5960  AliasArgs<["no-sign-compare"]>;
5961def _SLASH_wd4100 : CLFlag<"wd4100">, Alias<W_Joined>,
5962  AliasArgs<["no-unused-parameter"]>;
5963def _SLASH_wd4910 : CLFlag<"wd4910">, Alias<W_Joined>,
5964  AliasArgs<["no-dllexport-explicit-instantiation-decl"]>;
5965def _SLASH_wd4996 : CLFlag<"wd4996">, Alias<W_Joined>,
5966  AliasArgs<["no-deprecated-declarations"]>;
5967def _SLASH_vd : CLJoined<"vd">, HelpText<"Control vtordisp placement">,
5968  Alias<vtordisp_mode_EQ>;
5969def _SLASH_X : CLFlag<"X">,
5970  HelpText<"Do not add %INCLUDE% to include search path">, Alias<nostdlibinc>;
5971def _SLASH_Zc_sizedDealloc : CLFlag<"Zc:sizedDealloc">,
5972  HelpText<"Enable C++14 sized global deallocation functions">,
5973  Alias<fsized_deallocation>;
5974def _SLASH_Zc_sizedDealloc_ : CLFlag<"Zc:sizedDealloc-">,
5975  HelpText<"Disable C++14 sized global deallocation functions">,
5976  Alias<fno_sized_deallocation>;
5977def _SLASH_Zc_alignedNew : CLFlag<"Zc:alignedNew">,
5978  HelpText<"Enable C++17 aligned allocation functions">,
5979  Alias<faligned_allocation>;
5980def _SLASH_Zc_alignedNew_ : CLFlag<"Zc:alignedNew-">,
5981  HelpText<"Disable C++17 aligned allocation functions">,
5982  Alias<fno_aligned_allocation>;
5983def _SLASH_Zc_char8_t : CLFlag<"Zc:char8_t">,
5984  HelpText<"Enable char8_t from C++2a">,
5985  Alias<fchar8__t>;
5986def _SLASH_Zc_char8_t_ : CLFlag<"Zc:char8_t-">,
5987  HelpText<"Disable char8_t from c++2a">,
5988  Alias<fno_char8__t>;
5989def _SLASH_Zc_strictStrings : CLFlag<"Zc:strictStrings">,
5990  HelpText<"Treat string literals as const">, Alias<W_Joined>,
5991  AliasArgs<["error=c++11-compat-deprecated-writable-strings"]>;
5992def _SLASH_Zc_threadSafeInit : CLFlag<"Zc:threadSafeInit">,
5993  HelpText<"Enable thread-safe initialization of static variables">,
5994  Alias<fthreadsafe_statics>;
5995def _SLASH_Zc_threadSafeInit_ : CLFlag<"Zc:threadSafeInit-">,
5996  HelpText<"Disable thread-safe initialization of static variables">,
5997  Alias<fno_threadsafe_statics>;
5998def _SLASH_Zc_trigraphs : CLFlag<"Zc:trigraphs">,
5999  HelpText<"Enable trigraphs">, Alias<ftrigraphs>;
6000def _SLASH_Zc_trigraphs_off : CLFlag<"Zc:trigraphs-">,
6001  HelpText<"Disable trigraphs (default)">, Alias<fno_trigraphs>;
6002def _SLASH_Zc_twoPhase : CLFlag<"Zc:twoPhase">,
6003  HelpText<"Enable two-phase name lookup in templates">,
6004  Alias<fno_delayed_template_parsing>;
6005def _SLASH_Zc_twoPhase_ : CLFlag<"Zc:twoPhase-">,
6006  HelpText<"Disable two-phase name lookup in templates (default)">,
6007  Alias<fdelayed_template_parsing>;
6008def _SLASH_Z7 : CLFlag<"Z7">,
6009  HelpText<"Enable CodeView debug information in object files">;
6010def _SLASH_Zi : CLFlag<"Zi">, Alias<_SLASH_Z7>,
6011  HelpText<"Like /Z7">;
6012def _SLASH_Zp : CLJoined<"Zp">,
6013  HelpText<"Set default maximum struct packing alignment">,
6014  Alias<fpack_struct_EQ>;
6015def _SLASH_Zp_flag : CLFlag<"Zp">,
6016  HelpText<"Set default maximum struct packing alignment to 1">,
6017  Alias<fpack_struct_EQ>, AliasArgs<["1"]>;
6018def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Syntax-check only">,
6019  Alias<fsyntax_only>;
6020def _SLASH_openmp_ : CLFlag<"openmp-">,
6021  HelpText<"Disable OpenMP support">, Alias<fno_openmp>;
6022def _SLASH_openmp : CLFlag<"openmp">, HelpText<"Enable OpenMP support">,
6023  Alias<fopenmp>;
6024def _SLASH_openmp_experimental : CLFlag<"openmp:experimental">,
6025  HelpText<"Enable OpenMP support with experimental SIMD support">,
6026  Alias<fopenmp>;
6027def _SLASH_tune : CLCompileJoined<"tune:">,
6028  HelpText<"Set CPU for optimization without affecting instruction set">,
6029  Alias<mtune_EQ>;
6030def _SLASH_QIntel_jcc_erratum : CLFlag<"QIntel-jcc-erratum">,
6031  HelpText<"Align branches within 32-byte boundaries to mitigate the performance impact of the Intel JCC erratum.">,
6032  Alias<mbranches_within_32B_boundaries>;
6033
6034// Non-aliases:
6035
6036def _SLASH_arch : CLCompileJoined<"arch:">,
6037  HelpText<"Set architecture for code generation">;
6038
6039def _SLASH_M_Group : OptionGroup<"</M group>">, Group<cl_compile_Group>;
6040def _SLASH_volatile_Group : OptionGroup<"</volatile group>">,
6041  Group<cl_compile_Group>;
6042
6043def _SLASH_EH : CLJoined<"EH">, HelpText<"Set exception handling model">;
6044def _SLASH_EP : CLFlag<"EP">,
6045  HelpText<"Disable linemarker output and preprocess to stdout">;
6046def _SLASH_FA : CLFlag<"FA">,
6047  HelpText<"Output assembly code file during compilation">;
6048def _SLASH_Fa : CLJoined<"Fa">,
6049  HelpText<"Set assembly output file name (with /FA)">,
6050  MetaVarName<"<file or dir/>">;
6051def _SLASH_FI : CLJoinedOrSeparate<"FI">,
6052  HelpText<"Include file before parsing">, Alias<include_>;
6053def _SLASH_Fe : CLJoined<"Fe">,
6054  HelpText<"Set output executable file name">,
6055  MetaVarName<"<file or dir/>">;
6056def _SLASH_Fe_COLON : CLJoined<"Fe:">, Alias<_SLASH_Fe>;
6057def _SLASH_Fi : CLCompileJoined<"Fi">,
6058  HelpText<"Set preprocess output file name (with /P)">,
6059  MetaVarName<"<file>">;
6060def _SLASH_Fo : CLCompileJoined<"Fo">,
6061  HelpText<"Set output object file (with /c)">,
6062  MetaVarName<"<file or dir/>">;
6063def _SLASH_guard : CLJoined<"guard:">,
6064  HelpText<"Enable Control Flow Guard with /guard:cf, or only the table with /guard:cf,nochecks. "
6065           "Enable EH Continuation Guard with /guard:ehcont">;
6066def _SLASH_GX : CLFlag<"GX">,
6067  HelpText<"Deprecated; use /EHsc">;
6068def _SLASH_GX_ : CLFlag<"GX-">,
6069  HelpText<"Deprecated (like not passing /EH)">;
6070def _SLASH_imsvc : CLJoinedOrSeparate<"imsvc">,
6071  HelpText<"Add <dir> to system include search path, as if in %INCLUDE%">,
6072  MetaVarName<"<dir>">;
6073def _SLASH_LD : CLFlag<"LD">, HelpText<"Create DLL">;
6074def _SLASH_LDd : CLFlag<"LDd">, HelpText<"Create debug DLL">;
6075def _SLASH_link : CLRemainingArgsJoined<"link">,
6076  HelpText<"Forward options to the linker">, MetaVarName<"<options>">;
6077def _SLASH_MD : Option<["/", "-"], "MD", KIND_FLAG>, Group<_SLASH_M_Group>,
6078  Flags<[CLOption, NoXarchOption]>, HelpText<"Use DLL run-time">;
6079def _SLASH_MDd : Option<["/", "-"], "MDd", KIND_FLAG>, Group<_SLASH_M_Group>,
6080  Flags<[CLOption, NoXarchOption]>, HelpText<"Use DLL debug run-time">;
6081def _SLASH_MT : Option<["/", "-"], "MT", KIND_FLAG>, Group<_SLASH_M_Group>,
6082  Flags<[CLOption, NoXarchOption]>, HelpText<"Use static run-time">;
6083def _SLASH_MTd : Option<["/", "-"], "MTd", KIND_FLAG>, Group<_SLASH_M_Group>,
6084  Flags<[CLOption, NoXarchOption]>, HelpText<"Use static debug run-time">;
6085def _SLASH_o : CLJoinedOrSeparate<"o">,
6086  HelpText<"Deprecated (set output file name); use /Fe or /Fe">,
6087  MetaVarName<"<file or dir/>">;
6088def _SLASH_P : CLFlag<"P">, HelpText<"Preprocess to file">;
6089def _SLASH_Tc : CLCompileJoinedOrSeparate<"Tc">,
6090  HelpText<"Treat <file> as C source file">, MetaVarName<"<file>">;
6091def _SLASH_TC : CLCompileFlag<"TC">, HelpText<"Treat all source files as C">;
6092def _SLASH_Tp : CLCompileJoinedOrSeparate<"Tp">,
6093  HelpText<"Treat <file> as C++ source file">, MetaVarName<"<file>">;
6094def _SLASH_TP : CLCompileFlag<"TP">, HelpText<"Treat all source files as C++">;
6095def _SLASH_vctoolsdir : CLJoinedOrSeparate<"vctoolsdir">,
6096  HelpText<"Path to the VCToolChain">, MetaVarName<"<dir>">;
6097def _SLASH_vctoolsversion : CLJoinedOrSeparate<"vctoolsversion">,
6098  HelpText<"For use with /winsysroot, defaults to newest found">;
6099def _SLASH_winsdkdir : CLJoinedOrSeparate<"winsdkdir">,
6100  HelpText<"Path to the Windows SDK">, MetaVarName<"<dir>">;
6101def _SLASH_winsdkversion : CLJoinedOrSeparate<"winsdkversion">,
6102  HelpText<"Full version of the Windows SDK, defaults to newest found">;
6103def _SLASH_winsysroot : CLJoinedOrSeparate<"winsysroot">,
6104  HelpText<"Same as /vctoolsdir <dir>/VC/Tools/MSVC/<vctoolsversion> /winsdkdir <dir>/Windows Kits/10">,
6105  MetaVarName<"<dir>">;
6106def _SLASH_volatile_iso : Option<["/", "-"], "volatile:iso", KIND_FLAG>,
6107  Group<_SLASH_volatile_Group>, Flags<[CLOption, NoXarchOption]>,
6108  HelpText<"Volatile loads and stores have standard semantics">;
6109def _SLASH_vmb : CLFlag<"vmb">,
6110  HelpText<"Use a best-case representation method for member pointers">;
6111def _SLASH_vmg : CLFlag<"vmg">,
6112  HelpText<"Use a most-general representation for member pointers">;
6113def _SLASH_vms : CLFlag<"vms">,
6114  HelpText<"Set the default most-general representation to single inheritance">;
6115def _SLASH_vmm : CLFlag<"vmm">,
6116  HelpText<"Set the default most-general representation to "
6117           "multiple inheritance">;
6118def _SLASH_vmv : CLFlag<"vmv">,
6119  HelpText<"Set the default most-general representation to "
6120           "virtual inheritance">;
6121def _SLASH_volatile_ms  : Option<["/", "-"], "volatile:ms", KIND_FLAG>,
6122  Group<_SLASH_volatile_Group>, Flags<[CLOption, NoXarchOption]>,
6123  HelpText<"Volatile loads and stores have acquire and release semantics">;
6124def _SLASH_clang : CLJoined<"clang:">,
6125  HelpText<"Pass <arg> to the clang driver">, MetaVarName<"<arg>">;
6126def _SLASH_Zl : CLFlag<"Zl">,
6127  HelpText<"Do not let object file auto-link default libraries">;
6128
6129def _SLASH_Yc : CLJoined<"Yc">,
6130  HelpText<"Generate a pch file for all code up to and including <filename>">,
6131  MetaVarName<"<filename>">;
6132def _SLASH_Yu : CLJoined<"Yu">,
6133  HelpText<"Load a pch file and use it instead of all code up to "
6134           "and including <filename>">,
6135  MetaVarName<"<filename>">;
6136def _SLASH_Y_ : CLFlag<"Y-">,
6137  HelpText<"Disable precompiled headers, overrides /Yc and /Yu">;
6138def _SLASH_Zc_dllexportInlines : CLFlag<"Zc:dllexportInlines">,
6139  HelpText<"dllexport/dllimport inline member functions of dllexport/import classes (default)">;
6140def _SLASH_Zc_dllexportInlines_ : CLFlag<"Zc:dllexportInlines-">,
6141  HelpText<"Do not dllexport/dllimport inline member functions of dllexport/import classes">;
6142def _SLASH_Fp : CLJoined<"Fp">,
6143  HelpText<"Set pch file name (with /Yc and /Yu)">, MetaVarName<"<file>">;
6144
6145def _SLASH_Gd : CLFlag<"Gd">,
6146  HelpText<"Set __cdecl as a default calling convention">;
6147def _SLASH_Gr : CLFlag<"Gr">,
6148  HelpText<"Set __fastcall as a default calling convention">;
6149def _SLASH_Gz : CLFlag<"Gz">,
6150  HelpText<"Set __stdcall as a default calling convention">;
6151def _SLASH_Gv : CLFlag<"Gv">,
6152  HelpText<"Set __vectorcall as a default calling convention">;
6153def _SLASH_Gregcall : CLFlag<"Gregcall">,
6154  HelpText<"Set __regcall as a default calling convention">;
6155
6156// Ignored:
6157
6158def _SLASH_analyze_ : CLIgnoredFlag<"analyze-">;
6159def _SLASH_bigobj : CLIgnoredFlag<"bigobj">;
6160def _SLASH_cgthreads : CLIgnoredJoined<"cgthreads">;
6161def _SLASH_d2FastFail : CLIgnoredFlag<"d2FastFail">;
6162def _SLASH_d2Zi_PLUS : CLIgnoredFlag<"d2Zi+">;
6163def _SLASH_errorReport : CLIgnoredJoined<"errorReport">;
6164def _SLASH_FC : CLIgnoredFlag<"FC">;
6165def _SLASH_Fd : CLIgnoredJoined<"Fd">;
6166def _SLASH_FS : CLIgnoredFlag<"FS">;
6167def _SLASH_JMC : CLIgnoredFlag<"JMC">;
6168def _SLASH_kernel_ : CLIgnoredFlag<"kernel-">;
6169def _SLASH_nologo : CLIgnoredFlag<"nologo">;
6170def _SLASH_permissive_ : CLIgnoredFlag<"permissive-">;
6171def _SLASH_RTC : CLIgnoredJoined<"RTC">;
6172def _SLASH_sdl : CLIgnoredFlag<"sdl">;
6173def _SLASH_sdl_ : CLIgnoredFlag<"sdl-">;
6174def _SLASH_utf8 : CLIgnoredFlag<"utf-8">,
6175  HelpText<"Set source and runtime encoding to UTF-8 (default)">;
6176def _SLASH_w : CLIgnoredJoined<"w">;
6177def _SLASH_Zc___cplusplus : CLIgnoredFlag<"Zc:__cplusplus">;
6178def _SLASH_Zc_auto : CLIgnoredFlag<"Zc:auto">;
6179def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">;
6180def _SLASH_Zc_inline : CLIgnoredFlag<"Zc:inline">;
6181def _SLASH_Zc_rvalueCast : CLIgnoredFlag<"Zc:rvalueCast">;
6182def _SLASH_Zc_ternary : CLIgnoredFlag<"Zc:ternary">;
6183def _SLASH_Zc_wchar_t : CLIgnoredFlag<"Zc:wchar_t">;
6184def _SLASH_ZH_MD5 : CLIgnoredFlag<"ZH:MD5">;
6185def _SLASH_ZH_SHA1 : CLIgnoredFlag<"ZH:SHA1">;
6186def _SLASH_ZH_SHA_256 : CLIgnoredFlag<"ZH:SHA_256">;
6187def _SLASH_Zm : CLIgnoredJoined<"Zm">;
6188def _SLASH_Zo : CLIgnoredFlag<"Zo">;
6189def _SLASH_Zo_ : CLIgnoredFlag<"Zo-">;
6190
6191
6192// Unsupported:
6193
6194def _SLASH_await : CLFlag<"await">;
6195def _SLASH_constexpr : CLJoined<"constexpr:">;
6196def _SLASH_AI : CLJoinedOrSeparate<"AI">;
6197def _SLASH_Bt : CLFlag<"Bt">;
6198def _SLASH_Bt_plus : CLFlag<"Bt+">;
6199def _SLASH_clr : CLJoined<"clr">;
6200def _SLASH_d2 : CLJoined<"d2">;
6201def _SLASH_doc : CLJoined<"doc">;
6202def _SLASH_experimental : CLJoined<"experimental:">;
6203def _SLASH_exportHeader : CLFlag<"exportHeader">;
6204def _SLASH_FA_joined : CLJoined<"FA">;
6205def _SLASH_favor : CLJoined<"favor">;
6206def _SLASH_fsanitize_address_use_after_return : CLJoined<"fsanitize-address-use-after-return">;
6207def _SLASH_fno_sanitize_address_vcasan_lib : CLJoined<"fno-sanitize-address-vcasan-lib">;
6208def _SLASH_F : CLJoinedOrSeparate<"F">;
6209def _SLASH_Fm : CLJoined<"Fm">;
6210def _SLASH_Fr : CLJoined<"Fr">;
6211def _SLASH_FR : CLJoined<"FR">;
6212def _SLASH_FU : CLJoinedOrSeparate<"FU">;
6213def _SLASH_Fx : CLFlag<"Fx">;
6214def _SLASH_G1 : CLFlag<"G1">;
6215def _SLASH_G2 : CLFlag<"G2">;
6216def _SLASH_Ge : CLFlag<"Ge">;
6217def _SLASH_Gh : CLFlag<"Gh">;
6218def _SLASH_GH : CLFlag<"GH">;
6219def _SLASH_GL : CLFlag<"GL">;
6220def _SLASH_GL_ : CLFlag<"GL-">;
6221def _SLASH_Gm : CLFlag<"Gm">;
6222def _SLASH_Gm_ : CLFlag<"Gm-">;
6223def _SLASH_GT : CLFlag<"GT">;
6224def _SLASH_GZ : CLFlag<"GZ">;
6225def _SLASH_H : CLFlag<"H">;
6226def _SLASH_headername : CLJoined<"headerName:">;
6227def _SLASH_headerUnit : CLJoinedOrSeparate<"headerUnit">;
6228def _SLASH_headerUnitAngle : CLJoinedOrSeparate<"headerUnit:angle">;
6229def _SLASH_headerUnitQuote : CLJoinedOrSeparate<"headerUnit:quote">;
6230def _SLASH_homeparams : CLFlag<"homeparams">;
6231def _SLASH_hotpatch : CLFlag<"hotpatch">;
6232def _SLASH_kernel : CLFlag<"kernel">;
6233def _SLASH_LN : CLFlag<"LN">;
6234def _SLASH_MP : CLJoined<"MP">;
6235def _SLASH_Qfast_transcendentals : CLFlag<"Qfast_transcendentals">;
6236def _SLASH_QIfist : CLFlag<"QIfist">;
6237def _SLASH_Qimprecise_fwaits : CLFlag<"Qimprecise_fwaits">;
6238def _SLASH_Qpar : CLFlag<"Qpar">;
6239def _SLASH_Qpar_report : CLJoined<"Qpar-report">;
6240def _SLASH_Qsafe_fp_loads : CLFlag<"Qsafe_fp_loads">;
6241def _SLASH_Qspectre : CLFlag<"Qspectre">;
6242def _SLASH_Qspectre_load : CLFlag<"Qspectre-load">;
6243def _SLASH_Qspectre_load_cf : CLFlag<"Qspectre-load-cf">;
6244def _SLASH_Qvec_report : CLJoined<"Qvec-report">;
6245def _SLASH_reference : CLJoinedOrSeparate<"reference">;
6246def _SLASH_sourceDependencies : CLJoinedOrSeparate<"sourceDependencies">;
6247def _SLASH_sourceDependenciesDirectives : CLJoinedOrSeparate<"sourceDependencies:directives">;
6248def _SLASH_translateInclude : CLFlag<"translateInclude">;
6249def _SLASH_u : CLFlag<"u">;
6250def _SLASH_V : CLFlag<"V">;
6251def _SLASH_WL : CLFlag<"WL">;
6252def _SLASH_Wp64 : CLFlag<"Wp64">;
6253def _SLASH_Yd : CLFlag<"Yd">;
6254def _SLASH_Yl : CLJoined<"Yl">;
6255def _SLASH_Za : CLFlag<"Za">;
6256def _SLASH_Zc : CLJoined<"Zc:">;
6257def _SLASH_Ze : CLFlag<"Ze">;
6258def _SLASH_Zg : CLFlag<"Zg">;
6259def _SLASH_ZI : CLFlag<"ZI">;
6260def _SLASH_ZW : CLJoined<"ZW">;
6261