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// DXCOption - This is a dxc.exe compatibility option. Options with this flag
53// are made available when the driver is running in DXC compatibility mode.
54def DXCOption : OptionFlag;
55
56// CLDXCOption - This is a cl.exe/dxc.exe compatibility option. Options with this flag
57// are made available when the driver is running in CL/DXC compatibility mode.
58def CLDXCOption : OptionFlag;
59
60// NoDriverOption - This option should not be accepted by the driver.
61def NoDriverOption : OptionFlag;
62
63// If an option affects linking, but has a primary group (so Link_Group cannot
64// be used), add this flag.
65def LinkOption : OptionFlag;
66
67// FlangOption - This is considered a "core" Flang option, available in
68// flang mode.
69def FlangOption : OptionFlag;
70
71// FlangOnlyOption - This option should only be used by Flang (i.e. it is not
72// available for Clang)
73def FlangOnlyOption : OptionFlag;
74
75// FC1Option - This option should be accepted by flang -fc1.
76def FC1Option : OptionFlag;
77
78// A short name to show in documentation. The name will be interpreted as rST.
79class DocName<string name> { string DocName = name; }
80
81// A brief description to show in documentation, interpreted as rST.
82class DocBrief<code descr> { code DocBrief = descr; }
83
84// Indicates that this group should be flattened into its parent when generating
85// documentation.
86class DocFlatten { bit DocFlatten = 1; }
87
88// Indicates that this warning is ignored, but accepted with a warning for
89// GCC compatibility.
90class IgnoredGCCCompat : Flags<[HelpHidden]> {}
91
92/////////
93// Groups
94
95def Action_Group : OptionGroup<"<action group>">, DocName<"Actions">,
96                   DocBrief<[{The action to perform on the input.}]>;
97
98// Meta-group for options which are only used for compilation,
99// and not linking etc.
100def CompileOnly_Group : OptionGroup<"<CompileOnly group>">,
101                        DocName<"Compilation flags">, DocBrief<[{
102Flags controlling the behavior of Clang during compilation. These flags have
103no effect during actions that do not perform compilation.}]>;
104
105def Preprocessor_Group : OptionGroup<"<Preprocessor group>">,
106                         Group<CompileOnly_Group>,
107                         DocName<"Preprocessor flags">, DocBrief<[{
108Flags controlling the behavior of the Clang preprocessor.}]>;
109
110def IncludePath_Group : OptionGroup<"<I/i group>">, Group<Preprocessor_Group>,
111                        DocName<"Include path management">,
112                        DocBrief<[{
113Flags controlling how ``#include``\s are resolved to files.}]>;
114
115def I_Group : OptionGroup<"<I group>">, Group<IncludePath_Group>, DocFlatten;
116def i_Group : OptionGroup<"<i group>">, Group<IncludePath_Group>, DocFlatten;
117def clang_i_Group : OptionGroup<"<clang i group>">, Group<i_Group>, DocFlatten;
118
119def M_Group : OptionGroup<"<M group>">, Group<Preprocessor_Group>,
120              DocName<"Dependency file generation">, DocBrief<[{
121Flags controlling generation of a dependency file for ``make``-like build
122systems.}]>;
123
124def d_Group : OptionGroup<"<d group>">, Group<Preprocessor_Group>,
125              DocName<"Dumping preprocessor state">, DocBrief<[{
126Flags allowing the state of the preprocessor to be dumped in various ways.}]>;
127
128def Diag_Group : OptionGroup<"<W/R group>">, Group<CompileOnly_Group>,
129                 DocName<"Diagnostic flags">, DocBrief<[{
130Flags controlling which warnings, errors, and remarks Clang will generate.
131See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.}]>;
132
133def R_Group : OptionGroup<"<R group>">, Group<Diag_Group>, DocFlatten;
134def R_value_Group : OptionGroup<"<R (with value) group>">, Group<R_Group>,
135                    DocFlatten;
136def W_Group : OptionGroup<"<W group>">, Group<Diag_Group>, DocFlatten;
137def W_value_Group : OptionGroup<"<W (with value) group>">, Group<W_Group>,
138                    DocFlatten;
139
140def f_Group : OptionGroup<"<f group>">, Group<CompileOnly_Group>,
141              DocName<"Target-independent compilation options">;
142
143def f_clang_Group : OptionGroup<"<f (clang-only) group>">,
144                    Group<CompileOnly_Group>, DocFlatten;
145def pedantic_Group : OptionGroup<"<pedantic group>">, Group<f_Group>,
146                     DocFlatten;
147def opencl_Group : OptionGroup<"<opencl group>">, Group<f_Group>,
148                   DocName<"OpenCL flags">;
149
150def sycl_Group : OptionGroup<"<SYCL group>">, Group<f_Group>,
151                 DocName<"SYCL flags">;
152
153def m_Group : OptionGroup<"<m group>">, Group<CompileOnly_Group>,
154              DocName<"Target-dependent compilation options">;
155
156// Feature groups - these take command line options that correspond directly to
157// target specific features and can be translated directly from command line
158// options.
159def m_aarch64_Features_Group : OptionGroup<"<aarch64 features group>">,
160                               Group<m_Group>, DocName<"AARCH64">;
161def m_amdgpu_Features_Group : OptionGroup<"<amdgpu features group>">,
162                              Group<m_Group>, DocName<"AMDGPU">;
163def m_arm_Features_Group : OptionGroup<"<arm features group>">,
164                           Group<m_Group>, DocName<"ARM">;
165def m_hexagon_Features_Group : OptionGroup<"<hexagon features group>">,
166                               Group<m_Group>, DocName<"Hexagon">;
167// The features added by this group will not be added to target features.
168// These are explicitly handled.
169def m_hexagon_Features_HVX_Group : OptionGroup<"<hexagon features group>">,
170                                   Group<m_Group>, DocName<"Hexagon">;
171def m_m68k_Features_Group: OptionGroup<"<m68k features group>">,
172                           Group<m_Group>, DocName<"M68k">;
173def m_mips_Features_Group : OptionGroup<"<mips features group>">,
174                            Group<m_Group>, DocName<"MIPS">;
175def m_ppc_Features_Group : OptionGroup<"<ppc features group>">,
176                           Group<m_Group>, DocName<"PowerPC">;
177def m_wasm_Features_Group : OptionGroup<"<wasm features group>">,
178                            Group<m_Group>, DocName<"WebAssembly">;
179// The features added by this group will not be added to target features.
180// These are explicitly handled.
181def m_wasm_Features_Driver_Group : OptionGroup<"<wasm driver features group>">,
182                                   Group<m_Group>, DocName<"WebAssembly Driver">;
183def m_x86_Features_Group : OptionGroup<"<x86 features group>">,
184                           Group<m_Group>, Flags<[CoreOption]>, DocName<"X86">;
185def m_riscv_Features_Group : OptionGroup<"<riscv features group>">,
186                             Group<m_Group>, DocName<"RISCV">;
187
188def m_libc_Group : OptionGroup<"<m libc group>">, Group<m_mips_Features_Group>,
189                   Flags<[HelpHidden]>;
190
191def O_Group : OptionGroup<"<O group>">, Group<CompileOnly_Group>,
192              DocName<"Optimization level">, DocBrief<[{
193Flags controlling how much optimization should be performed.}]>;
194
195def DebugInfo_Group : OptionGroup<"<g group>">, Group<CompileOnly_Group>,
196                      DocName<"Debug information generation">, DocBrief<[{
197Flags controlling how much and what kind of debug information should be
198generated.}]>;
199
200def g_Group : OptionGroup<"<g group>">, Group<DebugInfo_Group>,
201              DocName<"Kind and level of debug information">;
202def gN_Group : OptionGroup<"<gN group>">, Group<g_Group>,
203               DocName<"Debug level">;
204def ggdbN_Group : OptionGroup<"<ggdbN group>">, Group<gN_Group>, DocFlatten;
205def gTune_Group : OptionGroup<"<gTune group>">, Group<g_Group>,
206                  DocName<"Debugger to tune debug information for">;
207def g_flags_Group : OptionGroup<"<g flags group>">, Group<DebugInfo_Group>,
208                    DocName<"Debug information flags">;
209
210def StaticAnalyzer_Group : OptionGroup<"<Static analyzer group>">,
211                           DocName<"Static analyzer flags">, DocBrief<[{
212Flags controlling the behavior of the Clang Static Analyzer.}]>;
213
214// gfortran options that we recognize in the driver and pass along when
215// invoking GCC to compile Fortran code.
216def gfortran_Group : OptionGroup<"<gfortran group>">,
217                     DocName<"Fortran compilation flags">, DocBrief<[{
218Flags that will be passed onto the ``gfortran`` compiler when Clang is given
219a Fortran input.}]>;
220
221def Link_Group : OptionGroup<"<T/e/s/t/u group>">, DocName<"Linker flags">,
222                 DocBrief<[{Flags that are passed on to the linker}]>;
223def T_Group : OptionGroup<"<T group>">, Group<Link_Group>, DocFlatten;
224def u_Group : OptionGroup<"<u group>">, Group<Link_Group>, DocFlatten;
225
226def reserved_lib_Group : OptionGroup<"<reserved libs group>">,
227                         Flags<[Unsupported]>;
228
229// Temporary groups for clang options which we know we don't support,
230// but don't want to verbosely warn the user about.
231def clang_ignored_f_Group : OptionGroup<"<clang ignored f group>">,
232  Group<f_Group>, Flags<[Ignored]>;
233def clang_ignored_m_Group : OptionGroup<"<clang ignored m group>">,
234  Group<m_Group>, Flags<[Ignored]>;
235
236// Group for clang options in the process of deprecation.
237// Please include the version that deprecated the flag as comment to allow
238// easier garbage collection.
239def clang_ignored_legacy_options_Group : OptionGroup<"<clang legacy flags>">,
240  Group<f_Group>, Flags<[Ignored]>;
241
242// Retired with clang-5.0
243def : Flag<["-"], "fslp-vectorize-aggressive">, Group<clang_ignored_legacy_options_Group>;
244def : Flag<["-"], "fno-slp-vectorize-aggressive">, Group<clang_ignored_legacy_options_Group>;
245
246// Retired with clang-10.0. Previously controlled X86 MPX ISA.
247def mmpx : Flag<["-"], "mmpx">, Group<clang_ignored_legacy_options_Group>;
248def mno_mpx : Flag<["-"], "mno-mpx">, Group<clang_ignored_legacy_options_Group>;
249
250// Group that ignores all gcc optimizations that won't be implemented
251def clang_ignored_gcc_optimization_f_Group : OptionGroup<
252  "<clang_ignored_gcc_optimization_f_Group>">, Group<f_Group>, Flags<[Ignored]>;
253
254class DiagnosticOpts<string base>
255  : KeyPathAndMacro<"DiagnosticOpts->", base, "DIAG_"> {}
256class LangOpts<string base>
257  : KeyPathAndMacro<"LangOpts->", base, "LANG_"> {}
258class TargetOpts<string base>
259  : KeyPathAndMacro<"TargetOpts->", base, "TARGET_"> {}
260class FrontendOpts<string base>
261  : KeyPathAndMacro<"FrontendOpts.", base, "FRONTEND_"> {}
262class PreprocessorOutputOpts<string base>
263  : KeyPathAndMacro<"PreprocessorOutputOpts.", base, "PREPROCESSOR_OUTPUT_"> {}
264class DependencyOutputOpts<string base>
265  : KeyPathAndMacro<"DependencyOutputOpts.", base, "DEPENDENCY_OUTPUT_"> {}
266class CodeGenOpts<string base>
267  : KeyPathAndMacro<"CodeGenOpts.", base, "CODEGEN_"> {}
268class HeaderSearchOpts<string base>
269  : KeyPathAndMacro<"HeaderSearchOpts->", base, "HEADER_SEARCH_"> {}
270class PreprocessorOpts<string base>
271  : KeyPathAndMacro<"PreprocessorOpts->", base, "PREPROCESSOR_"> {}
272class FileSystemOpts<string base>
273  : KeyPathAndMacro<"FileSystemOpts.", base, "FILE_SYSTEM_"> {}
274class AnalyzerOpts<string base>
275  : KeyPathAndMacro<"AnalyzerOpts->", base, "ANALYZER_"> {}
276class MigratorOpts<string base>
277  : KeyPathAndMacro<"MigratorOpts.", base, "MIGRATOR_"> {}
278
279// A boolean option which is opt-in in CC1. The positive option exists in CC1 and
280// Args.hasArg(OPT_ffoo) can be used to check that the flag is enabled.
281// This is useful if the option is usually disabled.
282// Use this only when the option cannot be declared via BoolFOption.
283multiclass OptInCC1FFlag<string name, string pos_prefix, string neg_prefix="",
284                      string help="", list<OptionFlag> flags=[]> {
285  def f#NAME : Flag<["-"], "f"#name>, Flags<[CC1Option] # flags>,
286               Group<f_Group>, HelpText<pos_prefix # help>;
287  def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<flags>,
288                  Group<f_Group>, HelpText<neg_prefix # help>;
289}
290
291// A boolean option which is opt-out in CC1. The negative option exists in CC1 and
292// Args.hasArg(OPT_fno_foo) can be used to check that the flag is disabled.
293// Use this only when the option cannot be declared via BoolFOption.
294multiclass OptOutCC1FFlag<string name, string pos_prefix, string neg_prefix,
295                       string help="", list<OptionFlag> flags=[]> {
296  def f#NAME : Flag<["-"], "f"#name>, Flags<flags>,
297               Group<f_Group>, HelpText<pos_prefix # help>;
298  def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<[CC1Option] # flags>,
299                  Group<f_Group>, HelpText<neg_prefix # help>;
300}
301
302// A boolean option which is opt-in in FC1. The positive option exists in FC1 and
303// Args.hasArg(OPT_ffoo) can be used to check that the flag is enabled.
304// This is useful if the option is usually disabled.
305multiclass OptInFC1FFlag<string name, string pos_prefix, string neg_prefix="",
306                      string help="", list<OptionFlag> flags=[]> {
307  def f#NAME : Flag<["-"], "f"#name>, Flags<[FC1Option] # flags>,
308               Group<f_Group>, HelpText<pos_prefix # help>;
309  def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<flags>,
310                  Group<f_Group>, HelpText<neg_prefix # help>;
311}
312
313// A boolean option which is opt-out in FC1. The negative option exists in FC1 and
314// Args.hasArg(OPT_fno_foo) can be used to check that the flag is disabled.
315multiclass OptOutFC1FFlag<string name, string pos_prefix, string neg_prefix,
316                       string help="", list<OptionFlag> flags=[]> {
317  def f#NAME : Flag<["-"], "f"#name>, Flags<flags>,
318               Group<f_Group>, HelpText<pos_prefix # help>;
319  def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<[FC1Option] # flags>,
320                  Group<f_Group>, HelpText<neg_prefix # help>;
321}
322
323// Creates a positive and negative flags where both of them are prefixed with
324// "m", have help text specified for positive and negative option, and a Group
325// optionally specified by the opt_group argument, otherwise Group<m_Group>.
326multiclass SimpleMFlag<string name, string pos_prefix, string neg_prefix,
327                       string help, OptionGroup opt_group = m_Group> {
328  def m#NAME : Flag<["-"], "m"#name>, Group<opt_group>,
329    HelpText<pos_prefix # help>;
330  def mno_#NAME : Flag<["-"], "mno-"#name>, Group<opt_group>,
331    HelpText<neg_prefix # help>;
332}
333
334//===----------------------------------------------------------------------===//
335// BoolOption
336//===----------------------------------------------------------------------===//
337
338// The default value of a marshalled key path.
339class Default<code value> { code Value = value; }
340
341// Convenience variables for boolean defaults.
342def DefaultTrue : Default<"true"> {}
343def DefaultFalse : Default<"false"> {}
344
345// The value set to the key path when the flag is present on the command line.
346class Set<bit value> { bit Value = value; }
347def SetTrue : Set<true> {}
348def SetFalse : Set<false> {}
349
350// Definition of single command line flag. This is an implementation detail, use
351// SetTrueBy or SetFalseBy instead.
352class FlagDef<bit polarity, bit value, list<OptionFlag> option_flags,
353              string help, list<code> implied_by_expressions = []> {
354  // The polarity. Besides spelling, this also decides whether the TableGen
355  // record will be prefixed with "no_".
356  bit Polarity = polarity;
357
358  // The value assigned to key path when the flag is present on command line.
359  bit Value = value;
360
361  // OptionFlags that control visibility of the flag in different tools.
362  list<OptionFlag> OptionFlags = option_flags;
363
364  // The help text associated with the flag.
365  string Help = help;
366
367  // List of expressions that, when true, imply this flag.
368  list<code> ImpliedBy = implied_by_expressions;
369}
370
371// Additional information to be appended to both positive and negative flag.
372class BothFlags<list<OptionFlag> option_flags, string help = ""> {
373  list<OptionFlag> OptionFlags = option_flags;
374  string Help = help;
375}
376
377// Functor that appends the suffix to the base flag definition.
378class ApplySuffix<FlagDef flag, BothFlags suffix> {
379  FlagDef Result
380    = FlagDef<flag.Polarity, flag.Value,
381              flag.OptionFlags # suffix.OptionFlags,
382              flag.Help # suffix.Help, flag.ImpliedBy>;
383}
384
385// Definition of the command line flag with positive spelling, e.g. "-ffoo".
386class PosFlag<Set value, list<OptionFlag> flags = [], string help = "",
387              list<code> implied_by_expressions = []>
388  : FlagDef<true, value.Value, flags, help, implied_by_expressions> {}
389
390// Definition of the command line flag with negative spelling, e.g. "-fno-foo".
391class NegFlag<Set value, list<OptionFlag> flags = [], string help = "",
392              list<code> implied_by_expressions = []>
393  : FlagDef<false, value.Value, flags, help, implied_by_expressions> {}
394
395// Expanded FlagDef that's convenient for creation of TableGen records.
396class FlagDefExpanded<FlagDef flag, string prefix, string name, string spelling>
397  : FlagDef<flag.Polarity, flag.Value, flag.OptionFlags, flag.Help,
398            flag.ImpliedBy> {
399  // Name of the TableGen record.
400  string RecordName = prefix # !if(flag.Polarity, "", "no_") # name;
401
402  // Spelling of the flag.
403  string Spelling = prefix # !if(flag.Polarity, "", "no-") # spelling;
404
405  // Can the flag be implied by another flag?
406  bit CanBeImplied = !not(!empty(flag.ImpliedBy));
407
408  // C++ code that will be assigned to the keypath when the flag is present.
409  code ValueAsCode = !if(flag.Value, "true", "false");
410}
411
412// TableGen record for a single marshalled flag.
413class MarshalledFlagRec<FlagDefExpanded flag, FlagDefExpanded other,
414                        FlagDefExpanded implied, KeyPathAndMacro kpm,
415                        Default default>
416  : Flag<["-"], flag.Spelling>, Flags<flag.OptionFlags>, HelpText<flag.Help>,
417    MarshallingInfoBooleanFlag<kpm, default.Value, flag.ValueAsCode,
418                               other.ValueAsCode, other.RecordName>,
419    ImpliedByAnyOf<implied.ImpliedBy, implied.ValueAsCode> {}
420
421// Generates TableGen records for two command line flags that control the same
422// key path via the marshalling infrastructure.
423// Names of the records consist of the specified prefix, "no_" for the negative
424// flag, and NAME.
425// Used for -cc1 frontend options. Driver-only options do not map to
426// CompilerInvocation.
427multiclass BoolOption<string prefix = "", string spelling_base,
428                      KeyPathAndMacro kpm, Default default,
429                      FlagDef flag1_base, FlagDef flag2_base,
430                      BothFlags suffix = BothFlags<[], "">> {
431  defvar flag1 = FlagDefExpanded<ApplySuffix<flag1_base, suffix>.Result, prefix,
432                                 NAME, spelling_base>;
433
434  defvar flag2 = FlagDefExpanded<ApplySuffix<flag2_base, suffix>.Result, prefix,
435                                 NAME, spelling_base>;
436
437  // The flags must have different polarity, different values, and only
438  // one can be implied.
439  assert !xor(flag1.Polarity, flag2.Polarity),
440         "the flags must have different polarity: flag1: " #
441             flag1.Polarity # ", flag2: " # flag2.Polarity;
442  assert !ne(flag1.Value, flag2.Value),
443         "the flags must have different values: flag1: " #
444             flag1.Value # ", flag2: " # flag2.Value;
445  assert !not(!and(flag1.CanBeImplied, flag2.CanBeImplied)),
446         "only one of the flags can be implied: flag1: " #
447             flag1.CanBeImplied # ", flag2: " # flag2.CanBeImplied;
448
449  defvar implied = !if(flag1.CanBeImplied, flag1, flag2);
450
451  def flag1.RecordName : MarshalledFlagRec<flag1, flag2, implied, kpm, default>;
452  def flag2.RecordName : MarshalledFlagRec<flag2, flag1, implied, kpm, default>;
453}
454
455/// Creates a BoolOption where both of the flags are prefixed with "f", are in
456/// the Group<f_Group>.
457/// Used for -cc1 frontend options. Driver-only options do not map to
458/// CompilerInvocation.
459multiclass BoolFOption<string flag_base, KeyPathAndMacro kpm,
460                       Default default, FlagDef flag1, FlagDef flag2,
461                       BothFlags both = BothFlags<[], "">> {
462  defm NAME : BoolOption<"f", flag_base, kpm, default, flag1, flag2, both>,
463              Group<f_Group>;
464}
465
466// Creates a BoolOption where both of the flags are prefixed with "g" and have
467// the Group<g_Group>.
468// Used for -cc1 frontend options. Driver-only options do not map to
469// CompilerInvocation.
470multiclass BoolGOption<string flag_base, KeyPathAndMacro kpm,
471                       Default default, FlagDef flag1, FlagDef flag2,
472                       BothFlags both = BothFlags<[], "">> {
473  defm NAME : BoolOption<"g", flag_base, kpm, default, flag1, flag2, both>,
474              Group<g_Group>;
475}
476
477// FIXME: Diagnose if target does not support protected visibility.
478class MarshallingInfoVisibility<KeyPathAndMacro kpm, code default>
479  : MarshallingInfoEnum<kpm, default>,
480    Values<"default,hidden,internal,protected">,
481    NormalizedValues<["DefaultVisibility", "HiddenVisibility",
482                      "HiddenVisibility", "ProtectedVisibility"]> {}
483
484// Key paths that are constant during parsing of options with the same key path prefix.
485defvar cplusplus = LangOpts<"CPlusPlus">;
486defvar cpp11 = LangOpts<"CPlusPlus11">;
487defvar cpp17 = LangOpts<"CPlusPlus17">;
488defvar cpp20 = LangOpts<"CPlusPlus20">;
489defvar c99 = LangOpts<"C99">;
490defvar c2x = LangOpts<"C2x">;
491defvar lang_std = LangOpts<"LangStd">;
492defvar open_cl = LangOpts<"OpenCL">;
493defvar cuda = LangOpts<"CUDA">;
494defvar render_script = LangOpts<"RenderScript">;
495defvar hip = LangOpts<"HIP">;
496defvar gnu_mode = LangOpts<"GNUMode">;
497defvar asm_preprocessor = LangOpts<"AsmPreprocessor">;
498
499defvar std = !strconcat("LangStandard::getLangStandardForKind(", lang_std.KeyPath, ")");
500
501/////////
502// Options
503
504// The internal option ID must be a valid C++ identifier and results in a
505// clang::driver::options::OPT_XX enum constant for XX.
506//
507// We want to unambiguously be able to refer to options from the driver source
508// code, for this reason the option name is mangled into an ID. This mangling
509// isn't guaranteed to have an inverse, but for practical purposes it does.
510//
511// The mangling scheme is to ignore the leading '-', and perform the following
512// substitutions:
513//   _ => __
514//   - => _
515//   / => _SLASH
516//   # => _HASH
517//   ? => _QUESTION
518//   , => _COMMA
519//   = => _EQ
520//   C++ => CXX
521//   . => _
522
523// Developer Driver Options
524
525def internal_Group : OptionGroup<"<clang internal options>">, Flags<[HelpHidden]>;
526def internal_driver_Group : OptionGroup<"<clang driver internal options>">,
527  Group<internal_Group>, HelpText<"DRIVER OPTIONS">;
528def internal_debug_Group :
529  OptionGroup<"<clang debug/development internal options>">,
530  Group<internal_Group>, HelpText<"DEBUG/DEVELOPMENT OPTIONS">;
531
532class InternalDriverOpt : Group<internal_driver_Group>,
533  Flags<[NoXarchOption, HelpHidden]>;
534def driver_mode : Joined<["--"], "driver-mode=">, Group<internal_driver_Group>,
535  Flags<[CoreOption, NoXarchOption, HelpHidden]>,
536  HelpText<"Set the driver mode to either 'gcc', 'g++', 'cpp', or 'cl'">;
537def rsp_quoting : Joined<["--"], "rsp-quoting=">, Group<internal_driver_Group>,
538  Flags<[CoreOption, NoXarchOption, HelpHidden]>,
539  HelpText<"Set the rsp quoting to either 'posix', or 'windows'">;
540def ccc_gcc_name : Separate<["-"], "ccc-gcc-name">, InternalDriverOpt,
541  HelpText<"Name for native GCC compiler">,
542  MetaVarName<"<gcc-path>">;
543
544class InternalDebugOpt : Group<internal_debug_Group>,
545  Flags<[NoXarchOption, HelpHidden, CoreOption]>;
546def ccc_install_dir : Separate<["-"], "ccc-install-dir">, InternalDebugOpt,
547  HelpText<"Simulate installation in the given directory">;
548def ccc_print_phases : Flag<["-"], "ccc-print-phases">, InternalDebugOpt,
549  HelpText<"Dump list of actions to perform">;
550def ccc_print_bindings : Flag<["-"], "ccc-print-bindings">, InternalDebugOpt,
551  HelpText<"Show bindings of tools to actions">;
552
553def ccc_arcmt_check : Flag<["-"], "ccc-arcmt-check">, InternalDriverOpt,
554  HelpText<"Check for ARC migration issues that need manual handling">;
555def ccc_arcmt_modify : Flag<["-"], "ccc-arcmt-modify">, InternalDriverOpt,
556  HelpText<"Apply modifications to files to conform to ARC">;
557def ccc_arcmt_migrate : Separate<["-"], "ccc-arcmt-migrate">, InternalDriverOpt,
558  HelpText<"Apply modifications and produces temporary files that conform to ARC">;
559def arcmt_migrate_report_output : Separate<["-"], "arcmt-migrate-report-output">,
560  HelpText<"Output path for the plist report">,  Flags<[CC1Option]>,
561  MarshallingInfoString<FrontendOpts<"ARCMTMigrateReportOut">>;
562def arcmt_migrate_emit_arc_errors : Flag<["-"], "arcmt-migrate-emit-errors">,
563  HelpText<"Emit ARC errors even if the migrator can fix them">, Flags<[CC1Option]>,
564  MarshallingInfoFlag<FrontendOpts<"ARCMTMigrateEmitARCErrors">>;
565def gen_reproducer_eq: Joined<["-"], "gen-reproducer=">, Flags<[NoArgumentUnused, CoreOption]>,
566  HelpText<"Emit reproducer on (option: off, crash (default), error, always)">;
567def gen_reproducer: Flag<["-"], "gen-reproducer">, InternalDebugOpt,
568  Alias<gen_reproducer_eq>, AliasArgs<["always"]>,
569  HelpText<"Auto-generates preprocessed source files and a reproduction script">;
570def gen_cdb_fragment_path: Separate<["-"], "gen-cdb-fragment-path">, InternalDebugOpt,
571  HelpText<"Emit a compilation database fragment to the specified directory">;
572
573def round_trip_args : Flag<["-"], "round-trip-args">, Flags<[CC1Option, NoDriverOption]>,
574  HelpText<"Enable command line arguments round-trip.">;
575def no_round_trip_args : Flag<["-"], "no-round-trip-args">, Flags<[CC1Option, NoDriverOption]>,
576  HelpText<"Disable command line arguments round-trip.">;
577
578def _migrate : Flag<["--"], "migrate">, Flags<[NoXarchOption]>,
579  HelpText<"Run the migrator">;
580def ccc_objcmt_migrate : Separate<["-"], "ccc-objcmt-migrate">,
581  InternalDriverOpt,
582  HelpText<"Apply modifications and produces temporary files to migrate to "
583   "modern ObjC syntax">;
584
585def objcmt_migrate_literals : Flag<["-"], "objcmt-migrate-literals">, Flags<[CC1Option]>,
586  HelpText<"Enable migration to modern ObjC literals">,
587  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Literals">;
588def objcmt_migrate_subscripting : Flag<["-"], "objcmt-migrate-subscripting">, Flags<[CC1Option]>,
589  HelpText<"Enable migration to modern ObjC subscripting">,
590  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Subscripting">;
591def objcmt_migrate_property : Flag<["-"], "objcmt-migrate-property">, Flags<[CC1Option]>,
592  HelpText<"Enable migration to modern ObjC property">,
593  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Property">;
594def objcmt_migrate_all : Flag<["-"], "objcmt-migrate-all">, Flags<[CC1Option]>,
595  HelpText<"Enable migration to modern ObjC">,
596  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_MigrateDecls">;
597def objcmt_migrate_readonly_property : Flag<["-"], "objcmt-migrate-readonly-property">, Flags<[CC1Option]>,
598  HelpText<"Enable migration to modern ObjC readonly property">,
599  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ReadonlyProperty">;
600def objcmt_migrate_readwrite_property : Flag<["-"], "objcmt-migrate-readwrite-property">, Flags<[CC1Option]>,
601  HelpText<"Enable migration to modern ObjC readwrite property">,
602  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ReadwriteProperty">;
603def objcmt_migrate_property_dot_syntax : Flag<["-"], "objcmt-migrate-property-dot-syntax">, Flags<[CC1Option]>,
604  HelpText<"Enable migration of setter/getter messages to property-dot syntax">,
605  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_PropertyDotSyntax">;
606def objcmt_migrate_annotation : Flag<["-"], "objcmt-migrate-annotation">, Flags<[CC1Option]>,
607  HelpText<"Enable migration to property and method annotations">,
608  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Annotation">;
609def objcmt_migrate_instancetype : Flag<["-"], "objcmt-migrate-instancetype">, Flags<[CC1Option]>,
610  HelpText<"Enable migration to infer instancetype for method result type">,
611  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Instancetype">;
612def objcmt_migrate_nsmacros : Flag<["-"], "objcmt-migrate-ns-macros">, Flags<[CC1Option]>,
613  HelpText<"Enable migration to NS_ENUM/NS_OPTIONS macros">,
614  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_NsMacros">;
615def objcmt_migrate_protocol_conformance : Flag<["-"], "objcmt-migrate-protocol-conformance">, Flags<[CC1Option]>,
616  HelpText<"Enable migration to add protocol conformance on classes">,
617  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ProtocolConformance">;
618def objcmt_atomic_property : Flag<["-"], "objcmt-atomic-property">, Flags<[CC1Option]>,
619  HelpText<"Make migration to 'atomic' properties">,
620  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_AtomicProperty">;
621def objcmt_returns_innerpointer_property : Flag<["-"], "objcmt-returns-innerpointer-property">, Flags<[CC1Option]>,
622  HelpText<"Enable migration to annotate property with NS_RETURNS_INNER_POINTER">,
623  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ReturnsInnerPointerProperty">;
624def objcmt_ns_nonatomic_iosonly: Flag<["-"], "objcmt-ns-nonatomic-iosonly">, Flags<[CC1Option]>,
625  HelpText<"Enable migration to use NS_NONATOMIC_IOSONLY macro for setting property's 'atomic' attribute">,
626  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_NsAtomicIOSOnlyProperty">;
627def objcmt_migrate_designated_init : Flag<["-"], "objcmt-migrate-designated-init">, Flags<[CC1Option]>,
628  HelpText<"Enable migration to infer NS_DESIGNATED_INITIALIZER for initializer methods">,
629  MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_DesignatedInitializer">;
630
631def objcmt_allowlist_dir_path: Joined<["-"], "objcmt-allowlist-dir-path=">, Flags<[CC1Option]>,
632  HelpText<"Only modify files with a filename contained in the provided directory path">,
633  MarshallingInfoString<FrontendOpts<"ObjCMTAllowListPath">>;
634def : Joined<["-"], "objcmt-whitelist-dir-path=">, Flags<[CC1Option]>,
635  HelpText<"Alias for -objcmt-allowlist-dir-path">,
636  Alias<objcmt_allowlist_dir_path>;
637// The misspelt "white-list" [sic] alias is due for removal.
638def : Joined<["-"], "objcmt-white-list-dir-path=">, Flags<[CC1Option]>,
639  Alias<objcmt_allowlist_dir_path>;
640
641// Make sure all other -ccc- options are rejected.
642def ccc_ : Joined<["-"], "ccc-">, Group<internal_Group>, Flags<[Unsupported]>;
643
644// Standard Options
645
646def _HASH_HASH_HASH : Flag<["-"], "###">, Flags<[NoXarchOption, CoreOption, FlangOption]>,
647    HelpText<"Print (but do not run) the commands to run for this compilation">;
648def _DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>,
649    Flags<[NoXarchOption, CoreOption]>;
650def A : JoinedOrSeparate<["-"], "A">, Flags<[RenderJoined]>, Group<gfortran_Group>;
651def B : JoinedOrSeparate<["-"], "B">, MetaVarName<"<prefix>">,
652    HelpText<"Search $prefix$file for executables, libraries, and data files. "
653    "If $prefix is a directory, search $prefix/$file">;
654def gcc_toolchain : Joined<["--"], "gcc-toolchain=">, Flags<[NoXarchOption]>,
655  HelpText<"Search for GCC installation in the specified directory on targets which commonly use GCC. "
656  "The directory usually contains 'lib{,32,64}/gcc{,-cross}/$triple' and 'include'. If specified, "
657  "sysroot is skipped for GCC detection. Note: executables (e.g. ld) used by the compiler are not "
658  "overridden by the selected GCC installation">;
659def CC : Flag<["-"], "CC">, Flags<[CC1Option]>, Group<Preprocessor_Group>,
660    HelpText<"Include comments from within macros in preprocessed output">,
661    MarshallingInfoFlag<PreprocessorOutputOpts<"ShowMacroComments">>;
662def C : Flag<["-"], "C">, Flags<[CC1Option]>, Group<Preprocessor_Group>,
663    HelpText<"Include comments in preprocessed output">,
664    MarshallingInfoFlag<PreprocessorOutputOpts<"ShowComments">>;
665def D : JoinedOrSeparate<["-"], "D">, Group<Preprocessor_Group>,
666    Flags<[CC1Option, FlangOption, FC1Option]>, MetaVarName<"<macro>=<value>">,
667    HelpText<"Define <macro> to <value> (or 1 if <value> omitted)">;
668def E : Flag<["-"], "E">, Flags<[NoXarchOption,CC1Option, FlangOption, FC1Option]>, Group<Action_Group>,
669    HelpText<"Only run the preprocessor">;
670def F : JoinedOrSeparate<["-"], "F">, Flags<[RenderJoined,CC1Option]>,
671    HelpText<"Add directory to framework include search path">;
672def G : JoinedOrSeparate<["-"], "G">, Flags<[NoXarchOption]>, Group<m_Group>,
673    MetaVarName<"<size>">, HelpText<"Put objects of at most <size> bytes "
674    "into small data section (MIPS / Hexagon)">;
675def G_EQ : Joined<["-"], "G=">, Flags<[NoXarchOption]>, Group<m_Group>, Alias<G>;
676def H : Flag<["-"], "H">, Flags<[CC1Option]>, Group<Preprocessor_Group>,
677    HelpText<"Show header includes and nesting depth">,
678    MarshallingInfoFlag<DependencyOutputOpts<"ShowHeaderIncludes">>;
679def fshow_skipped_includes : Flag<["-"], "fshow-skipped-includes">,
680  Flags<[CC1Option]>, HelpText<"Show skipped includes in -H output.">,
681  DocBrief<[{#include files may be "skipped" due to include guard optimization
682             or #pragma once. This flag makes -H show also such includes.}]>,
683  MarshallingInfoFlag<DependencyOutputOpts<"ShowSkippedHeaderIncludes">>;
684
685def I_ : Flag<["-"], "I-">, Group<I_Group>,
686    HelpText<"Restrict all prior -I flags to double-quoted inclusion and "
687             "remove current directory from include path">;
688def I : JoinedOrSeparate<["-"], "I">, Group<I_Group>,
689    Flags<[CC1Option,CC1AsOption,FlangOption,FC1Option]>, MetaVarName<"<dir>">,
690    HelpText<"Add directory to the end of the list of include search paths">,
691    DocBrief<[{Add directory to include search path. For C++ inputs, if
692there are multiple -I options, these directories are searched
693in the order they are given before the standard system directories
694are searched. If the same directory is in the SYSTEM include search
695paths, for example if also specified with -isystem, the -I option
696will be ignored}]>;
697def L : JoinedOrSeparate<["-"], "L">, Flags<[RenderJoined]>, Group<Link_Group>,
698    MetaVarName<"<dir>">, HelpText<"Add directory to library search path">;
699def MD : Flag<["-"], "MD">, Group<M_Group>,
700    HelpText<"Write a depfile containing user and system headers">;
701def MMD : Flag<["-"], "MMD">, Group<M_Group>,
702    HelpText<"Write a depfile containing user headers">;
703def M : Flag<["-"], "M">, Group<M_Group>,
704    HelpText<"Like -MD, but also implies -E and writes to stdout by default">;
705def MM : Flag<["-"], "MM">, Group<M_Group>,
706    HelpText<"Like -MMD, but also implies -E and writes to stdout by default">;
707def MF : JoinedOrSeparate<["-"], "MF">, Group<M_Group>,
708    HelpText<"Write depfile output from -MMD, -MD, -MM, or -M to <file>">,
709    MetaVarName<"<file>">;
710def MG : Flag<["-"], "MG">, Group<M_Group>, Flags<[CC1Option]>,
711    HelpText<"Add missing headers to depfile">,
712    MarshallingInfoFlag<DependencyOutputOpts<"AddMissingHeaderDeps">>;
713def MJ : JoinedOrSeparate<["-"], "MJ">, Group<M_Group>,
714    HelpText<"Write a compilation database entry per input">;
715def MP : Flag<["-"], "MP">, Group<M_Group>, Flags<[CC1Option]>,
716    HelpText<"Create phony target for each dependency (other than main file)">,
717    MarshallingInfoFlag<DependencyOutputOpts<"UsePhonyTargets">>;
718def MQ : JoinedOrSeparate<["-"], "MQ">, Group<M_Group>, Flags<[CC1Option]>,
719    HelpText<"Specify name of main file output to quote in depfile">;
720def MT : JoinedOrSeparate<["-"], "MT">, Group<M_Group>, Flags<[CC1Option]>,
721    HelpText<"Specify name of main file output in depfile">,
722    MarshallingInfoStringVector<DependencyOutputOpts<"Targets">>;
723def MV : Flag<["-"], "MV">, Group<M_Group>, Flags<[CC1Option]>,
724    HelpText<"Use NMake/Jom format for the depfile">,
725    MarshallingInfoFlag<DependencyOutputOpts<"OutputFormat">, "DependencyOutputFormat::Make">,
726    Normalizer<"makeFlagToValueNormalizer(DependencyOutputFormat::NMake)">;
727def Mach : Flag<["-"], "Mach">, Group<Link_Group>;
728def O0 : Flag<["-"], "O0">, Group<O_Group>, Flags<[CC1Option, FC1Option, HelpHidden]>;
729def O4 : Flag<["-"], "O4">, Group<O_Group>, Flags<[CC1Option, FC1Option, HelpHidden]>;
730def ObjCXX : Flag<["-"], "ObjC++">, Flags<[NoXarchOption]>,
731  HelpText<"Treat source input files as Objective-C++ inputs">;
732def ObjC : Flag<["-"], "ObjC">, Flags<[NoXarchOption]>,
733  HelpText<"Treat source input files as Objective-C inputs">;
734def O : Joined<["-"], "O">, Group<O_Group>, Flags<[CC1Option,FC1Option]>;
735def O_flag : Flag<["-"], "O">, Flags<[CC1Option,FC1Option]>, Alias<O>, AliasArgs<["1"]>;
736def Ofast : Joined<["-"], "Ofast">, Group<O_Group>, Flags<[CC1Option]>;
737def P : Flag<["-"], "P">, Flags<[CC1Option,FlangOption,FC1Option]>, Group<Preprocessor_Group>,
738  HelpText<"Disable linemarker output in -E mode">,
739  MarshallingInfoNegativeFlag<PreprocessorOutputOpts<"ShowLineMarkers">>;
740def Qy : Flag<["-"], "Qy">, Flags<[CC1Option]>,
741  HelpText<"Emit metadata containing compiler name and version">;
742def Qn : Flag<["-"], "Qn">, Flags<[CC1Option]>,
743  HelpText<"Do not emit metadata containing compiler name and version">;
744def : Flag<["-"], "fident">, Group<f_Group>, Alias<Qy>,
745  Flags<[CoreOption, CC1Option]>;
746def : Flag<["-"], "fno-ident">, Group<f_Group>, Alias<Qn>,
747  Flags<[CoreOption, CC1Option]>;
748def Qunused_arguments : Flag<["-"], "Qunused-arguments">, Flags<[NoXarchOption, CoreOption]>,
749  HelpText<"Don't emit warning for unused driver arguments">;
750def Q : Flag<["-"], "Q">, IgnoredGCCCompat;
751def Rpass_EQ : Joined<["-"], "Rpass=">, Group<R_value_Group>, Flags<[CC1Option]>,
752  HelpText<"Report transformations performed by optimization passes whose "
753           "name matches the given POSIX regular expression">;
754def Rpass_missed_EQ : Joined<["-"], "Rpass-missed=">, Group<R_value_Group>,
755  Flags<[CC1Option]>,
756  HelpText<"Report missed transformations by optimization passes whose "
757           "name matches the given POSIX regular expression">;
758def Rpass_analysis_EQ : Joined<["-"], "Rpass-analysis=">, Group<R_value_Group>,
759  Flags<[CC1Option]>,
760  HelpText<"Report transformation analysis from optimization passes whose "
761           "name matches the given POSIX regular expression">;
762def R_Joined : Joined<["-"], "R">, Group<R_Group>, Flags<[CC1Option, CoreOption]>,
763  MetaVarName<"<remark>">, HelpText<"Enable the specified remark">;
764def S : Flag<["-"], "S">, Flags<[NoXarchOption,CC1Option,FlangOption,FC1Option]>, Group<Action_Group>,
765  HelpText<"Only run preprocess and compilation steps">;
766def Tbss : JoinedOrSeparate<["-"], "Tbss">, Group<T_Group>,
767  MetaVarName<"<addr>">, HelpText<"Set starting address of BSS to <addr>">;
768def Tdata : JoinedOrSeparate<["-"], "Tdata">, Group<T_Group>,
769  MetaVarName<"<addr>">, HelpText<"Set starting address of DATA to <addr>">;
770def Ttext : JoinedOrSeparate<["-"], "Ttext">, Group<T_Group>,
771  MetaVarName<"<addr>">, HelpText<"Set starting address of TEXT to <addr>">;
772def T : JoinedOrSeparate<["-"], "T">, Group<T_Group>,
773  MetaVarName<"<script>">, HelpText<"Specify <script> as linker script">;
774def U : JoinedOrSeparate<["-"], "U">, Group<Preprocessor_Group>,
775  Flags<[CC1Option, FlangOption, FC1Option]>, MetaVarName<"<macro>">, HelpText<"Undefine macro <macro>">;
776def V : JoinedOrSeparate<["-"], "V">, Flags<[NoXarchOption, Unsupported]>;
777def Wa_COMMA : CommaJoined<["-"], "Wa,">,
778  HelpText<"Pass the comma separated arguments in <arg> to the assembler">,
779  MetaVarName<"<arg>">;
780def Wall : Flag<["-"], "Wall">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
781def WCL4 : Flag<["-"], "WCL4">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
782def Wsystem_headers : Flag<["-"], "Wsystem-headers">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
783def Wno_system_headers : Flag<["-"], "Wno-system-headers">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
784def Wdeprecated : Flag<["-"], "Wdeprecated">, Group<W_Group>, Flags<[CC1Option]>,
785  HelpText<"Enable warnings for deprecated constructs and define __DEPRECATED">;
786def Wno_deprecated : Flag<["-"], "Wno-deprecated">, Group<W_Group>, Flags<[CC1Option]>;
787def Wl_COMMA : CommaJoined<["-"], "Wl,">, Flags<[LinkerInput, RenderAsInput]>,
788  HelpText<"Pass the comma separated arguments in <arg> to the linker">,
789  MetaVarName<"<arg>">, Group<Link_Group>;
790// FIXME: This is broken; these should not be Joined arguments.
791def Wno_nonportable_cfstrings : Joined<["-"], "Wno-nonportable-cfstrings">, Group<W_Group>,
792  Flags<[CC1Option]>;
793def Wnonportable_cfstrings : Joined<["-"], "Wnonportable-cfstrings">, Group<W_Group>,
794  Flags<[CC1Option]>;
795def Wp_COMMA : CommaJoined<["-"], "Wp,">,
796  HelpText<"Pass the comma separated arguments in <arg> to the preprocessor">,
797  MetaVarName<"<arg>">, Group<Preprocessor_Group>;
798def Wundef_prefix_EQ : CommaJoined<["-"], "Wundef-prefix=">, Group<W_value_Group>,
799  Flags<[CC1Option, CoreOption, HelpHidden]>, MetaVarName<"<arg>">,
800  HelpText<"Enable warnings for undefined macros with a prefix in the comma separated list <arg>">,
801  MarshallingInfoStringVector<DiagnosticOpts<"UndefPrefixes">>;
802def Wwrite_strings : Flag<["-"], "Wwrite-strings">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
803def Wno_write_strings : Flag<["-"], "Wno-write-strings">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
804def W_Joined : Joined<["-"], "W">, Group<W_Group>, Flags<[CC1Option, CoreOption, FC1Option, FlangOption]>,
805  MetaVarName<"<warning>">, HelpText<"Enable the specified warning">;
806def Xanalyzer : Separate<["-"], "Xanalyzer">,
807  HelpText<"Pass <arg> to the static analyzer">, MetaVarName<"<arg>">,
808  Group<StaticAnalyzer_Group>;
809def Xarch__ : JoinedAndSeparate<["-"], "Xarch_">, Flags<[NoXarchOption]>;
810def Xarch_host : Separate<["-"], "Xarch_host">, Flags<[NoXarchOption]>,
811  HelpText<"Pass <arg> to the CUDA/HIP host compilation">, MetaVarName<"<arg>">;
812def Xarch_device : Separate<["-"], "Xarch_device">, Flags<[NoXarchOption]>,
813  HelpText<"Pass <arg> to the CUDA/HIP device compilation">, MetaVarName<"<arg>">;
814def Xassembler : Separate<["-"], "Xassembler">,
815  HelpText<"Pass <arg> to the assembler">, MetaVarName<"<arg>">,
816  Group<CompileOnly_Group>;
817def Xclang : Separate<["-"], "Xclang">,
818  HelpText<"Pass <arg> to the clang compiler">, MetaVarName<"<arg>">,
819  Flags<[NoXarchOption, CoreOption]>, Group<CompileOnly_Group>;
820def Xcuda_fatbinary : Separate<["-"], "Xcuda-fatbinary">,
821  HelpText<"Pass <arg> to fatbinary invocation">, MetaVarName<"<arg>">;
822def Xcuda_ptxas : Separate<["-"], "Xcuda-ptxas">,
823  HelpText<"Pass <arg> to the ptxas assembler">, MetaVarName<"<arg>">;
824def Xopenmp_target : Separate<["-"], "Xopenmp-target">, Group<CompileOnly_Group>,
825  HelpText<"Pass <arg> to the target offloading toolchain.">, MetaVarName<"<arg>">;
826def Xopenmp_target_EQ : JoinedAndSeparate<["-"], "Xopenmp-target=">, Group<CompileOnly_Group>,
827  HelpText<"Pass <arg> to the target offloading toolchain identified by <triple>.">,
828  MetaVarName<"<triple> <arg>">;
829def z : Separate<["-"], "z">, Flags<[LinkerInput, RenderAsInput]>,
830  HelpText<"Pass -z <arg> to the linker">, MetaVarName<"<arg>">,
831  Group<Link_Group>;
832def offload_link : Flag<["--"], "offload-link">, Group<Link_Group>,
833  HelpText<"Use the new offloading linker to perform the link job.">;
834def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, RenderAsInput]>,
835  HelpText<"Pass <arg> to the linker">, MetaVarName<"<arg>">,
836  Group<Link_Group>;
837def Xoffload_linker : JoinedAndSeparate<["-"], "Xoffload-linker">,
838  HelpText<"Pass <arg> to the offload linkers or the ones idenfied by -<triple>">,
839  MetaVarName<"<triple> <arg>">, Group<Link_Group>;
840def Xpreprocessor : Separate<["-"], "Xpreprocessor">, Group<Preprocessor_Group>,
841  HelpText<"Pass <arg> to the preprocessor">, MetaVarName<"<arg>">;
842def X_Flag : Flag<["-"], "X">, Group<Link_Group>;
843def X_Joined : Joined<["-"], "X">, IgnoredGCCCompat;
844def Z_Flag : Flag<["-"], "Z">, Group<Link_Group>;
845// FIXME: All we do with this is reject it. Remove.
846def Z_Joined : Joined<["-"], "Z">;
847def all__load : Flag<["-"], "all_load">;
848def allowable__client : Separate<["-"], "allowable_client">;
849def ansi : Flag<["-", "--"], "ansi">, Group<CompileOnly_Group>;
850def arch__errors__fatal : Flag<["-"], "arch_errors_fatal">;
851def arch : Separate<["-"], "arch">, Flags<[NoXarchOption]>;
852def arch__only : Separate<["-"], "arch_only">;
853def a : Joined<["-"], "a">;
854def autocomplete : Joined<["--"], "autocomplete=">;
855def bind__at__load : Flag<["-"], "bind_at_load">;
856def bundle__loader : Separate<["-"], "bundle_loader">;
857def bundle : Flag<["-"], "bundle">;
858def b : JoinedOrSeparate<["-"], "b">, Flags<[LinkerInput, RenderAsInput]>,
859  HelpText<"Pass -b <arg> to the linker on AIX (only).">, MetaVarName<"<arg>">,
860  Group<Link_Group>;
861// OpenCL-only Options
862def cl_opt_disable : Flag<["-"], "cl-opt-disable">, Group<opencl_Group>, Flags<[CC1Option]>,
863  HelpText<"OpenCL only. This option disables all optimizations. By default optimizations are enabled.">;
864def cl_strict_aliasing : Flag<["-"], "cl-strict-aliasing">, Group<opencl_Group>, Flags<[CC1Option]>,
865  HelpText<"OpenCL only. This option is added for compatibility with OpenCL 1.0.">;
866def cl_single_precision_constant : Flag<["-"], "cl-single-precision-constant">, Group<opencl_Group>, Flags<[CC1Option]>,
867  HelpText<"OpenCL only. Treat double precision floating-point constant as single precision constant.">,
868  MarshallingInfoFlag<LangOpts<"SinglePrecisionConstants">>;
869def cl_finite_math_only : Flag<["-"], "cl-finite-math-only">, Group<opencl_Group>, Flags<[CC1Option]>,
870  HelpText<"OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.">,
871  MarshallingInfoFlag<LangOpts<"CLFiniteMathOnly">>;
872def cl_kernel_arg_info : Flag<["-"], "cl-kernel-arg-info">, Group<opencl_Group>, Flags<[CC1Option]>,
873  HelpText<"OpenCL only. Generate kernel argument metadata.">,
874  MarshallingInfoFlag<CodeGenOpts<"EmitOpenCLArgMetadata">>;
875def cl_unsafe_math_optimizations : Flag<["-"], "cl-unsafe-math-optimizations">, Group<opencl_Group>, Flags<[CC1Option]>,
876  HelpText<"OpenCL only. Allow unsafe floating-point optimizations.  Also implies -cl-no-signed-zeros and -cl-mad-enable.">,
877  MarshallingInfoFlag<LangOpts<"CLUnsafeMath">>;
878def cl_fast_relaxed_math : Flag<["-"], "cl-fast-relaxed-math">, Group<opencl_Group>, Flags<[CC1Option]>,
879  HelpText<"OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines __FAST_RELAXED_MATH__.">,
880  MarshallingInfoFlag<LangOpts<"FastRelaxedMath">>;
881def cl_mad_enable : Flag<["-"], "cl-mad-enable">, Group<opencl_Group>, Flags<[CC1Option]>,
882  HelpText<"OpenCL only. Allow use of less precise MAD computations in the generated binary.">,
883  MarshallingInfoFlag<CodeGenOpts<"LessPreciseFPMAD">>,
884  ImpliedByAnyOf<[cl_unsafe_math_optimizations.KeyPath, cl_fast_relaxed_math.KeyPath]>;
885def cl_no_signed_zeros : Flag<["-"], "cl-no-signed-zeros">, Group<opencl_Group>, Flags<[CC1Option]>,
886  HelpText<"OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.">,
887  MarshallingInfoFlag<LangOpts<"CLNoSignedZero">>;
888def cl_std_EQ : Joined<["-"], "cl-std=">, Group<opencl_Group>, Flags<[CC1Option]>,
889  HelpText<"OpenCL language standard to compile for.">,
890  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++,clc++1.0,CLC++1.0,clc++2021,CLC++2021">;
891def cl_denorms_are_zero : Flag<["-"], "cl-denorms-are-zero">, Group<opencl_Group>,
892  HelpText<"OpenCL only. Allow denormals to be flushed to zero.">;
893def cl_fp32_correctly_rounded_divide_sqrt : Flag<["-"], "cl-fp32-correctly-rounded-divide-sqrt">, Group<opencl_Group>, Flags<[CC1Option]>,
894  HelpText<"OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.">,
895  MarshallingInfoFlag<CodeGenOpts<"OpenCLCorrectlyRoundedDivSqrt">>;
896def cl_uniform_work_group_size : Flag<["-"], "cl-uniform-work-group-size">, Group<opencl_Group>, Flags<[CC1Option]>,
897  HelpText<"OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel">,
898  MarshallingInfoFlag<CodeGenOpts<"UniformWGSize">>;
899def cl_no_stdinc : Flag<["-"], "cl-no-stdinc">, Group<opencl_Group>,
900  HelpText<"OpenCL only. Disables all standard includes containing non-native compiler types and functions.">;
901def cl_ext_EQ : CommaJoined<["-"], "cl-ext=">, Group<opencl_Group>, Flags<[CC1Option]>,
902  HelpText<"OpenCL only. Enable or disable OpenCL extensions/optional features. The argument is a comma-separated "
903           "sequence of one or more extension names, each prefixed by '+' or '-'.">,
904  MarshallingInfoStringVector<TargetOpts<"OpenCLExtensionsAsWritten">>;
905
906def client__name : JoinedOrSeparate<["-"], "client_name">;
907def combine : Flag<["-", "--"], "combine">, Flags<[NoXarchOption, Unsupported]>;
908def compatibility__version : JoinedOrSeparate<["-"], "compatibility_version">;
909def config : Separate<["--"], "config">, Flags<[NoXarchOption]>,
910  HelpText<"Specifies configuration file">;
911def config_system_dir_EQ : Joined<["--"], "config-system-dir=">, Flags<[NoXarchOption, HelpHidden]>,
912  HelpText<"System directory for configuration files">;
913def config_user_dir_EQ : Joined<["--"], "config-user-dir=">, Flags<[NoXarchOption, HelpHidden]>,
914  HelpText<"User directory for configuration files">;
915def coverage : Flag<["-", "--"], "coverage">, Group<Link_Group>, Flags<[CoreOption]>;
916def cpp_precomp : Flag<["-"], "cpp-precomp">, Group<clang_ignored_f_Group>;
917def current__version : JoinedOrSeparate<["-"], "current_version">;
918def cxx_isystem : JoinedOrSeparate<["-"], "cxx-isystem">, Group<clang_i_Group>,
919  HelpText<"Add directory to the C++ SYSTEM include search path">, Flags<[CC1Option]>,
920  MetaVarName<"<directory>">;
921def c : Flag<["-"], "c">, Flags<[NoXarchOption, FlangOption]>, Group<Action_Group>,
922  HelpText<"Only run preprocess, compile, and assemble steps">;
923def fconvergent_functions : Flag<["-"], "fconvergent-functions">, Group<f_Group>, Flags<[CC1Option]>,
924  HelpText<"Assume functions may be convergent">;
925
926def gpu_use_aux_triple_only : Flag<["--"], "gpu-use-aux-triple-only">,
927  InternalDriverOpt, HelpText<"Prepare '-aux-triple' only without populating "
928                              "'-aux-target-cpu' and '-aux-target-feature'.">;
929def cuda_include_ptx_EQ : Joined<["--"], "cuda-include-ptx=">, Flags<[NoXarchOption]>,
930  HelpText<"Include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">;
931def no_cuda_include_ptx_EQ : Joined<["--"], "no-cuda-include-ptx=">, Flags<[NoXarchOption]>,
932  HelpText<"Do not include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">;
933def offload_arch_EQ : Joined<["--"], "offload-arch=">, Flags<[NoXarchOption]>,
934  HelpText<"CUDA offloading device architecture (e.g. sm_35), or HIP offloading target ID in the form of a "
935           "device architecture followed by target ID features delimited by a colon. Each target ID feature "
936           "is a pre-defined string followed by a plus or minus sign (e.g. gfx908:xnack+:sramecc-).  May be "
937           "specified more than once.">;
938def cuda_gpu_arch_EQ : Joined<["--"], "cuda-gpu-arch=">, Flags<[NoXarchOption]>,
939  Alias<offload_arch_EQ>;
940def cuda_feature_EQ : Joined<["--"], "cuda-feature=">, HelpText<"Manually specify the CUDA feature to use">;
941def hip_link : Flag<["--"], "hip-link">,
942  HelpText<"Link clang-offload-bundler bundles for HIP">;
943def no_hip_rt: Flag<["-"], "no-hip-rt">,
944  HelpText<"Do not link against HIP runtime libraries">;
945def no_offload_arch_EQ : Joined<["--"], "no-offload-arch=">, Flags<[NoXarchOption]>,
946  HelpText<"Remove CUDA/HIP offloading device architecture (e.g. sm_35, gfx906) from the list of devices to compile for. "
947           "'all' resets the list to its default value.">;
948def emit_static_lib : Flag<["--"], "emit-static-lib">,
949  HelpText<"Enable linker job to emit a static library.">;
950def no_cuda_gpu_arch_EQ : Joined<["--"], "no-cuda-gpu-arch=">, Flags<[NoXarchOption]>,
951  Alias<no_offload_arch_EQ>;
952def cuda_noopt_device_debug : Flag<["--"], "cuda-noopt-device-debug">,
953  HelpText<"Enable device-side debug info generation. Disables ptxas optimizations.">;
954def no_cuda_version_check : Flag<["--"], "no-cuda-version-check">,
955  HelpText<"Don't error out if the detected version of the CUDA install is "
956           "too low for the requested CUDA gpu architecture.">;
957def no_cuda_noopt_device_debug : Flag<["--"], "no-cuda-noopt-device-debug">;
958def cuda_path_EQ : Joined<["--"], "cuda-path=">, Group<i_Group>,
959  HelpText<"CUDA installation path">;
960def cuda_path_ignore_env : Flag<["--"], "cuda-path-ignore-env">, Group<i_Group>,
961  HelpText<"Ignore environment variables to detect CUDA installation">;
962def ptxas_path_EQ : Joined<["--"], "ptxas-path=">, Group<i_Group>,
963  HelpText<"Path to ptxas (used for compiling CUDA code)">;
964def fgpu_flush_denormals_to_zero : Flag<["-"], "fgpu-flush-denormals-to-zero">,
965  HelpText<"Flush denormal floating point values to zero in CUDA/HIP device mode.">;
966def fno_gpu_flush_denormals_to_zero : Flag<["-"], "fno-gpu-flush-denormals-to-zero">;
967def fcuda_flush_denormals_to_zero : Flag<["-"], "fcuda-flush-denormals-to-zero">,
968  Alias<fgpu_flush_denormals_to_zero>;
969def fno_cuda_flush_denormals_to_zero : Flag<["-"], "fno-cuda-flush-denormals-to-zero">,
970  Alias<fno_gpu_flush_denormals_to_zero>;
971defm gpu_rdc : BoolFOption<"gpu-rdc",
972  LangOpts<"GPURelocatableDeviceCode">, DefaultFalse,
973  PosFlag<SetTrue, [CC1Option], "Generate relocatable device code, also known as separate compilation mode">,
974  NegFlag<SetFalse>>;
975def : Flag<["-"], "fcuda-rdc">, Alias<fgpu_rdc>;
976def : Flag<["-"], "fno-cuda-rdc">, Alias<fno_gpu_rdc>;
977defm cuda_short_ptr : BoolFOption<"cuda-short-ptr",
978  TargetOpts<"NVPTXUseShortPointers">, DefaultFalse,
979  PosFlag<SetTrue, [CC1Option], "Use 32-bit pointers for accessing const/local/shared address spaces">,
980  NegFlag<SetFalse>>;
981def fgpu_default_stream_EQ : Joined<["-"], "fgpu-default-stream=">,
982  HelpText<"Specify default stream. The default value is 'legacy'. (HIP only)">,
983  Flags<[CC1Option]>,
984  Values<"legacy,per-thread">,
985  NormalizedValuesScope<"LangOptions::GPUDefaultStreamKind">,
986  NormalizedValues<["Legacy", "PerThread"]>,
987  MarshallingInfoEnum<LangOpts<"GPUDefaultStream">, "Legacy">;
988def rocm_path_EQ : Joined<["--"], "rocm-path=">, Group<i_Group>,
989  HelpText<"ROCm installation path, used for finding and automatically linking required bitcode libraries.">;
990def hip_path_EQ : Joined<["--"], "hip-path=">, Group<i_Group>,
991  HelpText<"HIP runtime installation path, used for finding HIP version and adding HIP include path.">;
992def amdgpu_arch_tool_EQ : Joined<["--"], "amdgpu-arch-tool=">, Group<i_Group>,
993  HelpText<"Tool used for detecting AMD GPU arch in the system.">;
994def rocm_device_lib_path_EQ : Joined<["--"], "rocm-device-lib-path=">, Group<Link_Group>,
995  HelpText<"ROCm device library path. Alternative to rocm-path.">;
996def : Joined<["--"], "hip-device-lib-path=">, Alias<rocm_device_lib_path_EQ>;
997def hip_device_lib_EQ : Joined<["--"], "hip-device-lib=">, Group<Link_Group>,
998  HelpText<"HIP device library">;
999def hip_version_EQ : Joined<["--"], "hip-version=">,
1000  HelpText<"HIP version in the format of major.minor.patch">;
1001def fhip_dump_offload_linker_script : Flag<["-"], "fhip-dump-offload-linker-script">,
1002  Group<f_Group>, Flags<[NoArgumentUnused, HelpHidden]>;
1003defm hip_new_launch_api : BoolFOption<"hip-new-launch-api",
1004  LangOpts<"HIPUseNewLaunchAPI">, DefaultFalse,
1005  PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">,
1006  BothFlags<[], " new kernel launching API for HIP">>;
1007defm hip_fp32_correctly_rounded_divide_sqrt : BoolFOption<"hip-fp32-correctly-rounded-divide-sqrt",
1008  CodeGenOpts<"HIPCorrectlyRoundedDivSqrt">, DefaultTrue,
1009  PosFlag<SetTrue, [], "Specify">,
1010  NegFlag<SetFalse, [CC1Option], "Don't specify">,
1011  BothFlags<[], " that single precision floating-point divide and sqrt used in "
1012  "the program source are correctly rounded (HIP device compilation only)">>,
1013  ShouldParseIf<hip.KeyPath>;
1014defm hip_kernel_arg_name : BoolFOption<"hip-kernel-arg-name",
1015  CodeGenOpts<"HIPSaveKernelArgName">, DefaultFalse,
1016  PosFlag<SetTrue, [CC1Option], "Specify">,
1017  NegFlag<SetFalse, [], "Don't specify">,
1018  BothFlags<[], " that kernel argument names are preserved (HIP only)">>,
1019  ShouldParseIf<hip.KeyPath>;
1020def hipspv_pass_plugin_EQ : Joined<["--"], "hipspv-pass-plugin=">,
1021  Group<Link_Group>, MetaVarName<"<dsopath>">,
1022  HelpText<"path to a pass plugin for HIP to SPIR-V passes.">;
1023defm gpu_allow_device_init : BoolFOption<"gpu-allow-device-init",
1024  LangOpts<"GPUAllowDeviceInit">, DefaultFalse,
1025  PosFlag<SetTrue, [CC1Option], "Allow">, NegFlag<SetFalse, [], "Don't allow">,
1026  BothFlags<[], " device side init function in HIP (experimental)">>,
1027  ShouldParseIf<hip.KeyPath>;
1028defm gpu_defer_diag : BoolFOption<"gpu-defer-diag",
1029  LangOpts<"GPUDeferDiag">, DefaultFalse,
1030  PosFlag<SetTrue, [CC1Option], "Defer">, NegFlag<SetFalse, [], "Don't defer">,
1031  BothFlags<[], " host/device related diagnostic messages for CUDA/HIP">>;
1032defm gpu_exclude_wrong_side_overloads : BoolFOption<"gpu-exclude-wrong-side-overloads",
1033  LangOpts<"GPUExcludeWrongSideOverloads">, DefaultFalse,
1034  PosFlag<SetTrue, [CC1Option], "Always exclude wrong side overloads">,
1035  NegFlag<SetFalse, [], "Exclude wrong side overloads only if there are same side overloads">,
1036  BothFlags<[HelpHidden], " in overloading resolution for CUDA/HIP">>;
1037def gpu_max_threads_per_block_EQ : Joined<["--"], "gpu-max-threads-per-block=">,
1038  Flags<[CC1Option]>,
1039  HelpText<"Default max threads per block for kernel launch bounds for HIP">,
1040  MarshallingInfoInt<LangOpts<"GPUMaxThreadsPerBlock">, "1024">,
1041  ShouldParseIf<hip.KeyPath>;
1042def fgpu_inline_threshold_EQ : Joined<["-"], "fgpu-inline-threshold=">,
1043  Flags<[HelpHidden]>,
1044  HelpText<"Inline threshold for device compilation for CUDA/HIP">;
1045def gpu_instrument_lib_EQ : Joined<["--"], "gpu-instrument-lib=">,
1046  HelpText<"Instrument device library for HIP, which is a LLVM bitcode containing "
1047  "__cyg_profile_func_enter and __cyg_profile_func_exit">;
1048def fgpu_sanitize : Flag<["-"], "fgpu-sanitize">, Group<f_Group>,
1049  HelpText<"Enable sanitizer for AMDGPU target">;
1050def fno_gpu_sanitize : Flag<["-"], "fno-gpu-sanitize">, Group<f_Group>;
1051def gpu_bundle_output : Flag<["--"], "gpu-bundle-output">,
1052  Group<f_Group>, HelpText<"Bundle output files of HIP device compilation">;
1053def no_gpu_bundle_output : Flag<["--"], "no-gpu-bundle-output">,
1054  Group<f_Group>, HelpText<"Do not bundle output files of HIP device compilation">;
1055def cuid_EQ : Joined<["-"], "cuid=">, Flags<[CC1Option]>,
1056  HelpText<"An ID for compilation unit, which should be the same for the same "
1057           "compilation unit but different for different compilation units. "
1058           "It is used to externalize device-side static variables for single "
1059           "source offloading languages CUDA and HIP so that they can be "
1060           "accessed by the host code of the same compilation unit.">,
1061  MarshallingInfoString<LangOpts<"CUID">>;
1062def fuse_cuid_EQ : Joined<["-"], "fuse-cuid=">,
1063  HelpText<"Method to generate ID's for compilation units for single source "
1064           "offloading languages CUDA and HIP: 'hash' (ID's generated by hashing "
1065           "file path and command line options) | 'random' (ID's generated as "
1066           "random numbers) | 'none' (disabled). Default is 'hash'. This option "
1067           "will be overridden by option '-cuid=[ID]' if it is specified." >;
1068def libomptarget_amdgpu_bc_path_EQ : Joined<["--"], "libomptarget-amdgpu-bc-path=">, Group<i_Group>,
1069  HelpText<"Path to libomptarget-amdgcn bitcode library">;
1070def libomptarget_amdgcn_bc_path_EQ : Joined<["--"], "libomptarget-amdgcn-bc-path=">, Group<i_Group>,
1071  HelpText<"Path to libomptarget-amdgcn bitcode library">, Alias<libomptarget_amdgpu_bc_path_EQ>;
1072def libomptarget_nvptx_bc_path_EQ : Joined<["--"], "libomptarget-nvptx-bc-path=">, Group<i_Group>,
1073  HelpText<"Path to libomptarget-nvptx bitcode library">;
1074def dD : Flag<["-"], "dD">, Group<d_Group>, Flags<[CC1Option]>,
1075  HelpText<"Print macro definitions in -E mode in addition to normal output">;
1076def dI : Flag<["-"], "dI">, Group<d_Group>, Flags<[CC1Option]>,
1077  HelpText<"Print include directives in -E mode in addition to normal output">,
1078  MarshallingInfoFlag<PreprocessorOutputOpts<"ShowIncludeDirectives">>;
1079def dM : Flag<["-"], "dM">, Group<d_Group>, Flags<[CC1Option]>,
1080  HelpText<"Print macro definitions in -E mode instead of normal output">;
1081def dead__strip : Flag<["-"], "dead_strip">;
1082def dependency_file : Separate<["-"], "dependency-file">, Flags<[CC1Option]>,
1083  HelpText<"Filename (or -) to write dependency output to">,
1084  MarshallingInfoString<DependencyOutputOpts<"OutputFile">>;
1085def dependency_dot : Separate<["-"], "dependency-dot">, Flags<[CC1Option]>,
1086  HelpText<"Filename to write DOT-formatted header dependencies to">,
1087  MarshallingInfoString<DependencyOutputOpts<"DOTOutputFile">>;
1088def module_dependency_dir : Separate<["-"], "module-dependency-dir">,
1089  Flags<[CC1Option]>, HelpText<"Directory to dump module dependencies to">,
1090  MarshallingInfoString<DependencyOutputOpts<"ModuleDependencyOutputDir">>;
1091def dsym_dir : JoinedOrSeparate<["-"], "dsym-dir">,
1092  Flags<[NoXarchOption, RenderAsInput]>,
1093  HelpText<"Directory to output dSYM's (if any) to">, MetaVarName<"<dir>">;
1094def dumpmachine : Flag<["-"], "dumpmachine">;
1095def dumpspecs : Flag<["-"], "dumpspecs">, Flags<[Unsupported]>;
1096def dumpversion : Flag<["-"], "dumpversion">;
1097def dylib__file : Separate<["-"], "dylib_file">;
1098def dylinker__install__name : JoinedOrSeparate<["-"], "dylinker_install_name">;
1099def dylinker : Flag<["-"], "dylinker">;
1100def dynamiclib : Flag<["-"], "dynamiclib">;
1101def dynamic : Flag<["-"], "dynamic">, Flags<[NoArgumentUnused]>;
1102def d_Flag : Flag<["-"], "d">, Group<d_Group>;
1103def d_Joined : Joined<["-"], "d">, Group<d_Group>;
1104def emit_ast : Flag<["-"], "emit-ast">, Flags<[CoreOption]>,
1105  HelpText<"Emit Clang AST files for source inputs">;
1106def emit_llvm : Flag<["-"], "emit-llvm">, Flags<[CC1Option, FC1Option, FlangOption]>, Group<Action_Group>,
1107  HelpText<"Use the LLVM representation for assembler and object files">;
1108def emit_interface_stubs : Flag<["-"], "emit-interface-stubs">, Flags<[CC1Option]>, Group<Action_Group>,
1109  HelpText<"Generate Interface Stub Files.">;
1110def emit_merged_ifs : Flag<["-"], "emit-merged-ifs">,
1111  Flags<[CC1Option]>, Group<Action_Group>,
1112  HelpText<"Generate Interface Stub Files, emit merged text not binary.">;
1113def end_no_unused_arguments : Flag<["--"], "end-no-unused-arguments">, Flags<[CoreOption]>,
1114  HelpText<"Start emitting warnings for unused driver arguments">;
1115def interface_stub_version_EQ : JoinedOrSeparate<["-"], "interface-stub-version=">, Flags<[CC1Option]>;
1116def exported__symbols__list : Separate<["-"], "exported_symbols_list">;
1117def extract_api : Flag<["-"], "extract-api">, Flags<[CC1Option]>, Group<Action_Group>,
1118  HelpText<"Extract API information">;
1119def product_name_EQ: Joined<["--"], "product-name=">, Flags<[CC1Option]>,
1120  MarshallingInfoString<FrontendOpts<"ProductName">>;
1121def e : JoinedOrSeparate<["-"], "e">, Flags<[LinkerInput]>, Group<Link_Group>;
1122def fmax_tokens_EQ : Joined<["-"], "fmax-tokens=">, Group<f_Group>, Flags<[CC1Option]>,
1123  HelpText<"Max total number of preprocessed tokens for -Wmax-tokens.">,
1124  MarshallingInfoInt<LangOpts<"MaxTokens">>;
1125def fPIC : Flag<["-"], "fPIC">, Group<f_Group>;
1126def fno_PIC : Flag<["-"], "fno-PIC">, Group<f_Group>;
1127def fPIE : Flag<["-"], "fPIE">, Group<f_Group>;
1128def fno_PIE : Flag<["-"], "fno-PIE">, Group<f_Group>;
1129defm access_control : BoolFOption<"access-control",
1130  LangOpts<"AccessControl">, DefaultTrue,
1131  NegFlag<SetFalse, [CC1Option], "Disable C++ access control">,
1132  PosFlag<SetTrue>>;
1133def falign_functions : Flag<["-"], "falign-functions">, Group<f_Group>;
1134def falign_functions_EQ : Joined<["-"], "falign-functions=">, Group<f_Group>;
1135def falign_loops_EQ : Joined<["-"], "falign-loops=">, Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<N>">,
1136  HelpText<"N must be a power of two. Align loops to the boundary">,
1137  MarshallingInfoInt<CodeGenOpts<"LoopAlignment">>;
1138def fno_align_functions: Flag<["-"], "fno-align-functions">, Group<f_Group>;
1139defm allow_editor_placeholders : BoolFOption<"allow-editor-placeholders",
1140  LangOpts<"AllowEditorPlaceholders">, DefaultFalse,
1141  PosFlag<SetTrue, [CC1Option], "Treat editor placeholders as valid source code">,
1142  NegFlag<SetFalse>>;
1143def fallow_unsupported : Flag<["-"], "fallow-unsupported">, Group<f_Group>;
1144def fapple_kext : Flag<["-"], "fapple-kext">, Group<f_Group>, Flags<[CC1Option]>,
1145  HelpText<"Use Apple's kernel extensions ABI">,
1146  MarshallingInfoFlag<LangOpts<"AppleKext">>;
1147def fstrict_flex_arrays_EQ : Joined<["-"], "fstrict-flex-arrays=">,Group<f_Group>,
1148  MetaVarName<"<n>">, Values<"0,1,2">,
1149  LangOpts<"StrictFlexArrays">,
1150  Flags<[CC1Option]>,
1151  HelpText<"Enable optimizations based on the strict definition of flexible arrays">,
1152  MarshallingInfoInt<LangOpts<"StrictFlexArrays">>;
1153defm apple_pragma_pack : BoolFOption<"apple-pragma-pack",
1154  LangOpts<"ApplePragmaPack">, DefaultFalse,
1155  PosFlag<SetTrue, [CC1Option], "Enable Apple gcc-compatible #pragma pack handling">,
1156  NegFlag<SetFalse>>;
1157defm xl_pragma_pack : BoolFOption<"xl-pragma-pack",
1158  LangOpts<"XLPragmaPack">, DefaultFalse,
1159  PosFlag<SetTrue, [CC1Option], "Enable IBM XL #pragma pack handling">,
1160  NegFlag<SetFalse>>;
1161def shared_libsan : Flag<["-"], "shared-libsan">,
1162  HelpText<"Dynamically link the sanitizer runtime">;
1163def static_libsan : Flag<["-"], "static-libsan">,
1164  HelpText<"Statically link the sanitizer runtime">;
1165def : Flag<["-"], "shared-libasan">, Alias<shared_libsan>;
1166def fasm : Flag<["-"], "fasm">, Group<f_Group>;
1167
1168def fassume_sane_operator_new : Flag<["-"], "fassume-sane-operator-new">, Group<f_Group>;
1169def fastcp : Flag<["-"], "fastcp">, Group<f_Group>;
1170def fastf : Flag<["-"], "fastf">, Group<f_Group>;
1171def fast : Flag<["-"], "fast">, Group<f_Group>;
1172def fasynchronous_unwind_tables : Flag<["-"], "fasynchronous-unwind-tables">, Group<f_Group>;
1173
1174defm double_square_bracket_attributes : BoolFOption<"double-square-bracket-attributes",
1175  LangOpts<"DoubleSquareBracketAttributes">, Default<!strconcat(cpp11.KeyPath, "||", c2x.KeyPath)>,
1176  PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">,
1177  BothFlags<[NoXarchOption, CC1Option], " '[[]]' attributes in all C and C++ language modes">>;
1178
1179defm autolink : BoolFOption<"autolink",
1180  CodeGenOpts<"Autolink">, DefaultTrue,
1181  NegFlag<SetFalse, [CC1Option], "Disable generation of linker directives for automatic library linking">,
1182  PosFlag<SetTrue>>;
1183
1184// In the future this option will be supported by other offloading
1185// languages and accept other values such as CPU/GPU architectures,
1186// offload kinds and target aliases.
1187def offload_EQ : CommaJoined<["--"], "offload=">, Flags<[NoXarchOption]>,
1188  HelpText<"Specify comma-separated list of offloading target triples (CUDA and HIP only)">;
1189
1190// C++ Coroutines TS
1191defm coroutines_ts : BoolFOption<"coroutines-ts",
1192  LangOpts<"Coroutines">, Default<cpp20.KeyPath>,
1193  PosFlag<SetTrue, [CC1Option], "Enable support for the C++ Coroutines TS">,
1194  NegFlag<SetFalse>>;
1195
1196defm experimental_library : BoolFOption<"experimental-library",
1197  LangOpts<"ExperimentalLibrary">, DefaultFalse,
1198  PosFlag<SetTrue, [CC1Option, CoreOption], "Control whether unstable and experimental library features are enabled. "
1199          "This option enables various library features that are either experimental (also known as TSes), or have been "
1200          "but are not stable yet in the selected Standard Library implementation. It is not recommended to use this option "
1201          "in production code, since neither ABI nor API stability are guaranteed. This is intended to provide a preview "
1202          "of features that will ship in the future for experimentation purposes">,
1203  NegFlag<SetFalse>>;
1204
1205def fembed_offload_object_EQ : Joined<["-"], "fembed-offload-object=">,
1206  Group<f_Group>, Flags<[NoXarchOption, CC1Option]>,
1207  HelpText<"Embed Offloading device-side binary into host object file as a section.">,
1208  MarshallingInfoStringVector<CodeGenOpts<"OffloadObjects">>;
1209def fembed_bitcode_EQ : Joined<["-"], "fembed-bitcode=">,
1210    Group<f_Group>, Flags<[NoXarchOption, CC1Option, CC1AsOption]>, MetaVarName<"<option>">,
1211    HelpText<"Embed LLVM bitcode">,
1212    Values<"off,all,bitcode,marker">, NormalizedValuesScope<"CodeGenOptions">,
1213    NormalizedValues<["Embed_Off", "Embed_All", "Embed_Bitcode", "Embed_Marker"]>,
1214    MarshallingInfoEnum<CodeGenOpts<"EmbedBitcode">, "Embed_Off">;
1215def fembed_bitcode : Flag<["-"], "fembed-bitcode">, Group<f_Group>,
1216  Alias<fembed_bitcode_EQ>, AliasArgs<["all"]>,
1217  HelpText<"Embed LLVM IR bitcode as data">;
1218def fembed_bitcode_marker : Flag<["-"], "fembed-bitcode-marker">,
1219  Alias<fembed_bitcode_EQ>, AliasArgs<["marker"]>,
1220  HelpText<"Embed placeholder LLVM IR data as a marker">;
1221defm gnu_inline_asm : BoolFOption<"gnu-inline-asm",
1222  LangOpts<"GNUAsm">, DefaultTrue,
1223  NegFlag<SetFalse, [CC1Option], "Disable GNU style inline asm">, PosFlag<SetTrue>>;
1224
1225def fprofile_sample_use : Flag<["-"], "fprofile-sample-use">, Group<f_Group>,
1226    Flags<[CoreOption]>;
1227def fno_profile_sample_use : Flag<["-"], "fno-profile-sample-use">, Group<f_Group>,
1228    Flags<[CoreOption]>;
1229def fprofile_sample_use_EQ : Joined<["-"], "fprofile-sample-use=">,
1230    Group<f_Group>, Flags<[NoXarchOption, CC1Option]>,
1231    HelpText<"Enable sample-based profile guided optimizations">,
1232    MarshallingInfoString<CodeGenOpts<"SampleProfileFile">>;
1233def fprofile_sample_accurate : Flag<["-"], "fprofile-sample-accurate">,
1234    Group<f_Group>, Flags<[NoXarchOption, CC1Option]>,
1235    HelpText<"Specifies that the sample profile is accurate">,
1236    DocBrief<[{Specifies that the sample profile is accurate. If the sample
1237               profile is accurate, callsites without profile samples are marked
1238               as cold. Otherwise, treat callsites without profile samples as if
1239               we have no profile}]>,
1240   MarshallingInfoFlag<CodeGenOpts<"ProfileSampleAccurate">>;
1241def fno_profile_sample_accurate : Flag<["-"], "fno-profile-sample-accurate">,
1242  Group<f_Group>, Flags<[NoXarchOption]>;
1243def fauto_profile : Flag<["-"], "fauto-profile">, Group<f_Group>,
1244    Alias<fprofile_sample_use>;
1245def fno_auto_profile : Flag<["-"], "fno-auto-profile">, Group<f_Group>,
1246    Alias<fno_profile_sample_use>;
1247def fauto_profile_EQ : Joined<["-"], "fauto-profile=">,
1248    Alias<fprofile_sample_use_EQ>;
1249def fauto_profile_accurate : Flag<["-"], "fauto-profile-accurate">,
1250    Group<f_Group>, Alias<fprofile_sample_accurate>;
1251def fno_auto_profile_accurate : Flag<["-"], "fno-auto-profile-accurate">,
1252    Group<f_Group>, Alias<fno_profile_sample_accurate>;
1253def fdebug_compilation_dir_EQ : Joined<["-"], "fdebug-compilation-dir=">,
1254    Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>,
1255    HelpText<"The compilation directory to embed in the debug info">,
1256    MarshallingInfoString<CodeGenOpts<"DebugCompilationDir">>;
1257def fdebug_compilation_dir : Separate<["-"], "fdebug-compilation-dir">,
1258    Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>,
1259    Alias<fdebug_compilation_dir_EQ>;
1260def fcoverage_compilation_dir_EQ : Joined<["-"], "fcoverage-compilation-dir=">,
1261    Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>,
1262    HelpText<"The compilation directory to embed in the coverage mapping.">,
1263    MarshallingInfoString<CodeGenOpts<"CoverageCompilationDir">>;
1264def ffile_compilation_dir_EQ : Joined<["-"], "ffile-compilation-dir=">, Group<f_Group>,
1265    Flags<[CoreOption]>,
1266    HelpText<"The compilation directory to embed in the debug info and coverage mapping.">;
1267defm debug_info_for_profiling : BoolFOption<"debug-info-for-profiling",
1268  CodeGenOpts<"DebugInfoForProfiling">, DefaultFalse,
1269  PosFlag<SetTrue, [CC1Option], "Emit extra debug info to make sample profile more accurate">,
1270  NegFlag<SetFalse>>;
1271def fprofile_instr_generate : Flag<["-"], "fprofile-instr-generate">,
1272    Group<f_Group>, Flags<[CoreOption]>,
1273    HelpText<"Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">;
1274def fprofile_instr_generate_EQ : Joined<["-"], "fprofile-instr-generate=">,
1275    Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<file>">,
1276    HelpText<"Generate instrumented code to collect execution counts into <file> (overridden by LLVM_PROFILE_FILE env var)">;
1277def fprofile_instr_use : Flag<["-"], "fprofile-instr-use">, Group<f_Group>,
1278    Flags<[CoreOption]>;
1279def fprofile_instr_use_EQ : Joined<["-"], "fprofile-instr-use=">,
1280    Group<f_Group>, Flags<[CoreOption]>,
1281    HelpText<"Use instrumentation data for profile-guided optimization">;
1282def fprofile_remapping_file_EQ : Joined<["-"], "fprofile-remapping-file=">,
1283    Group<f_Group>, Flags<[CC1Option, CoreOption]>, MetaVarName<"<file>">,
1284    HelpText<"Use the remappings described in <file> to match the profile data against names in the program">,
1285    MarshallingInfoString<CodeGenOpts<"ProfileRemappingFile">>;
1286defm coverage_mapping : BoolFOption<"coverage-mapping",
1287  CodeGenOpts<"CoverageMapping">, DefaultFalse,
1288  PosFlag<SetTrue, [CC1Option], "Generate coverage mapping to enable code coverage analysis">,
1289  NegFlag<SetFalse, [], "Disable code coverage analysis">, BothFlags<[CoreOption]>>;
1290def fprofile_generate : Flag<["-"], "fprofile-generate">,
1291    Group<f_Group>, Flags<[CoreOption]>,
1292    HelpText<"Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
1293def fprofile_generate_EQ : Joined<["-"], "fprofile-generate=">,
1294    Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<directory>">,
1295    HelpText<"Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
1296def fcs_profile_generate : Flag<["-"], "fcs-profile-generate">,
1297    Group<f_Group>, Flags<[CoreOption]>,
1298    HelpText<"Generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
1299def fcs_profile_generate_EQ : Joined<["-"], "fcs-profile-generate=">,
1300    Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<directory>">,
1301    HelpText<"Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
1302def fprofile_use : Flag<["-"], "fprofile-use">, Group<f_Group>,
1303    Flags<[CoreOption]>, Alias<fprofile_instr_use>;
1304def fprofile_use_EQ : Joined<["-"], "fprofile-use=">,
1305    Group<f_Group>, Flags<[NoXarchOption, CoreOption]>,
1306    MetaVarName<"<pathname>">,
1307    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>.">;
1308def fno_profile_instr_generate : Flag<["-"], "fno-profile-instr-generate">,
1309    Group<f_Group>, Flags<[CoreOption]>,
1310    HelpText<"Disable generation of profile instrumentation.">;
1311def fno_profile_generate : Flag<["-"], "fno-profile-generate">,
1312    Group<f_Group>, Flags<[CoreOption]>,
1313    HelpText<"Disable generation of profile instrumentation.">;
1314def fno_profile_instr_use : Flag<["-"], "fno-profile-instr-use">,
1315    Group<f_Group>, Flags<[CoreOption]>,
1316    HelpText<"Disable using instrumentation data for profile-guided optimization">;
1317def fno_profile_use : Flag<["-"], "fno-profile-use">,
1318    Alias<fno_profile_instr_use>;
1319defm profile_arcs : BoolFOption<"profile-arcs",
1320  CodeGenOpts<"EmitGcovArcs">, DefaultFalse,
1321  PosFlag<SetTrue, [CC1Option, LinkOption]>, NegFlag<SetFalse>>;
1322defm test_coverage : BoolFOption<"test-coverage",
1323  CodeGenOpts<"EmitGcovNotes">, DefaultFalse,
1324  PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>;
1325def fprofile_filter_files_EQ : Joined<["-"], "fprofile-filter-files=">,
1326    Group<f_Group>, Flags<[CC1Option, CoreOption]>,
1327    HelpText<"Instrument only functions from files where names match any regex separated by a semi-colon">,
1328    MarshallingInfoString<CodeGenOpts<"ProfileFilterFiles">>,
1329    ShouldParseIf<!strconcat(fprofile_arcs.KeyPath, "||", ftest_coverage.KeyPath)>;
1330def fprofile_exclude_files_EQ : Joined<["-"], "fprofile-exclude-files=">,
1331    Group<f_Group>, Flags<[CC1Option, CoreOption]>,
1332    HelpText<"Instrument only functions from files where names don't match all the regexes separated by a semi-colon">,
1333    MarshallingInfoString<CodeGenOpts<"ProfileExcludeFiles">>,
1334    ShouldParseIf<!strconcat(fprofile_arcs.KeyPath, "||", ftest_coverage.KeyPath)>;
1335def fprofile_update_EQ : Joined<["-"], "fprofile-update=">,
1336    Group<f_Group>, Flags<[CC1Option, CoreOption]>, Values<"atomic,prefer-atomic,single">,
1337    MetaVarName<"<method>">, HelpText<"Set update method of profile counters">,
1338    MarshallingInfoFlag<CodeGenOpts<"AtomicProfileUpdate">>;
1339defm pseudo_probe_for_profiling : BoolFOption<"pseudo-probe-for-profiling",
1340  CodeGenOpts<"PseudoProbeForProfiling">, DefaultFalse,
1341  PosFlag<SetTrue, [], "Emit">, NegFlag<SetFalse, [], "Do not emit">,
1342  BothFlags<[NoXarchOption, CC1Option], " pseudo probes for sample profiling">>;
1343def forder_file_instrumentation : Flag<["-"], "forder-file-instrumentation">,
1344    Group<f_Group>, Flags<[CC1Option, CoreOption]>,
1345    HelpText<"Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">;
1346def fprofile_list_EQ : Joined<["-"], "fprofile-list=">,
1347    Group<f_Group>, Flags<[CC1Option, CoreOption]>,
1348    HelpText<"Filename defining the list of functions/files to instrument">,
1349    MarshallingInfoStringVector<LangOpts<"ProfileListFiles">>;
1350def fprofile_function_groups : Joined<["-"], "fprofile-function-groups=">,
1351  Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<N>">,
1352  HelpText<"Partition functions into N groups and select only functions in group i to be instrumented using -fprofile-selected-function-group">,
1353  MarshallingInfoInt<CodeGenOpts<"ProfileTotalFunctionGroups">, "1">;
1354def fprofile_selected_function_group :
1355  Joined<["-"], "fprofile-selected-function-group=">, Group<f_Group>,
1356  Flags<[CC1Option]>, MetaVarName<"<i>">,
1357  HelpText<"Partition functions into N groups using -fprofile-function-groups and select only functions in group i to be instrumented. The valid range is 0 to N-1 inclusive">,
1358  MarshallingInfoInt<CodeGenOpts<"ProfileSelectedFunctionGroup">>;
1359def fswift_async_fp_EQ : Joined<["-"], "fswift-async-fp=">,
1360    Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>, MetaVarName<"<option>">,
1361    HelpText<"Control emission of Swift async extended frame info">,
1362    Values<"auto,always,never">,
1363    NormalizedValuesScope<"CodeGenOptions::SwiftAsyncFramePointerKind">,
1364    NormalizedValues<["Auto", "Always", "Never"]>,
1365    MarshallingInfoEnum<CodeGenOpts<"SwiftAsyncFramePointer">, "Always">;
1366
1367defm addrsig : BoolFOption<"addrsig",
1368  CodeGenOpts<"Addrsig">, DefaultFalse,
1369  PosFlag<SetTrue, [CC1Option], "Emit">, NegFlag<SetFalse, [], "Don't emit">,
1370  BothFlags<[CoreOption], " an address-significance table">>;
1371defm blocks : OptInCC1FFlag<"blocks", "Enable the 'blocks' language feature", "", "", [CoreOption]>;
1372def fbootclasspath_EQ : Joined<["-"], "fbootclasspath=">, Group<f_Group>;
1373defm borland_extensions : BoolFOption<"borland-extensions",
1374  LangOpts<"Borland">, DefaultFalse,
1375  PosFlag<SetTrue, [CC1Option], "Accept non-standard constructs supported by the Borland compiler">,
1376  NegFlag<SetFalse>>;
1377def fbuiltin : Flag<["-"], "fbuiltin">, Group<f_Group>, Flags<[CoreOption]>;
1378def fbuiltin_module_map : Flag <["-"], "fbuiltin-module-map">, Group<f_Group>,
1379  Flags<[NoXarchOption]>, HelpText<"Load the clang builtins module map file.">;
1380defm caret_diagnostics : BoolFOption<"caret-diagnostics",
1381  DiagnosticOpts<"ShowCarets">, DefaultTrue,
1382  NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>>;
1383def fclang_abi_compat_EQ : Joined<["-"], "fclang-abi-compat=">, Group<f_clang_Group>,
1384  Flags<[CC1Option]>, MetaVarName<"<version>">, Values<"<major>.<minor>,latest">,
1385  HelpText<"Attempt to match the ABI of Clang <version>">;
1386def fclasspath_EQ : Joined<["-"], "fclasspath=">, Group<f_Group>;
1387def fcolor_diagnostics : Flag<["-"], "fcolor-diagnostics">, Group<f_Group>,
1388  Flags<[CoreOption, CC1Option, FlangOption, FC1Option]>,
1389  HelpText<"Enable colors in diagnostics">;
1390def fno_color_diagnostics : Flag<["-"], "fno-color-diagnostics">, Group<f_Group>,
1391  Flags<[CoreOption, FlangOption]>, HelpText<"Disable colors in diagnostics">;
1392def : Flag<["-"], "fdiagnostics-color">, Group<f_Group>, Flags<[CoreOption]>, Alias<fcolor_diagnostics>;
1393def : Flag<["-"], "fno-diagnostics-color">, Group<f_Group>, Flags<[CoreOption]>, Alias<fno_color_diagnostics>;
1394def fdiagnostics_color_EQ : Joined<["-"], "fdiagnostics-color=">, Group<f_Group>;
1395def fansi_escape_codes : Flag<["-"], "fansi-escape-codes">, Group<f_Group>,
1396  Flags<[CoreOption, CC1Option]>, HelpText<"Use ANSI escape codes for diagnostics">,
1397  MarshallingInfoFlag<DiagnosticOpts<"UseANSIEscapeCodes">>;
1398def fcomment_block_commands : CommaJoined<["-"], "fcomment-block-commands=">, Group<f_clang_Group>, Flags<[CC1Option]>,
1399  HelpText<"Treat each comma separated argument in <arg> as a documentation comment block command">,
1400  MetaVarName<"<arg>">, MarshallingInfoStringVector<LangOpts<"CommentOpts.BlockCommandNames">>;
1401def fparse_all_comments : Flag<["-"], "fparse-all-comments">, Group<f_clang_Group>, Flags<[CC1Option]>,
1402  MarshallingInfoFlag<LangOpts<"CommentOpts.ParseAllComments">>;
1403def frecord_command_line : Flag<["-"], "frecord-command-line">,
1404  Group<f_clang_Group>;
1405def fno_record_command_line : Flag<["-"], "fno-record-command-line">,
1406  Group<f_clang_Group>;
1407def : Flag<["-"], "frecord-gcc-switches">, Alias<frecord_command_line>;
1408def : Flag<["-"], "fno-record-gcc-switches">, Alias<fno_record_command_line>;
1409def fcommon : Flag<["-"], "fcommon">, Group<f_Group>,
1410  Flags<[CoreOption, CC1Option]>, HelpText<"Place uninitialized global variables in a common block">,
1411  MarshallingInfoNegativeFlag<CodeGenOpts<"NoCommon">>;
1412def fcompile_resource_EQ : Joined<["-"], "fcompile-resource=">, Group<f_Group>;
1413defm complete_member_pointers : BoolOption<"f", "complete-member-pointers",
1414  LangOpts<"CompleteMemberPointers">, DefaultFalse,
1415  PosFlag<SetTrue, [CC1Option], "Require">, NegFlag<SetFalse, [], "Do not require">,
1416  BothFlags<[CoreOption], " member pointer base types to be complete if they"
1417            " would be significant under the Microsoft ABI">>,
1418  Group<f_clang_Group>;
1419def fcf_runtime_abi_EQ : Joined<["-"], "fcf-runtime-abi=">, Group<f_Group>,
1420    Flags<[CC1Option]>, Values<"unspecified,standalone,objc,swift,swift-5.0,swift-4.2,swift-4.1">,
1421    NormalizedValuesScope<"LangOptions::CoreFoundationABI">,
1422    NormalizedValues<["ObjectiveC", "ObjectiveC", "ObjectiveC", "Swift5_0", "Swift5_0", "Swift4_2", "Swift4_1"]>,
1423    MarshallingInfoEnum<LangOpts<"CFRuntime">, "ObjectiveC">;
1424defm constant_cfstrings : BoolFOption<"constant-cfstrings",
1425  LangOpts<"NoConstantCFStrings">, DefaultFalse,
1426  NegFlag<SetTrue, [CC1Option], "Disable creation of CodeFoundation-type constant strings">,
1427  PosFlag<SetFalse>>;
1428def fconstant_string_class_EQ : Joined<["-"], "fconstant-string-class=">, Group<f_Group>;
1429def fconstexpr_depth_EQ : Joined<["-"], "fconstexpr-depth=">, Group<f_Group>;
1430def fconstexpr_steps_EQ : Joined<["-"], "fconstexpr-steps=">, Group<f_Group>;
1431def fexperimental_new_constant_interpreter : Flag<["-"], "fexperimental-new-constant-interpreter">, Group<f_Group>,
1432  HelpText<"Enable the experimental new constant interpreter">, Flags<[CC1Option]>,
1433  MarshallingInfoFlag<LangOpts<"EnableNewConstInterp">>;
1434def fconstexpr_backtrace_limit_EQ : Joined<["-"], "fconstexpr-backtrace-limit=">,
1435                                    Group<f_Group>;
1436def fno_crash_diagnostics : Flag<["-"], "fno-crash-diagnostics">, Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>,
1437  Alias<gen_reproducer_eq>, AliasArgs<["off"]>,
1438  HelpText<"Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash">;
1439def fcrash_diagnostics_dir : Joined<["-"], "fcrash-diagnostics-dir=">,
1440  Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>,
1441  HelpText<"Put crash-report files in <dir>">, MetaVarName<"<dir>">;
1442def fcreate_profile : Flag<["-"], "fcreate-profile">, Group<f_Group>;
1443defm cxx_exceptions: BoolFOption<"cxx-exceptions",
1444  LangOpts<"CXXExceptions">, DefaultFalse,
1445  PosFlag<SetTrue, [CC1Option], "Enable C++ exceptions">, NegFlag<SetFalse>>;
1446defm async_exceptions: BoolFOption<"async-exceptions",
1447  LangOpts<"EHAsynch">, DefaultFalse,
1448  PosFlag<SetTrue, [CC1Option], "Enable EH Asynchronous exceptions">, NegFlag<SetFalse>>;
1449defm cxx_modules : BoolFOption<"cxx-modules",
1450  LangOpts<"CPlusPlusModules">, Default<cpp20.KeyPath>,
1451  NegFlag<SetFalse, [CC1Option], "Disable">, PosFlag<SetTrue, [], "Enable">,
1452  BothFlags<[NoXarchOption], " modules for C++">>,
1453  ShouldParseIf<cplusplus.KeyPath>;
1454def fdebug_pass_arguments : Flag<["-"], "fdebug-pass-arguments">, Group<f_Group>;
1455def fdebug_pass_structure : Flag<["-"], "fdebug-pass-structure">, Group<f_Group>;
1456def fdepfile_entry : Joined<["-"], "fdepfile-entry=">,
1457    Group<f_clang_Group>, Flags<[CC1Option]>;
1458def fdiagnostics_fixit_info : Flag<["-"], "fdiagnostics-fixit-info">, Group<f_clang_Group>;
1459def fno_diagnostics_fixit_info : Flag<["-"], "fno-diagnostics-fixit-info">, Group<f_Group>,
1460  Flags<[CC1Option]>, HelpText<"Do not include fixit information in diagnostics">,
1461  MarshallingInfoNegativeFlag<DiagnosticOpts<"ShowFixits">>;
1462def fdiagnostics_parseable_fixits : Flag<["-"], "fdiagnostics-parseable-fixits">, Group<f_clang_Group>,
1463    Flags<[CoreOption, CC1Option]>, HelpText<"Print fix-its in machine parseable form">,
1464    MarshallingInfoFlag<DiagnosticOpts<"ShowParseableFixits">>;
1465def fdiagnostics_print_source_range_info : Flag<["-"], "fdiagnostics-print-source-range-info">,
1466    Group<f_clang_Group>,  Flags<[CC1Option]>,
1467    HelpText<"Print source range spans in numeric form">,
1468    MarshallingInfoFlag<DiagnosticOpts<"ShowSourceRanges">>;
1469defm diagnostics_show_hotness : BoolFOption<"diagnostics-show-hotness",
1470  CodeGenOpts<"DiagnosticsWithHotness">, DefaultFalse,
1471  PosFlag<SetTrue, [CC1Option], "Enable profile hotness information in diagnostic line">,
1472  NegFlag<SetFalse>>;
1473def fdiagnostics_hotness_threshold_EQ : Joined<["-"], "fdiagnostics-hotness-threshold=">,
1474    Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<value>">,
1475    HelpText<"Prevent optimization remarks from being output if they do not have at least this profile count. "
1476    "Use 'auto' to apply the threshold from profile summary">;
1477def fdiagnostics_misexpect_tolerance_EQ : Joined<["-"], "fdiagnostics-misexpect-tolerance=">,
1478    Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<value>">,
1479    HelpText<"Prevent misexpect diagnostics from being output if the profile counts are within N% of the expected. ">;
1480defm diagnostics_show_option : BoolFOption<"diagnostics-show-option",
1481    DiagnosticOpts<"ShowOptionNames">, DefaultTrue,
1482    NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue, [], "Print option name with mappable diagnostics">>;
1483defm diagnostics_show_note_include_stack : BoolFOption<"diagnostics-show-note-include-stack",
1484    DiagnosticOpts<"ShowNoteIncludeStack">, DefaultFalse,
1485    PosFlag<SetTrue, [], "Display include stacks for diagnostic notes">,
1486    NegFlag<SetFalse>, BothFlags<[CC1Option]>>;
1487def fdiagnostics_format_EQ : Joined<["-"], "fdiagnostics-format=">, Group<f_clang_Group>;
1488def fdiagnostics_show_category_EQ : Joined<["-"], "fdiagnostics-show-category=">, Group<f_clang_Group>;
1489def fdiagnostics_show_template_tree : Flag<["-"], "fdiagnostics-show-template-tree">,
1490    Group<f_Group>, Flags<[CC1Option]>,
1491    HelpText<"Print a template comparison tree for differing templates">,
1492    MarshallingInfoFlag<DiagnosticOpts<"ShowTemplateTree">>;
1493def fdiscard_value_names : Flag<["-"], "fdiscard-value-names">, Group<f_clang_Group>,
1494  HelpText<"Discard value names in LLVM IR">, Flags<[NoXarchOption]>;
1495def fno_discard_value_names : Flag<["-"], "fno-discard-value-names">, Group<f_clang_Group>,
1496  HelpText<"Do not discard value names in LLVM IR">, Flags<[NoXarchOption]>;
1497defm dollars_in_identifiers : BoolFOption<"dollars-in-identifiers",
1498  LangOpts<"DollarIdents">, Default<!strconcat("!", asm_preprocessor.KeyPath)>,
1499  PosFlag<SetTrue, [], "Allow">, NegFlag<SetFalse, [], "Disallow">,
1500  BothFlags<[CC1Option], " '$' in identifiers">>;
1501def fdwarf2_cfi_asm : Flag<["-"], "fdwarf2-cfi-asm">, Group<clang_ignored_f_Group>;
1502def fno_dwarf2_cfi_asm : Flag<["-"], "fno-dwarf2-cfi-asm">, Group<clang_ignored_f_Group>;
1503defm dwarf_directory_asm : BoolFOption<"dwarf-directory-asm",
1504  CodeGenOpts<"NoDwarfDirectoryAsm">, DefaultFalse,
1505  NegFlag<SetTrue, [CC1Option]>, PosFlag<SetFalse>>;
1506defm elide_constructors : BoolFOption<"elide-constructors",
1507  LangOpts<"ElideConstructors">, DefaultTrue,
1508  NegFlag<SetFalse, [CC1Option], "Disable C++ copy constructor elision">,
1509  PosFlag<SetTrue>>;
1510def fno_elide_type : Flag<["-"], "fno-elide-type">, Group<f_Group>,
1511    Flags<[CC1Option]>,
1512    HelpText<"Do not elide types when printing diagnostics">,
1513    MarshallingInfoNegativeFlag<DiagnosticOpts<"ElideType">>;
1514def feliminate_unused_debug_symbols : Flag<["-"], "feliminate-unused-debug-symbols">, Group<f_Group>;
1515defm eliminate_unused_debug_types : OptOutCC1FFlag<"eliminate-unused-debug-types",
1516  "Do not emit ", "Emit ", " debug info for defined but unused types">;
1517def femit_all_decls : Flag<["-"], "femit-all-decls">, Group<f_Group>, Flags<[CC1Option]>,
1518  HelpText<"Emit all declarations, even if unused">,
1519  MarshallingInfoFlag<LangOpts<"EmitAllDecls">>;
1520defm emulated_tls : BoolFOption<"emulated-tls",
1521  CodeGenOpts<"EmulatedTLS">, DefaultFalse,
1522  PosFlag<SetTrue, [CC1Option], "Use emutls functions to access thread_local variables">,
1523  NegFlag<SetFalse>, BothFlags<[CC1Option]>>;
1524def fencoding_EQ : Joined<["-"], "fencoding=">, Group<f_Group>;
1525def ferror_limit_EQ : Joined<["-"], "ferror-limit=">, Group<f_Group>, Flags<[CoreOption]>;
1526defm exceptions : BoolFOption<"exceptions",
1527  LangOpts<"Exceptions">, DefaultFalse,
1528  PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
1529  BothFlags<[], " support for exception handling">>;
1530def fdwarf_exceptions : Flag<["-"], "fdwarf-exceptions">, Group<f_Group>,
1531  HelpText<"Use DWARF style exceptions">;
1532def fsjlj_exceptions : Flag<["-"], "fsjlj-exceptions">, Group<f_Group>,
1533  HelpText<"Use SjLj style exceptions">;
1534def fseh_exceptions : Flag<["-"], "fseh-exceptions">, Group<f_Group>,
1535  HelpText<"Use SEH style exceptions">;
1536def fwasm_exceptions : Flag<["-"], "fwasm-exceptions">, Group<f_Group>,
1537  HelpText<"Use WebAssembly style exceptions">;
1538def exception_model : Separate<["-"], "exception-model">,
1539  Flags<[CC1Option, NoDriverOption]>, HelpText<"The exception model">,
1540  Values<"dwarf,sjlj,seh,wasm">,
1541  NormalizedValuesScope<"LangOptions::ExceptionHandlingKind">,
1542  NormalizedValues<["DwarfCFI", "SjLj", "WinEH", "Wasm"]>,
1543  MarshallingInfoEnum<LangOpts<"ExceptionHandling">, "None">;
1544def exception_model_EQ : Joined<["-"], "exception-model=">,
1545  Flags<[CC1Option, NoDriverOption]>, Alias<exception_model>;
1546def fignore_exceptions : Flag<["-"], "fignore-exceptions">, Group<f_Group>, Flags<[CC1Option]>,
1547  HelpText<"Enable support for ignoring exception handling constructs">,
1548  MarshallingInfoFlag<LangOpts<"IgnoreExceptions">>;
1549def fexcess_precision_EQ : Joined<["-"], "fexcess-precision=">,
1550    Group<clang_ignored_gcc_optimization_f_Group>;
1551def : Flag<["-"], "fexpensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>;
1552def : Flag<["-"], "fno-expensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>;
1553def fextdirs_EQ : Joined<["-"], "fextdirs=">, Group<f_Group>;
1554def : Flag<["-"], "fdefer-pop">, Group<clang_ignored_gcc_optimization_f_Group>;
1555def : Flag<["-"], "fno-defer-pop">, Group<clang_ignored_gcc_optimization_f_Group>;
1556def : Flag<["-"], "fextended-identifiers">, Group<clang_ignored_f_Group>;
1557def : Flag<["-"], "fno-extended-identifiers">, Group<f_Group>, Flags<[Unsupported]>;
1558def fhosted : Flag<["-"], "fhosted">, Group<f_Group>;
1559def fdenormal_fp_math_EQ : Joined<["-"], "fdenormal-fp-math=">, Group<f_Group>, Flags<[CC1Option]>;
1560def ffile_reproducible : Flag<["-"], "ffile-reproducible">, Group<f_Group>,
1561  Flags<[CoreOption, CC1Option]>,
1562  HelpText<"Use the target's platform-specific path separator character when "
1563           "expanding the __FILE__ macro">;
1564def fno_file_reproducible : Flag<["-"], "fno-file-reproducible">,
1565  Group<f_Group>, Flags<[CoreOption, CC1Option]>,
1566  HelpText<"Use the host's platform-specific path separator character when "
1567           "expanding the __FILE__ macro">;
1568def ffp_eval_method_EQ : Joined<["-"], "ffp-eval-method=">, Group<f_Group>, Flags<[CC1Option]>,
1569  HelpText<"Specifies the evaluation method to use for floating-point arithmetic.">,
1570  Values<"source,double,extended">, NormalizedValuesScope<"LangOptions">,
1571  NormalizedValues<["FEM_Source", "FEM_Double", "FEM_Extended"]>,
1572  MarshallingInfoEnum<LangOpts<"FPEvalMethod">, "FEM_UnsetOnCommandLine">;
1573def ffp_model_EQ : Joined<["-"], "ffp-model=">, Group<f_Group>, Flags<[NoXarchOption]>,
1574  HelpText<"Controls the semantics of floating-point calculations.">;
1575def ffp_exception_behavior_EQ : Joined<["-"], "ffp-exception-behavior=">, Group<f_Group>, Flags<[CC1Option]>,
1576  HelpText<"Specifies the exception behavior of floating-point operations.">,
1577  Values<"ignore,maytrap,strict">, NormalizedValuesScope<"LangOptions">,
1578  NormalizedValues<["FPE_Ignore", "FPE_MayTrap", "FPE_Strict"]>,
1579  MarshallingInfoEnum<LangOpts<"FPExceptionMode">, "FPE_Default">;
1580defm fast_math : BoolFOption<"fast-math",
1581  LangOpts<"FastMath">, DefaultFalse,
1582  PosFlag<SetTrue, [CC1Option], "Allow aggressive, lossy floating-point optimizations",
1583          [cl_fast_relaxed_math.KeyPath]>,
1584  NegFlag<SetFalse>>;
1585def menable_unsafe_fp_math : Flag<["-"], "menable-unsafe-fp-math">, Flags<[CC1Option]>,
1586  HelpText<"Allow unsafe floating-point math optimizations which may decrease precision">,
1587  MarshallingInfoFlag<LangOpts<"UnsafeFPMath">>,
1588  ImpliedByAnyOf<[cl_unsafe_math_optimizations.KeyPath, ffast_math.KeyPath]>;
1589defm math_errno : BoolFOption<"math-errno",
1590  LangOpts<"MathErrno">, DefaultFalse,
1591  PosFlag<SetTrue, [CC1Option], "Require math functions to indicate errors by setting errno">,
1592  NegFlag<SetFalse>>,
1593  ShouldParseIf<!strconcat("!", open_cl.KeyPath)>;
1594def fextend_args_EQ : Joined<["-"], "fextend-arguments=">, Group<f_Group>,
1595  Flags<[CC1Option, NoArgumentUnused]>,
1596  HelpText<"Controls how scalar integer arguments are extended in calls "
1597           "to unprototyped and varargs functions">,
1598  Values<"32,64">,
1599  NormalizedValues<["ExtendTo32", "ExtendTo64"]>,
1600  NormalizedValuesScope<"LangOptions::ExtendArgsKind">,
1601  MarshallingInfoEnum<LangOpts<"ExtendIntArgs">,"ExtendTo32">;
1602def fbracket_depth_EQ : Joined<["-"], "fbracket-depth=">, Group<f_Group>, Flags<[CoreOption]>;
1603def fsignaling_math : Flag<["-"], "fsignaling-math">, Group<f_Group>;
1604def fno_signaling_math : Flag<["-"], "fno-signaling-math">, Group<f_Group>;
1605defm jump_tables : BoolFOption<"jump-tables",
1606  CodeGenOpts<"NoUseJumpTables">, DefaultFalse,
1607  NegFlag<SetTrue, [CC1Option], "Do not use">, PosFlag<SetFalse, [], "Use">,
1608  BothFlags<[], " jump tables for lowering switches">>;
1609defm force_enable_int128 : BoolFOption<"force-enable-int128",
1610  TargetOpts<"ForceEnableInt128">, DefaultFalse,
1611  PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
1612  BothFlags<[], " support for int128_t type">>;
1613defm keep_static_consts : BoolFOption<"keep-static-consts",
1614  CodeGenOpts<"KeepStaticConsts">, DefaultFalse,
1615  PosFlag<SetTrue, [CC1Option], "Keep">, NegFlag<SetFalse, [], "Don't keep">,
1616  BothFlags<[NoXarchOption], " static const variables if unused">>;
1617defm fixed_point : BoolFOption<"fixed-point",
1618  LangOpts<"FixedPoint">, DefaultFalse,
1619  PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
1620  BothFlags<[], " fixed point types">>, ShouldParseIf<!strconcat("!", cplusplus.KeyPath)>;
1621defm cxx_static_destructors : BoolFOption<"c++-static-destructors",
1622  LangOpts<"RegisterStaticDestructors">, DefaultTrue,
1623  NegFlag<SetFalse, [CC1Option], "Disable C++ static destructor registration">,
1624  PosFlag<SetTrue>>;
1625def fsymbol_partition_EQ : Joined<["-"], "fsymbol-partition=">, Group<f_Group>,
1626  Flags<[CC1Option]>, MarshallingInfoString<CodeGenOpts<"SymbolPartition">>;
1627
1628defm memory_profile : OptInCC1FFlag<"memory-profile", "Enable", "Disable", " heap memory profiling">;
1629def fmemory_profile_EQ : Joined<["-"], "fmemory-profile=">,
1630    Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<directory>">,
1631    HelpText<"Enable heap memory profiling and dump results into <directory>">;
1632
1633// Begin sanitizer flags. These should all be core options exposed in all driver
1634// modes.
1635let Flags = [CC1Option, CoreOption] in {
1636
1637def fsanitize_EQ : CommaJoined<["-"], "fsanitize=">, Group<f_clang_Group>,
1638                   MetaVarName<"<check>">,
1639                   HelpText<"Turn on runtime checks for various forms of undefined "
1640                            "or suspicious behavior. See user manual for available checks">;
1641def fno_sanitize_EQ : CommaJoined<["-"], "fno-sanitize=">, Group<f_clang_Group>,
1642                      Flags<[CoreOption, NoXarchOption]>;
1643
1644def fsanitize_ignorelist_EQ : Joined<["-"], "fsanitize-ignorelist=">,
1645  Group<f_clang_Group>, HelpText<"Path to ignorelist file for sanitizers">;
1646def : Joined<["-"], "fsanitize-blacklist=">,
1647  Group<f_clang_Group>, Flags<[HelpHidden]>, Alias<fsanitize_ignorelist_EQ>,
1648  HelpText<"Alias for -fsanitize-ignorelist=">;
1649
1650def fsanitize_system_ignorelist_EQ : Joined<["-"], "fsanitize-system-ignorelist=">,
1651  HelpText<"Path to system ignorelist file for sanitizers">, Flags<[CC1Option]>;
1652def : Joined<["-"], "fsanitize-system-blacklist=">,
1653  HelpText<"Alias for -fsanitize-system-ignorelist=">,
1654  Flags<[CC1Option, HelpHidden]>, Alias<fsanitize_system_ignorelist_EQ>;
1655
1656def fno_sanitize_ignorelist : Flag<["-"], "fno-sanitize-ignorelist">,
1657  Group<f_clang_Group>, HelpText<"Don't use ignorelist file for sanitizers">;
1658def : Flag<["-"], "fno-sanitize-blacklist">,
1659  Group<f_clang_Group>, Flags<[HelpHidden]>, Alias<fno_sanitize_ignorelist>;
1660
1661def fsanitize_coverage : CommaJoined<["-"], "fsanitize-coverage=">,
1662  Group<f_clang_Group>,
1663  HelpText<"Specify the type of coverage instrumentation for Sanitizers">;
1664def fno_sanitize_coverage : CommaJoined<["-"], "fno-sanitize-coverage=">,
1665  Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>,
1666  HelpText<"Disable features of coverage instrumentation for Sanitizers">,
1667  Values<"func,bb,edge,indirect-calls,trace-bb,trace-cmp,trace-div,trace-gep,"
1668         "8bit-counters,trace-pc,trace-pc-guard,no-prune,inline-8bit-counters,"
1669         "inline-bool-flag">;
1670def fsanitize_coverage_allowlist : Joined<["-"], "fsanitize-coverage-allowlist=">,
1671    Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>,
1672    HelpText<"Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones">,
1673    MarshallingInfoStringVector<CodeGenOpts<"SanitizeCoverageAllowlistFiles">>;
1674def : Joined<["-"], "fsanitize-coverage-whitelist=">,
1675  Group<f_clang_Group>, Flags<[CoreOption, HelpHidden]>, Alias<fsanitize_coverage_allowlist>,
1676  HelpText<"Deprecated, use -fsanitize-coverage-allowlist= instead">;
1677def fsanitize_coverage_ignorelist : Joined<["-"], "fsanitize-coverage-ignorelist=">,
1678    Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>,
1679    HelpText<"Disable sanitizer coverage instrumentation for modules and functions "
1680             "that match the provided special case list, even the allowed ones">,
1681    MarshallingInfoStringVector<CodeGenOpts<"SanitizeCoverageIgnorelistFiles">>;
1682def : Joined<["-"], "fsanitize-coverage-blacklist=">,
1683  Group<f_clang_Group>, Flags<[CoreOption, HelpHidden]>,
1684  Alias<fsanitize_coverage_ignorelist>,
1685  HelpText<"Deprecated, use -fsanitize-coverage-ignorelist= instead">;
1686def fsanitize_memory_track_origins_EQ : Joined<["-"], "fsanitize-memory-track-origins=">,
1687                                        Group<f_clang_Group>,
1688                                        HelpText<"Enable origins tracking in MemorySanitizer">,
1689                                        MarshallingInfoInt<CodeGenOpts<"SanitizeMemoryTrackOrigins">>;
1690def fsanitize_memory_track_origins : Flag<["-"], "fsanitize-memory-track-origins">,
1691                                     Group<f_clang_Group>,
1692                                     HelpText<"Enable origins tracking in MemorySanitizer">;
1693def fno_sanitize_memory_track_origins : Flag<["-"], "fno-sanitize-memory-track-origins">,
1694                                        Group<f_clang_Group>,
1695                                        Flags<[CoreOption, NoXarchOption]>,
1696                                        HelpText<"Disable origins tracking in MemorySanitizer">;
1697def fsanitize_address_outline_instrumentation : Flag<["-"], "fsanitize-address-outline-instrumentation">,
1698                                                Group<f_clang_Group>,
1699                                                HelpText<"Always generate function calls for address sanitizer instrumentation">;
1700def fno_sanitize_address_outline_instrumentation : Flag<["-"], "fno-sanitize-address-outline-instrumentation">,
1701                                                   Group<f_clang_Group>,
1702                                                   HelpText<"Use default code inlining logic for the address sanitizer">;
1703def fsanitize_memtag_mode_EQ : Joined<["-"], "fsanitize-memtag-mode=">,
1704                                        Group<f_clang_Group>,
1705                                        HelpText<"Set default MTE mode to 'sync' (default) or 'async'">;
1706def fsanitize_hwaddress_experimental_aliasing
1707  : Flag<["-"], "fsanitize-hwaddress-experimental-aliasing">,
1708    Group<f_clang_Group>,
1709    HelpText<"Enable aliasing mode in HWAddressSanitizer">;
1710def fno_sanitize_hwaddress_experimental_aliasing
1711  : Flag<["-"], "fno-sanitize-hwaddress-experimental-aliasing">,
1712    Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>,
1713    HelpText<"Disable aliasing mode in HWAddressSanitizer">;
1714defm sanitize_memory_use_after_dtor : BoolOption<"f", "sanitize-memory-use-after-dtor",
1715  CodeGenOpts<"SanitizeMemoryUseAfterDtor">, DefaultFalse,
1716  PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
1717  BothFlags<[], " use-after-destroy detection in MemorySanitizer">>,
1718  Group<f_clang_Group>;
1719def fsanitize_address_field_padding : Joined<["-"], "fsanitize-address-field-padding=">,
1720                                        Group<f_clang_Group>,
1721                                        HelpText<"Level of field padding for AddressSanitizer">,
1722                                        MarshallingInfoInt<LangOpts<"SanitizeAddressFieldPadding">>;
1723defm sanitize_address_use_after_scope : BoolOption<"f", "sanitize-address-use-after-scope",
1724  CodeGenOpts<"SanitizeAddressUseAfterScope">, DefaultFalse,
1725  PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Disable">,
1726  BothFlags<[], " use-after-scope detection in AddressSanitizer">>,
1727  Group<f_clang_Group>;
1728def sanitize_address_use_after_return_EQ
1729  : Joined<["-"], "fsanitize-address-use-after-return=">,
1730    MetaVarName<"<mode>">,
1731    Flags<[CC1Option]>,
1732    HelpText<"Select the mode of detecting stack use-after-return in AddressSanitizer">,
1733    Group<f_clang_Group>,
1734    Values<"never,runtime,always">,
1735    NormalizedValuesScope<"llvm::AsanDetectStackUseAfterReturnMode">,
1736    NormalizedValues<["Never", "Runtime", "Always"]>,
1737    MarshallingInfoEnum<CodeGenOpts<"SanitizeAddressUseAfterReturn">, "Runtime">;
1738defm sanitize_address_poison_custom_array_cookie : BoolOption<"f", "sanitize-address-poison-custom-array-cookie",
1739  CodeGenOpts<"SanitizeAddressPoisonCustomArrayCookie">, DefaultFalse,
1740  PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">,
1741  BothFlags<[], " poisoning array cookies when using custom operator new[] in AddressSanitizer">>,
1742  Group<f_clang_Group>;
1743defm sanitize_address_globals_dead_stripping : BoolOption<"f", "sanitize-address-globals-dead-stripping",
1744  CodeGenOpts<"SanitizeAddressGlobalsDeadStripping">, DefaultFalse,
1745  PosFlag<SetTrue, [], "Enable linker dead stripping of globals in AddressSanitizer">,
1746  NegFlag<SetFalse, [], "Disable linker dead stripping of globals in AddressSanitizer">>,
1747  Group<f_clang_Group>;
1748defm sanitize_address_use_odr_indicator : BoolOption<"f", "sanitize-address-use-odr-indicator",
1749  CodeGenOpts<"SanitizeAddressUseOdrIndicator">, DefaultFalse,
1750  PosFlag<SetTrue, [], "Enable ODR indicator globals to avoid false ODR violation"
1751            " reports in partially sanitized programs at the cost of an increase in binary size">,
1752  NegFlag<SetFalse, [], "Disable ODR indicator globals">>,
1753  Group<f_clang_Group>;
1754def sanitize_address_destructor_EQ
1755    : Joined<["-"], "fsanitize-address-destructor=">,
1756      Flags<[CC1Option]>,
1757      HelpText<"Set destructor type used in ASan instrumentation">,
1758      Group<f_clang_Group>,
1759      Values<"none,global">,
1760      NormalizedValuesScope<"llvm::AsanDtorKind">,
1761      NormalizedValues<["None", "Global"]>,
1762      MarshallingInfoEnum<CodeGenOpts<"SanitizeAddressDtor">, "Global">;
1763defm sanitize_memory_param_retval
1764    : BoolFOption<"sanitize-memory-param-retval",
1765        CodeGenOpts<"SanitizeMemoryParamRetval">,
1766        DefaultFalse,
1767        PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
1768        BothFlags<[], " detection of uninitialized parameters and return values">>;
1769//// Note: This flag was introduced when it was necessary to distinguish between
1770//       ABI for correct codegen.  This is no longer needed, but the flag is
1771//       not removed since targeting either ABI will behave the same.
1772//       This way we cause no disturbance to existing scripts & code, and if we
1773//       want to use this flag in the future we will cause no disturbance then
1774//       either.
1775def fsanitize_hwaddress_abi_EQ
1776    : Joined<["-"], "fsanitize-hwaddress-abi=">,
1777      Group<f_clang_Group>,
1778      HelpText<"Select the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor). This option is currently unused.">;
1779def fsanitize_recover_EQ : CommaJoined<["-"], "fsanitize-recover=">,
1780                           Group<f_clang_Group>,
1781                           HelpText<"Enable recovery for specified sanitizers">;
1782def fno_sanitize_recover_EQ : CommaJoined<["-"], "fno-sanitize-recover=">,
1783                              Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>,
1784                              HelpText<"Disable recovery for specified sanitizers">;
1785def fsanitize_recover : Flag<["-"], "fsanitize-recover">, Group<f_clang_Group>,
1786                        Alias<fsanitize_recover_EQ>, AliasArgs<["all"]>;
1787def fno_sanitize_recover : Flag<["-"], "fno-sanitize-recover">,
1788                           Flags<[CoreOption, NoXarchOption]>, Group<f_clang_Group>,
1789                           Alias<fno_sanitize_recover_EQ>, AliasArgs<["all"]>;
1790def fsanitize_trap_EQ : CommaJoined<["-"], "fsanitize-trap=">, Group<f_clang_Group>,
1791                        HelpText<"Enable trapping for specified sanitizers">;
1792def fno_sanitize_trap_EQ : CommaJoined<["-"], "fno-sanitize-trap=">, Group<f_clang_Group>,
1793                           Flags<[CoreOption, NoXarchOption]>,
1794                           HelpText<"Disable trapping for specified sanitizers">;
1795def fsanitize_trap : Flag<["-"], "fsanitize-trap">, Group<f_clang_Group>,
1796                     Alias<fsanitize_trap_EQ>, AliasArgs<["all"]>,
1797                     HelpText<"Enable trapping for all sanitizers">;
1798def fno_sanitize_trap : Flag<["-"], "fno-sanitize-trap">, Group<f_clang_Group>,
1799                        Alias<fno_sanitize_trap_EQ>, AliasArgs<["all"]>,
1800                        Flags<[CoreOption, NoXarchOption]>,
1801                        HelpText<"Disable trapping for all sanitizers">;
1802def fsanitize_undefined_trap_on_error
1803    : Flag<["-"], "fsanitize-undefined-trap-on-error">, Group<f_clang_Group>,
1804      Alias<fsanitize_trap_EQ>, AliasArgs<["undefined"]>;
1805def fno_sanitize_undefined_trap_on_error
1806    : Flag<["-"], "fno-sanitize-undefined-trap-on-error">, Group<f_clang_Group>,
1807      Alias<fno_sanitize_trap_EQ>, AliasArgs<["undefined"]>;
1808defm sanitize_minimal_runtime : BoolOption<"f", "sanitize-minimal-runtime",
1809  CodeGenOpts<"SanitizeMinimalRuntime">, DefaultFalse,
1810  PosFlag<SetTrue>, NegFlag<SetFalse>>,
1811  Group<f_clang_Group>;
1812def fsanitize_link_runtime : Flag<["-"], "fsanitize-link-runtime">,
1813                           Group<f_clang_Group>;
1814def fno_sanitize_link_runtime : Flag<["-"], "fno-sanitize-link-runtime">,
1815                              Group<f_clang_Group>;
1816def fsanitize_link_cxx_runtime : Flag<["-"], "fsanitize-link-c++-runtime">,
1817                                 Group<f_clang_Group>;
1818def fno_sanitize_link_cxx_runtime : Flag<["-"], "fno-sanitize-link-c++-runtime">,
1819                                    Group<f_clang_Group>;
1820defm sanitize_cfi_cross_dso : BoolOption<"f", "sanitize-cfi-cross-dso",
1821  CodeGenOpts<"SanitizeCfiCrossDso">, DefaultFalse,
1822  PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Disable">,
1823  BothFlags<[], " control flow integrity (CFI) checks for cross-DSO calls.">>,
1824  Group<f_clang_Group>;
1825def fsanitize_cfi_icall_generalize_pointers : Flag<["-"], "fsanitize-cfi-icall-generalize-pointers">,
1826                                              Group<f_clang_Group>,
1827                                              HelpText<"Generalize pointers in CFI indirect call type signature checks">,
1828                                              MarshallingInfoFlag<CodeGenOpts<"SanitizeCfiICallGeneralizePointers">>;
1829defm sanitize_cfi_canonical_jump_tables : BoolOption<"f", "sanitize-cfi-canonical-jump-tables",
1830  CodeGenOpts<"SanitizeCfiCanonicalJumpTables">, DefaultFalse,
1831  PosFlag<SetTrue, [], "Make">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Do not make">,
1832  BothFlags<[], " the jump table addresses canonical in the symbol table">>,
1833  Group<f_clang_Group>;
1834defm sanitize_stats : BoolOption<"f", "sanitize-stats",
1835  CodeGenOpts<"SanitizeStats">, DefaultFalse,
1836  PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Disable">,
1837  BothFlags<[], " sanitizer statistics gathering.">>,
1838  Group<f_clang_Group>;
1839def fsanitize_thread_memory_access : Flag<["-"], "fsanitize-thread-memory-access">,
1840                                     Group<f_clang_Group>,
1841                                     HelpText<"Enable memory access instrumentation in ThreadSanitizer (default)">;
1842def fno_sanitize_thread_memory_access : Flag<["-"], "fno-sanitize-thread-memory-access">,
1843                                        Group<f_clang_Group>,
1844                                        Flags<[CoreOption, NoXarchOption]>,
1845                                        HelpText<"Disable memory access instrumentation in ThreadSanitizer">;
1846def fsanitize_thread_func_entry_exit : Flag<["-"], "fsanitize-thread-func-entry-exit">,
1847                                       Group<f_clang_Group>,
1848                                       HelpText<"Enable function entry/exit instrumentation in ThreadSanitizer (default)">;
1849def fno_sanitize_thread_func_entry_exit : Flag<["-"], "fno-sanitize-thread-func-entry-exit">,
1850                                          Group<f_clang_Group>,
1851                                          Flags<[CoreOption, NoXarchOption]>,
1852                                          HelpText<"Disable function entry/exit instrumentation in ThreadSanitizer">;
1853def fsanitize_thread_atomics : Flag<["-"], "fsanitize-thread-atomics">,
1854                               Group<f_clang_Group>,
1855                               HelpText<"Enable atomic operations instrumentation in ThreadSanitizer (default)">;
1856def fno_sanitize_thread_atomics : Flag<["-"], "fno-sanitize-thread-atomics">,
1857                                  Group<f_clang_Group>,
1858                                  Flags<[CoreOption, NoXarchOption]>,
1859                                  HelpText<"Disable atomic operations instrumentation in ThreadSanitizer">;
1860def fsanitize_undefined_strip_path_components_EQ : Joined<["-"], "fsanitize-undefined-strip-path-components=">,
1861  Group<f_clang_Group>, MetaVarName<"<number>">,
1862  HelpText<"Strip (or keep only, if negative) a given number of path components "
1863           "when emitting check metadata.">,
1864  MarshallingInfoInt<CodeGenOpts<"EmitCheckPathComponentsToStrip">, "0", "int">;
1865
1866} // end -f[no-]sanitize* flags
1867
1868def funsafe_math_optimizations : Flag<["-"], "funsafe-math-optimizations">,
1869  Group<f_Group>;
1870def fno_unsafe_math_optimizations : Flag<["-"], "fno-unsafe-math-optimizations">,
1871  Group<f_Group>;
1872def fassociative_math : Flag<["-"], "fassociative-math">, Group<f_Group>;
1873def fno_associative_math : Flag<["-"], "fno-associative-math">, Group<f_Group>;
1874defm reciprocal_math : BoolFOption<"reciprocal-math",
1875  LangOpts<"AllowRecip">, DefaultFalse,
1876  PosFlag<SetTrue, [CC1Option], "Allow division operations to be reassociated",
1877          [menable_unsafe_fp_math.KeyPath]>,
1878  NegFlag<SetFalse>>;
1879defm approx_func : BoolFOption<"approx-func", LangOpts<"ApproxFunc">, DefaultFalse,
1880   PosFlag<SetTrue, [CC1Option], "Allow certain math function calls to be replaced "
1881           "with an approximately equivalent calculation",
1882           [menable_unsafe_fp_math.KeyPath]>,
1883   NegFlag<SetFalse>>;
1884defm finite_math_only : BoolFOption<"finite-math-only",
1885  LangOpts<"FiniteMathOnly">, DefaultFalse,
1886  PosFlag<SetTrue, [CC1Option], "", [cl_finite_math_only.KeyPath, ffast_math.KeyPath]>,
1887  NegFlag<SetFalse>>;
1888defm signed_zeros : BoolFOption<"signed-zeros",
1889  LangOpts<"NoSignedZero">, DefaultFalse,
1890  NegFlag<SetTrue, [CC1Option], "Allow optimizations that ignore the sign of floating point zeros",
1891            [cl_no_signed_zeros.KeyPath, menable_unsafe_fp_math.KeyPath]>,
1892  PosFlag<SetFalse>>;
1893def fhonor_nans : Flag<["-"], "fhonor-nans">, Group<f_Group>;
1894def fno_honor_nans : Flag<["-"], "fno-honor-nans">, Group<f_Group>;
1895def fhonor_infinities : Flag<["-"], "fhonor-infinities">, Group<f_Group>;
1896def fno_honor_infinities : Flag<["-"], "fno-honor-infinities">, Group<f_Group>;
1897// This option was originally misspelt "infinites" [sic].
1898def : Flag<["-"], "fhonor-infinites">, Alias<fhonor_infinities>;
1899def : Flag<["-"], "fno-honor-infinites">, Alias<fno_honor_infinities>;
1900def frounding_math : Flag<["-"], "frounding-math">, Group<f_Group>, Flags<[CC1Option]>,
1901  MarshallingInfoFlag<LangOpts<"RoundingMath">>,
1902  Normalizer<"makeFlagToValueNormalizer(llvm::RoundingMode::Dynamic)">;
1903def fno_rounding_math : Flag<["-"], "fno-rounding-math">, Group<f_Group>, Flags<[CC1Option]>;
1904def ftrapping_math : Flag<["-"], "ftrapping-math">, Group<f_Group>;
1905def fno_trapping_math : Flag<["-"], "fno-trapping-math">, Group<f_Group>;
1906def ffp_contract : Joined<["-"], "ffp-contract=">, Group<f_Group>,
1907  Flags<[CC1Option]>, HelpText<"Form fused FP ops (e.g. FMAs):"
1908  " fast (fuses across statements disregarding pragmas)"
1909  " | on (only fuses in the same statement unless dictated by pragmas)"
1910  " | off (never fuses)"
1911  " | fast-honor-pragmas (fuses across statements unless diectated by pragmas)."
1912  " Default is 'fast' for CUDA, 'fast-honor-pragmas' for HIP, and 'on' otherwise.">,
1913  Values<"fast,on,off,fast-honor-pragmas">;
1914
1915defm strict_float_cast_overflow : BoolFOption<"strict-float-cast-overflow",
1916  CodeGenOpts<"StrictFloatCastOverflow">, DefaultTrue,
1917  NegFlag<SetFalse, [CC1Option], "Relax language rules and try to match the behavior"
1918            " of the target's native float-to-int conversion instructions">,
1919  PosFlag<SetTrue, [], "Assume that overflowing float-to-int casts are undefined (default)">>;
1920
1921defm protect_parens : BoolFOption<"protect-parens",
1922  LangOpts<"ProtectParens">, DefaultFalse,
1923  PosFlag<SetTrue, [CoreOption, CC1Option],
1924          "Determines whether the optimizer honors parentheses when "
1925          "floating-point expressions are evaluated">,
1926  NegFlag<SetFalse>>;
1927
1928def ffor_scope : Flag<["-"], "ffor-scope">, Group<f_Group>;
1929def fno_for_scope : Flag<["-"], "fno-for-scope">, Group<f_Group>;
1930
1931defm rewrite_imports : BoolFOption<"rewrite-imports",
1932  PreprocessorOutputOpts<"RewriteImports">, DefaultFalse,
1933  PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>;
1934defm rewrite_includes : BoolFOption<"rewrite-includes",
1935  PreprocessorOutputOpts<"RewriteIncludes">, DefaultFalse,
1936  PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>;
1937
1938defm directives_only : OptInCC1FFlag<"directives-only", "">;
1939
1940defm delete_null_pointer_checks : BoolFOption<"delete-null-pointer-checks",
1941  CodeGenOpts<"NullPointerIsValid">, DefaultFalse,
1942  NegFlag<SetTrue, [CC1Option], "Do not treat usage of null pointers as undefined behavior">,
1943  PosFlag<SetFalse, [], "Treat usage of null pointers as undefined behavior (default)">,
1944  BothFlags<[CoreOption]>>;
1945
1946def frewrite_map_file_EQ : Joined<["-"], "frewrite-map-file=">,
1947                           Group<f_Group>,
1948                           Flags<[NoXarchOption, CC1Option]>,
1949                           MarshallingInfoStringVector<CodeGenOpts<"RewriteMapFiles">>;
1950
1951defm use_line_directives : BoolFOption<"use-line-directives",
1952  PreprocessorOutputOpts<"UseLineDirectives">, DefaultFalse,
1953  PosFlag<SetTrue, [CC1Option], "Use #line in preprocessed output">, NegFlag<SetFalse>>;
1954defm minimize_whitespace : BoolFOption<"minimize-whitespace",
1955  PreprocessorOutputOpts<"MinimizeWhitespace">, DefaultFalse,
1956  PosFlag<SetTrue, [CC1Option], "Minimize whitespace when emitting preprocessor output">, NegFlag<SetFalse>>;
1957
1958def ffreestanding : Flag<["-"], "ffreestanding">, Group<f_Group>, Flags<[CC1Option]>,
1959  HelpText<"Assert that the compilation takes place in a freestanding environment">,
1960  MarshallingInfoFlag<LangOpts<"Freestanding">>;
1961def fgnuc_version_EQ : Joined<["-"], "fgnuc-version=">, Group<f_Group>,
1962  HelpText<"Sets various macros to claim compatibility with the given GCC version (default is 4.2.1)">,
1963  Flags<[CC1Option, CoreOption]>;
1964// We abuse '-f[no-]gnu-keywords' to force overriding all GNU-extension
1965// keywords. This behavior is provided by GCC's poorly named '-fasm' flag,
1966// while a subset (the non-C++ GNU keywords) is provided by GCC's
1967// '-fgnu-keywords'. Clang conflates the two for simplicity under the single
1968// name, as it doesn't seem a useful distinction.
1969defm gnu_keywords : BoolFOption<"gnu-keywords",
1970  LangOpts<"GNUKeywords">, Default<gnu_mode.KeyPath>,
1971  PosFlag<SetTrue, [], "Allow GNU-extension keywords regardless of language standard">,
1972  NegFlag<SetFalse>, BothFlags<[CC1Option]>>;
1973defm gnu89_inline : BoolFOption<"gnu89-inline",
1974  LangOpts<"GNUInline">, Default<!strconcat("!", c99.KeyPath, " && !", cplusplus.KeyPath)>,
1975  PosFlag<SetTrue, [CC1Option], "Use the gnu89 inline semantics">,
1976  NegFlag<SetFalse>>, ShouldParseIf<!strconcat("!", cplusplus.KeyPath)>;
1977def fgnu_runtime : Flag<["-"], "fgnu-runtime">, Group<f_Group>,
1978  HelpText<"Generate output compatible with the standard GNU Objective-C runtime">;
1979def fheinous_gnu_extensions : Flag<["-"], "fheinous-gnu-extensions">, Flags<[CC1Option]>,
1980  MarshallingInfoFlag<LangOpts<"HeinousExtensions">>;
1981def filelist : Separate<["-"], "filelist">, Flags<[LinkerInput]>,
1982               Group<Link_Group>;
1983def : Flag<["-"], "findirect-virtual-calls">, Alias<fapple_kext>;
1984def finline_functions : Flag<["-"], "finline-functions">, Group<f_clang_Group>, Flags<[CC1Option]>,
1985  HelpText<"Inline suitable functions">;
1986def finline_hint_functions: Flag<["-"], "finline-hint-functions">, Group<f_clang_Group>, Flags<[CC1Option]>,
1987  HelpText<"Inline functions which are (explicitly or implicitly) marked inline">;
1988def finline : Flag<["-"], "finline">, Group<clang_ignored_f_Group>;
1989defm jmc : BoolFOption<"jmc",
1990  CodeGenOpts<"JMCInstrument">, DefaultFalse,
1991  PosFlag<SetTrue, [CC1Option], "Enable just-my-code debugging">,
1992  NegFlag<SetFalse>>;
1993def fglobal_isel : Flag<["-"], "fglobal-isel">, Group<f_clang_Group>,
1994  HelpText<"Enables the global instruction selector">;
1995def fexperimental_isel : Flag<["-"], "fexperimental-isel">, Group<f_clang_Group>,
1996  Alias<fglobal_isel>;
1997def fno_legacy_pass_manager : Flag<["-"], "fno-legacy-pass-manager">,
1998  Group<f_clang_Group>, Flags<[CC1Option, NoArgumentUnused]>;
1999def fexperimental_new_pass_manager : Flag<["-"], "fexperimental-new-pass-manager">,
2000  Group<f_clang_Group>, Flags<[CC1Option]>, Alias<fno_legacy_pass_manager>;
2001def fexperimental_strict_floating_point : Flag<["-"], "fexperimental-strict-floating-point">,
2002  Group<f_clang_Group>, Flags<[CC1Option]>,
2003  HelpText<"Enables experimental strict floating point in LLVM.">,
2004  MarshallingInfoFlag<LangOpts<"ExpStrictFP">>;
2005def finput_charset_EQ : Joined<["-"], "finput-charset=">, Flags<[FlangOption, FC1Option]>, Group<f_Group>,
2006  HelpText<"Specify the default character set for source files">;
2007def fexec_charset_EQ : Joined<["-"], "fexec-charset=">, Group<f_Group>;
2008def finstrument_functions : Flag<["-"], "finstrument-functions">, Group<f_Group>, Flags<[CC1Option]>,
2009  HelpText<"Generate calls to instrument function entry and exit">,
2010  MarshallingInfoFlag<CodeGenOpts<"InstrumentFunctions">>;
2011def finstrument_functions_after_inlining : Flag<["-"], "finstrument-functions-after-inlining">, Group<f_Group>, Flags<[CC1Option]>,
2012  HelpText<"Like -finstrument-functions, but insert the calls after inlining">,
2013  MarshallingInfoFlag<CodeGenOpts<"InstrumentFunctionsAfterInlining">>;
2014def finstrument_function_entry_bare : Flag<["-"], "finstrument-function-entry-bare">, Group<f_Group>, Flags<[CC1Option]>,
2015  HelpText<"Instrument function entry only, after inlining, without arguments to the instrumentation call">,
2016  MarshallingInfoFlag<CodeGenOpts<"InstrumentFunctionEntryBare">>;
2017def fcf_protection_EQ : Joined<["-"], "fcf-protection=">, Flags<[CoreOption, CC1Option]>, Group<f_Group>,
2018  HelpText<"Instrument control-flow architecture protection">, Values<"return,branch,full,none">;
2019def fcf_protection : Flag<["-"], "fcf-protection">, Group<f_Group>, Flags<[CoreOption, CC1Option]>,
2020  Alias<fcf_protection_EQ>, AliasArgs<["full"]>,
2021  HelpText<"Enable cf-protection in 'full' mode">;
2022def mibt_seal : Flag<["-"], "mibt-seal">, Group<m_Group>, Flags<[CoreOption, CC1Option]>,
2023  HelpText<"Optimize fcf-protection=branch/full (requires LTO).">;
2024def mfunction_return_EQ : Joined<["-"], "mfunction-return=">,
2025  Group<m_Group>, Flags<[CoreOption, CC1Option]>,
2026  HelpText<"Replace returns with jumps to ``__x86_return_thunk`` (x86 only, error otherwise)">,
2027  Values<"keep,thunk-extern">,
2028  NormalizedValues<["Keep", "Extern"]>,
2029  NormalizedValuesScope<"llvm::FunctionReturnThunksKind">,
2030  MarshallingInfoEnum<CodeGenOpts<"FunctionReturnThunks">, "Keep">;
2031
2032defm xray_instrument : BoolFOption<"xray-instrument",
2033  LangOpts<"XRayInstrument">, DefaultFalse,
2034  PosFlag<SetTrue, [CC1Option], "Generate XRay instrumentation sleds on function entry and exit">,
2035  NegFlag<SetFalse>>;
2036
2037def fxray_instruction_threshold_EQ :
2038  JoinedOrSeparate<["-"], "fxray-instruction-threshold=">,
2039  Group<f_Group>, Flags<[CC1Option]>,
2040  HelpText<"Sets the minimum function size to instrument with XRay">,
2041  MarshallingInfoInt<CodeGenOpts<"XRayInstructionThreshold">, "200">;
2042def fxray_instruction_threshold_ :
2043  JoinedOrSeparate<["-"], "fxray-instruction-threshold">,
2044  Group<f_Group>, Flags<[CC1Option]>;
2045
2046def fxray_always_instrument :
2047  JoinedOrSeparate<["-"], "fxray-always-instrument=">,
2048  Group<f_Group>, Flags<[CC1Option]>,
2049  HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.">,
2050  MarshallingInfoStringVector<LangOpts<"XRayAlwaysInstrumentFiles">>;
2051def fxray_never_instrument :
2052  JoinedOrSeparate<["-"], "fxray-never-instrument=">,
2053  Group<f_Group>, Flags<[CC1Option]>,
2054  HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.">,
2055  MarshallingInfoStringVector<LangOpts<"XRayNeverInstrumentFiles">>;
2056def fxray_attr_list :
2057  JoinedOrSeparate<["-"], "fxray-attr-list=">,
2058  Group<f_Group>, Flags<[CC1Option]>,
2059  HelpText<"Filename defining the list of functions/types for imbuing XRay attributes.">,
2060  MarshallingInfoStringVector<LangOpts<"XRayAttrListFiles">>;
2061def fxray_modes :
2062  JoinedOrSeparate<["-"], "fxray-modes=">,
2063  Group<f_Group>, Flags<[CC1Option]>,
2064  HelpText<"List of modes to link in by default into XRay instrumented binaries.">;
2065
2066defm xray_always_emit_customevents : BoolFOption<"xray-always-emit-customevents",
2067  LangOpts<"XRayAlwaysEmitCustomEvents">, DefaultFalse,
2068  PosFlag<SetTrue, [CC1Option], "Always emit __xray_customevent(...) calls"
2069          " even if the containing function is not always instrumented">,
2070  NegFlag<SetFalse>>;
2071
2072defm xray_always_emit_typedevents : BoolFOption<"xray-always-emit-typedevents",
2073  LangOpts<"XRayAlwaysEmitTypedEvents">, DefaultFalse,
2074  PosFlag<SetTrue, [CC1Option], "Always emit __xray_typedevent(...) calls"
2075          " even if the containing function is not always instrumented">,
2076  NegFlag<SetFalse>>;
2077
2078defm xray_ignore_loops : BoolFOption<"xray-ignore-loops",
2079  CodeGenOpts<"XRayIgnoreLoops">, DefaultFalse,
2080  PosFlag<SetTrue, [CC1Option], "Don't instrument functions with loops"
2081          " unless they also meet the minimum function size">,
2082  NegFlag<SetFalse>>;
2083
2084defm xray_function_index : BoolFOption<"xray-function-index",
2085  CodeGenOpts<"XRayOmitFunctionIndex">, DefaultTrue,
2086  NegFlag<SetFalse, [CC1Option], "Omit function index section at the"
2087          " expense of single-function patching performance">,
2088  PosFlag<SetTrue>>;
2089
2090def fxray_link_deps : Flag<["-"], "fxray-link-deps">, Group<f_Group>,
2091  Flags<[CC1Option]>,
2092  HelpText<"Tells clang to add the link dependencies for XRay.">;
2093def fnoxray_link_deps : Flag<["-"], "fnoxray-link-deps">, Group<f_Group>,
2094  Flags<[CC1Option]>;
2095
2096def fxray_instrumentation_bundle :
2097  JoinedOrSeparate<["-"], "fxray-instrumentation-bundle=">,
2098  Group<f_Group>, Flags<[CC1Option]>,
2099  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'.">;
2100
2101def fxray_function_groups :
2102  Joined<["-"], "fxray-function-groups=">,
2103  Group<f_Group>, Flags<[CC1Option]>,
2104  HelpText<"Only instrument 1 of N groups">,
2105  MarshallingInfoInt<CodeGenOpts<"XRayTotalFunctionGroups">, "1">;
2106
2107def fxray_selected_function_group :
2108  Joined<["-"], "fxray-selected-function-group=">,
2109  Group<f_Group>, Flags<[CC1Option]>,
2110  HelpText<"When using -fxray-function-groups, select which group of functions to instrument. Valid range is 0 to fxray-function-groups - 1">,
2111  MarshallingInfoInt<CodeGenOpts<"XRaySelectedFunctionGroup">, "0">;
2112
2113
2114defm fine_grained_bitfield_accesses : BoolOption<"f", "fine-grained-bitfield-accesses",
2115  CodeGenOpts<"FineGrainedBitfieldAccesses">, DefaultFalse,
2116  PosFlag<SetTrue, [], "Use separate accesses for consecutive bitfield runs with legal widths and alignments.">,
2117  NegFlag<SetFalse, [], "Use large-integer access for consecutive bitfield runs.">,
2118  BothFlags<[CC1Option]>>,
2119  Group<f_clang_Group>;
2120
2121def fexperimental_relative_cxx_abi_vtables :
2122  Flag<["-"], "fexperimental-relative-c++-abi-vtables">,
2123  Group<f_clang_Group>, Flags<[CC1Option]>,
2124  HelpText<"Use the experimental C++ class ABI for classes with virtual tables">;
2125def fno_experimental_relative_cxx_abi_vtables :
2126  Flag<["-"], "fno-experimental-relative-c++-abi-vtables">,
2127  Group<f_clang_Group>, Flags<[CC1Option]>,
2128  HelpText<"Do not use the experimental C++ class ABI for classes with virtual tables">;
2129
2130def fcxx_abi_EQ : Joined<["-"], "fc++-abi=">,
2131                  Group<f_clang_Group>, Flags<[CC1Option]>,
2132                  HelpText<"C++ ABI to use. This will override the target C++ ABI.">;
2133
2134def flat__namespace : Flag<["-"], "flat_namespace">;
2135def flax_vector_conversions_EQ : Joined<["-"], "flax-vector-conversions=">, Group<f_Group>,
2136  HelpText<"Enable implicit vector bit-casts">, Values<"none,integer,all">, Flags<[CC1Option]>,
2137  NormalizedValues<["LangOptions::LaxVectorConversionKind::None",
2138                    "LangOptions::LaxVectorConversionKind::Integer",
2139                    "LangOptions::LaxVectorConversionKind::All"]>,
2140  MarshallingInfoEnum<LangOpts<"LaxVectorConversions">,
2141                      open_cl.KeyPath #
2142                          " ? LangOptions::LaxVectorConversionKind::None" #
2143                          " : LangOptions::LaxVectorConversionKind::All">;
2144def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group<f_Group>,
2145  Alias<flax_vector_conversions_EQ>, AliasArgs<["integer"]>;
2146def flimited_precision_EQ : Joined<["-"], "flimited-precision=">, Group<f_Group>;
2147def fapple_link_rtlib : Flag<["-"], "fapple-link-rtlib">, Group<f_Group>,
2148  HelpText<"Force linking the clang builtins runtime library">;
2149def flto_EQ : Joined<["-"], "flto=">, Flags<[CoreOption, CC1Option]>, Group<f_Group>,
2150  HelpText<"Set LTO mode">, Values<"thin,full">;
2151def flto_EQ_jobserver : Flag<["-"], "flto=jobserver">, Group<f_Group>,
2152  Alias<flto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode">;
2153def flto_EQ_auto : Flag<["-"], "flto=auto">, Group<f_Group>,
2154  Alias<flto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode">;
2155def flto : Flag<["-"], "flto">, Flags<[CoreOption, CC1Option]>, Group<f_Group>,
2156  Alias<flto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode">;
2157def fno_lto : Flag<["-"], "fno-lto">, Flags<[CoreOption, CC1Option]>, Group<f_Group>,
2158  HelpText<"Disable LTO mode (default)">;
2159def foffload_lto_EQ : Joined<["-"], "foffload-lto=">, Flags<[CoreOption]>, Group<f_Group>,
2160  HelpText<"Set LTO mode for offload compilation">, Values<"thin,full">;
2161def foffload_lto : Flag<["-"], "foffload-lto">, Flags<[CoreOption]>, Group<f_Group>,
2162  Alias<foffload_lto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode for offload compilation">;
2163def fno_offload_lto : Flag<["-"], "fno-offload-lto">, Flags<[CoreOption]>, Group<f_Group>,
2164  HelpText<"Disable LTO mode (default) for offload compilation">;
2165def flto_jobs_EQ : Joined<["-"], "flto-jobs=">,
2166  Flags<[CC1Option]>, Group<f_Group>,
2167  HelpText<"Controls the backend parallelism of -flto=thin (default "
2168           "of 0 means the number of threads will be derived from "
2169           "the number of CPUs detected)">;
2170def fthinlto_index_EQ : Joined<["-"], "fthinlto-index=">,
2171  Flags<[CoreOption, CC1Option]>, Group<f_Group>,
2172  HelpText<"Perform ThinLTO importing using provided function summary index">;
2173def fthin_link_bitcode_EQ : Joined<["-"], "fthin-link-bitcode=">,
2174  Flags<[CoreOption, CC1Option]>, Group<f_Group>,
2175  HelpText<"Write minimized bitcode to <file> for the ThinLTO thin link only">,
2176  MarshallingInfoString<CodeGenOpts<"ThinLinkBitcodeFile">>;
2177def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">,
2178                                Group<f_Group>, Flags<[NoXarchOption, CoreOption]>;
2179defm merge_all_constants : BoolFOption<"merge-all-constants",
2180  CodeGenOpts<"MergeAllConstants">, DefaultFalse,
2181  PosFlag<SetTrue, [CC1Option, CoreOption], "Allow">, NegFlag<SetFalse, [], "Disallow">,
2182  BothFlags<[], " merging of constants">>;
2183def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group<f_Group>, Flags<[CC1Option]>,
2184  HelpText<"Format message diagnostics so that they fit within N columns">,
2185  MarshallingInfoInt<DiagnosticOpts<"MessageLength">>;
2186def frandomize_layout_seed_EQ : Joined<["-"], "frandomize-layout-seed=">,
2187  MetaVarName<"<seed>">, Group<f_clang_Group>, Flags<[CC1Option]>,
2188  HelpText<"The seed used by the randomize structure layout feature">;
2189def frandomize_layout_seed_file_EQ : Joined<["-"], "frandomize-layout-seed-file=">,
2190  MetaVarName<"<file>">, Group<f_clang_Group>, Flags<[CC1Option]>,
2191  HelpText<"File holding the seed used by the randomize structure layout feature">;
2192def fms_compatibility : Flag<["-"], "fms-compatibility">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
2193  HelpText<"Enable full Microsoft Visual C++ compatibility">,
2194  MarshallingInfoFlag<LangOpts<"MSVCCompat">>;
2195def fms_extensions : Flag<["-"], "fms-extensions">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
2196  HelpText<"Accept some non-standard constructs supported by the Microsoft compiler">,
2197  MarshallingInfoFlag<LangOpts<"MicrosoftExt">>, ImpliedByAnyOf<[fms_compatibility.KeyPath]>;
2198defm asm_blocks : BoolFOption<"asm-blocks",
2199  LangOpts<"AsmBlocks">, Default<fms_extensions.KeyPath>,
2200  PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>;
2201def fms_volatile : Flag<["-"], "fms-volatile">, Group<f_Group>, Flags<[CC1Option]>,
2202  MarshallingInfoFlag<CodeGenOpts<"MSVolatile">>;
2203def fmsc_version : Joined<["-"], "fmsc-version=">, Group<f_Group>, Flags<[NoXarchOption, CoreOption]>,
2204  HelpText<"Microsoft compiler version number to report in _MSC_VER (0 = don't define it (default))">;
2205def fms_compatibility_version
2206    : Joined<["-"], "fms-compatibility-version=">,
2207      Group<f_Group>,
2208      Flags<[ CC1Option, CoreOption ]>,
2209      HelpText<"Dot-separated value representing the Microsoft compiler "
2210               "version number to report in _MSC_VER (0 = don't define it "
2211               "(default))">;
2212defm delayed_template_parsing : BoolFOption<"delayed-template-parsing",
2213  LangOpts<"DelayedTemplateParsing">, DefaultFalse,
2214  PosFlag<SetTrue, [CC1Option], "Parse templated function definitions at the end of the translation unit">,
2215  NegFlag<SetFalse, [NoXarchOption], "Disable delayed template parsing">,
2216  BothFlags<[CoreOption]>>;
2217def fms_memptr_rep_EQ : Joined<["-"], "fms-memptr-rep=">, Group<f_Group>, Flags<[CC1Option]>,
2218  Values<"single,multiple,virtual">, NormalizedValuesScope<"LangOptions">,
2219  NormalizedValues<["PPTMK_FullGeneralitySingleInheritance", "PPTMK_FullGeneralityMultipleInheritance",
2220                    "PPTMK_FullGeneralityVirtualInheritance"]>,
2221  MarshallingInfoEnum<LangOpts<"MSPointerToMemberRepresentationMethod">, "PPTMK_BestCase">;
2222def fms_kernel : Flag<["-"], "fms-kernel">, Group<f_Group>, Flags<[CC1Option, NoDriverOption]>,
2223  MarshallingInfoFlag<LangOpts<"Kernel">>;
2224// __declspec is enabled by default for the PS4 by the driver, and also
2225// enabled for Microsoft Extensions or Borland Extensions, here.
2226//
2227// FIXME: __declspec is also currently enabled for CUDA, but isn't really a
2228// CUDA extension. However, it is required for supporting
2229// __clang_cuda_builtin_vars.h, which uses __declspec(property). Once that has
2230// been rewritten in terms of something more generic, remove the Opts.CUDA
2231// term here.
2232defm declspec : BoolOption<"f", "declspec",
2233  LangOpts<"DeclSpecKeyword">, DefaultFalse,
2234  PosFlag<SetTrue, [], "Allow", [fms_extensions.KeyPath, fborland_extensions.KeyPath, cuda.KeyPath]>,
2235  NegFlag<SetFalse, [], "Disallow">,
2236  BothFlags<[CC1Option], " __declspec as a keyword">>, Group<f_clang_Group>;
2237def fmodules_cache_path : Joined<["-"], "fmodules-cache-path=">, Group<i_Group>,
2238  Flags<[NoXarchOption, CC1Option]>, MetaVarName<"<directory>">,
2239  HelpText<"Specify the module cache path">;
2240def fmodules_user_build_path : Separate<["-"], "fmodules-user-build-path">, Group<i_Group>,
2241  Flags<[NoXarchOption, CC1Option]>, MetaVarName<"<directory>">,
2242  HelpText<"Specify the module user build path">,
2243  MarshallingInfoString<HeaderSearchOpts<"ModuleUserBuildPath">>;
2244def fprebuilt_module_path : Joined<["-"], "fprebuilt-module-path=">, Group<i_Group>,
2245  Flags<[NoXarchOption, CC1Option]>, MetaVarName<"<directory>">,
2246  HelpText<"Specify the prebuilt module path">;
2247defm prebuilt_implicit_modules : BoolFOption<"prebuilt-implicit-modules",
2248  HeaderSearchOpts<"EnablePrebuiltImplicitModules">, DefaultFalse,
2249  PosFlag<SetTrue, [], "Look up implicit modules in the prebuilt module path">,
2250  NegFlag<SetFalse>, BothFlags<[NoXarchOption, CC1Option]>>;
2251
2252def fmodules_prune_interval : Joined<["-"], "fmodules-prune-interval=">, Group<i_Group>,
2253  Flags<[CC1Option]>, MetaVarName<"<seconds>">,
2254  HelpText<"Specify the interval (in seconds) between attempts to prune the module cache">,
2255  MarshallingInfoInt<HeaderSearchOpts<"ModuleCachePruneInterval">, "7 * 24 * 60 * 60">;
2256def fmodules_prune_after : Joined<["-"], "fmodules-prune-after=">, Group<i_Group>,
2257  Flags<[CC1Option]>, MetaVarName<"<seconds>">,
2258  HelpText<"Specify the interval (in seconds) after which a module file will be considered unused">,
2259  MarshallingInfoInt<HeaderSearchOpts<"ModuleCachePruneAfter">, "31 * 24 * 60 * 60">;
2260def fbuild_session_timestamp : Joined<["-"], "fbuild-session-timestamp=">,
2261  Group<i_Group>, Flags<[CC1Option]>, MetaVarName<"<time since Epoch in seconds>">,
2262  HelpText<"Time when the current build session started">,
2263  MarshallingInfoInt<HeaderSearchOpts<"BuildSessionTimestamp">, "0", "uint64_t">;
2264def fbuild_session_file : Joined<["-"], "fbuild-session-file=">,
2265  Group<i_Group>, MetaVarName<"<file>">,
2266  HelpText<"Use the last modification time of <file> as the build session timestamp">;
2267def fmodules_validate_once_per_build_session : Flag<["-"], "fmodules-validate-once-per-build-session">,
2268  Group<i_Group>, Flags<[CC1Option]>,
2269  HelpText<"Don't verify input files for the modules if the module has been "
2270           "successfully validated or loaded during this build session">,
2271  MarshallingInfoFlag<HeaderSearchOpts<"ModulesValidateOncePerBuildSession">>;
2272def fmodules_disable_diagnostic_validation : Flag<["-"], "fmodules-disable-diagnostic-validation">,
2273  Group<i_Group>, Flags<[CC1Option]>,
2274  HelpText<"Disable validation of the diagnostic options when loading the module">,
2275  MarshallingInfoNegativeFlag<HeaderSearchOpts<"ModulesValidateDiagnosticOptions">>;
2276defm modules_validate_system_headers : BoolOption<"f", "modules-validate-system-headers",
2277  HeaderSearchOpts<"ModulesValidateSystemHeaders">, DefaultFalse,
2278  PosFlag<SetTrue, [CC1Option], "Validate the system headers that a module depends on when loading the module">,
2279  NegFlag<SetFalse, [NoXarchOption]>>, Group<i_Group>;
2280
2281def fvalidate_ast_input_files_content:
2282  Flag <["-"], "fvalidate-ast-input-files-content">,
2283  Group<f_Group>, Flags<[CC1Option]>,
2284  HelpText<"Compute and store the hash of input files used to build an AST."
2285           " Files with mismatching mtime's are considered valid"
2286           " if both contents is identical">,
2287  MarshallingInfoFlag<HeaderSearchOpts<"ValidateASTInputFilesContent">>;
2288def fmodules_validate_input_files_content:
2289  Flag <["-"], "fmodules-validate-input-files-content">,
2290  Group<f_Group>, Flags<[NoXarchOption]>,
2291  HelpText<"Validate PCM input files based on content if mtime differs">;
2292def fno_modules_validate_input_files_content:
2293  Flag <["-"], "fno_modules-validate-input-files-content">,
2294  Group<f_Group>, Flags<[NoXarchOption]>;
2295def fpch_validate_input_files_content:
2296  Flag <["-"], "fpch-validate-input-files-content">,
2297  Group<f_Group>, Flags<[NoXarchOption]>,
2298  HelpText<"Validate PCH input files based on content if mtime differs">;
2299def fno_pch_validate_input_files_content:
2300  Flag <["-"], "fno_pch-validate-input-files-content">,
2301  Group<f_Group>, Flags<[NoXarchOption]>;
2302defm pch_instantiate_templates : BoolFOption<"pch-instantiate-templates",
2303  LangOpts<"PCHInstantiateTemplates">, DefaultFalse,
2304  PosFlag<SetTrue, [], "Instantiate templates already while building a PCH">,
2305  NegFlag<SetFalse>, BothFlags<[CC1Option, CoreOption]>>;
2306defm pch_codegen: OptInCC1FFlag<"pch-codegen", "Generate ", "Do not generate ",
2307  "code for uses of this PCH that assumes an explicit object file will be built for the PCH">;
2308defm pch_debuginfo: OptInCC1FFlag<"pch-debuginfo", "Generate ", "Do not generate ",
2309  "debug info for types in an object file built from this PCH and do not generate them elsewhere">;
2310
2311def fimplicit_module_maps : Flag <["-"], "fimplicit-module-maps">, Group<f_Group>,
2312  Flags<[NoXarchOption, CC1Option, CoreOption]>,
2313  HelpText<"Implicitly search the file system for module map files.">,
2314  MarshallingInfoFlag<HeaderSearchOpts<"ImplicitModuleMaps">>;
2315def fmodules_ts : Flag <["-"], "fmodules-ts">, Group<f_Group>,
2316  Flags<[CC1Option]>, HelpText<"Enable support for the C++ Modules TS">,
2317  MarshallingInfoFlag<LangOpts<"ModulesTS">>;
2318defm modules : BoolFOption<"modules",
2319  LangOpts<"Modules">, Default<!strconcat(fmodules_ts.KeyPath, "||", fcxx_modules.KeyPath)>,
2320  PosFlag<SetTrue, [CC1Option], "Enable the 'modules' language feature">,
2321  NegFlag<SetFalse>, BothFlags<[NoXarchOption, CoreOption]>>;
2322def fmodule_maps : Flag <["-"], "fmodule-maps">, Flags<[CoreOption]>, Alias<fimplicit_module_maps>;
2323def fmodule_name_EQ : Joined<["-"], "fmodule-name=">, Group<f_Group>,
2324  Flags<[NoXarchOption,CC1Option,CoreOption]>, MetaVarName<"<name>">,
2325  HelpText<"Specify the name of the module to build">,
2326  MarshallingInfoString<LangOpts<"ModuleName">>;
2327def fmodule_implementation_of : Separate<["-"], "fmodule-implementation-of">,
2328  Flags<[CC1Option,CoreOption]>, Alias<fmodule_name_EQ>;
2329def fsystem_module : Flag<["-"], "fsystem-module">, Flags<[CC1Option,CoreOption]>,
2330  HelpText<"Build this module as a system module. Only used with -emit-module">,
2331  MarshallingInfoFlag<FrontendOpts<"IsSystemModule">>;
2332def fmodule_map_file : Joined<["-"], "fmodule-map-file=">,
2333  Group<f_Group>, Flags<[NoXarchOption,CC1Option,CoreOption]>, MetaVarName<"<file>">,
2334  HelpText<"Load this module map file">,
2335  MarshallingInfoStringVector<FrontendOpts<"ModuleMapFiles">>;
2336def fmodule_file : Joined<["-"], "fmodule-file=">,
2337  Group<i_Group>, Flags<[NoXarchOption,CC1Option,CoreOption]>, MetaVarName<"[<name>=]<file>">,
2338  HelpText<"Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.">;
2339def fmodules_ignore_macro : Joined<["-"], "fmodules-ignore-macro=">, Group<f_Group>,
2340  Flags<[CC1Option,CoreOption]>,
2341  HelpText<"Ignore the definition of the given macro when building and loading modules">;
2342def fmodules_strict_decluse : Flag <["-"], "fmodules-strict-decluse">, Group<f_Group>,
2343  Flags<[NoXarchOption,CC1Option,CoreOption]>,
2344  HelpText<"Like -fmodules-decluse but requires all headers to be in modules">,
2345  MarshallingInfoFlag<LangOpts<"ModulesStrictDeclUse">>;
2346defm modules_decluse : BoolFOption<"modules-decluse",
2347  LangOpts<"ModulesDeclUse">, Default<fmodules_strict_decluse.KeyPath>,
2348  PosFlag<SetTrue, [CC1Option], "Require declaration of modules used within a module">,
2349  NegFlag<SetFalse>, BothFlags<[NoXarchOption,CoreOption]>>;
2350defm modules_search_all : BoolFOption<"modules-search-all",
2351  LangOpts<"ModulesSearchAll">, DefaultFalse,
2352  PosFlag<SetTrue, [], "Search even non-imported modules to resolve references">,
2353  NegFlag<SetFalse>, BothFlags<[NoXarchOption, CC1Option,CoreOption]>>,
2354  ShouldParseIf<fmodules.KeyPath>;
2355defm implicit_modules : BoolFOption<"implicit-modules",
2356  LangOpts<"ImplicitModules">, DefaultTrue,
2357  NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>, BothFlags<[NoXarchOption,CoreOption]>>;
2358def fretain_comments_from_system_headers : Flag<["-"], "fretain-comments-from-system-headers">, Group<f_Group>, Flags<[CC1Option]>,
2359  MarshallingInfoFlag<LangOpts<"RetainCommentsFromSystemHeaders">>;
2360def fmodule_header : Flag <["-"], "fmodule-header">, Group<f_Group>,
2361  Flags<[NoXarchOption]>, HelpText<"Build a C++20 Header Unit from a header.">;
2362def fmodule_header_EQ : Joined<["-"], "fmodule-header=">, Group<f_Group>,
2363  Flags<[NoXarchOption]>, MetaVarName<"<kind>">,
2364  HelpText<"Build a C++20 Header Unit from a header that should be found in the user (fmodule-header=user) or system (fmodule-header=system) search path.">;
2365
2366def fno_knr_functions : Flag<["-"], "fno-knr-functions">, Group<f_Group>,
2367  MarshallingInfoFlag<LangOpts<"DisableKNRFunctions">>,
2368  HelpText<"Disable support for K&R C function declarations">,
2369  Flags<[CC1Option, CoreOption]>;
2370
2371def fmudflapth : Flag<["-"], "fmudflapth">, Group<f_Group>;
2372def fmudflap : Flag<["-"], "fmudflap">, Group<f_Group>;
2373def fnested_functions : Flag<["-"], "fnested-functions">, Group<f_Group>;
2374def fnext_runtime : Flag<["-"], "fnext-runtime">, Group<f_Group>;
2375def fno_asm : Flag<["-"], "fno-asm">, Group<f_Group>;
2376def fno_asynchronous_unwind_tables : Flag<["-"], "fno-asynchronous-unwind-tables">, Group<f_Group>;
2377def fno_assume_sane_operator_new : Flag<["-"], "fno-assume-sane-operator-new">, Group<f_Group>,
2378  HelpText<"Don't assume that C++'s global operator new can't alias any pointer">,
2379  Flags<[CC1Option]>, MarshallingInfoNegativeFlag<CodeGenOpts<"AssumeSaneOperatorNew">>;
2380def fno_builtin : Flag<["-"], "fno-builtin">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
2381  HelpText<"Disable implicit builtin knowledge of functions">;
2382def fno_builtin_ : Joined<["-"], "fno-builtin-">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
2383  HelpText<"Disable implicit builtin knowledge of a specific function">;
2384def fno_common : Flag<["-"], "fno-common">, Group<f_Group>, Flags<[CC1Option]>,
2385    HelpText<"Compile common globals like normal definitions">;
2386defm digraphs : BoolFOption<"digraphs",
2387  LangOpts<"Digraphs">, Default<std#".hasDigraphs()">,
2388  PosFlag<SetTrue, [], "Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default)">,
2389  NegFlag<SetFalse, [], "Disallow alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:'">,
2390  BothFlags<[CC1Option]>>;
2391def fno_eliminate_unused_debug_symbols : Flag<["-"], "fno-eliminate-unused-debug-symbols">, Group<f_Group>;
2392def fno_inline_functions : Flag<["-"], "fno-inline-functions">, Group<f_clang_Group>, Flags<[CC1Option]>;
2393def fno_inline : Flag<["-"], "fno-inline">, Group<f_clang_Group>, Flags<[CC1Option]>;
2394def fno_global_isel : Flag<["-"], "fno-global-isel">, Group<f_clang_Group>,
2395  HelpText<"Disables the global instruction selector">;
2396def fno_experimental_isel : Flag<["-"], "fno-experimental-isel">, Group<f_clang_Group>,
2397  Alias<fno_global_isel>;
2398def fveclib : Joined<["-"], "fveclib=">, Group<f_Group>, Flags<[CC1Option]>,
2399    HelpText<"Use the given vector functions library">,
2400    Values<"Accelerate,libmvec,MASSV,SVML,Darwin_libsystem_m,none">,
2401    NormalizedValuesScope<"CodeGenOptions">,
2402    NormalizedValues<["Accelerate", "LIBMVEC", "MASSV", "SVML",
2403                      "Darwin_libsystem_m", "NoLibrary"]>,
2404    MarshallingInfoEnum<CodeGenOpts<"VecLib">, "NoLibrary">;
2405def fno_lax_vector_conversions : Flag<["-"], "fno-lax-vector-conversions">, Group<f_Group>,
2406  Alias<flax_vector_conversions_EQ>, AliasArgs<["none"]>;
2407def fno_implicit_module_maps : Flag <["-"], "fno-implicit-module-maps">, Group<f_Group>,
2408  Flags<[NoXarchOption]>;
2409def fno_module_maps : Flag <["-"], "fno-module-maps">, Alias<fno_implicit_module_maps>;
2410def fno_modules_strict_decluse : Flag <["-"], "fno-strict-modules-decluse">, Group<f_Group>,
2411  Flags<[NoXarchOption]>;
2412def fmodule_file_deps : Flag <["-"], "fmodule-file-deps">, Group<f_Group>,
2413  Flags<[NoXarchOption]>;
2414def fno_module_file_deps : Flag <["-"], "fno-module-file-deps">, Group<f_Group>,
2415  Flags<[NoXarchOption]>;
2416def fno_ms_extensions : Flag<["-"], "fno-ms-extensions">, Group<f_Group>,
2417  Flags<[CoreOption]>;
2418def fno_ms_compatibility : Flag<["-"], "fno-ms-compatibility">, Group<f_Group>,
2419  Flags<[CoreOption]>;
2420def fno_objc_legacy_dispatch : Flag<["-"], "fno-objc-legacy-dispatch">, Group<f_Group>;
2421def fno_objc_weak : Flag<["-"], "fno-objc-weak">, Group<f_Group>, Flags<[CC1Option]>;
2422def fno_omit_frame_pointer : Flag<["-"], "fno-omit-frame-pointer">, Group<f_Group>;
2423defm operator_names : BoolFOption<"operator-names",
2424  LangOpts<"CXXOperatorNames">, Default<cplusplus.KeyPath>,
2425  NegFlag<SetFalse, [CC1Option], "Do not treat C++ operator name keywords as synonyms for operators">,
2426  PosFlag<SetTrue>>;
2427def fdiagnostics_absolute_paths : Flag<["-"], "fdiagnostics-absolute-paths">, Group<f_Group>,
2428  Flags<[CC1Option, CoreOption]>, HelpText<"Print absolute paths in diagnostics">,
2429  MarshallingInfoFlag<DiagnosticOpts<"AbsolutePath">>;
2430def fno_stack_protector : Flag<["-"], "fno-stack-protector">, Group<f_Group>,
2431  HelpText<"Disable the use of stack protectors">;
2432def fno_strict_aliasing : Flag<["-"], "fno-strict-aliasing">, Group<f_Group>,
2433  Flags<[NoXarchOption, CoreOption]>;
2434def fstruct_path_tbaa : Flag<["-"], "fstruct-path-tbaa">, Group<f_Group>;
2435def fno_struct_path_tbaa : Flag<["-"], "fno-struct-path-tbaa">, Group<f_Group>;
2436def fno_strict_enums : Flag<["-"], "fno-strict-enums">, Group<f_Group>;
2437def fno_strict_overflow : Flag<["-"], "fno-strict-overflow">, Group<f_Group>;
2438def fno_temp_file : Flag<["-"], "fno-temp-file">, Group<f_Group>,
2439  Flags<[CC1Option, CoreOption]>, HelpText<
2440  "Directly create compilation output files. This may lead to incorrect incremental builds if the compiler crashes">,
2441  MarshallingInfoNegativeFlag<FrontendOpts<"UseTemporary">>;
2442defm use_cxa_atexit : BoolFOption<"use-cxa-atexit",
2443  CodeGenOpts<"CXAAtExit">, DefaultTrue,
2444  NegFlag<SetFalse, [CC1Option], "Don't use __cxa_atexit for calling destructors">,
2445  PosFlag<SetTrue>>;
2446def fno_unwind_tables : Flag<["-"], "fno-unwind-tables">, Group<f_Group>;
2447def fno_verbose_asm : Flag<["-"], "fno-verbose-asm">, Group<f_Group>, Flags<[CC1Option]>,
2448  MarshallingInfoNegativeFlag<CodeGenOpts<"AsmVerbose">>;
2449def fno_working_directory : Flag<["-"], "fno-working-directory">, Group<f_Group>;
2450def fno_wrapv : Flag<["-"], "fno-wrapv">, Group<f_Group>;
2451def fobjc_arc : Flag<["-"], "fobjc-arc">, Group<f_Group>, Flags<[CC1Option]>,
2452  HelpText<"Synthesize retain and release calls for Objective-C pointers">;
2453def fno_objc_arc : Flag<["-"], "fno-objc-arc">, Group<f_Group>;
2454defm objc_encode_cxx_class_template_spec : BoolFOption<"objc-encode-cxx-class-template-spec",
2455  LangOpts<"EncodeCXXClassTemplateSpec">, DefaultFalse,
2456  PosFlag<SetTrue, [CC1Option], "Fully encode c++ class template specialization">,
2457  NegFlag<SetFalse>>;
2458defm objc_convert_messages_to_runtime_calls : BoolFOption<"objc-convert-messages-to-runtime-calls",
2459  CodeGenOpts<"ObjCConvertMessagesToRuntimeCalls">, DefaultTrue,
2460  NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>>;
2461defm objc_arc_exceptions : BoolFOption<"objc-arc-exceptions",
2462  CodeGenOpts<"ObjCAutoRefCountExceptions">, DefaultFalse,
2463  PosFlag<SetTrue, [CC1Option], "Use EH-safe code when synthesizing retains and releases in -fobjc-arc">,
2464  NegFlag<SetFalse>>;
2465def fobjc_atdefs : Flag<["-"], "fobjc-atdefs">, Group<clang_ignored_f_Group>;
2466def fobjc_call_cxx_cdtors : Flag<["-"], "fobjc-call-cxx-cdtors">, Group<clang_ignored_f_Group>;
2467defm objc_exceptions : BoolFOption<"objc-exceptions",
2468  LangOpts<"ObjCExceptions">, DefaultFalse,
2469  PosFlag<SetTrue, [CC1Option], "Enable Objective-C exceptions">, NegFlag<SetFalse>>;
2470defm application_extension : BoolFOption<"application-extension",
2471  LangOpts<"AppExt">, DefaultFalse,
2472  PosFlag<SetTrue, [CC1Option], "Restrict code to those available for App Extensions">,
2473  NegFlag<SetFalse>>;
2474defm relaxed_template_template_args : BoolFOption<"relaxed-template-template-args",
2475  LangOpts<"RelaxedTemplateTemplateArgs">, DefaultFalse,
2476  PosFlag<SetTrue, [CC1Option], "Enable C++17 relaxed template template argument matching">,
2477  NegFlag<SetFalse>>;
2478defm sized_deallocation : BoolFOption<"sized-deallocation",
2479  LangOpts<"SizedDeallocation">, DefaultFalse,
2480  PosFlag<SetTrue, [CC1Option], "Enable C++14 sized global deallocation functions">,
2481  NegFlag<SetFalse>>;
2482defm aligned_allocation : BoolFOption<"aligned-allocation",
2483  LangOpts<"AlignedAllocation">, Default<cpp17.KeyPath>,
2484  PosFlag<SetTrue, [], "Enable C++17 aligned allocation functions">,
2485  NegFlag<SetFalse>, BothFlags<[CC1Option]>>;
2486def fnew_alignment_EQ : Joined<["-"], "fnew-alignment=">,
2487  HelpText<"Specifies the largest alignment guaranteed by '::operator new(size_t)'">,
2488  MetaVarName<"<align>">, Group<f_Group>, Flags<[CC1Option]>,
2489  MarshallingInfoInt<LangOpts<"NewAlignOverride">>;
2490def : Separate<["-"], "fnew-alignment">, Alias<fnew_alignment_EQ>;
2491def : Flag<["-"], "faligned-new">, Alias<faligned_allocation>;
2492def : Flag<["-"], "fno-aligned-new">, Alias<fno_aligned_allocation>;
2493def faligned_new_EQ : Joined<["-"], "faligned-new=">;
2494
2495def fobjc_legacy_dispatch : Flag<["-"], "fobjc-legacy-dispatch">, Group<f_Group>;
2496def fobjc_new_property : Flag<["-"], "fobjc-new-property">, Group<clang_ignored_f_Group>;
2497defm objc_infer_related_result_type : BoolFOption<"objc-infer-related-result-type",
2498  LangOpts<"ObjCInferRelatedResultType">, DefaultTrue,
2499  NegFlag<SetFalse, [CC1Option], "do not infer Objective-C related result type based on method family">,
2500  PosFlag<SetTrue>>;
2501def fobjc_link_runtime: Flag<["-"], "fobjc-link-runtime">, Group<f_Group>;
2502def fobjc_weak : Flag<["-"], "fobjc-weak">, Group<f_Group>, Flags<[CC1Option]>,
2503  HelpText<"Enable ARC-style weak references in Objective-C">;
2504
2505// Objective-C ABI options.
2506def fobjc_runtime_EQ : Joined<["-"], "fobjc-runtime=">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
2507  HelpText<"Specify the target Objective-C runtime kind and version">;
2508def fobjc_abi_version_EQ : Joined<["-"], "fobjc-abi-version=">, Group<f_Group>;
2509def fobjc_nonfragile_abi_version_EQ : Joined<["-"], "fobjc-nonfragile-abi-version=">, Group<f_Group>;
2510def fobjc_nonfragile_abi : Flag<["-"], "fobjc-nonfragile-abi">, Group<f_Group>;
2511def fno_objc_nonfragile_abi : Flag<["-"], "fno-objc-nonfragile-abi">, Group<f_Group>;
2512
2513def fobjc_sender_dependent_dispatch : Flag<["-"], "fobjc-sender-dependent-dispatch">, Group<f_Group>;
2514def fobjc_disable_direct_methods_for_testing :
2515  Flag<["-"], "fobjc-disable-direct-methods-for-testing">,
2516  Group<f_Group>, Flags<[CC1Option]>,
2517  HelpText<"Ignore attribute objc_direct so that direct methods can be tested">,
2518  MarshallingInfoFlag<LangOpts<"ObjCDisableDirectMethodsForTesting">>;
2519defm objc_avoid_heapify_local_blocks : BoolFOption<"objc-avoid-heapify-local-blocks",
2520  CodeGenOpts<"ObjCAvoidHeapifyLocalBlocks">, DefaultFalse,
2521  PosFlag<SetTrue, [], "Try">,
2522  NegFlag<SetFalse, [], "Don't try">,
2523  BothFlags<[CC1Option, NoDriverOption], " to avoid heapifying local blocks">>;
2524
2525def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group<f_Group>;
2526def fopenmp : Flag<["-"], "fopenmp">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, FlangOption, FC1Option]>,
2527  HelpText<"Parse OpenMP pragmas and generate parallel code.">;
2528def fno_openmp : Flag<["-"], "fno-openmp">, Group<f_Group>, Flags<[NoArgumentUnused]>;
2529def fopenmp_version_EQ : Joined<["-"], "fopenmp-version=">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>,
2530  HelpText<"Set OpenMP version (e.g. 45 for OpenMP 4.5, 50 for OpenMP 5.0). Default value is 50.">;
2531defm openmp_extensions: BoolFOption<"openmp-extensions",
2532  LangOpts<"OpenMPExtensions">, DefaultTrue,
2533  PosFlag<SetTrue, [CC1Option, NoArgumentUnused],
2534          "Enable all Clang extensions for OpenMP directives and clauses">,
2535  NegFlag<SetFalse, [CC1Option, NoArgumentUnused],
2536          "Disable all Clang extensions for OpenMP directives and clauses">>;
2537def fopenmp_EQ : Joined<["-"], "fopenmp=">, Group<f_Group>;
2538def fopenmp_use_tls : Flag<["-"], "fopenmp-use-tls">, Group<f_Group>,
2539  Flags<[NoArgumentUnused, HelpHidden]>;
2540def fnoopenmp_use_tls : Flag<["-"], "fnoopenmp-use-tls">, Group<f_Group>,
2541  Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2542def fopenmp_targets_EQ : CommaJoined<["-"], "fopenmp-targets=">, Flags<[NoXarchOption, CC1Option]>,
2543  HelpText<"Specify comma-separated list of triples OpenMP offloading targets to be supported">;
2544def fopenmp_relocatable_target : Flag<["-"], "fopenmp-relocatable-target">,
2545  Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2546def fnoopenmp_relocatable_target : Flag<["-"], "fnoopenmp-relocatable-target">,
2547  Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2548def fopenmp_simd : Flag<["-"], "fopenmp-simd">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>,
2549  HelpText<"Emit OpenMP code only for SIMD-based constructs.">;
2550def fopenmp_enable_irbuilder : Flag<["-"], "fopenmp-enable-irbuilder">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>,
2551  HelpText<"Use the experimental OpenMP-IR-Builder codegen path.">;
2552def fno_openmp_simd : Flag<["-"], "fno-openmp-simd">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>;
2553def fopenmp_cuda_mode : Flag<["-"], "fopenmp-cuda-mode">, Group<f_Group>,
2554  Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2555def fno_openmp_cuda_mode : Flag<["-"], "fno-openmp-cuda-mode">, Group<f_Group>,
2556  Flags<[NoArgumentUnused, HelpHidden]>;
2557def fopenmp_cuda_force_full_runtime : Flag<["-"], "fopenmp-cuda-force-full-runtime">, Group<f_Group>,
2558  Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2559def fno_openmp_cuda_force_full_runtime : Flag<["-"], "fno-openmp-cuda-force-full-runtime">, Group<f_Group>,
2560  Flags<[NoArgumentUnused, HelpHidden]>;
2561def fopenmp_cuda_number_of_sm_EQ : Joined<["-"], "fopenmp-cuda-number-of-sm=">, Group<f_Group>,
2562  Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2563def fopenmp_cuda_blocks_per_sm_EQ : Joined<["-"], "fopenmp-cuda-blocks-per-sm=">, Group<f_Group>,
2564  Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2565def fopenmp_cuda_teams_reduction_recs_num_EQ : Joined<["-"], "fopenmp-cuda-teams-reduction-recs-num=">, Group<f_Group>,
2566  Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2567def fopenmp_target_debug : Flag<["-"], "fopenmp-target-debug">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>,
2568  HelpText<"Enable debugging in the OpenMP offloading device RTL">;
2569def fno_openmp_target_debug : Flag<["-"], "fno-openmp-target-debug">, Group<f_Group>, Flags<[NoArgumentUnused]>;
2570def fopenmp_target_debug_EQ : Joined<["-"], "fopenmp-target-debug=">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2571def fopenmp_assume_teams_oversubscription : Flag<["-"], "fopenmp-assume-teams-oversubscription">,
2572  Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2573def fopenmp_assume_threads_oversubscription : Flag<["-"], "fopenmp-assume-threads-oversubscription">,
2574  Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2575def fno_openmp_assume_teams_oversubscription : Flag<["-"], "fno-openmp-assume-teams-oversubscription">,
2576  Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2577def fno_openmp_assume_threads_oversubscription : Flag<["-"], "fno-openmp-assume-threads-oversubscription">,
2578  Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
2579def fopenmp_assume_no_thread_state : Flag<["-"], "fopenmp-assume-no-thread-state">, Group<f_Group>,
2580  Flags<[CC1Option, NoArgumentUnused, HelpHidden]>,
2581  HelpText<"Assert no thread in a parallel region modifies an ICV">,
2582  MarshallingInfoFlag<LangOpts<"OpenMPNoThreadState">>;
2583def fopenmp_offload_mandatory : Flag<["-"], "fopenmp-offload-mandatory">, Group<f_Group>,
2584  Flags<[CC1Option, NoArgumentUnused]>,
2585  HelpText<"Do not create a host fallback if offloading to the device fails.">,
2586  MarshallingInfoFlag<LangOpts<"OpenMPOffloadMandatory">>;
2587def fopenmp_target_new_runtime : Flag<["-"], "fopenmp-target-new-runtime">,
2588  Group<f_Group>, Flags<[CC1Option, HelpHidden]>;
2589def fno_openmp_target_new_runtime : Flag<["-"], "fno-openmp-target-new-runtime">,
2590  Group<f_Group>, Flags<[CC1Option, HelpHidden]>;
2591defm openmp_optimistic_collapse : BoolFOption<"openmp-optimistic-collapse",
2592  LangOpts<"OpenMPOptimisticCollapse">, DefaultFalse,
2593  PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>, BothFlags<[NoArgumentUnused, HelpHidden]>>;
2594def static_openmp: Flag<["-"], "static-openmp">,
2595  HelpText<"Use the static host OpenMP runtime while linking.">;
2596def offload_new_driver : Flag<["--"], "offload-new-driver">, Flags<[CC1Option]>, Group<f_Group>,
2597  MarshallingInfoFlag<LangOpts<"OffloadingNewDriver">>, HelpText<"Use the new driver for offloading compilation.">;
2598def no_offload_new_driver : Flag<["--"], "no-offload-new-driver">, Flags<[CC1Option]>, Group<f_Group>,
2599  HelpText<"Don't Use the new driver for offloading compilation.">;
2600def offload_device_only : Flag<["--"], "offload-device-only">,
2601  HelpText<"Only compile for the offloading device.">;
2602def offload_host_only : Flag<["--"], "offload-host-only">,
2603  HelpText<"Only compile for the offloading host.">;
2604def offload_host_device : Flag<["--"], "offload-host-device">,
2605  HelpText<"Only compile for the offloading host.">;
2606def cuda_device_only : Flag<["--"], "cuda-device-only">, Alias<offload_device_only>,
2607  HelpText<"Compile CUDA code for device only">;
2608def cuda_host_only : Flag<["--"], "cuda-host-only">, Alias<offload_host_only>,
2609  HelpText<"Compile CUDA code for host only. Has no effect on non-CUDA compilations.">;
2610def cuda_compile_host_device : Flag<["--"], "cuda-compile-host-device">, Alias<offload_host_device>,
2611  HelpText<"Compile CUDA code for both host and device (default). Has no "
2612           "effect on non-CUDA compilations.">;
2613def fopenmp_new_driver : Flag<["-"], "fopenmp-new-driver">, Flags<[CC1Option]>, Group<f_Group>,
2614  HelpText<"Use the new driver for OpenMP offloading.">;
2615def fno_openmp_new_driver : Flag<["-"], "fno-openmp-new-driver">, Flags<[CC1Option]>, Group<Action_Group>,
2616  Alias<no_offload_new_driver>, HelpText<"Don't use the new driver for OpenMP offloading.">;
2617def fno_optimize_sibling_calls : Flag<["-"], "fno-optimize-sibling-calls">, Group<f_Group>, Flags<[CC1Option]>,
2618  HelpText<"Disable tail call optimization, keeping the call stack accurate">,
2619  MarshallingInfoFlag<CodeGenOpts<"DisableTailCalls">>;
2620def foptimize_sibling_calls : Flag<["-"], "foptimize-sibling-calls">, Group<f_Group>;
2621defm escaping_block_tail_calls : BoolFOption<"escaping-block-tail-calls",
2622  CodeGenOpts<"NoEscapingBlockTailCalls">, DefaultFalse,
2623  NegFlag<SetTrue, [CC1Option]>, PosFlag<SetFalse>>;
2624def force__cpusubtype__ALL : Flag<["-"], "force_cpusubtype_ALL">;
2625def force__flat__namespace : Flag<["-"], "force_flat_namespace">;
2626def force__load : Separate<["-"], "force_load">;
2627def force_addr : Joined<["-"], "fforce-addr">, Group<clang_ignored_f_Group>;
2628def foutput_class_dir_EQ : Joined<["-"], "foutput-class-dir=">, Group<f_Group>;
2629def fpack_struct : Flag<["-"], "fpack-struct">, Group<f_Group>;
2630def fno_pack_struct : Flag<["-"], "fno-pack-struct">, Group<f_Group>;
2631def fpack_struct_EQ : Joined<["-"], "fpack-struct=">, Group<f_Group>, Flags<[CC1Option]>,
2632  HelpText<"Specify the default maximum struct packing alignment">,
2633  MarshallingInfoInt<LangOpts<"PackStruct">>;
2634def fmax_type_align_EQ : Joined<["-"], "fmax-type-align=">, Group<f_Group>, Flags<[CC1Option]>,
2635  HelpText<"Specify the maximum alignment to enforce on pointers lacking an explicit alignment">,
2636  MarshallingInfoInt<LangOpts<"MaxTypeAlign">>;
2637def fno_max_type_align : Flag<["-"], "fno-max-type-align">, Group<f_Group>;
2638defm pascal_strings : BoolFOption<"pascal-strings",
2639  LangOpts<"PascalStrings">, DefaultFalse,
2640  PosFlag<SetTrue, [CC1Option], "Recognize and construct Pascal-style string literals">,
2641  NegFlag<SetFalse>>;
2642// Note: This flag has different semantics in the driver and in -cc1. The driver accepts -fpatchable-function-entry=M,N
2643// and forwards it to -cc1 as -fpatchable-function-entry=M and -fpatchable-function-entry-offset=N. In -cc1, both flags
2644// are treated as a single integer.
2645def fpatchable_function_entry_EQ : Joined<["-"], "fpatchable-function-entry=">, Group<f_Group>, Flags<[CC1Option]>,
2646  MetaVarName<"<N,M>">, HelpText<"Generate M NOPs before function entry and N-M NOPs after function entry">,
2647  MarshallingInfoInt<CodeGenOpts<"PatchableFunctionEntryCount">>;
2648def fms_hotpatch : Flag<["-"], "fms-hotpatch">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
2649  HelpText<"Ensure that all functions can be hotpatched at runtime">,
2650  MarshallingInfoFlag<CodeGenOpts<"HotPatch">>;
2651def fpcc_struct_return : Flag<["-"], "fpcc-struct-return">, Group<f_Group>, Flags<[CC1Option]>,
2652  HelpText<"Override the default ABI to return all structs on the stack">;
2653def fpch_preprocess : Flag<["-"], "fpch-preprocess">, Group<f_Group>;
2654def fpic : Flag<["-"], "fpic">, Group<f_Group>;
2655def fno_pic : Flag<["-"], "fno-pic">, Group<f_Group>;
2656def fpie : Flag<["-"], "fpie">, Group<f_Group>;
2657def fno_pie : Flag<["-"], "fno-pie">, Group<f_Group>;
2658def fdirect_access_external_data : Flag<["-"], "fdirect-access-external-data">, Group<f_Group>, Flags<[CC1Option]>,
2659  HelpText<"Don't use GOT indirection to reference external data symbols">;
2660def fno_direct_access_external_data : Flag<["-"], "fno-direct-access-external-data">, Group<f_Group>, Flags<[CC1Option]>,
2661  HelpText<"Use GOT indirection to reference external data symbols">;
2662defm plt : BoolFOption<"plt",
2663  CodeGenOpts<"NoPLT">, DefaultFalse,
2664  NegFlag<SetTrue, [CC1Option], "Use GOT indirection instead of PLT to make external function calls (x86 only)">,
2665  PosFlag<SetFalse>>;
2666defm ropi : BoolFOption<"ropi",
2667  LangOpts<"ROPI">, DefaultFalse,
2668  PosFlag<SetTrue, [CC1Option], "Generate read-only position independent code (ARM only)">,
2669  NegFlag<SetFalse>>;
2670defm rwpi : BoolFOption<"rwpi",
2671  LangOpts<"RWPI">, DefaultFalse,
2672  PosFlag<SetTrue, [CC1Option], "Generate read-write position independent code (ARM only)">,
2673  NegFlag<SetFalse>>;
2674def fplugin_EQ : Joined<["-"], "fplugin=">, Group<f_Group>, Flags<[NoXarchOption]>, MetaVarName<"<dsopath>">,
2675  HelpText<"Load the named plugin (dynamic shared object)">;
2676def fplugin_arg : Joined<["-"], "fplugin-arg-">,
2677  MetaVarName<"<name>-<arg>">,
2678  HelpText<"Pass <arg> to plugin <name>">;
2679def fpass_plugin_EQ : Joined<["-"], "fpass-plugin=">,
2680  Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<dsopath>">,
2681  HelpText<"Load pass plugin from a dynamic shared object file (only with new pass manager).">,
2682  MarshallingInfoStringVector<CodeGenOpts<"PassPlugins">>;
2683defm preserve_as_comments : BoolFOption<"preserve-as-comments",
2684  CodeGenOpts<"PreserveAsmComments">, DefaultTrue,
2685  NegFlag<SetFalse, [CC1Option], "Do not preserve comments in inline assembly">,
2686  PosFlag<SetTrue>>;
2687def framework : Separate<["-"], "framework">, Flags<[LinkerInput]>;
2688def frandom_seed_EQ : Joined<["-"], "frandom-seed=">, Group<clang_ignored_f_Group>;
2689def freg_struct_return : Flag<["-"], "freg-struct-return">, Group<f_Group>, Flags<[CC1Option]>,
2690  HelpText<"Override the default ABI to return small structs in registers">;
2691defm rtti : BoolFOption<"rtti",
2692  LangOpts<"RTTI">, Default<cplusplus.KeyPath>,
2693  NegFlag<SetFalse, [CC1Option], "Disable generation of rtti information">,
2694  PosFlag<SetTrue>>, ShouldParseIf<cplusplus.KeyPath>;
2695defm rtti_data : BoolFOption<"rtti-data",
2696  LangOpts<"RTTIData">, Default<frtti.KeyPath>,
2697  NegFlag<SetFalse, [CC1Option], "Disable generation of RTTI data">,
2698  PosFlag<SetTrue>>, ShouldParseIf<frtti.KeyPath>;
2699def : Flag<["-"], "fsched-interblock">, Group<clang_ignored_f_Group>;
2700defm short_enums : BoolFOption<"short-enums",
2701  LangOpts<"ShortEnums">, DefaultFalse,
2702  PosFlag<SetTrue, [CC1Option], "Allocate to an enum type only as many bytes as it"
2703           " needs for the declared range of possible values">,
2704  NegFlag<SetFalse>>;
2705defm char8__t : BoolFOption<"char8_t",
2706  LangOpts<"Char8">, Default<cpp20.KeyPath>,
2707  PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">,
2708  BothFlags<[CC1Option], " C++ builtin type char8_t">>;
2709def fshort_wchar : Flag<["-"], "fshort-wchar">, Group<f_Group>,
2710  HelpText<"Force wchar_t to be a short unsigned int">;
2711def fno_short_wchar : Flag<["-"], "fno-short-wchar">, Group<f_Group>,
2712  HelpText<"Force wchar_t to be an unsigned int">;
2713def fshow_overloads_EQ : Joined<["-"], "fshow-overloads=">, Group<f_Group>, Flags<[CC1Option]>,
2714  HelpText<"Which overload candidates to show when overload resolution fails. Defaults to 'all'">,
2715  Values<"best,all">,
2716  NormalizedValues<["Ovl_Best", "Ovl_All"]>,
2717  MarshallingInfoEnum<DiagnosticOpts<"ShowOverloads">, "Ovl_All">;
2718defm show_column : BoolFOption<"show-column",
2719  DiagnosticOpts<"ShowColumn">, DefaultTrue,
2720  NegFlag<SetFalse, [CC1Option], "Do not include column number on diagnostics">,
2721  PosFlag<SetTrue>>;
2722defm show_source_location : BoolFOption<"show-source-location",
2723  DiagnosticOpts<"ShowLocation">, DefaultTrue,
2724  NegFlag<SetFalse, [CC1Option], "Do not include source location information with diagnostics">,
2725  PosFlag<SetTrue>>;
2726defm spell_checking : BoolFOption<"spell-checking",
2727  LangOpts<"SpellChecking">, DefaultTrue,
2728  NegFlag<SetFalse, [CC1Option], "Disable spell-checking">, PosFlag<SetTrue>>;
2729def fspell_checking_limit_EQ : Joined<["-"], "fspell-checking-limit=">, Group<f_Group>;
2730def fsigned_bitfields : Flag<["-"], "fsigned-bitfields">, Group<f_Group>;
2731defm signed_char : BoolFOption<"signed-char",
2732  LangOpts<"CharIsSigned">, DefaultTrue,
2733  NegFlag<SetFalse, [CC1Option], "char is unsigned">, PosFlag<SetTrue, [], "char is signed">>,
2734  ShouldParseIf<!strconcat("!", open_cl.KeyPath)>;
2735defm split_stack : BoolFOption<"split-stack",
2736  CodeGenOpts<"EnableSegmentedStacks">, DefaultFalse,
2737  NegFlag<SetFalse, [], "Wouldn't use segmented stack">,
2738  PosFlag<SetTrue, [CC1Option], "Use segmented stack">>;
2739def fstack_protector_all : Flag<["-"], "fstack-protector-all">, Group<f_Group>,
2740  HelpText<"Enable stack protectors for all functions">;
2741defm stack_clash_protection : BoolFOption<"stack-clash-protection",
2742  CodeGenOpts<"StackClashProtector">, DefaultFalse,
2743  PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
2744  BothFlags<[], " stack clash protection">>;
2745def fstack_protector_strong : Flag<["-"], "fstack-protector-strong">, Group<f_Group>,
2746  HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. "
2747           "Compared to -fstack-protector, this uses a stronger heuristic "
2748           "that includes functions containing arrays of any size (and any type), "
2749           "as well as any calls to alloca or the taking of an address from a local variable">;
2750def fstack_protector : Flag<["-"], "fstack-protector">, Group<f_Group>,
2751  HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. "
2752           "This uses a loose heuristic which considers functions vulnerable if they "
2753           "contain a char (or 8bit integer) array or constant sized calls to alloca "
2754           ", which are of greater size than ssp-buffer-size (default: 8 bytes). All "
2755           "variable sized calls to alloca are considered vulnerable. A function with "
2756           "a stack protector has a guard value added to the stack frame that is "
2757           "checked on function exit. The guard value must be positioned in the "
2758           "stack frame such that a buffer overflow from a vulnerable variable will "
2759           "overwrite the guard value before overwriting the function's return "
2760           "address. The reference stack guard value is stored in a global variable.">;
2761def ftrivial_auto_var_init : Joined<["-"], "ftrivial-auto-var-init=">, Group<f_Group>,
2762  Flags<[CC1Option, CoreOption]>, HelpText<"Initialize trivial automatic stack variables. Defaults to 'uninitialized'">,
2763  Values<"uninitialized,zero,pattern">,
2764  NormalizedValuesScope<"LangOptions::TrivialAutoVarInitKind">,
2765  NormalizedValues<["Uninitialized", "Zero", "Pattern"]>,
2766  MarshallingInfoEnum<LangOpts<"TrivialAutoVarInit">, "Uninitialized">;
2767def enable_trivial_var_init_zero : Flag<["-"], "enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang">,
2768  Flags<[CC1Option, CoreOption, NoArgumentUnused]>,
2769  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">;
2770def ftrivial_auto_var_init_stop_after : Joined<["-"], "ftrivial-auto-var-init-stop-after=">, Group<f_Group>,
2771  Flags<[CC1Option, CoreOption]>, HelpText<"Stop initializing trivial automatic stack variables after the specified number of instances">,
2772  MarshallingInfoInt<LangOpts<"TrivialAutoVarInitStopAfter">>;
2773def fstandalone_debug : Flag<["-"], "fstandalone-debug">, Group<f_Group>, Flags<[CoreOption]>,
2774  HelpText<"Emit full debug info for all types used by the program">;
2775def fno_standalone_debug : Flag<["-"], "fno-standalone-debug">, Group<f_Group>, Flags<[CoreOption]>,
2776  HelpText<"Limit debug information produced to reduce size of debug binary">;
2777def flimit_debug_info : Flag<["-"], "flimit-debug-info">, Flags<[CoreOption]>, Alias<fno_standalone_debug>;
2778def fno_limit_debug_info : Flag<["-"], "fno-limit-debug-info">, Flags<[CoreOption]>, Alias<fstandalone_debug>;
2779def fdebug_macro : Flag<["-"], "fdebug-macro">, Group<f_Group>, Flags<[CoreOption]>,
2780  HelpText<"Emit macro debug information">;
2781def fno_debug_macro : Flag<["-"], "fno-debug-macro">, Group<f_Group>, Flags<[CoreOption]>,
2782  HelpText<"Do not emit macro debug information">;
2783def fstrict_aliasing : Flag<["-"], "fstrict-aliasing">, Group<f_Group>,
2784  Flags<[NoXarchOption, CoreOption]>;
2785def fstrict_enums : Flag<["-"], "fstrict-enums">, Group<f_Group>, Flags<[CC1Option]>,
2786  HelpText<"Enable optimizations based on the strict definition of an enum's "
2787           "value range">,
2788  MarshallingInfoFlag<CodeGenOpts<"StrictEnums">>;
2789defm strict_vtable_pointers : BoolFOption<"strict-vtable-pointers",
2790  CodeGenOpts<"StrictVTablePointers">, DefaultFalse,
2791  PosFlag<SetTrue, [CC1Option], "Enable optimizations based on the strict rules for"
2792            " overwriting polymorphic C++ objects">,
2793  NegFlag<SetFalse>>;
2794def fstrict_overflow : Flag<["-"], "fstrict-overflow">, Group<f_Group>;
2795def fdriver_only : Flag<["-"], "fdriver-only">, Flags<[NoXarchOption, CoreOption]>,
2796  Group<Action_Group>, HelpText<"Only run the driver.">;
2797def fsyntax_only : Flag<["-"], "fsyntax-only">,
2798  Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option]>, Group<Action_Group>;
2799def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group<f_Group>;
2800def ftemplate_depth_EQ : Joined<["-"], "ftemplate-depth=">, Group<f_Group>;
2801def ftemplate_depth_ : Joined<["-"], "ftemplate-depth-">, Group<f_Group>;
2802def ftemplate_backtrace_limit_EQ : Joined<["-"], "ftemplate-backtrace-limit=">,
2803                                   Group<f_Group>;
2804def foperator_arrow_depth_EQ : Joined<["-"], "foperator-arrow-depth=">,
2805                               Group<f_Group>;
2806
2807def fsave_optimization_record : Flag<["-"], "fsave-optimization-record">,
2808  Group<f_Group>, HelpText<"Generate a YAML optimization record file">;
2809def fsave_optimization_record_EQ : Joined<["-"], "fsave-optimization-record=">,
2810  Group<f_Group>, HelpText<"Generate an optimization record file in a specific format">,
2811  MetaVarName<"<format>">;
2812def fno_save_optimization_record : Flag<["-"], "fno-save-optimization-record">,
2813  Group<f_Group>, Flags<[NoArgumentUnused]>;
2814def foptimization_record_file_EQ : Joined<["-"], "foptimization-record-file=">,
2815  Group<f_Group>,
2816  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.">,
2817  MetaVarName<"<file>">;
2818def foptimization_record_passes_EQ : Joined<["-"], "foptimization-record-passes=">,
2819  Group<f_Group>,
2820  HelpText<"Only include passes which match a specified regular expression in the generated optimization record (by default, include all passes)">,
2821  MetaVarName<"<regex>">;
2822
2823def fvectorize : Flag<["-"], "fvectorize">, Group<f_Group>,
2824  HelpText<"Enable the loop vectorization passes">;
2825def fno_vectorize : Flag<["-"], "fno-vectorize">, Group<f_Group>;
2826def : Flag<["-"], "ftree-vectorize">, Alias<fvectorize>;
2827def : Flag<["-"], "fno-tree-vectorize">, Alias<fno_vectorize>;
2828def fslp_vectorize : Flag<["-"], "fslp-vectorize">, Group<f_Group>,
2829  HelpText<"Enable the superword-level parallelism vectorization passes">;
2830def fno_slp_vectorize : Flag<["-"], "fno-slp-vectorize">, Group<f_Group>;
2831def : Flag<["-"], "ftree-slp-vectorize">, Alias<fslp_vectorize>;
2832def : Flag<["-"], "fno-tree-slp-vectorize">, Alias<fno_slp_vectorize>;
2833def Wlarge_by_value_copy_def : Flag<["-"], "Wlarge-by-value-copy">,
2834  HelpText<"Warn if a function definition returns or accepts an object larger "
2835           "in bytes than a given value">, Flags<[HelpHidden]>;
2836def Wlarge_by_value_copy_EQ : Joined<["-"], "Wlarge-by-value-copy=">, Flags<[CC1Option]>,
2837  MarshallingInfoInt<LangOpts<"NumLargeByValueCopy">>;
2838
2839// These "special" warning flags are effectively processed as f_Group flags by the driver:
2840// Just silence warnings about -Wlarger-than for now.
2841def Wlarger_than_EQ : Joined<["-"], "Wlarger-than=">, Group<clang_ignored_f_Group>;
2842def Wlarger_than_ : Joined<["-"], "Wlarger-than-">, Alias<Wlarger_than_EQ>;
2843
2844// This is converted to -fwarn-stack-size=N and also passed through by the driver.
2845// FIXME: The driver should strip out the =<value> when passing W_value_Group through.
2846def Wframe_larger_than_EQ : Joined<["-"], "Wframe-larger-than=">, Group<W_value_Group>,
2847                            Flags<[NoXarchOption, CC1Option]>;
2848def Wframe_larger_than : Flag<["-"], "Wframe-larger-than">, Alias<Wframe_larger_than_EQ>;
2849
2850def : Flag<["-"], "fterminated-vtables">, Alias<fapple_kext>;
2851defm threadsafe_statics : BoolFOption<"threadsafe-statics",
2852  LangOpts<"ThreadsafeStatics">, DefaultTrue,
2853  NegFlag<SetFalse, [CC1Option], "Do not emit code to make initialization of local statics thread safe">,
2854  PosFlag<SetTrue>>;
2855def ftime_report : Flag<["-"], "ftime-report">, Group<f_Group>, Flags<[CC1Option]>,
2856  MarshallingInfoFlag<CodeGenOpts<"TimePasses">>;
2857def ftime_report_EQ: Joined<["-"], "ftime-report=">, Group<f_Group>,
2858  Flags<[CC1Option]>, Values<"per-pass,per-pass-run">,
2859  MarshallingInfoFlag<CodeGenOpts<"TimePassesPerRun">>,
2860  HelpText<"(For new pass manager) 'per-pass': one report for each pass; "
2861           "'per-pass-run': one report for each pass invocation">;
2862def ftime_trace : Flag<["-"], "ftime-trace">, Group<f_Group>,
2863  HelpText<"Turn on time profiler. Generates JSON file based on output filename.">,
2864  DocBrief<[{
2865Turn on time profiler. Generates JSON file based on output filename. Results
2866can be analyzed with chrome://tracing or `Speedscope App
2867<https://www.speedscope.app>`_ for flamegraph visualization.}]>,
2868  Flags<[CC1Option, CoreOption]>,
2869  MarshallingInfoFlag<FrontendOpts<"TimeTrace">>;
2870def ftime_trace_granularity_EQ : Joined<["-"], "ftime-trace-granularity=">, Group<f_Group>,
2871  HelpText<"Minimum time granularity (in microseconds) traced by time profiler">,
2872  Flags<[CC1Option, CoreOption]>,
2873  MarshallingInfoInt<FrontendOpts<"TimeTraceGranularity">, "500u">;
2874def ftime_trace_EQ : Joined<["-"], "ftime-trace=">, Group<f_Group>,
2875  HelpText<"Turn on time profiler. Generates JSON file based on output filename. "
2876           "Specify the path which stores the tracing output file.">,
2877  DocBrief<[{
2878  Turn on time profiler. Generates JSON file based on output filename. Results
2879  can be analyzed with chrome://tracing or `Speedscope App
2880  <https://www.speedscope.app>`_ for flamegraph visualization.}]>,
2881  Flags<[CC1Option, CoreOption]>,
2882  MarshallingInfoString<FrontendOpts<"TimeTracePath">>;
2883def fproc_stat_report : Joined<["-"], "fproc-stat-report">, Group<f_Group>,
2884  HelpText<"Print subprocess statistics">;
2885def fproc_stat_report_EQ : Joined<["-"], "fproc-stat-report=">, Group<f_Group>,
2886  HelpText<"Save subprocess statistics to the given file">;
2887def ftlsmodel_EQ : Joined<["-"], "ftls-model=">, Group<f_Group>, Flags<[CC1Option]>,
2888  Values<"global-dynamic,local-dynamic,initial-exec,local-exec">,
2889  NormalizedValuesScope<"CodeGenOptions">,
2890  NormalizedValues<["GeneralDynamicTLSModel", "LocalDynamicTLSModel", "InitialExecTLSModel", "LocalExecTLSModel"]>,
2891  MarshallingInfoEnum<CodeGenOpts<"DefaultTLSModel">, "GeneralDynamicTLSModel">;
2892def ftrapv : Flag<["-"], "ftrapv">, Group<f_Group>, Flags<[CC1Option]>,
2893  HelpText<"Trap on integer overflow">;
2894def ftrapv_handler_EQ : Joined<["-"], "ftrapv-handler=">, Group<f_Group>,
2895  MetaVarName<"<function name>">,
2896  HelpText<"Specify the function to be called on overflow">;
2897def ftrapv_handler : Separate<["-"], "ftrapv-handler">, Group<f_Group>, Flags<[CC1Option]>;
2898def ftrap_function_EQ : Joined<["-"], "ftrap-function=">, Group<f_Group>, Flags<[CC1Option]>,
2899  HelpText<"Issue call to specified function rather than a trap instruction">,
2900  MarshallingInfoString<CodeGenOpts<"TrapFuncName">>;
2901def funroll_loops : Flag<["-"], "funroll-loops">, Group<f_Group>,
2902  HelpText<"Turn on loop unroller">, Flags<[CC1Option]>;
2903def fno_unroll_loops : Flag<["-"], "fno-unroll-loops">, Group<f_Group>,
2904  HelpText<"Turn off loop unroller">, Flags<[CC1Option]>;
2905defm reroll_loops : BoolFOption<"reroll-loops",
2906  CodeGenOpts<"RerollLoops">, DefaultFalse,
2907  PosFlag<SetTrue, [CC1Option], "Turn on loop reroller">, NegFlag<SetFalse>>;
2908def ffinite_loops: Flag<["-"],  "ffinite-loops">, Group<f_Group>,
2909  HelpText<"Assume all loops are finite.">, Flags<[CC1Option]>;
2910def fno_finite_loops: Flag<["-"], "fno-finite-loops">, Group<f_Group>,
2911  HelpText<"Do not assume that any loop is finite.">, Flags<[CC1Option]>;
2912
2913def ftrigraphs : Flag<["-"], "ftrigraphs">, Group<f_Group>,
2914  HelpText<"Process trigraph sequences">, Flags<[CC1Option]>;
2915def fno_trigraphs : Flag<["-"], "fno-trigraphs">, Group<f_Group>,
2916  HelpText<"Do not process trigraph sequences">, Flags<[CC1Option]>;
2917def funsigned_bitfields : Flag<["-"], "funsigned-bitfields">, Group<f_Group>;
2918def funsigned_char : Flag<["-"], "funsigned-char">, Group<f_Group>;
2919def fno_unsigned_char : Flag<["-"], "fno-unsigned-char">;
2920def funwind_tables : Flag<["-"], "funwind-tables">, Group<f_Group>;
2921defm register_global_dtors_with_atexit : BoolFOption<"register-global-dtors-with-atexit",
2922  CodeGenOpts<"RegisterGlobalDtorsWithAtExit">, DefaultFalse,
2923  PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">,
2924  BothFlags<[], " atexit or __cxa_atexit to register global destructors">>;
2925defm use_init_array : BoolFOption<"use-init-array",
2926  CodeGenOpts<"UseInitArray">, DefaultTrue,
2927  NegFlag<SetFalse, [CC1Option], "Use .ctors/.dtors instead of .init_array/.fini_array">,
2928  PosFlag<SetTrue>>;
2929def fno_var_tracking : Flag<["-"], "fno-var-tracking">, Group<clang_ignored_f_Group>;
2930def fverbose_asm : Flag<["-"], "fverbose-asm">, Group<f_Group>,
2931  HelpText<"Generate verbose assembly output">;
2932def dA : Flag<["-"], "dA">, Alias<fverbose_asm>;
2933defm visibility_from_dllstorageclass : BoolFOption<"visibility-from-dllstorageclass",
2934  LangOpts<"VisibilityFromDLLStorageClass">, DefaultFalse,
2935  PosFlag<SetTrue, [CC1Option], "Set the visibility of symbols in the generated code from their DLL storage class">,
2936  NegFlag<SetFalse>>;
2937def fvisibility_dllexport_EQ : Joined<["-"], "fvisibility-dllexport=">, Group<f_Group>, Flags<[CC1Option]>,
2938  HelpText<"The visibility for dllexport definitions [-fvisibility-from-dllstorageclass]">,
2939  MarshallingInfoVisibility<LangOpts<"DLLExportVisibility">, "DefaultVisibility">,
2940  ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>;
2941def fvisibility_nodllstorageclass_EQ : Joined<["-"], "fvisibility-nodllstorageclass=">, Group<f_Group>, Flags<[CC1Option]>,
2942  HelpText<"The visibility for definitions without an explicit DLL export class [-fvisibility-from-dllstorageclass]">,
2943  MarshallingInfoVisibility<LangOpts<"NoDLLStorageClassVisibility">, "HiddenVisibility">,
2944  ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>;
2945def fvisibility_externs_dllimport_EQ : Joined<["-"], "fvisibility-externs-dllimport=">, Group<f_Group>, Flags<[CC1Option]>,
2946  HelpText<"The visibility for dllimport external declarations [-fvisibility-from-dllstorageclass]">,
2947  MarshallingInfoVisibility<LangOpts<"ExternDeclDLLImportVisibility">, "DefaultVisibility">,
2948  ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>;
2949def fvisibility_externs_nodllstorageclass_EQ : Joined<["-"], "fvisibility-externs-nodllstorageclass=">, Group<f_Group>, Flags<[CC1Option]>,
2950  HelpText<"The visibility for external declarations without an explicit DLL dllstorageclass [-fvisibility-from-dllstorageclass]">,
2951  MarshallingInfoVisibility<LangOpts<"ExternDeclNoDLLStorageClassVisibility">, "HiddenVisibility">,
2952  ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>;
2953def fvisibility_EQ : Joined<["-"], "fvisibility=">, Group<f_Group>,
2954  HelpText<"Set the default symbol visibility for all global declarations">, Values<"hidden,default">;
2955defm visibility_inlines_hidden : BoolFOption<"visibility-inlines-hidden",
2956  LangOpts<"InlineVisibilityHidden">, DefaultFalse,
2957  PosFlag<SetTrue, [CC1Option], "Give inline C++ member functions hidden visibility by default">,
2958  NegFlag<SetFalse>>;
2959defm visibility_inlines_hidden_static_local_var : BoolFOption<"visibility-inlines-hidden-static-local-var",
2960  LangOpts<"VisibilityInlinesHiddenStaticLocalVar">, DefaultFalse,
2961  PosFlag<SetTrue, [CC1Option], "When -fvisibility-inlines-hidden is enabled, static variables in"
2962            " inline C++ member functions will also be given hidden visibility by default">,
2963  NegFlag<SetFalse, [], "Disables -fvisibility-inlines-hidden-static-local-var"
2964         " (this is the default on non-darwin targets)">, BothFlags<[CC1Option]>>;
2965def fvisibility_ms_compat : Flag<["-"], "fvisibility-ms-compat">, Group<f_Group>,
2966  HelpText<"Give global types 'default' visibility and global functions and "
2967           "variables 'hidden' visibility by default">;
2968def fvisibility_global_new_delete_hidden : Flag<["-"], "fvisibility-global-new-delete-hidden">, Group<f_Group>,
2969  HelpText<"Give global C++ operator new and delete declarations hidden visibility">, Flags<[CC1Option]>,
2970  MarshallingInfoFlag<LangOpts<"GlobalAllocationFunctionVisibilityHidden">>;
2971def mdefault_visibility_export_mapping_EQ : Joined<["-"], "mdefault-visibility-export-mapping=">,
2972  Values<"none,explicit,all">,
2973  NormalizedValuesScope<"LangOptions::DefaultVisiblityExportMapping">,
2974  NormalizedValues<["None", "Explicit", "All"]>,
2975  HelpText<"Mapping between default visibility and export">,
2976  Group<m_Group>, Flags<[CC1Option]>,
2977  MarshallingInfoEnum<LangOpts<"DefaultVisibilityExportMapping">,"None">;
2978defm new_infallible : BoolFOption<"new-infallible",
2979  LangOpts<"NewInfallible">, DefaultFalse,
2980  PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">,
2981  BothFlags<[CC1Option], " treating throwing global C++ operator new as always returning valid memory "
2982  "(annotates with __attribute__((returns_nonnull)) and throw()). This is detectable in source.">>;
2983defm whole_program_vtables : BoolFOption<"whole-program-vtables",
2984  CodeGenOpts<"WholeProgramVTables">, DefaultFalse,
2985  PosFlag<SetTrue, [CC1Option], "Enables whole-program vtable optimization. Requires -flto">,
2986  NegFlag<SetFalse>, BothFlags<[CoreOption]>>;
2987defm split_lto_unit : BoolFOption<"split-lto-unit",
2988  CodeGenOpts<"EnableSplitLTOUnit">, DefaultFalse,
2989  PosFlag<SetTrue, [CC1Option], "Enables splitting of the LTO unit">,
2990  NegFlag<SetFalse>, BothFlags<[CoreOption]>>;
2991defm force_emit_vtables : BoolFOption<"force-emit-vtables",
2992  CodeGenOpts<"ForceEmitVTables">, DefaultFalse,
2993  PosFlag<SetTrue, [CC1Option], "Emits more virtual tables to improve devirtualization">,
2994  NegFlag<SetFalse>, BothFlags<[CoreOption]>>;
2995defm virtual_function_elimination : BoolFOption<"virtual-function-elimination",
2996  CodeGenOpts<"VirtualFunctionElimination">, DefaultFalse,
2997  PosFlag<SetTrue, [CC1Option], "Enables dead virtual function elimination optimization. Requires -flto=full">,
2998  NegFlag<SetFalse>, BothFlags<[CoreOption]>>;
2999
3000def fwrapv : Flag<["-"], "fwrapv">, Group<f_Group>, Flags<[CC1Option]>,
3001  HelpText<"Treat signed integer overflow as two's complement">;
3002def fwritable_strings : Flag<["-"], "fwritable-strings">, Group<f_Group>, Flags<[CC1Option]>,
3003  HelpText<"Store string literals as writable data">,
3004  MarshallingInfoFlag<LangOpts<"WritableStrings">>;
3005defm zero_initialized_in_bss : BoolFOption<"zero-initialized-in-bss",
3006  CodeGenOpts<"NoZeroInitializedInBSS">, DefaultFalse,
3007  NegFlag<SetTrue, [CC1Option], "Don't place zero initialized data in BSS">,
3008  PosFlag<SetFalse>>;
3009defm function_sections : BoolFOption<"function-sections",
3010  CodeGenOpts<"FunctionSections">, DefaultFalse,
3011  PosFlag<SetTrue, [CC1Option], "Place each function in its own section">,
3012  NegFlag<SetFalse>>;
3013def fbasic_block_sections_EQ : Joined<["-"], "fbasic-block-sections=">, Group<f_Group>,
3014  Flags<[CC1Option, CC1AsOption]>,
3015  HelpText<"Place each function's basic blocks in unique sections (ELF Only)">,
3016  DocBrief<[{Generate labels for each basic block or place each basic block or a subset of basic blocks in its own section.}]>,
3017  Values<"all,labels,none,list=">,
3018  MarshallingInfoString<CodeGenOpts<"BBSections">, [{"none"}]>;
3019defm data_sections : BoolFOption<"data-sections",
3020  CodeGenOpts<"DataSections">, DefaultFalse,
3021  PosFlag<SetTrue, [CC1Option], "Place each data in its own section">, NegFlag<SetFalse>>;
3022defm stack_size_section : BoolFOption<"stack-size-section",
3023  CodeGenOpts<"StackSizeSection">, DefaultFalse,
3024  PosFlag<SetTrue, [CC1Option], "Emit section containing metadata on function stack sizes">,
3025  NegFlag<SetFalse>>;
3026def fstack_usage : Flag<["-"], "fstack-usage">, Group<f_Group>,
3027  HelpText<"Emit .su file containing information on function stack sizes">;
3028def stack_usage_file : Separate<["-"], "stack-usage-file">,
3029  Flags<[CC1Option, NoDriverOption]>,
3030  HelpText<"Filename (or -) to write stack usage output to">,
3031  MarshallingInfoString<CodeGenOpts<"StackUsageOutput">>;
3032
3033defm unique_basic_block_section_names : BoolFOption<"unique-basic-block-section-names",
3034  CodeGenOpts<"UniqueBasicBlockSectionNames">, DefaultFalse,
3035  PosFlag<SetTrue, [CC1Option], "Use unique names for basic block sections (ELF Only)">,
3036  NegFlag<SetFalse>>;
3037defm unique_internal_linkage_names : BoolFOption<"unique-internal-linkage-names",
3038  CodeGenOpts<"UniqueInternalLinkageNames">, DefaultFalse,
3039  PosFlag<SetTrue, [CC1Option], "Uniqueify Internal Linkage Symbol Names by appending"
3040            " the MD5 hash of the module path">,
3041  NegFlag<SetFalse>>;
3042defm unique_section_names : BoolFOption<"unique-section-names",
3043  CodeGenOpts<"UniqueSectionNames">, DefaultTrue,
3044  NegFlag<SetFalse, [CC1Option], "Don't use unique names for text and data sections">,
3045  PosFlag<SetTrue>>;
3046
3047defm split_machine_functions: BoolFOption<"split-machine-functions",
3048  CodeGenOpts<"SplitMachineFunctions">, DefaultFalse,
3049  PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
3050  BothFlags<[], " late function splitting using profile information (x86 ELF)">>;
3051
3052defm strict_return : BoolFOption<"strict-return",
3053  CodeGenOpts<"StrictReturn">, DefaultTrue,
3054  NegFlag<SetFalse, [CC1Option], "Don't treat control flow paths that fall off the end"
3055            " of a non-void function as unreachable">,
3056  PosFlag<SetTrue>>;
3057
3058def fenable_matrix : Flag<["-"], "fenable-matrix">, Group<f_Group>,
3059    Flags<[CC1Option]>,
3060    HelpText<"Enable matrix data type and related builtin functions">,
3061    MarshallingInfoFlag<LangOpts<"MatrixTypes">>;
3062
3063def fzero_call_used_regs_EQ
3064    : Joined<["-"], "fzero-call-used-regs=">, Group<f_Group>, Flags<[CC1Option]>,
3065      HelpText<"Clear call-used registers upon function return (AArch64/x86 only)">,
3066      Values<"skip,used-gpr-arg,used-gpr,used-arg,used,all-gpr-arg,all-gpr,all-arg,all">,
3067      NormalizedValues<["Skip", "UsedGPRArg", "UsedGPR", "UsedArg", "Used",
3068                        "AllGPRArg", "AllGPR", "AllArg", "All"]>,
3069      NormalizedValuesScope<"llvm::ZeroCallUsedRegs::ZeroCallUsedRegsKind">,
3070      MarshallingInfoEnum<CodeGenOpts<"ZeroCallUsedRegs">, "Skip">;
3071
3072def fdebug_types_section: Flag <["-"], "fdebug-types-section">, Group<f_Group>,
3073  HelpText<"Place debug types in their own section (ELF Only)">;
3074def fno_debug_types_section: Flag<["-"], "fno-debug-types-section">, Group<f_Group>;
3075defm debug_ranges_base_address : BoolFOption<"debug-ranges-base-address",
3076  CodeGenOpts<"DebugRangesBaseAddress">, DefaultFalse,
3077  PosFlag<SetTrue, [CC1Option], "Use DWARF base address selection entries in .debug_ranges">,
3078  NegFlag<SetFalse>>;
3079defm split_dwarf_inlining : BoolFOption<"split-dwarf-inlining",
3080  CodeGenOpts<"SplitDwarfInlining">, DefaultFalse,
3081  NegFlag<SetFalse, []>,
3082  PosFlag<SetTrue, [CC1Option], "Provide minimal debug info in the object/executable"
3083          " to facilitate online symbolication/stack traces in the absence of"
3084          " .dwo/.dwp files when using Split DWARF">>;
3085def fdebug_default_version: Joined<["-"], "fdebug-default-version=">, Group<f_Group>,
3086  HelpText<"Default DWARF version to use, if a -g option caused DWARF debug info to be produced">;
3087def fdebug_prefix_map_EQ
3088  : Joined<["-"], "fdebug-prefix-map=">, Group<f_Group>,
3089    Flags<[CC1Option,CC1AsOption]>,
3090    HelpText<"remap file source paths in debug info">;
3091def fcoverage_prefix_map_EQ
3092  : Joined<["-"], "fcoverage-prefix-map=">, Group<f_Group>,
3093    Flags<[CC1Option]>,
3094    HelpText<"remap file source paths in coverage mapping">;
3095def ffile_prefix_map_EQ
3096  : Joined<["-"], "ffile-prefix-map=">, Group<f_Group>,
3097    HelpText<"remap file source paths in debug info, predefined preprocessor "
3098             "macros and __builtin_FILE(). Implies -ffile-reproducible.">;
3099def fmacro_prefix_map_EQ
3100  : Joined<["-"], "fmacro-prefix-map=">, Group<f_Group>, Flags<[CC1Option]>,
3101    HelpText<"remap file source paths in predefined preprocessor macros and "
3102             "__builtin_FILE(). Implies -ffile-reproducible.">;
3103defm force_dwarf_frame : BoolFOption<"force-dwarf-frame",
3104  CodeGenOpts<"ForceDwarfFrameSection">, DefaultFalse,
3105  PosFlag<SetTrue, [CC1Option], "Always emit a debug frame section">, NegFlag<SetFalse>>;
3106def femit_dwarf_unwind_EQ : Joined<["-"], "femit-dwarf-unwind=">,
3107  Group<f_Group>, Flags<[CC1Option, CC1AsOption]>,
3108  HelpText<"When to emit DWARF unwind (EH frame) info">,
3109  Values<"always,no-compact-unwind,default">,
3110  NormalizedValues<["Always", "NoCompactUnwind", "Default"]>,
3111  NormalizedValuesScope<"llvm::EmitDwarfUnwindType">,
3112  MarshallingInfoEnum<CodeGenOpts<"EmitDwarfUnwind">, "Default">;
3113def g_Flag : Flag<["-"], "g">, Group<g_Group>,
3114  HelpText<"Generate source-level debug information">;
3115def gline_tables_only : Flag<["-"], "gline-tables-only">, Group<gN_Group>,
3116  Flags<[CoreOption]>, HelpText<"Emit debug line number tables only">;
3117def gline_directives_only : Flag<["-"], "gline-directives-only">, Group<gN_Group>,
3118  Flags<[CoreOption]>, HelpText<"Emit debug line info directives only">;
3119def gmlt : Flag<["-"], "gmlt">, Alias<gline_tables_only>;
3120def g0 : Flag<["-"], "g0">, Group<gN_Group>;
3121def g1 : Flag<["-"], "g1">, Group<gN_Group>, Alias<gline_tables_only>;
3122def g2 : Flag<["-"], "g2">, Group<gN_Group>;
3123def g3 : Flag<["-"], "g3">, Group<gN_Group>;
3124def ggdb : Flag<["-"], "ggdb">, Group<gTune_Group>;
3125def ggdb0 : Flag<["-"], "ggdb0">, Group<ggdbN_Group>;
3126def ggdb1 : Flag<["-"], "ggdb1">, Group<ggdbN_Group>;
3127def ggdb2 : Flag<["-"], "ggdb2">, Group<ggdbN_Group>;
3128def ggdb3 : Flag<["-"], "ggdb3">, Group<ggdbN_Group>;
3129def glldb : Flag<["-"], "glldb">, Group<gTune_Group>;
3130def gsce : Flag<["-"], "gsce">, Group<gTune_Group>;
3131def gdbx : Flag<["-"], "gdbx">, Group<gTune_Group>;
3132// Equivalent to our default dwarf version. Forces usual dwarf emission when
3133// CodeView is enabled.
3134def gdwarf : Flag<["-"], "gdwarf">, Group<g_Group>, Flags<[CoreOption]>,
3135  HelpText<"Generate source-level debug information with the default dwarf version">;
3136def gdwarf_2 : Flag<["-"], "gdwarf-2">, Group<g_Group>,
3137  HelpText<"Generate source-level debug information with dwarf version 2">;
3138def gdwarf_3 : Flag<["-"], "gdwarf-3">, Group<g_Group>,
3139  HelpText<"Generate source-level debug information with dwarf version 3">;
3140def gdwarf_4 : Flag<["-"], "gdwarf-4">, Group<g_Group>,
3141  HelpText<"Generate source-level debug information with dwarf version 4">;
3142def gdwarf_5 : Flag<["-"], "gdwarf-5">, Group<g_Group>,
3143  HelpText<"Generate source-level debug information with dwarf version 5">;
3144def gdwarf64 : Flag<["-"], "gdwarf64">, Group<g_Group>,
3145  Flags<[CC1Option, CC1AsOption]>,
3146  HelpText<"Enables DWARF64 format for ELF binaries, if debug information emission is enabled.">,
3147  MarshallingInfoFlag<CodeGenOpts<"Dwarf64">>;
3148def gdwarf32 : Flag<["-"], "gdwarf32">, Group<g_Group>,
3149  Flags<[CC1Option, CC1AsOption]>,
3150  HelpText<"Enables DWARF32 format for ELF binaries, if debug information emission is enabled.">;
3151
3152def gcodeview : Flag<["-"], "gcodeview">,
3153  HelpText<"Generate CodeView debug information">,
3154  Flags<[CC1Option, CC1AsOption, CoreOption]>,
3155  MarshallingInfoFlag<CodeGenOpts<"EmitCodeView">>;
3156defm codeview_ghash : BoolOption<"g", "codeview-ghash",
3157  CodeGenOpts<"CodeViewGHash">, DefaultFalse,
3158  PosFlag<SetTrue, [CC1Option], "Emit type record hashes in a .debug$H section">,
3159  NegFlag<SetFalse>, BothFlags<[CoreOption]>>;
3160defm inline_line_tables : BoolGOption<"inline-line-tables",
3161  CodeGenOpts<"NoInlineLineTables">, DefaultFalse,
3162  NegFlag<SetTrue, [CC1Option], "Don't emit inline line tables.">,
3163  PosFlag<SetFalse>, BothFlags<[CoreOption]>>;
3164
3165def gfull : Flag<["-"], "gfull">, Group<g_Group>;
3166def gused : Flag<["-"], "gused">, Group<g_Group>;
3167def gstabs : Joined<["-"], "gstabs">, Group<g_Group>, Flags<[Unsupported]>;
3168def gcoff : Joined<["-"], "gcoff">, Group<g_Group>, Flags<[Unsupported]>;
3169def gxcoff : Joined<["-"], "gxcoff">, Group<g_Group>, Flags<[Unsupported]>;
3170def gvms : Joined<["-"], "gvms">, Group<g_Group>, Flags<[Unsupported]>;
3171def gtoggle : Flag<["-"], "gtoggle">, Group<g_flags_Group>, Flags<[Unsupported]>;
3172def grecord_command_line : Flag<["-"], "grecord-command-line">,
3173  Group<g_flags_Group>;
3174def gno_record_command_line : Flag<["-"], "gno-record-command-line">,
3175  Group<g_flags_Group>;
3176def : Flag<["-"], "grecord-gcc-switches">, Alias<grecord_command_line>;
3177def : Flag<["-"], "gno-record-gcc-switches">, Alias<gno_record_command_line>;
3178defm strict_dwarf : BoolOption<"g", "strict-dwarf",
3179  CodeGenOpts<"DebugStrictDwarf">, DefaultFalse,
3180  PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>, BothFlags<[CoreOption]>>,
3181  Group<g_flags_Group>;
3182defm column_info : BoolOption<"g", "column-info",
3183  CodeGenOpts<"DebugColumnInfo">, DefaultTrue,
3184  NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>, BothFlags<[CoreOption]>>,
3185  Group<g_flags_Group>;
3186def gsplit_dwarf : Flag<["-"], "gsplit-dwarf">, Group<g_flags_Group>;
3187def gsplit_dwarf_EQ : Joined<["-"], "gsplit-dwarf=">, Group<g_flags_Group>,
3188  HelpText<"Set DWARF fission mode">,
3189  Values<"split,single">;
3190def gno_split_dwarf : Flag<["-"], "gno-split-dwarf">, Group<g_flags_Group>;
3191def gsimple_template_names : Flag<["-"], "gsimple-template-names">, Group<g_flags_Group>;
3192def gsimple_template_names_EQ
3193    : Joined<["-"], "gsimple-template-names=">,
3194      HelpText<"Use simple template names in DWARF, or include the full "
3195               "template name with a modified prefix for validation">,
3196      Values<"simple,mangled">, Flags<[CC1Option, NoDriverOption]>;
3197def gno_simple_template_names : Flag<["-"], "gno-simple-template-names">,
3198                                Group<g_flags_Group>;
3199def ggnu_pubnames : Flag<["-"], "ggnu-pubnames">, Group<g_flags_Group>, Flags<[CC1Option]>;
3200def gno_gnu_pubnames : Flag<["-"], "gno-gnu-pubnames">, Group<g_flags_Group>;
3201def gpubnames : Flag<["-"], "gpubnames">, Group<g_flags_Group>, Flags<[CC1Option]>;
3202def gno_pubnames : Flag<["-"], "gno-pubnames">, Group<g_flags_Group>;
3203def gdwarf_aranges : Flag<["-"], "gdwarf-aranges">, Group<g_flags_Group>;
3204def gmodules : Flag <["-"], "gmodules">, Group<gN_Group>,
3205  HelpText<"Generate debug info with external references to clang modules"
3206           " or precompiled headers">;
3207def gz_EQ : Joined<["-"], "gz=">, Group<g_flags_Group>,
3208    HelpText<"DWARF debug sections compression type">;
3209def gz : Flag<["-"], "gz">, Alias<gz_EQ>, AliasArgs<["zlib"]>, Group<g_flags_Group>;
3210def gembed_source : Flag<["-"], "gembed-source">, Group<g_flags_Group>, Flags<[CC1Option]>,
3211    HelpText<"Embed source text in DWARF debug sections">,
3212    MarshallingInfoFlag<CodeGenOpts<"EmbedSource">>;
3213def gno_embed_source : Flag<["-"], "gno-embed-source">, Group<g_flags_Group>,
3214    Flags<[NoXarchOption]>,
3215    HelpText<"Restore the default behavior of not embedding source text in DWARF debug sections">;
3216def headerpad__max__install__names : Joined<["-"], "headerpad_max_install_names">;
3217def help : Flag<["-", "--"], "help">, Flags<[CC1Option,CC1AsOption, FC1Option,
3218    FlangOption]>, HelpText<"Display available options">,
3219    MarshallingInfoFlag<FrontendOpts<"ShowHelp">>;
3220def ibuiltininc : Flag<["-"], "ibuiltininc">,
3221  HelpText<"Enable builtin #include directories even when -nostdinc is used "
3222           "before or after -ibuiltininc. "
3223           "Using -nobuiltininc after the option disables it">;
3224def index_header_map : Flag<["-"], "index-header-map">, Flags<[CC1Option]>,
3225  HelpText<"Make the next included directory (-I or -F) an indexer header map">;
3226def idirafter : JoinedOrSeparate<["-"], "idirafter">, Group<clang_i_Group>, Flags<[CC1Option]>,
3227  HelpText<"Add directory to AFTER include search path">;
3228def iframework : JoinedOrSeparate<["-"], "iframework">, Group<clang_i_Group>, Flags<[CC1Option]>,
3229  HelpText<"Add directory to SYSTEM framework search path">;
3230def iframeworkwithsysroot : JoinedOrSeparate<["-"], "iframeworkwithsysroot">,
3231  Group<clang_i_Group>,
3232  HelpText<"Add directory to SYSTEM framework search path, "
3233           "absolute paths are relative to -isysroot">,
3234  MetaVarName<"<directory>">, Flags<[CC1Option]>;
3235def imacros : JoinedOrSeparate<["-", "--"], "imacros">, Group<clang_i_Group>, Flags<[CC1Option]>,
3236  HelpText<"Include macros from file before parsing">, MetaVarName<"<file>">,
3237  MarshallingInfoStringVector<PreprocessorOpts<"MacroIncludes">>;
3238def image__base : Separate<["-"], "image_base">;
3239def include_ : JoinedOrSeparate<["-", "--"], "include">, Group<clang_i_Group>, EnumName<"include">,
3240    MetaVarName<"<file>">, HelpText<"Include file before parsing">, Flags<[CC1Option]>;
3241def include_pch : Separate<["-"], "include-pch">, Group<clang_i_Group>, Flags<[CC1Option]>,
3242  HelpText<"Include precompiled header file">, MetaVarName<"<file>">,
3243  MarshallingInfoString<PreprocessorOpts<"ImplicitPCHInclude">>;
3244def relocatable_pch : Flag<["-", "--"], "relocatable-pch">, Flags<[CC1Option]>,
3245  HelpText<"Whether to build a relocatable precompiled header">,
3246  MarshallingInfoFlag<FrontendOpts<"RelocatablePCH">>;
3247def verify_pch : Flag<["-"], "verify-pch">, Group<Action_Group>, Flags<[CC1Option]>,
3248  HelpText<"Load and verify that a pre-compiled header file is not stale">;
3249def init : Separate<["-"], "init">;
3250def install__name : Separate<["-"], "install_name">;
3251def iprefix : JoinedOrSeparate<["-"], "iprefix">, Group<clang_i_Group>, Flags<[CC1Option]>,
3252  HelpText<"Set the -iwithprefix/-iwithprefixbefore prefix">, MetaVarName<"<dir>">;
3253def iquote : JoinedOrSeparate<["-"], "iquote">, Group<clang_i_Group>, Flags<[CC1Option]>,
3254  HelpText<"Add directory to QUOTE include search path">, MetaVarName<"<directory>">;
3255def isysroot : JoinedOrSeparate<["-"], "isysroot">, Group<clang_i_Group>, Flags<[CC1Option]>,
3256  HelpText<"Set the system root directory (usually /)">, MetaVarName<"<dir>">,
3257  MarshallingInfoString<HeaderSearchOpts<"Sysroot">, [{"/"}]>;
3258def isystem : JoinedOrSeparate<["-"], "isystem">, Group<clang_i_Group>,
3259  Flags<[CC1Option]>,
3260  HelpText<"Add directory to SYSTEM include search path">, MetaVarName<"<directory>">;
3261def isystem_after : JoinedOrSeparate<["-"], "isystem-after">,
3262  Group<clang_i_Group>, Flags<[NoXarchOption]>, MetaVarName<"<directory>">,
3263  HelpText<"Add directory to end of the SYSTEM include search path">;
3264def iwithprefixbefore : JoinedOrSeparate<["-"], "iwithprefixbefore">, Group<clang_i_Group>,
3265  HelpText<"Set directory to include search path with prefix">, MetaVarName<"<dir>">,
3266  Flags<[CC1Option]>;
3267def iwithprefix : JoinedOrSeparate<["-"], "iwithprefix">, Group<clang_i_Group>, Flags<[CC1Option]>,
3268  HelpText<"Set directory to SYSTEM include search path with prefix">, MetaVarName<"<dir>">;
3269def iwithsysroot : JoinedOrSeparate<["-"], "iwithsysroot">, Group<clang_i_Group>,
3270  HelpText<"Add directory to SYSTEM include search path, "
3271           "absolute paths are relative to -isysroot">, MetaVarName<"<directory>">,
3272  Flags<[CC1Option]>;
3273def ivfsoverlay : JoinedOrSeparate<["-"], "ivfsoverlay">, Group<clang_i_Group>, Flags<[CC1Option]>,
3274  HelpText<"Overlay the virtual filesystem described by file over the real file system">;
3275def imultilib : Separate<["-"], "imultilib">, Group<gfortran_Group>;
3276def keep__private__externs : Flag<["-"], "keep_private_externs">;
3277def l : JoinedOrSeparate<["-"], "l">, Flags<[LinkerInput, RenderJoined]>,
3278        Group<Link_Group>;
3279def lazy__framework : Separate<["-"], "lazy_framework">, Flags<[LinkerInput]>;
3280def lazy__library : Separate<["-"], "lazy_library">, Flags<[LinkerInput]>;
3281def mlittle_endian : Flag<["-"], "mlittle-endian">, Flags<[NoXarchOption]>;
3282def EL : Flag<["-"], "EL">, Alias<mlittle_endian>;
3283def mbig_endian : Flag<["-"], "mbig-endian">, Flags<[NoXarchOption]>;
3284def EB : Flag<["-"], "EB">, Alias<mbig_endian>;
3285def m16 : Flag<["-"], "m16">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>;
3286def m32 : Flag<["-"], "m32">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>;
3287def mqdsp6_compat : Flag<["-"], "mqdsp6-compat">, Group<m_Group>, Flags<[NoXarchOption,CC1Option]>,
3288  HelpText<"Enable hexagon-qdsp6 backward compatibility">,
3289  MarshallingInfoFlag<LangOpts<"HexagonQdsp6Compat">>;
3290def m64 : Flag<["-"], "m64">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>;
3291def mx32 : Flag<["-"], "mx32">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>;
3292def mabi_EQ : Joined<["-"], "mabi=">, Group<m_Group>;
3293def miamcu : Flag<["-"], "miamcu">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>,
3294  HelpText<"Use Intel MCU ABI">;
3295def mno_iamcu : Flag<["-"], "mno-iamcu">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>;
3296def malign_functions_EQ : Joined<["-"], "malign-functions=">, Group<clang_ignored_m_Group>;
3297def malign_loops_EQ : Joined<["-"], "malign-loops=">, Group<clang_ignored_m_Group>;
3298def malign_jumps_EQ : Joined<["-"], "malign-jumps=">, Group<clang_ignored_m_Group>;
3299def malign_branch_EQ : CommaJoined<["-"], "malign-branch=">, Group<m_Group>, Flags<[NoXarchOption]>,
3300  HelpText<"Specify types of branches to align">;
3301def malign_branch_boundary_EQ : Joined<["-"], "malign-branch-boundary=">, Group<m_Group>, Flags<[NoXarchOption]>,
3302  HelpText<"Specify the boundary's size to align branches">;
3303def mpad_max_prefix_size_EQ : Joined<["-"], "mpad-max-prefix-size=">, Group<m_Group>, Flags<[NoXarchOption]>,
3304  HelpText<"Specify maximum number of prefixes to use for padding">;
3305def mbranches_within_32B_boundaries : Flag<["-"], "mbranches-within-32B-boundaries">, Flags<[NoXarchOption]>, Group<m_Group>,
3306  HelpText<"Align selected branches (fused, jcc, jmp) within 32-byte boundary">;
3307def mfancy_math_387 : Flag<["-"], "mfancy-math-387">, Group<clang_ignored_m_Group>;
3308def mlong_calls : Flag<["-"], "mlong-calls">, Group<m_Group>,
3309  HelpText<"Generate branches with extended addressability, usually via indirect jumps.">;
3310def mdouble_EQ : Joined<["-"], "mdouble=">, Group<m_Group>,
3311  MetaVarName<"<n">, Values<"32,64">, Flags<[CC1Option]>,
3312  HelpText<"Force double to be <n> bits">,
3313  MarshallingInfoInt<LangOpts<"DoubleSize">, "0">;
3314def LongDouble_Group : OptionGroup<"<LongDouble group>">, Group<m_Group>,
3315  DocName<"Long double flags">,
3316  DocBrief<[{Selects the long double implementation}]>;
3317def mlong_double_64 : Flag<["-"], "mlong-double-64">, Group<LongDouble_Group>, Flags<[CC1Option]>,
3318  HelpText<"Force long double to be 64 bits">;
3319def mlong_double_80 : Flag<["-"], "mlong-double-80">, Group<LongDouble_Group>, Flags<[CC1Option]>,
3320  HelpText<"Force long double to be 80 bits, padded to 128 bits for storage">;
3321def mlong_double_128 : Flag<["-"], "mlong-double-128">, Group<LongDouble_Group>, Flags<[CC1Option]>,
3322  HelpText<"Force long double to be 128 bits">;
3323def mno_long_calls : Flag<["-"], "mno-long-calls">, Group<m_Group>,
3324  HelpText<"Restore the default behaviour of not generating long calls">;
3325def mexecute_only : Flag<["-"], "mexecute-only">, Group<m_arm_Features_Group>,
3326  HelpText<"Disallow generation of data access to code sections (ARM only)">;
3327def mno_execute_only : Flag<["-"], "mno-execute-only">, Group<m_arm_Features_Group>,
3328  HelpText<"Allow generation of data access to code sections (ARM only)">;
3329def mtp_mode_EQ : Joined<["-"], "mtp=">, Group<m_arm_Features_Group>, Values<"soft,cp15,el0,el1,el2,el3">,
3330  HelpText<"Thread pointer access method (AArch32/AArch64 only)">;
3331def mpure_code : Flag<["-"], "mpure-code">, Alias<mexecute_only>; // Alias for GCC compatibility
3332def mno_pure_code : Flag<["-"], "mno-pure-code">, Alias<mno_execute_only>;
3333def mtvos_version_min_EQ : Joined<["-"], "mtvos-version-min=">, Group<m_Group>;
3334def mappletvos_version_min_EQ : Joined<["-"], "mappletvos-version-min=">, Alias<mtvos_version_min_EQ>;
3335def mtvos_simulator_version_min_EQ : Joined<["-"], "mtvos-simulator-version-min=">;
3336def mappletvsimulator_version_min_EQ : Joined<["-"], "mappletvsimulator-version-min=">, Alias<mtvos_simulator_version_min_EQ>;
3337def mwatchos_version_min_EQ : Joined<["-"], "mwatchos-version-min=">, Group<m_Group>;
3338def mwatchos_simulator_version_min_EQ : Joined<["-"], "mwatchos-simulator-version-min=">;
3339def mwatchsimulator_version_min_EQ : Joined<["-"], "mwatchsimulator-version-min=">, Alias<mwatchos_simulator_version_min_EQ>;
3340def march_EQ : Joined<["-"], "march=">, Group<m_Group>, Flags<[CoreOption]>;
3341def masm_EQ : Joined<["-"], "masm=">, Group<m_Group>, Flags<[NoXarchOption]>;
3342def inline_asm_EQ : Joined<["-"], "inline-asm=">, Group<m_Group>, Flags<[CC1Option]>,
3343  Values<"att,intel">,
3344  NormalizedValuesScope<"CodeGenOptions">, NormalizedValues<["IAD_ATT", "IAD_Intel"]>,
3345  MarshallingInfoEnum<CodeGenOpts<"InlineAsmDialect">, "IAD_ATT">;
3346def mcmodel_EQ : Joined<["-"], "mcmodel=">, Group<m_Group>, Flags<[CC1Option]>,
3347  MarshallingInfoString<TargetOpts<"CodeModel">, [{"default"}]>;
3348def mtls_size_EQ : Joined<["-"], "mtls-size=">, Group<m_Group>, Flags<[NoXarchOption, CC1Option]>,
3349  HelpText<"Specify bit size of immediate TLS offsets (AArch64 ELF only): "
3350           "12 (for 4KB) | 24 (for 16MB, default) | 32 (for 4GB) | 48 (for 256TB, needs -mcmodel=large)">,
3351  MarshallingInfoInt<CodeGenOpts<"TLSSize">>;
3352def mimplicit_it_EQ : Joined<["-"], "mimplicit-it=">, Group<m_Group>;
3353def mdefault_build_attributes : Joined<["-"], "mdefault-build-attributes">, Group<m_Group>;
3354def mno_default_build_attributes : Joined<["-"], "mno-default-build-attributes">, Group<m_Group>;
3355def mconstant_cfstrings : Flag<["-"], "mconstant-cfstrings">, Group<clang_ignored_m_Group>;
3356def mconsole : Joined<["-"], "mconsole">, Group<m_Group>, Flags<[NoXarchOption]>;
3357def mwindows : Joined<["-"], "mwindows">, Group<m_Group>, Flags<[NoXarchOption]>;
3358def mdll : Joined<["-"], "mdll">, Group<m_Group>, Flags<[NoXarchOption]>;
3359def municode : Joined<["-"], "municode">, Group<m_Group>, Flags<[NoXarchOption]>;
3360def mthreads : Joined<["-"], "mthreads">, Group<m_Group>, Flags<[NoXarchOption]>;
3361def mcpu_EQ : Joined<["-"], "mcpu=">, Group<m_Group>;
3362def mmcu_EQ : Joined<["-"], "mmcu=">, Group<m_Group>;
3363def msim : Flag<["-"], "msim">, Group<m_Group>;
3364def mdynamic_no_pic : Joined<["-"], "mdynamic-no-pic">, Group<m_Group>;
3365def mfix_and_continue : Flag<["-"], "mfix-and-continue">, Group<clang_ignored_m_Group>;
3366def mieee_fp : Flag<["-"], "mieee-fp">, Group<clang_ignored_m_Group>;
3367def minline_all_stringops : Flag<["-"], "minline-all-stringops">, Group<clang_ignored_m_Group>;
3368def mno_inline_all_stringops : Flag<["-"], "mno-inline-all-stringops">, Group<clang_ignored_m_Group>;
3369def malign_double : Flag<["-"], "malign-double">, Group<m_Group>, Flags<[CC1Option]>,
3370  HelpText<"Align doubles to two words in structs (x86 only)">,
3371  MarshallingInfoFlag<LangOpts<"AlignDouble">>;
3372def mfloat_abi_EQ : Joined<["-"], "mfloat-abi=">, Group<m_Group>, Values<"soft,softfp,hard">;
3373def mfpmath_EQ : Joined<["-"], "mfpmath=">, Group<m_Group>;
3374def mfpu_EQ : Joined<["-"], "mfpu=">, Group<m_Group>;
3375def mhwdiv_EQ : Joined<["-"], "mhwdiv=">, Group<m_Group>;
3376def mhwmult_EQ : Joined<["-"], "mhwmult=">, Group<m_Group>;
3377def mglobal_merge : Flag<["-"], "mglobal-merge">, Group<m_Group>, Flags<[CC1Option]>,
3378  HelpText<"Enable merging of globals">;
3379def mhard_float : Flag<["-"], "mhard-float">, Group<m_Group>;
3380def mios_version_min_EQ : Joined<["-"], "mios-version-min=">,
3381  Group<m_Group>, HelpText<"Set iOS deployment target">;
3382def : Joined<["-"], "miphoneos-version-min=">,
3383  Group<m_Group>, Alias<mios_version_min_EQ>;
3384def mios_simulator_version_min_EQ : Joined<["-"], "mios-simulator-version-min=">;
3385def : Joined<["-"], "miphonesimulator-version-min=">, Alias<mios_simulator_version_min_EQ>;
3386def mkernel : Flag<["-"], "mkernel">, Group<m_Group>;
3387def mlinker_version_EQ : Joined<["-"], "mlinker-version=">,
3388  Flags<[NoXarchOption]>;
3389def mllvm : Separate<["-"], "mllvm">,Flags<[CC1Option,CC1AsOption,CoreOption,FC1Option,FlangOption]>,
3390  HelpText<"Additional arguments to forward to LLVM's option processing">,
3391  MarshallingInfoStringVector<FrontendOpts<"LLVMArgs">>;
3392def mmlir : Separate<["-"], "mmlir">, Flags<[CoreOption,FC1Option,FlangOption]>,
3393  HelpText<"Additional arguments to forward to MLIR's option processing">;
3394def ffuchsia_api_level_EQ : Joined<["-"], "ffuchsia-api-level=">,
3395  Group<m_Group>, Flags<[CC1Option]>, HelpText<"Set Fuchsia API level">,
3396  MarshallingInfoInt<LangOpts<"FuchsiaAPILevel">>;
3397def mmacos_version_min_EQ : Joined<["-"], "mmacos-version-min=">,
3398  Group<m_Group>, HelpText<"Set macOS deployment target">;
3399def : Joined<["-"], "mmacosx-version-min=">,
3400  Group<m_Group>, Alias<mmacos_version_min_EQ>;
3401def mms_bitfields : Flag<["-"], "mms-bitfields">, Group<m_Group>, Flags<[CC1Option]>,
3402  HelpText<"Set the default structure layout to be compatible with the Microsoft compiler standard">,
3403  MarshallingInfoFlag<LangOpts<"MSBitfields">>;
3404def moutline : Flag<["-"], "moutline">, Group<f_clang_Group>, Flags<[CC1Option]>,
3405    HelpText<"Enable function outlining (AArch64 only)">;
3406def mno_outline : Flag<["-"], "mno-outline">, Group<f_clang_Group>, Flags<[CC1Option]>,
3407    HelpText<"Disable function outlining (AArch64 only)">;
3408def mno_ms_bitfields : Flag<["-"], "mno-ms-bitfields">, Group<m_Group>,
3409  HelpText<"Do not set the default structure layout to be compatible with the Microsoft compiler standard">;
3410def mskip_rax_setup : Flag<["-"], "mskip-rax-setup">, Group<m_Group>, Flags<[CC1Option]>,
3411  HelpText<"Skip setting up RAX register when passing variable arguments (x86 only)">,
3412  MarshallingInfoFlag<CodeGenOpts<"SkipRaxSetup">>;
3413def mno_skip_rax_setup : Flag<["-"], "mno-skip-rax-setup">, Group<m_Group>, Flags<[CC1Option]>;
3414def mstackrealign : Flag<["-"], "mstackrealign">, Group<m_Group>, Flags<[CC1Option]>,
3415  HelpText<"Force realign the stack at entry to every function">,
3416  MarshallingInfoFlag<CodeGenOpts<"StackRealignment">>;
3417def mstack_alignment : Joined<["-"], "mstack-alignment=">, Group<m_Group>, Flags<[CC1Option]>,
3418  HelpText<"Set the stack alignment">,
3419  MarshallingInfoInt<CodeGenOpts<"StackAlignment">>;
3420def mstack_probe_size : Joined<["-"], "mstack-probe-size=">, Group<m_Group>, Flags<[CC1Option]>,
3421  HelpText<"Set the stack probe size">,
3422  MarshallingInfoInt<CodeGenOpts<"StackProbeSize">, "4096">;
3423def mstack_arg_probe : Flag<["-"], "mstack-arg-probe">, Group<m_Group>,
3424  HelpText<"Enable stack probes">;
3425def mno_stack_arg_probe : Flag<["-"], "mno-stack-arg-probe">, Group<m_Group>, Flags<[CC1Option]>,
3426  HelpText<"Disable stack probes which are enabled by default">,
3427  MarshallingInfoFlag<CodeGenOpts<"NoStackArgProbe">>;
3428def mthread_model : Separate<["-"], "mthread-model">, Group<m_Group>, Flags<[CC1Option]>,
3429  HelpText<"The thread model to use. Defaults to 'posix')">, Values<"posix,single">,
3430  NormalizedValues<["POSIX", "Single"]>, NormalizedValuesScope<"LangOptions::ThreadModelKind">,
3431  MarshallingInfoEnum<LangOpts<"ThreadModel">, "POSIX">;
3432def meabi : Separate<["-"], "meabi">, Group<m_Group>, Flags<[CC1Option]>,
3433  HelpText<"Set EABI type. Default depends on triple)">, Values<"default,4,5,gnu">,
3434  MarshallingInfoEnum<TargetOpts<"EABIVersion">, "Default">,
3435  NormalizedValuesScope<"llvm::EABI">,
3436  NormalizedValues<["Default", "EABI4", "EABI5", "GNU"]>;
3437def mtargetos_EQ : Joined<["-"], "mtargetos=">, Group<m_Group>,
3438  HelpText<"Set the deployment target to be the specified OS and OS version">;
3439
3440def mno_constant_cfstrings : Flag<["-"], "mno-constant-cfstrings">, Group<m_Group>;
3441def mno_global_merge : Flag<["-"], "mno-global-merge">, Group<m_Group>, Flags<[CC1Option]>,
3442  HelpText<"Disable merging of globals">;
3443def mno_pascal_strings : Flag<["-"], "mno-pascal-strings">,
3444  Alias<fno_pascal_strings>;
3445def mno_red_zone : Flag<["-"], "mno-red-zone">, Group<m_Group>;
3446def mno_tls_direct_seg_refs : Flag<["-"], "mno-tls-direct-seg-refs">, Group<m_Group>, Flags<[CC1Option]>,
3447  HelpText<"Disable direct TLS access through segment registers">,
3448  MarshallingInfoFlag<CodeGenOpts<"IndirectTlsSegRefs">>;
3449def mno_relax_all : Flag<["-"], "mno-relax-all">, Group<m_Group>;
3450def mno_rtd: Flag<["-"], "mno-rtd">, Group<m_Group>;
3451def mno_soft_float : Flag<["-"], "mno-soft-float">, Group<m_Group>;
3452def mno_stackrealign : Flag<["-"], "mno-stackrealign">, Group<m_Group>;
3453
3454def mretpoline : Flag<["-"], "mretpoline">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>;
3455def mno_retpoline : Flag<["-"], "mno-retpoline">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>;
3456defm speculative_load_hardening : BoolOption<"m", "speculative-load-hardening",
3457  CodeGenOpts<"SpeculativeLoadHardening">, DefaultFalse,
3458  PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>, BothFlags<[CoreOption]>>,
3459  Group<m_Group>;
3460def mlvi_hardening : Flag<["-"], "mlvi-hardening">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>,
3461  HelpText<"Enable all mitigations for Load Value Injection (LVI)">;
3462def mno_lvi_hardening : Flag<["-"], "mno-lvi-hardening">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>,
3463  HelpText<"Disable mitigations for Load Value Injection (LVI)">;
3464def mlvi_cfi : Flag<["-"], "mlvi-cfi">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>,
3465  HelpText<"Enable only control-flow mitigations for Load Value Injection (LVI)">;
3466def mno_lvi_cfi : Flag<["-"], "mno-lvi-cfi">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>,
3467  HelpText<"Disable control-flow mitigations for Load Value Injection (LVI)">;
3468def m_seses : Flag<["-"], "mseses">, Group<m_Group>, Flags<[CoreOption, NoXarchOption]>,
3469  HelpText<"Enable speculative execution side effect suppression (SESES). "
3470    "Includes LVI control flow integrity mitigations">;
3471def mno_seses : Flag<["-"], "mno-seses">, Group<m_Group>, Flags<[CoreOption, NoXarchOption]>,
3472  HelpText<"Disable speculative execution side effect suppression (SESES)">;
3473
3474def mrelax : Flag<["-"], "mrelax">, Group<m_Group>,
3475  HelpText<"Enable linker relaxation">;
3476def mno_relax : Flag<["-"], "mno-relax">, Group<m_Group>,
3477  HelpText<"Disable linker relaxation">;
3478def msmall_data_limit_EQ : Joined<["-"], "msmall-data-limit=">, Group<m_Group>,
3479  Alias<G>,
3480  HelpText<"Put global and static data smaller than the limit into a special section">;
3481def msave_restore : Flag<["-"], "msave-restore">, Group<m_riscv_Features_Group>,
3482  HelpText<"Enable using library calls for save and restore">;
3483def mno_save_restore : Flag<["-"], "mno-save-restore">, Group<m_riscv_Features_Group>,
3484  HelpText<"Disable using library calls for save and restore">;
3485def mcmodel_EQ_medlow : Flag<["-"], "mcmodel=medlow">, Group<m_riscv_Features_Group>,
3486  Flags<[CC1Option]>, Alias<mcmodel_EQ>, AliasArgs<["small"]>,
3487  HelpText<"Equivalent to -mcmodel=small, compatible with RISC-V gcc.">;
3488def mcmodel_EQ_medany : Flag<["-"], "mcmodel=medany">, Group<m_riscv_Features_Group>,
3489  Flags<[CC1Option]>, Alias<mcmodel_EQ>, AliasArgs<["medium"]>,
3490  HelpText<"Equivalent to -mcmodel=medium, compatible with RISC-V gcc.">;
3491def menable_experimental_extensions : Flag<["-"], "menable-experimental-extensions">, Group<m_Group>,
3492  HelpText<"Enable use of experimental RISC-V extensions.">;
3493
3494def munaligned_access : Flag<["-"], "munaligned-access">, Group<m_arm_Features_Group>,
3495  HelpText<"Allow memory accesses to be unaligned (AArch32/AArch64 only)">;
3496def mno_unaligned_access : Flag<["-"], "mno-unaligned-access">, Group<m_arm_Features_Group>,
3497  HelpText<"Force all memory accesses to be aligned (AArch32/AArch64 only)">;
3498def mstrict_align : Flag<["-"], "mstrict-align">, Alias<mno_unaligned_access>, Flags<[CC1Option,HelpHidden]>,
3499  HelpText<"Force all memory accesses to be aligned (same as mno-unaligned-access)">;
3500def mno_thumb : Flag<["-"], "mno-thumb">, Group<m_arm_Features_Group>;
3501def mrestrict_it: Flag<["-"], "mrestrict-it">, Group<m_arm_Features_Group>,
3502  HelpText<"Disallow generation of complex IT blocks.">;
3503def mno_restrict_it: Flag<["-"], "mno-restrict-it">, Group<m_arm_Features_Group>,
3504  HelpText<"Allow generation of complex IT blocks.">;
3505def marm : Flag<["-"], "marm">, Alias<mno_thumb>;
3506def ffixed_r9 : Flag<["-"], "ffixed-r9">, Group<m_arm_Features_Group>,
3507  HelpText<"Reserve the r9 register (ARM only)">;
3508def mno_movt : Flag<["-"], "mno-movt">, Group<m_arm_Features_Group>,
3509  HelpText<"Disallow use of movt/movw pairs (ARM only)">;
3510def mcrc : Flag<["-"], "mcrc">, Group<m_Group>,
3511  HelpText<"Allow use of CRC instructions (ARM/Mips only)">;
3512def mnocrc : Flag<["-"], "mnocrc">, Group<m_arm_Features_Group>,
3513  HelpText<"Disallow use of CRC instructions (ARM only)">;
3514def mno_neg_immediates: Flag<["-"], "mno-neg-immediates">, Group<m_arm_Features_Group>,
3515  HelpText<"Disallow converting instructions with negative immediates to their negation or inversion.">;
3516def mcmse : Flag<["-"], "mcmse">, Group<m_arm_Features_Group>,
3517  Flags<[NoXarchOption,CC1Option]>,
3518  HelpText<"Allow use of CMSE (Armv8-M Security Extensions)">,
3519  MarshallingInfoFlag<LangOpts<"Cmse">>;
3520def ForceAAPCSBitfieldLoad : Flag<["-"], "faapcs-bitfield-load">, Group<m_arm_Features_Group>,
3521  Flags<[NoXarchOption,CC1Option]>,
3522  HelpText<"Follows the AAPCS standard that all volatile bit-field write generates at least one load. (ARM only).">,
3523  MarshallingInfoFlag<CodeGenOpts<"ForceAAPCSBitfieldLoad">>;
3524defm aapcs_bitfield_width : BoolOption<"f", "aapcs-bitfield-width",
3525  CodeGenOpts<"AAPCSBitfieldWidth">, DefaultTrue,
3526  NegFlag<SetFalse, [], "Do not follow">, PosFlag<SetTrue, [], "Follow">,
3527  BothFlags<[NoXarchOption, CC1Option], " the AAPCS standard requirement stating that"
3528            " volatile bit-field width is dictated by the field container type. (ARM only).">>,
3529  Group<m_arm_Features_Group>;
3530def mframe_chain : Joined<["-"], "mframe-chain=">,
3531  Group<m_arm_Features_Group>, Values<"none,aapcs,aapcs+leaf">,
3532  HelpText<"Select the frame chain model used to emit frame records (Arm only).">;
3533def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group<m_Group>,
3534  HelpText<"Generate code which only uses the general purpose registers (AArch64/x86 only)">;
3535def mfix_cmse_cve_2021_35465 : Flag<["-"], "mfix-cmse-cve-2021-35465">,
3536  Group<m_arm_Features_Group>,
3537  HelpText<"Work around VLLDM erratum CVE-2021-35465 (ARM only)">;
3538def mno_fix_cmse_cve_2021_35465 : Flag<["-"], "mno-fix-cmse-cve-2021-35465">,
3539  Group<m_arm_Features_Group>,
3540  HelpText<"Don't work around VLLDM erratum CVE-2021-35465 (ARM only)">;
3541def mfix_cortex_a57_aes_1742098 : Flag<["-"], "mfix-cortex-a57-aes-1742098">,
3542  Group<m_arm_Features_Group>,
3543  HelpText<"Work around Cortex-A57 Erratum 1742098 (ARM only)">;
3544def mno_fix_cortex_a57_aes_1742098 : Flag<["-"], "mno-fix-cortex-a57-aes-1742098">,
3545  Group<m_arm_Features_Group>,
3546  HelpText<"Don't work around Cortex-A57 Erratum 1742098 (ARM only)">;
3547def mfix_cortex_a72_aes_1655431 : Flag<["-"], "mfix-cortex-a72-aes-1655431">,
3548  Group<m_arm_Features_Group>,
3549  HelpText<"Work around Cortex-A72 Erratum 1655431 (ARM only)">,
3550  Alias<mfix_cortex_a57_aes_1742098>;
3551def mno_fix_cortex_a72_aes_1655431 : Flag<["-"], "mno-fix-cortex-a72-aes-1655431">,
3552  Group<m_arm_Features_Group>,
3553  HelpText<"Don't work around Cortex-A72 Erratum 1655431 (ARM only)">,
3554  Alias<mno_fix_cortex_a57_aes_1742098>;
3555def mfix_cortex_a53_835769 : Flag<["-"], "mfix-cortex-a53-835769">,
3556  Group<m_aarch64_Features_Group>,
3557  HelpText<"Workaround Cortex-A53 erratum 835769 (AArch64 only)">;
3558def mno_fix_cortex_a53_835769 : Flag<["-"], "mno-fix-cortex-a53-835769">,
3559  Group<m_aarch64_Features_Group>,
3560  HelpText<"Don't workaround Cortex-A53 erratum 835769 (AArch64 only)">;
3561def mmark_bti_property : Flag<["-"], "mmark-bti-property">,
3562  Group<m_aarch64_Features_Group>,
3563  HelpText<"Add .note.gnu.property with BTI to assembly files (AArch64 only)">;
3564def mno_bti_at_return_twice : Flag<["-"], "mno-bti-at-return-twice">,
3565  Group<m_arm_Features_Group>,
3566  HelpText<"Do not add a BTI instruction after a setjmp or other"
3567           " return-twice construct (Arm/AArch64 only)">;
3568
3569foreach i = {1-31} in
3570  def ffixed_x#i : Flag<["-"], "ffixed-x"#i>, Group<m_Group>,
3571    HelpText<"Reserve the x"#i#" register (AArch64/RISC-V only)">;
3572
3573foreach i = {8-15,18} in
3574  def fcall_saved_x#i : Flag<["-"], "fcall-saved-x"#i>, Group<m_aarch64_Features_Group>,
3575    HelpText<"Make the x"#i#" register call-saved (AArch64 only)">;
3576
3577def msve_vector_bits_EQ : Joined<["-"], "msve-vector-bits=">, Group<m_aarch64_Features_Group>,
3578  HelpText<"Specify the size in bits of an SVE vector register. Defaults to the"
3579           " vector length agnostic value of \"scalable\". (AArch64 only)">;
3580
3581def mvscale_min_EQ : Joined<["-"], "mvscale-min=">,
3582  Group<m_aarch64_Features_Group>, Flags<[NoXarchOption,CC1Option]>,
3583  HelpText<"Specify the vscale minimum. Defaults to \"1\". (AArch64 only)">,
3584  MarshallingInfoInt<LangOpts<"VScaleMin">>;
3585def mvscale_max_EQ : Joined<["-"], "mvscale-max=">,
3586  Group<m_aarch64_Features_Group>, Flags<[NoXarchOption,CC1Option]>,
3587  HelpText<"Specify the vscale maximum. Defaults to the"
3588           " vector length agnostic value of \"0\". (AArch64 only)">,
3589  MarshallingInfoInt<LangOpts<"VScaleMax">>;
3590
3591def msign_return_address_EQ : Joined<["-"], "msign-return-address=">,
3592  Flags<[CC1Option]>, Group<m_Group>, Values<"none,all,non-leaf">,
3593  HelpText<"Select return address signing scope">;
3594def mbranch_protection_EQ : Joined<["-"], "mbranch-protection=">,
3595  Group<m_Group>,
3596  HelpText<"Enforce targets of indirect branches and function returns">;
3597
3598def mharden_sls_EQ : Joined<["-"], "mharden-sls=">,
3599  HelpText<"Select straight-line speculation hardening scope (ARM/AArch64/X86"
3600           " only). <arg> must be: all, none, retbr(ARM/AArch64),"
3601           " blr(ARM/AArch64), comdat(ARM/AArch64), nocomdat(ARM/AArch64),"
3602           " return(X86), indirect-jmp(X86)">;
3603
3604def msimd128 : Flag<["-"], "msimd128">, Group<m_wasm_Features_Group>;
3605def mno_simd128 : Flag<["-"], "mno-simd128">, Group<m_wasm_Features_Group>;
3606def mrelaxed_simd : Flag<["-"], "mrelaxed-simd">, Group<m_wasm_Features_Group>;
3607def mno_relaxed_simd : Flag<["-"], "mno-relaxed-simd">, Group<m_wasm_Features_Group>;
3608def mnontrapping_fptoint : Flag<["-"], "mnontrapping-fptoint">, Group<m_wasm_Features_Group>;
3609def mno_nontrapping_fptoint : Flag<["-"], "mno-nontrapping-fptoint">, Group<m_wasm_Features_Group>;
3610def msign_ext : Flag<["-"], "msign-ext">, Group<m_wasm_Features_Group>;
3611def mno_sign_ext : Flag<["-"], "mno-sign-ext">, Group<m_wasm_Features_Group>;
3612def mexception_handing : Flag<["-"], "mexception-handling">, Group<m_wasm_Features_Group>;
3613def mno_exception_handing : Flag<["-"], "mno-exception-handling">, Group<m_wasm_Features_Group>;
3614def matomics : Flag<["-"], "matomics">, Group<m_wasm_Features_Group>;
3615def mno_atomics : Flag<["-"], "mno-atomics">, Group<m_wasm_Features_Group>;
3616def mbulk_memory : Flag<["-"], "mbulk-memory">, Group<m_wasm_Features_Group>;
3617def mno_bulk_memory : Flag<["-"], "mno-bulk-memory">, Group<m_wasm_Features_Group>;
3618def mmutable_globals : Flag<["-"], "mmutable-globals">, Group<m_wasm_Features_Group>;
3619def mno_mutable_globals : Flag<["-"], "mno-mutable-globals">, Group<m_wasm_Features_Group>;
3620def mmultivalue : Flag<["-"], "mmultivalue">, Group<m_wasm_Features_Group>;
3621def mno_multivalue : Flag<["-"], "mno-multivalue">, Group<m_wasm_Features_Group>;
3622def mtail_call : Flag<["-"], "mtail-call">, Group<m_wasm_Features_Group>;
3623def mno_tail_call : Flag<["-"], "mno-tail-call">, Group<m_wasm_Features_Group>;
3624def mreference_types : Flag<["-"], "mreference-types">, Group<m_wasm_Features_Group>;
3625def mno_reference_types : Flag<["-"], "mno-reference-types">, Group<m_wasm_Features_Group>;
3626def mextended_const : Flag<["-"], "mextended-const">, Group<m_wasm_Features_Group>;
3627def mno_extended_const : Flag<["-"], "mno-extended-const">, Group<m_wasm_Features_Group>;
3628def mexec_model_EQ : Joined<["-"], "mexec-model=">, Group<m_wasm_Features_Driver_Group>,
3629                     Values<"command,reactor">,
3630                     HelpText<"Execution model (WebAssembly only)">;
3631
3632defm amdgpu_ieee : BoolOption<"m", "amdgpu-ieee",
3633  CodeGenOpts<"EmitIEEENaNCompliantInsts">, DefaultTrue,
3634  PosFlag<SetTrue, [], "Sets the IEEE bit in the expected default floating point "
3635  " mode register. Floating point opcodes that support exception flag "
3636  "gathering quiet and propagate signaling NaN inputs per IEEE 754-2008. "
3637  "This option changes the ABI. (AMDGPU only)">,
3638  NegFlag<SetFalse, [CC1Option]>>, Group<m_Group>;
3639
3640def mcode_object_version_EQ : Joined<["-"], "mcode-object-version=">, Group<m_Group>,
3641  HelpText<"Specify code object ABI version. Defaults to 4. (AMDGPU only)">,
3642  Flags<[CC1Option]>,
3643  Values<"none,2,3,4,5">,
3644  NormalizedValuesScope<"TargetOptions">,
3645  NormalizedValues<["COV_None", "COV_2", "COV_3", "COV_4", "COV_5"]>,
3646  MarshallingInfoEnum<TargetOpts<"CodeObjectVersion">, "COV_4">;
3647
3648defm code_object_v3_legacy : SimpleMFlag<"code-object-v3",
3649  "Legacy option to specify code object ABI V3",
3650  "Legacy option to specify code object ABI V2",
3651  " (AMDGPU only)">;
3652defm cumode : SimpleMFlag<"cumode",
3653  "Specify CU wavefront", "Specify WGP wavefront",
3654  " execution mode (AMDGPU only)", m_amdgpu_Features_Group>;
3655defm tgsplit : SimpleMFlag<"tgsplit", "Enable", "Disable",
3656  " threadgroup split execution mode (AMDGPU only)", m_amdgpu_Features_Group>;
3657defm wavefrontsize64 : SimpleMFlag<"wavefrontsize64",
3658  "Specify wavefront size 64", "Specify wavefront size 32",
3659  " mode (AMDGPU only)">;
3660
3661defm unsafe_fp_atomics : BoolOption<"m", "unsafe-fp-atomics",
3662  TargetOpts<"AllowAMDGPUUnsafeFPAtomics">, DefaultFalse,
3663  PosFlag<SetTrue, [CC1Option], "Enable unsafe floating point atomic instructions (AMDGPU only)">,
3664  NegFlag<SetFalse>>, Group<m_Group>;
3665
3666def faltivec : Flag<["-"], "faltivec">, Group<f_Group>, Flags<[NoXarchOption]>;
3667def fno_altivec : Flag<["-"], "fno-altivec">, Group<f_Group>, Flags<[NoXarchOption]>;
3668def maltivec : Flag<["-"], "maltivec">, Group<m_ppc_Features_Group>;
3669def mno_altivec : Flag<["-"], "mno-altivec">, Group<m_ppc_Features_Group>;
3670def mpcrel: Flag<["-"], "mpcrel">, Group<m_ppc_Features_Group>;
3671def mno_pcrel: Flag<["-"], "mno-pcrel">, Group<m_ppc_Features_Group>;
3672def mprefixed: Flag<["-"], "mprefixed">, Group<m_ppc_Features_Group>;
3673def mno_prefixed: Flag<["-"], "mno-prefixed">, Group<m_ppc_Features_Group>;
3674def mspe : Flag<["-"], "mspe">, Group<m_ppc_Features_Group>;
3675def mno_spe : Flag<["-"], "mno-spe">, Group<m_ppc_Features_Group>;
3676def mefpu2 : Flag<["-"], "mefpu2">, Group<m_ppc_Features_Group>;
3677def mabi_EQ_vec_extabi : Flag<["-"], "mabi=vec-extabi">, Group<m_Group>, Flags<[CC1Option]>,
3678  HelpText<"Enable the extended Altivec ABI on AIX (AIX only). Uses volatile and nonvolatile vector registers">,
3679  MarshallingInfoFlag<LangOpts<"EnableAIXExtendedAltivecABI">>;
3680def mabi_EQ_vec_default : Flag<["-"], "mabi=vec-default">, Group<m_Group>, Flags<[CC1Option]>,
3681  HelpText<"Enable the default Altivec ABI on AIX (AIX only). Uses only volatile vector registers.">;
3682def mabi_EQ_quadword_atomics : Flag<["-"], "mabi=quadword-atomics">,
3683  Group<m_Group>, Flags<[CC1Option]>,
3684  HelpText<"Enable quadword atomics ABI on AIX (AIX PPC64 only). Uses lqarx/stqcx. instructions.">,
3685  MarshallingInfoFlag<LangOpts<"EnableAIXQuadwordAtomicsABI">>;
3686def mvsx : Flag<["-"], "mvsx">, Group<m_ppc_Features_Group>;
3687def mno_vsx : Flag<["-"], "mno-vsx">, Group<m_ppc_Features_Group>;
3688def msecure_plt : Flag<["-"], "msecure-plt">, Group<m_ppc_Features_Group>;
3689def mpower8_vector : Flag<["-"], "mpower8-vector">,
3690    Group<m_ppc_Features_Group>;
3691def mno_power8_vector : Flag<["-"], "mno-power8-vector">,
3692    Group<m_ppc_Features_Group>;
3693def mpower9_vector : Flag<["-"], "mpower9-vector">,
3694    Group<m_ppc_Features_Group>;
3695def mno_power9_vector : Flag<["-"], "mno-power9-vector">,
3696    Group<m_ppc_Features_Group>;
3697def mpower10_vector : Flag<["-"], "mpower10-vector">,
3698    Group<m_ppc_Features_Group>;
3699def mno_power10_vector : Flag<["-"], "mno-power10-vector">,
3700    Group<m_ppc_Features_Group>;
3701def mpower8_crypto : Flag<["-"], "mcrypto">,
3702    Group<m_ppc_Features_Group>;
3703def mnopower8_crypto : Flag<["-"], "mno-crypto">,
3704    Group<m_ppc_Features_Group>;
3705def mdirect_move : Flag<["-"], "mdirect-move">,
3706    Group<m_ppc_Features_Group>;
3707def mnodirect_move : Flag<["-"], "mno-direct-move">,
3708    Group<m_ppc_Features_Group>;
3709def mpaired_vector_memops: Flag<["-"], "mpaired-vector-memops">,
3710    Group<m_ppc_Features_Group>;
3711def mnopaired_vector_memops: Flag<["-"], "mno-paired-vector-memops">,
3712    Group<m_ppc_Features_Group>;
3713def mhtm : Flag<["-"], "mhtm">, Group<m_ppc_Features_Group>;
3714def mno_htm : Flag<["-"], "mno-htm">, Group<m_ppc_Features_Group>;
3715def mfprnd : Flag<["-"], "mfprnd">, Group<m_ppc_Features_Group>;
3716def mno_fprnd : Flag<["-"], "mno-fprnd">, Group<m_ppc_Features_Group>;
3717def mcmpb : Flag<["-"], "mcmpb">, Group<m_ppc_Features_Group>;
3718def mno_cmpb : Flag<["-"], "mno-cmpb">, Group<m_ppc_Features_Group>;
3719def misel : Flag<["-"], "misel">, Group<m_ppc_Features_Group>;
3720def mno_isel : Flag<["-"], "mno-isel">, Group<m_ppc_Features_Group>;
3721def mmfocrf : Flag<["-"], "mmfocrf">, Group<m_ppc_Features_Group>;
3722def mmfcrf : Flag<["-"], "mmfcrf">, Alias<mmfocrf>;
3723def mno_mfocrf : Flag<["-"], "mno-mfocrf">, Group<m_ppc_Features_Group>;
3724def mno_mfcrf : Flag<["-"], "mno-mfcrf">, Alias<mno_mfocrf>;
3725def mpopcntd : Flag<["-"], "mpopcntd">, Group<m_ppc_Features_Group>;
3726def mno_popcntd : Flag<["-"], "mno-popcntd">, Group<m_ppc_Features_Group>;
3727def mcrbits : Flag<["-"], "mcrbits">, Group<m_ppc_Features_Group>;
3728def mno_crbits : Flag<["-"], "mno-crbits">, Group<m_ppc_Features_Group>;
3729def minvariant_function_descriptors :
3730  Flag<["-"], "minvariant-function-descriptors">, Group<m_ppc_Features_Group>;
3731def mno_invariant_function_descriptors :
3732  Flag<["-"], "mno-invariant-function-descriptors">,
3733  Group<m_ppc_Features_Group>;
3734def mfloat128: Flag<["-"], "mfloat128">,
3735    Group<m_ppc_Features_Group>;
3736def mno_float128 : Flag<["-"], "mno-float128">,
3737    Group<m_ppc_Features_Group>;
3738def mlongcall: Flag<["-"], "mlongcall">,
3739    Group<m_ppc_Features_Group>;
3740def mno_longcall : Flag<["-"], "mno-longcall">,
3741    Group<m_ppc_Features_Group>;
3742def mmma: Flag<["-"], "mmma">, Group<m_ppc_Features_Group>;
3743def mno_mma: Flag<["-"], "mno-mma">, Group<m_ppc_Features_Group>;
3744def mrop_protect : Flag<["-"], "mrop-protect">,
3745    Group<m_ppc_Features_Group>;
3746def mprivileged : Flag<["-"], "mprivileged">,
3747    Group<m_ppc_Features_Group>;
3748def maix_struct_return : Flag<["-"], "maix-struct-return">,
3749  Group<m_Group>, Flags<[CC1Option]>,
3750  HelpText<"Return all structs in memory (PPC32 only)">;
3751def msvr4_struct_return : Flag<["-"], "msvr4-struct-return">,
3752  Group<m_Group>, Flags<[CC1Option]>,
3753  HelpText<"Return small structs in registers (PPC32 only)">;
3754
3755def mvx : Flag<["-"], "mvx">, Group<m_Group>;
3756def mno_vx : Flag<["-"], "mno-vx">, Group<m_Group>;
3757
3758defm zvector : BoolFOption<"zvector",
3759  LangOpts<"ZVector">, DefaultFalse,
3760  PosFlag<SetTrue, [CC1Option], "Enable System z vector language extension">,
3761  NegFlag<SetFalse>>;
3762def mzvector : Flag<["-"], "mzvector">, Alias<fzvector>;
3763def mno_zvector : Flag<["-"], "mno-zvector">, Alias<fno_zvector>;
3764
3765def mignore_xcoff_visibility : Flag<["-"], "mignore-xcoff-visibility">, Group<m_Group>,
3766HelpText<"Not emit the visibility attribute for asm in AIX OS or give all symbols 'unspecified' visibility in XCOFF object file">,
3767  Flags<[CC1Option]>;
3768defm backchain : BoolOption<"m", "backchain",
3769  CodeGenOpts<"Backchain">, DefaultFalse,
3770  PosFlag<SetTrue, [], "Link stack frames through backchain on System Z">,
3771  NegFlag<SetFalse>, BothFlags<[NoXarchOption,CC1Option]>>, Group<m_Group>;
3772
3773def mno_warn_nonportable_cfstrings : Flag<["-"], "mno-warn-nonportable-cfstrings">, Group<m_Group>;
3774def mno_omit_leaf_frame_pointer : Flag<["-"], "mno-omit-leaf-frame-pointer">, Group<m_Group>;
3775def momit_leaf_frame_pointer : Flag<["-"], "momit-leaf-frame-pointer">, Group<m_Group>,
3776  HelpText<"Omit frame pointer setup for leaf functions">;
3777def moslib_EQ : Joined<["-"], "moslib=">, Group<m_Group>;
3778def mpascal_strings : Flag<["-"], "mpascal-strings">, Alias<fpascal_strings>;
3779def mred_zone : Flag<["-"], "mred-zone">, Group<m_Group>;
3780def mtls_direct_seg_refs : Flag<["-"], "mtls-direct-seg-refs">, Group<m_Group>,
3781  HelpText<"Enable direct TLS access through segment registers (default)">;
3782def mregparm_EQ : Joined<["-"], "mregparm=">, Group<m_Group>;
3783def mrelax_all : Flag<["-"], "mrelax-all">, Group<m_Group>, Flags<[CC1Option,CC1AsOption]>,
3784  HelpText<"(integrated-as) Relax all machine instructions">,
3785  MarshallingInfoFlag<CodeGenOpts<"RelaxAll">>;
3786def mincremental_linker_compatible : Flag<["-"], "mincremental-linker-compatible">, Group<m_Group>,
3787  Flags<[CC1Option,CC1AsOption]>,
3788  HelpText<"(integrated-as) Emit an object file which can be used with an incremental linker">,
3789  MarshallingInfoFlag<CodeGenOpts<"IncrementalLinkerCompatible">>;
3790def mno_incremental_linker_compatible : Flag<["-"], "mno-incremental-linker-compatible">, Group<m_Group>,
3791  HelpText<"(integrated-as) Emit an object file which cannot be used with an incremental linker">;
3792def mrtd : Flag<["-"], "mrtd">, Group<m_Group>, Flags<[CC1Option]>,
3793  HelpText<"Make StdCall calling convention the default">;
3794def msmall_data_threshold_EQ : Joined <["-"], "msmall-data-threshold=">,
3795  Group<m_Group>, Alias<G>;
3796def msoft_float : Flag<["-"], "msoft-float">, Group<m_Group>, Flags<[CC1Option]>,
3797  HelpText<"Use software floating point">,
3798  MarshallingInfoFlag<CodeGenOpts<"SoftFloat">>;
3799def moutline_atomics : Flag<["-"], "moutline-atomics">, Group<f_clang_Group>, Flags<[CC1Option]>,
3800  HelpText<"Generate local calls to out-of-line atomic operations">;
3801def mno_outline_atomics : Flag<["-"], "mno-outline-atomics">, Group<f_clang_Group>, Flags<[CC1Option]>,
3802  HelpText<"Don't generate local calls to out-of-line atomic operations">;
3803def mno_implicit_float : Flag<["-"], "mno-implicit-float">, Group<m_Group>,
3804  HelpText<"Don't generate implicit floating point instructions">;
3805def mimplicit_float : Flag<["-"], "mimplicit-float">, Group<m_Group>;
3806def mrecip : Flag<["-"], "mrecip">, Group<m_Group>;
3807def mrecip_EQ : CommaJoined<["-"], "mrecip=">, Group<m_Group>, Flags<[CC1Option]>,
3808  MarshallingInfoStringVector<CodeGenOpts<"Reciprocals">>;
3809def mprefer_vector_width_EQ : Joined<["-"], "mprefer-vector-width=">, Group<m_Group>, Flags<[CC1Option]>,
3810  HelpText<"Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.">,
3811  MarshallingInfoString<CodeGenOpts<"PreferVectorWidth">>;
3812def mstack_protector_guard_EQ : Joined<["-"], "mstack-protector-guard=">, Group<m_Group>, Flags<[CC1Option]>,
3813  HelpText<"Use the given guard (global, tls) for addressing the stack-protector guard">,
3814  MarshallingInfoString<CodeGenOpts<"StackProtectorGuard">>;
3815def mstack_protector_guard_offset_EQ : Joined<["-"], "mstack-protector-guard-offset=">, Group<m_Group>, Flags<[CC1Option]>,
3816  HelpText<"Use the given offset for addressing the stack-protector guard">,
3817  MarshallingInfoInt<CodeGenOpts<"StackProtectorGuardOffset">, "INT_MAX", "int">;
3818def mstack_protector_guard_symbol_EQ : Joined<["-"], "mstack-protector-guard-symbol=">, Group<m_Group>, Flags<[CC1Option]>,
3819  HelpText<"Use the given symbol for addressing the stack-protector guard">,
3820  MarshallingInfoString<CodeGenOpts<"StackProtectorGuardSymbol">>;
3821def mstack_protector_guard_reg_EQ : Joined<["-"], "mstack-protector-guard-reg=">, Group<m_Group>, Flags<[CC1Option]>,
3822  HelpText<"Use the given reg for addressing the stack-protector guard">,
3823  MarshallingInfoString<CodeGenOpts<"StackProtectorGuardReg">>;
3824def mfentry : Flag<["-"], "mfentry">, HelpText<"Insert calls to fentry at function entry (x86/SystemZ only)">,
3825  Flags<[CC1Option]>, Group<m_Group>,
3826  MarshallingInfoFlag<CodeGenOpts<"CallFEntry">>;
3827def mnop_mcount : Flag<["-"], "mnop-mcount">, HelpText<"Generate mcount/__fentry__ calls as nops. To activate they need to be patched in.">,
3828  Flags<[CC1Option]>, Group<m_Group>,
3829  MarshallingInfoFlag<CodeGenOpts<"MNopMCount">>;
3830def mrecord_mcount : Flag<["-"], "mrecord-mcount">, HelpText<"Generate a __mcount_loc section entry for each __fentry__ call.">,
3831  Flags<[CC1Option]>, Group<m_Group>,
3832  MarshallingInfoFlag<CodeGenOpts<"RecordMCount">>;
3833def mpacked_stack : Flag<["-"], "mpacked-stack">, HelpText<"Use packed stack layout (SystemZ only).">,
3834  Flags<[CC1Option]>, Group<m_Group>,
3835  MarshallingInfoFlag<CodeGenOpts<"PackedStack">>;
3836def mno_packed_stack : Flag<["-"], "mno-packed-stack">, Flags<[CC1Option]>, Group<m_Group>;
3837def mips16 : Flag<["-"], "mips16">, Group<m_mips_Features_Group>;
3838def mno_mips16 : Flag<["-"], "mno-mips16">, Group<m_mips_Features_Group>;
3839def mmicromips : Flag<["-"], "mmicromips">, Group<m_mips_Features_Group>;
3840def mno_micromips : Flag<["-"], "mno-micromips">, Group<m_mips_Features_Group>;
3841def mxgot : Flag<["-"], "mxgot">, Group<m_mips_Features_Group>;
3842def mno_xgot : Flag<["-"], "mno-xgot">, Group<m_mips_Features_Group>;
3843def mldc1_sdc1 : Flag<["-"], "mldc1-sdc1">, Group<m_mips_Features_Group>;
3844def mno_ldc1_sdc1 : Flag<["-"], "mno-ldc1-sdc1">, Group<m_mips_Features_Group>;
3845def mcheck_zero_division : Flag<["-"], "mcheck-zero-division">,
3846                           Group<m_mips_Features_Group>;
3847def mno_check_zero_division : Flag<["-"], "mno-check-zero-division">,
3848                              Group<m_mips_Features_Group>;
3849def mfix4300 : Flag<["-"], "mfix4300">, Group<m_mips_Features_Group>;
3850def mcompact_branches_EQ : Joined<["-"], "mcompact-branches=">,
3851                           Group<m_mips_Features_Group>;
3852def mbranch_likely : Flag<["-"], "mbranch-likely">, Group<m_Group>,
3853  IgnoredGCCCompat;
3854def mno_branch_likely : Flag<["-"], "mno-branch-likely">, Group<m_Group>,
3855  IgnoredGCCCompat;
3856def mindirect_jump_EQ : Joined<["-"], "mindirect-jump=">,
3857  Group<m_mips_Features_Group>,
3858  HelpText<"Change indirect jump instructions to inhibit speculation">;
3859def mdsp : Flag<["-"], "mdsp">, Group<m_mips_Features_Group>;
3860def mno_dsp : Flag<["-"], "mno-dsp">, Group<m_mips_Features_Group>;
3861def mdspr2 : Flag<["-"], "mdspr2">, Group<m_mips_Features_Group>;
3862def mno_dspr2 : Flag<["-"], "mno-dspr2">, Group<m_mips_Features_Group>;
3863def msingle_float : Flag<["-"], "msingle-float">, Group<m_mips_Features_Group>;
3864def mdouble_float : Flag<["-"], "mdouble-float">, Group<m_mips_Features_Group>;
3865def mmadd4 : Flag<["-"], "mmadd4">, Group<m_mips_Features_Group>,
3866  HelpText<"Enable the generation of 4-operand madd.s, madd.d and related instructions.">;
3867def mno_madd4 : Flag<["-"], "mno-madd4">, Group<m_mips_Features_Group>,
3868  HelpText<"Disable the generation of 4-operand madd.s, madd.d and related instructions.">;
3869def mmsa : Flag<["-"], "mmsa">, Group<m_mips_Features_Group>,
3870  HelpText<"Enable MSA ASE (MIPS only)">;
3871def mno_msa : Flag<["-"], "mno-msa">, Group<m_mips_Features_Group>,
3872  HelpText<"Disable MSA ASE (MIPS only)">;
3873def mmt : Flag<["-"], "mmt">, Group<m_mips_Features_Group>,
3874  HelpText<"Enable MT ASE (MIPS only)">;
3875def mno_mt : Flag<["-"], "mno-mt">, Group<m_mips_Features_Group>,
3876  HelpText<"Disable MT ASE (MIPS only)">;
3877def mfp64 : Flag<["-"], "mfp64">, Group<m_mips_Features_Group>,
3878  HelpText<"Use 64-bit floating point registers (MIPS only)">;
3879def mfp32 : Flag<["-"], "mfp32">, Group<m_mips_Features_Group>,
3880  HelpText<"Use 32-bit floating point registers (MIPS only)">;
3881def mgpopt : Flag<["-"], "mgpopt">, Group<m_mips_Features_Group>,
3882  HelpText<"Use GP relative accesses for symbols known to be in a small"
3883           " data section (MIPS)">;
3884def mno_gpopt : Flag<["-"], "mno-gpopt">, Group<m_mips_Features_Group>,
3885  HelpText<"Do not use GP relative accesses for symbols known to be in a small"
3886           " data section (MIPS)">;
3887def mlocal_sdata : Flag<["-"], "mlocal-sdata">,
3888  Group<m_mips_Features_Group>,
3889  HelpText<"Extend the -G behaviour to object local data (MIPS)">;
3890def mno_local_sdata : Flag<["-"], "mno-local-sdata">,
3891  Group<m_mips_Features_Group>,
3892  HelpText<"Do not extend the -G behaviour to object local data (MIPS)">;
3893def mextern_sdata : Flag<["-"], "mextern-sdata">,
3894  Group<m_mips_Features_Group>,
3895  HelpText<"Assume that externally defined data is in the small data if it"
3896           " meets the -G <size> threshold (MIPS)">;
3897def mno_extern_sdata : Flag<["-"], "mno-extern-sdata">,
3898  Group<m_mips_Features_Group>,
3899  HelpText<"Do not assume that externally defined data is in the small data if"
3900           " it meets the -G <size> threshold (MIPS)">;
3901def membedded_data : Flag<["-"], "membedded-data">,
3902  Group<m_mips_Features_Group>,
3903  HelpText<"Place constants in the .rodata section instead of the .sdata "
3904           "section even if they meet the -G <size> threshold (MIPS)">;
3905def mno_embedded_data : Flag<["-"], "mno-embedded-data">,
3906  Group<m_mips_Features_Group>,
3907  HelpText<"Do not place constants in the .rodata section instead of the "
3908           ".sdata if they meet the -G <size> threshold (MIPS)">;
3909def mnan_EQ : Joined<["-"], "mnan=">, Group<m_mips_Features_Group>;
3910def mabs_EQ : Joined<["-"], "mabs=">, Group<m_mips_Features_Group>;
3911def mabicalls : Flag<["-"], "mabicalls">, Group<m_mips_Features_Group>,
3912  HelpText<"Enable SVR4-style position-independent code (Mips only)">;
3913def mno_abicalls : Flag<["-"], "mno-abicalls">, Group<m_mips_Features_Group>,
3914  HelpText<"Disable SVR4-style position-independent code (Mips only)">;
3915def mno_crc : Flag<["-"], "mno-crc">, Group<m_mips_Features_Group>,
3916  HelpText<"Disallow use of CRC instructions (Mips only)">;
3917def mvirt : Flag<["-"], "mvirt">, Group<m_mips_Features_Group>;
3918def mno_virt : Flag<["-"], "mno-virt">, Group<m_mips_Features_Group>;
3919def mginv : Flag<["-"], "mginv">, Group<m_mips_Features_Group>;
3920def mno_ginv : Flag<["-"], "mno-ginv">, Group<m_mips_Features_Group>;
3921def mips1 : Flag<["-"], "mips1">,
3922  Alias<march_EQ>, AliasArgs<["mips1"]>, Group<m_mips_Features_Group>,
3923  HelpText<"Equivalent to -march=mips1">, Flags<[HelpHidden]>;
3924def mips2 : Flag<["-"], "mips2">,
3925  Alias<march_EQ>, AliasArgs<["mips2"]>, Group<m_mips_Features_Group>,
3926  HelpText<"Equivalent to -march=mips2">, Flags<[HelpHidden]>;
3927def mips3 : Flag<["-"], "mips3">,
3928  Alias<march_EQ>, AliasArgs<["mips3"]>, Group<m_mips_Features_Group>,
3929  HelpText<"Equivalent to -march=mips3">, Flags<[HelpHidden]>;
3930def mips4 : Flag<["-"], "mips4">,
3931  Alias<march_EQ>, AliasArgs<["mips4"]>, Group<m_mips_Features_Group>,
3932  HelpText<"Equivalent to -march=mips4">, Flags<[HelpHidden]>;
3933def mips5 : Flag<["-"], "mips5">,
3934  Alias<march_EQ>, AliasArgs<["mips5"]>, Group<m_mips_Features_Group>,
3935  HelpText<"Equivalent to -march=mips5">, Flags<[HelpHidden]>;
3936def mips32 : Flag<["-"], "mips32">,
3937  Alias<march_EQ>, AliasArgs<["mips32"]>, Group<m_mips_Features_Group>,
3938  HelpText<"Equivalent to -march=mips32">, Flags<[HelpHidden]>;
3939def mips32r2 : Flag<["-"], "mips32r2">,
3940  Alias<march_EQ>, AliasArgs<["mips32r2"]>, Group<m_mips_Features_Group>,
3941  HelpText<"Equivalent to -march=mips32r2">, Flags<[HelpHidden]>;
3942def mips32r3 : Flag<["-"], "mips32r3">,
3943  Alias<march_EQ>, AliasArgs<["mips32r3"]>, Group<m_mips_Features_Group>,
3944  HelpText<"Equivalent to -march=mips32r3">, Flags<[HelpHidden]>;
3945def mips32r5 : Flag<["-"], "mips32r5">,
3946  Alias<march_EQ>, AliasArgs<["mips32r5"]>, Group<m_mips_Features_Group>,
3947  HelpText<"Equivalent to -march=mips32r5">, Flags<[HelpHidden]>;
3948def mips32r6 : Flag<["-"], "mips32r6">,
3949  Alias<march_EQ>, AliasArgs<["mips32r6"]>, Group<m_mips_Features_Group>,
3950  HelpText<"Equivalent to -march=mips32r6">, Flags<[HelpHidden]>;
3951def mips64 : Flag<["-"], "mips64">,
3952  Alias<march_EQ>, AliasArgs<["mips64"]>, Group<m_mips_Features_Group>,
3953  HelpText<"Equivalent to -march=mips64">, Flags<[HelpHidden]>;
3954def mips64r2 : Flag<["-"], "mips64r2">,
3955  Alias<march_EQ>, AliasArgs<["mips64r2"]>, Group<m_mips_Features_Group>,
3956  HelpText<"Equivalent to -march=mips64r2">, Flags<[HelpHidden]>;
3957def mips64r3 : Flag<["-"], "mips64r3">,
3958  Alias<march_EQ>, AliasArgs<["mips64r3"]>, Group<m_mips_Features_Group>,
3959  HelpText<"Equivalent to -march=mips64r3">, Flags<[HelpHidden]>;
3960def mips64r5 : Flag<["-"], "mips64r5">,
3961  Alias<march_EQ>, AliasArgs<["mips64r5"]>, Group<m_mips_Features_Group>,
3962  HelpText<"Equivalent to -march=mips64r5">, Flags<[HelpHidden]>;
3963def mips64r6 : Flag<["-"], "mips64r6">,
3964  Alias<march_EQ>, AliasArgs<["mips64r6"]>, Group<m_mips_Features_Group>,
3965  HelpText<"Equivalent to -march=mips64r6">, Flags<[HelpHidden]>;
3966def mfpxx : Flag<["-"], "mfpxx">, Group<m_mips_Features_Group>,
3967  HelpText<"Avoid FPU mode dependent operations when used with the O32 ABI">,
3968  Flags<[HelpHidden]>;
3969def modd_spreg : Flag<["-"], "modd-spreg">, Group<m_mips_Features_Group>,
3970  HelpText<"Enable odd single-precision floating point registers">,
3971  Flags<[HelpHidden]>;
3972def mno_odd_spreg : Flag<["-"], "mno-odd-spreg">, Group<m_mips_Features_Group>,
3973  HelpText<"Disable odd single-precision floating point registers">,
3974  Flags<[HelpHidden]>;
3975def mrelax_pic_calls : Flag<["-"], "mrelax-pic-calls">,
3976  Group<m_mips_Features_Group>,
3977  HelpText<"Produce relaxation hints for linkers to try optimizing PIC "
3978           "call sequences into direct calls (MIPS only)">, Flags<[HelpHidden]>;
3979def mno_relax_pic_calls : Flag<["-"], "mno-relax-pic-calls">,
3980  Group<m_mips_Features_Group>,
3981  HelpText<"Do not produce relaxation hints for linkers to try optimizing PIC "
3982           "call sequences into direct calls (MIPS only)">, Flags<[HelpHidden]>;
3983def mglibc : Flag<["-"], "mglibc">, Group<m_libc_Group>, Flags<[HelpHidden]>;
3984def muclibc : Flag<["-"], "muclibc">, Group<m_libc_Group>, Flags<[HelpHidden]>;
3985def module_file_info : Flag<["-"], "module-file-info">, Flags<[NoXarchOption,CC1Option]>, Group<Action_Group>,
3986  HelpText<"Provide information about a particular module file">;
3987def mthumb : Flag<["-"], "mthumb">, Group<m_Group>;
3988def mtune_EQ : Joined<["-"], "mtune=">, Group<m_Group>,
3989  HelpText<"Only supported on X86, RISC-V and SystemZ. Otherwise accepted for compatibility with GCC.">;
3990def multi__module : Flag<["-"], "multi_module">;
3991def multiply__defined__unused : Separate<["-"], "multiply_defined_unused">;
3992def multiply__defined : Separate<["-"], "multiply_defined">;
3993def mwarn_nonportable_cfstrings : Flag<["-"], "mwarn-nonportable-cfstrings">, Group<m_Group>;
3994def canonical_prefixes : Flag<["-"], "canonical-prefixes">, Flags<[HelpHidden, CoreOption]>,
3995  HelpText<"Use absolute paths for invoking subcommands (default)">;
3996def no_canonical_prefixes : Flag<["-"], "no-canonical-prefixes">, Flags<[HelpHidden, CoreOption]>,
3997  HelpText<"Use relative paths for invoking subcommands">;
3998def no_cpp_precomp : Flag<["-"], "no-cpp-precomp">, Group<clang_ignored_f_Group>;
3999def no_integrated_cpp : Flag<["-", "--"], "no-integrated-cpp">, Flags<[NoXarchOption]>;
4000def no_pedantic : Flag<["-", "--"], "no-pedantic">, Group<pedantic_Group>;
4001def no__dead__strip__inits__and__terms : Flag<["-"], "no_dead_strip_inits_and_terms">;
4002def nobuiltininc : Flag<["-"], "nobuiltininc">, Flags<[CC1Option, CoreOption]>,
4003  HelpText<"Disable builtin #include directories">,
4004  MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseBuiltinIncludes">>;
4005def nogpuinc : Flag<["-"], "nogpuinc">, HelpText<"Do not add include paths for CUDA/HIP and"
4006  " do not include the default CUDA/HIP wrapper headers">;
4007def nohipwrapperinc : Flag<["-"], "nohipwrapperinc">,
4008  HelpText<"Do not include the default HIP wrapper headers and include paths">;
4009def : Flag<["-"], "nocudainc">, Alias<nogpuinc>;
4010def nogpulib : Flag<["-"], "nogpulib">, MarshallingInfoFlag<LangOpts<"NoGPULib">>,
4011  Flags<[CC1Option]>, HelpText<"Do not link device library for CUDA/HIP device compilation">;
4012def : Flag<["-"], "nocudalib">, Alias<nogpulib>;
4013def nodefaultlibs : Flag<["-"], "nodefaultlibs">;
4014def nodriverkitlib : Flag<["-"], "nodriverkitlib">;
4015def nofixprebinding : Flag<["-"], "nofixprebinding">;
4016def nolibc : Flag<["-"], "nolibc">;
4017def nomultidefs : Flag<["-"], "nomultidefs">;
4018def nopie : Flag<["-"], "nopie">;
4019def no_pie : Flag<["-"], "no-pie">, Alias<nopie>;
4020def noprebind : Flag<["-"], "noprebind">;
4021def noprofilelib : Flag<["-"], "noprofilelib">;
4022def noseglinkedit : Flag<["-"], "noseglinkedit">;
4023def nostartfiles : Flag<["-"], "nostartfiles">, Group<Link_Group>;
4024def nostdinc : Flag<["-"], "nostdinc">, Flags<[CoreOption]>;
4025def nostdlibinc : Flag<["-"], "nostdlibinc">;
4026def nostdincxx : Flag<["-"], "nostdinc++">, Flags<[CC1Option]>,
4027  HelpText<"Disable standard #include directories for the C++ standard library">,
4028  MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseStandardCXXIncludes">>;
4029def nostdlib : Flag<["-"], "nostdlib">, Group<Link_Group>;
4030def nostdlibxx : Flag<["-"], "nostdlib++">;
4031def object : Flag<["-"], "object">;
4032def o : JoinedOrSeparate<["-"], "o">, Flags<[NoXarchOption, RenderAsInput,
4033  CC1Option, CC1AsOption, FC1Option, FlangOption]>,
4034  HelpText<"Write output to <file>">, MetaVarName<"<file>">,
4035  MarshallingInfoString<FrontendOpts<"OutputFile">>;
4036def object_file_name_EQ : Joined<["-"], "object-file-name=">, Flags<[CC1Option, CC1AsOption, CoreOption]>,
4037  HelpText<"Set the output <file> for debug infos">, MetaVarName<"<file>">,
4038  MarshallingInfoString<CodeGenOpts<"ObjectFilenameForDebug">>;
4039def object_file_name : Separate<["-"], "object-file-name">, Flags<[CC1Option, CC1AsOption, CoreOption]>,
4040    Alias<object_file_name_EQ>;
4041def pagezero__size : JoinedOrSeparate<["-"], "pagezero_size">;
4042def pass_exit_codes : Flag<["-", "--"], "pass-exit-codes">, Flags<[Unsupported]>;
4043def pedantic_errors : Flag<["-", "--"], "pedantic-errors">, Group<pedantic_Group>, Flags<[CC1Option]>,
4044  MarshallingInfoFlag<DiagnosticOpts<"PedanticErrors">>;
4045def pedantic : Flag<["-", "--"], "pedantic">, Group<pedantic_Group>, Flags<[CC1Option,FlangOption,FC1Option]>,
4046  HelpText<"Warn on language extensions">, MarshallingInfoFlag<DiagnosticOpts<"Pedantic">>;
4047def pg : Flag<["-"], "pg">, HelpText<"Enable mcount instrumentation">, Flags<[CC1Option]>,
4048  MarshallingInfoFlag<CodeGenOpts<"InstrumentForProfiling">>;
4049def pipe : Flag<["-", "--"], "pipe">,
4050  HelpText<"Use pipes between commands, when possible">;
4051def prebind__all__twolevel__modules : Flag<["-"], "prebind_all_twolevel_modules">;
4052def prebind : Flag<["-"], "prebind">;
4053def preload : Flag<["-"], "preload">;
4054def print_file_name_EQ : Joined<["-", "--"], "print-file-name=">,
4055  HelpText<"Print the full library path of <file>">, MetaVarName<"<file>">;
4056def print_ivar_layout : Flag<["-"], "print-ivar-layout">, Flags<[CC1Option]>,
4057  HelpText<"Enable Objective-C Ivar layout bitmap print trace">,
4058  MarshallingInfoFlag<LangOpts<"ObjCGCBitmapPrint">>;
4059def print_libgcc_file_name : Flag<["-", "--"], "print-libgcc-file-name">,
4060  HelpText<"Print the library path for the currently used compiler runtime "
4061           "library (\"libgcc.a\" or \"libclang_rt.builtins.*.a\")">;
4062def print_multi_directory : Flag<["-", "--"], "print-multi-directory">;
4063def print_multi_lib : Flag<["-", "--"], "print-multi-lib">;
4064def print_multi_os_directory : Flag<["-", "--"], "print-multi-os-directory">,
4065  Flags<[Unsupported]>;
4066def print_target_triple : Flag<["-", "--"], "print-target-triple">,
4067  HelpText<"Print the normalized target triple">, Flags<[FlangOption]>;
4068def print_effective_triple : Flag<["-", "--"], "print-effective-triple">,
4069  HelpText<"Print the effective target triple">, Flags<[FlangOption]>;
4070def print_multiarch : Flag<["-", "--"], "print-multiarch">,
4071  HelpText<"Print the multiarch target triple">;
4072def print_prog_name_EQ : Joined<["-", "--"], "print-prog-name=">,
4073  HelpText<"Print the full program path of <name>">, MetaVarName<"<name>">;
4074def print_resource_dir : Flag<["-", "--"], "print-resource-dir">,
4075  HelpText<"Print the resource directory pathname">;
4076def print_search_dirs : Flag<["-", "--"], "print-search-dirs">,
4077  HelpText<"Print the paths used for finding libraries and programs">;
4078def print_targets : Flag<["-", "--"], "print-targets">,
4079  HelpText<"Print the registered targets">;
4080def print_rocm_search_dirs : Flag<["-", "--"], "print-rocm-search-dirs">,
4081  HelpText<"Print the paths used for finding ROCm installation">;
4082def print_runtime_dir : Flag<["-", "--"], "print-runtime-dir">,
4083  HelpText<"Print the directory pathname containing clangs runtime libraries">;
4084def print_diagnostic_options : Flag<["-", "--"], "print-diagnostic-options">,
4085  HelpText<"Print all of Clang's warning options">;
4086def private__bundle : Flag<["-"], "private_bundle">;
4087def pthreads : Flag<["-"], "pthreads">;
4088defm pthread : BoolOption<"", "pthread",
4089  LangOpts<"POSIXThreads">, DefaultFalse,
4090  PosFlag<SetTrue, [], "Support POSIX threads in generated code">,
4091  NegFlag<SetFalse>, BothFlags<[CC1Option]>>;
4092def p : Flag<["-"], "p">;
4093def pie : Flag<["-"], "pie">, Group<Link_Group>;
4094def static_pie : Flag<["-"], "static-pie">, Group<Link_Group>;
4095def read__only__relocs : Separate<["-"], "read_only_relocs">;
4096def remap : Flag<["-"], "remap">;
4097def rewrite_objc : Flag<["-"], "rewrite-objc">, Flags<[NoXarchOption,CC1Option]>,
4098  HelpText<"Rewrite Objective-C source to C++">, Group<Action_Group>;
4099def rewrite_legacy_objc : Flag<["-"], "rewrite-legacy-objc">, Flags<[NoXarchOption]>,
4100  HelpText<"Rewrite Legacy Objective-C source to C++">;
4101def rdynamic : Flag<["-"], "rdynamic">, Group<Link_Group>;
4102def resource_dir : Separate<["-"], "resource-dir">,
4103  Flags<[NoXarchOption, CC1Option, CoreOption, HelpHidden]>,
4104  HelpText<"The directory which holds the compiler resource files">,
4105  MarshallingInfoString<HeaderSearchOpts<"ResourceDir">>;
4106def resource_dir_EQ : Joined<["-"], "resource-dir=">, Flags<[NoXarchOption, CoreOption]>,
4107  Alias<resource_dir>;
4108def rpath : Separate<["-"], "rpath">, Flags<[LinkerInput]>, Group<Link_Group>;
4109def rtlib_EQ : Joined<["-", "--"], "rtlib=">,
4110  HelpText<"Compiler runtime library to use">;
4111def frtlib_add_rpath: Flag<["-"], "frtlib-add-rpath">, Flags<[NoArgumentUnused]>,
4112  HelpText<"Add -rpath with architecture-specific resource directory to the linker flags">;
4113def fno_rtlib_add_rpath: Flag<["-"], "fno-rtlib-add-rpath">, Flags<[NoArgumentUnused]>,
4114  HelpText<"Do not add -rpath with architecture-specific resource directory to the linker flags">;
4115defm openmp_implicit_rpath: BoolFOption<"openmp-implicit-rpath",
4116  LangOpts<"OpenMP">,
4117  DefaultTrue,
4118  PosFlag<SetTrue, [], "Set rpath on OpenMP executables">,
4119  NegFlag<SetFalse>>;
4120def r : Flag<["-"], "r">, Flags<[LinkerInput,NoArgumentUnused]>,
4121        Group<Link_Group>;
4122def save_temps_EQ : Joined<["-", "--"], "save-temps=">, Flags<[CC1Option, FlangOption, NoXarchOption]>,
4123  HelpText<"Save intermediate compilation results.">;
4124def save_temps : Flag<["-", "--"], "save-temps">, Flags<[FlangOption, NoXarchOption]>,
4125  Alias<save_temps_EQ>, AliasArgs<["cwd"]>,
4126  HelpText<"Save intermediate compilation results">;
4127def save_stats_EQ : Joined<["-", "--"], "save-stats=">, Flags<[NoXarchOption]>,
4128  HelpText<"Save llvm statistics.">;
4129def save_stats : Flag<["-", "--"], "save-stats">, Flags<[NoXarchOption]>,
4130  Alias<save_stats_EQ>, AliasArgs<["cwd"]>,
4131  HelpText<"Save llvm statistics.">;
4132def via_file_asm : Flag<["-", "--"], "via-file-asm">, InternalDebugOpt,
4133  HelpText<"Write assembly to file for input to assemble jobs">;
4134def sectalign : MultiArg<["-"], "sectalign", 3>;
4135def sectcreate : MultiArg<["-"], "sectcreate", 3>;
4136def sectobjectsymbols : MultiArg<["-"], "sectobjectsymbols", 2>;
4137def sectorder : MultiArg<["-"], "sectorder", 3>;
4138def seg1addr : JoinedOrSeparate<["-"], "seg1addr">;
4139def seg__addr__table__filename : Separate<["-"], "seg_addr_table_filename">;
4140def seg__addr__table : Separate<["-"], "seg_addr_table">;
4141def segaddr : MultiArg<["-"], "segaddr", 2>;
4142def segcreate : MultiArg<["-"], "segcreate", 3>;
4143def seglinkedit : Flag<["-"], "seglinkedit">;
4144def segprot : MultiArg<["-"], "segprot", 3>;
4145def segs__read__only__addr : Separate<["-"], "segs_read_only_addr">;
4146def segs__read__write__addr : Separate<["-"], "segs_read_write_addr">;
4147def segs__read__ : Joined<["-"], "segs_read_">;
4148def shared_libgcc : Flag<["-"], "shared-libgcc">;
4149def shared : Flag<["-", "--"], "shared">, Group<Link_Group>;
4150def single__module : Flag<["-"], "single_module">;
4151def specs_EQ : Joined<["-", "--"], "specs=">, Group<Link_Group>;
4152def specs : Separate<["-", "--"], "specs">, Flags<[Unsupported]>;
4153def start_no_unused_arguments : Flag<["--"], "start-no-unused-arguments">, Flags<[CoreOption]>,
4154  HelpText<"Don't emit warnings about unused arguments for the following arguments">;
4155def static_libgcc : Flag<["-"], "static-libgcc">;
4156def static_libstdcxx : Flag<["-"], "static-libstdc++">;
4157def static : Flag<["-", "--"], "static">, Group<Link_Group>, Flags<[NoArgumentUnused]>;
4158def std_default_EQ : Joined<["-"], "std-default=">;
4159def std_EQ : Joined<["-", "--"], "std=">, Flags<[CC1Option,FlangOption,FC1Option]>,
4160  Group<CompileOnly_Group>, HelpText<"Language standard to compile for">,
4161  ValuesCode<[{
4162    const char *Values =
4163    #define LANGSTANDARD(id, name, lang, desc, features) name ","
4164    #define LANGSTANDARD_ALIAS(id, alias) alias ","
4165    #include "clang/Basic/LangStandards.def"
4166    ;
4167  }]>;
4168def stdlib_EQ : Joined<["-", "--"], "stdlib=">, Flags<[CC1Option]>,
4169  HelpText<"C++ standard library to use">, Values<"libc++,libstdc++,platform">;
4170def stdlibxx_isystem : JoinedOrSeparate<["-"], "stdlib++-isystem">,
4171  Group<clang_i_Group>,
4172  HelpText<"Use directory as the C++ standard library include path">,
4173  Flags<[NoXarchOption]>, MetaVarName<"<directory>">;
4174def unwindlib_EQ : Joined<["-", "--"], "unwindlib=">, Flags<[CC1Option]>,
4175  HelpText<"Unwind library to use">, Values<"libgcc,unwindlib,platform">;
4176def sub__library : JoinedOrSeparate<["-"], "sub_library">;
4177def sub__umbrella : JoinedOrSeparate<["-"], "sub_umbrella">;
4178def system_header_prefix : Joined<["--"], "system-header-prefix=">,
4179  Group<clang_i_Group>, Flags<[CC1Option]>, MetaVarName<"<prefix>">,
4180  HelpText<"Treat all #include paths starting with <prefix> as including a "
4181           "system header.">;
4182def : Separate<["--"], "system-header-prefix">, Alias<system_header_prefix>;
4183def no_system_header_prefix : Joined<["--"], "no-system-header-prefix=">,
4184  Group<clang_i_Group>, Flags<[CC1Option]>, MetaVarName<"<prefix>">,
4185  HelpText<"Treat all #include paths starting with <prefix> as not including a "
4186           "system header.">;
4187def : Separate<["--"], "no-system-header-prefix">, Alias<no_system_header_prefix>;
4188def s : Flag<["-"], "s">, Group<Link_Group>;
4189def target : Joined<["--"], "target=">, Flags<[NoXarchOption, CoreOption, FlangOption]>,
4190  HelpText<"Generate code for the given target">;
4191def darwin_target_variant : Separate<["-"], "darwin-target-variant">,
4192  Flags<[NoXarchOption, CoreOption]>,
4193  HelpText<"Generate code for an additional runtime variant of the deployment target">;
4194def print_supported_cpus : Flag<["-", "--"], "print-supported-cpus">,
4195  Group<CompileOnly_Group>, Flags<[CC1Option, CoreOption]>,
4196  HelpText<"Print supported cpu models for the given target (if target is not specified,"
4197           " it will print the supported cpus for the default target)">,
4198  MarshallingInfoFlag<FrontendOpts<"PrintSupportedCPUs">>;
4199def mcpu_EQ_QUESTION : Flag<["-"], "mcpu=?">, Alias<print_supported_cpus>;
4200def mtune_EQ_QUESTION : Flag<["-"], "mtune=?">, Alias<print_supported_cpus>;
4201def time : Flag<["-"], "time">,
4202  HelpText<"Time individual commands">;
4203def traditional_cpp : Flag<["-", "--"], "traditional-cpp">, Flags<[CC1Option]>,
4204  HelpText<"Enable some traditional CPP emulation">,
4205  MarshallingInfoFlag<LangOpts<"TraditionalCPP">>;
4206def traditional : Flag<["-", "--"], "traditional">;
4207def trigraphs : Flag<["-", "--"], "trigraphs">, Alias<ftrigraphs>,
4208  HelpText<"Process trigraph sequences">;
4209def twolevel__namespace__hints : Flag<["-"], "twolevel_namespace_hints">;
4210def twolevel__namespace : Flag<["-"], "twolevel_namespace">;
4211def t : Flag<["-"], "t">, Group<Link_Group>;
4212def umbrella : Separate<["-"], "umbrella">;
4213def undefined : JoinedOrSeparate<["-"], "undefined">, Group<u_Group>;
4214def undef : Flag<["-"], "undef">, Group<u_Group>, Flags<[CC1Option]>,
4215  HelpText<"undef all system defines">,
4216  MarshallingInfoNegativeFlag<PreprocessorOpts<"UsePredefines">>;
4217def unexported__symbols__list : Separate<["-"], "unexported_symbols_list">;
4218def u : JoinedOrSeparate<["-"], "u">, Group<u_Group>;
4219def v : Flag<["-"], "v">, Flags<[CC1Option, CoreOption]>,
4220  HelpText<"Show commands to run and use verbose output">,
4221  MarshallingInfoFlag<HeaderSearchOpts<"Verbose">>;
4222def altivec_src_compat : Joined<["-"], "faltivec-src-compat=">,
4223  Flags<[CC1Option]>, Group<f_Group>,
4224  HelpText<"Source-level compatibility for Altivec vectors (for PowerPC "
4225           "targets). This includes results of vector comparison (scalar for "
4226           "'xl', vector for 'gcc') as well as behavior when initializing with "
4227           "a scalar (splatting for 'xl', element zero only for 'gcc'). For "
4228           "'mixed', the compatibility is as 'gcc' for 'vector bool/vector "
4229           "pixel' and as 'xl' for other types. Current default is 'mixed'.">,
4230  Values<"mixed,gcc,xl">,
4231  NormalizedValuesScope<"LangOptions::AltivecSrcCompatKind">,
4232  NormalizedValues<["Mixed", "GCC", "XL"]>,
4233  MarshallingInfoEnum<LangOpts<"AltivecSrcCompat">, "Mixed">;
4234def verify_debug_info : Flag<["--"], "verify-debug-info">, Flags<[NoXarchOption]>,
4235  HelpText<"Verify the binary representation of debug output">;
4236def weak_l : Joined<["-"], "weak-l">, Flags<[LinkerInput]>;
4237def weak__framework : Separate<["-"], "weak_framework">, Flags<[LinkerInput]>;
4238def weak__library : Separate<["-"], "weak_library">, Flags<[LinkerInput]>;
4239def weak__reference__mismatches : Separate<["-"], "weak_reference_mismatches">;
4240def whatsloaded : Flag<["-"], "whatsloaded">;
4241def why_load : Flag<["-"], "why_load">;
4242def whyload : Flag<["-"], "whyload">, Alias<why_load>;
4243def w : Flag<["-"], "w">, HelpText<"Suppress all warnings">, Flags<[CC1Option]>,
4244  MarshallingInfoFlag<DiagnosticOpts<"IgnoreWarnings">>;
4245def x : JoinedOrSeparate<["-"], "x">,
4246Flags<[NoXarchOption,CC1Option,FlangOption,FC1Option]>,
4247  HelpText<"Treat subsequent input files as having type <language>">,
4248  MetaVarName<"<language>">;
4249def y : Joined<["-"], "y">;
4250
4251defm integrated_as : BoolFOption<"integrated-as",
4252  CodeGenOpts<"DisableIntegratedAS">, DefaultFalse,
4253  NegFlag<SetTrue, [CC1Option, FlangOption], "Disable">, PosFlag<SetFalse, [], "Enable">,
4254  BothFlags<[], " the integrated assembler">>;
4255
4256def fintegrated_cc1 : Flag<["-"], "fintegrated-cc1">,
4257                      Flags<[CoreOption, NoXarchOption]>, Group<f_Group>,
4258                      HelpText<"Run cc1 in-process">;
4259def fno_integrated_cc1 : Flag<["-"], "fno-integrated-cc1">,
4260                         Flags<[CoreOption, NoXarchOption]>, Group<f_Group>,
4261                         HelpText<"Spawn a separate process for each cc1">;
4262
4263def fintegrated_objemitter : Flag<["-"], "fintegrated-objemitter">,
4264  Flags<[CoreOption, NoXarchOption]>, Group<f_Group>,
4265  HelpText<"Use internal machine object code emitter.">;
4266def fno_integrated_objemitter : Flag<["-"], "fno-integrated-objemitter">,
4267  Flags<[CoreOption, NoXarchOption]>, Group<f_Group>,
4268  HelpText<"Use external machine object code emitter.">;
4269
4270def : Flag<["-"], "integrated-as">, Alias<fintegrated_as>, Flags<[NoXarchOption]>;
4271def : Flag<["-"], "no-integrated-as">, Alias<fno_integrated_as>,
4272      Flags<[CC1Option, FlangOption, NoXarchOption]>;
4273
4274def working_directory : JoinedOrSeparate<["-"], "working-directory">, Flags<[CC1Option]>,
4275  HelpText<"Resolve file paths relative to the specified directory">,
4276  MarshallingInfoString<FileSystemOpts<"WorkingDir">>;
4277def working_directory_EQ : Joined<["-"], "working-directory=">, Flags<[CC1Option]>,
4278  Alias<working_directory>;
4279
4280// Double dash options, which are usually an alias for one of the previous
4281// options.
4282
4283def _mhwdiv_EQ : Joined<["--"], "mhwdiv=">, Alias<mhwdiv_EQ>;
4284def _mhwdiv : Separate<["--"], "mhwdiv">, Alias<mhwdiv_EQ>;
4285def _CLASSPATH_EQ : Joined<["--"], "CLASSPATH=">, Alias<fclasspath_EQ>;
4286def _CLASSPATH : Separate<["--"], "CLASSPATH">, Alias<fclasspath_EQ>;
4287def _all_warnings : Flag<["--"], "all-warnings">, Alias<Wall>;
4288def _analyzer_no_default_checks : Flag<["--"], "analyzer-no-default-checks">, Flags<[NoXarchOption]>;
4289def _analyzer_output : JoinedOrSeparate<["--"], "analyzer-output">, Flags<[NoXarchOption]>,
4290  HelpText<"Static analyzer report output format (html|plist|plist-multi-file|plist-html|sarif|sarif-html|text).">;
4291def _analyze : Flag<["--"], "analyze">, Flags<[NoXarchOption, CoreOption]>,
4292  HelpText<"Run the static analyzer">;
4293def _assemble : Flag<["--"], "assemble">, Alias<S>;
4294def _assert_EQ : Joined<["--"], "assert=">, Alias<A>;
4295def _assert : Separate<["--"], "assert">, Alias<A>;
4296def _bootclasspath_EQ : Joined<["--"], "bootclasspath=">, Alias<fbootclasspath_EQ>;
4297def _bootclasspath : Separate<["--"], "bootclasspath">, Alias<fbootclasspath_EQ>;
4298def _classpath_EQ : Joined<["--"], "classpath=">, Alias<fclasspath_EQ>;
4299def _classpath : Separate<["--"], "classpath">, Alias<fclasspath_EQ>;
4300def _comments_in_macros : Flag<["--"], "comments-in-macros">, Alias<CC>;
4301def _comments : Flag<["--"], "comments">, Alias<C>;
4302def _compile : Flag<["--"], "compile">, Alias<c>;
4303def _constant_cfstrings : Flag<["--"], "constant-cfstrings">;
4304def _debug_EQ : Joined<["--"], "debug=">, Alias<g_Flag>;
4305def _debug : Flag<["--"], "debug">, Alias<g_Flag>;
4306def _define_macro_EQ : Joined<["--"], "define-macro=">, Alias<D>;
4307def _define_macro : Separate<["--"], "define-macro">, Alias<D>;
4308def _dependencies : Flag<["--"], "dependencies">, Alias<M>;
4309def _dyld_prefix_EQ : Joined<["--"], "dyld-prefix=">;
4310def _dyld_prefix : Separate<["--"], "dyld-prefix">, Alias<_dyld_prefix_EQ>;
4311def _encoding_EQ : Joined<["--"], "encoding=">, Alias<fencoding_EQ>;
4312def _encoding : Separate<["--"], "encoding">, Alias<fencoding_EQ>;
4313def _entry : Flag<["--"], "entry">, Alias<e>;
4314def _extdirs_EQ : Joined<["--"], "extdirs=">, Alias<fextdirs_EQ>;
4315def _extdirs : Separate<["--"], "extdirs">, Alias<fextdirs_EQ>;
4316def _extra_warnings : Flag<["--"], "extra-warnings">, Alias<W_Joined>;
4317def _for_linker_EQ : Joined<["--"], "for-linker=">, Alias<Xlinker>;
4318def _for_linker : Separate<["--"], "for-linker">, Alias<Xlinker>;
4319def _force_link_EQ : Joined<["--"], "force-link=">, Alias<u>;
4320def _force_link : Separate<["--"], "force-link">, Alias<u>;
4321def _help_hidden : Flag<["--"], "help-hidden">,
4322  HelpText<"Display help for hidden options">;
4323def _imacros_EQ : Joined<["--"], "imacros=">, Alias<imacros>;
4324def _include_barrier : Flag<["--"], "include-barrier">, Alias<I_>;
4325def _include_directory_after_EQ : Joined<["--"], "include-directory-after=">, Alias<idirafter>;
4326def _include_directory_after : Separate<["--"], "include-directory-after">, Alias<idirafter>;
4327def _include_directory_EQ : Joined<["--"], "include-directory=">, Alias<I>;
4328def _include_directory : Separate<["--"], "include-directory">, Alias<I>;
4329def _include_prefix_EQ : Joined<["--"], "include-prefix=">, Alias<iprefix>;
4330def _include_prefix : Separate<["--"], "include-prefix">, Alias<iprefix>;
4331def _include_with_prefix_after_EQ : Joined<["--"], "include-with-prefix-after=">, Alias<iwithprefix>;
4332def _include_with_prefix_after : Separate<["--"], "include-with-prefix-after">, Alias<iwithprefix>;
4333def _include_with_prefix_before_EQ : Joined<["--"], "include-with-prefix-before=">, Alias<iwithprefixbefore>;
4334def _include_with_prefix_before : Separate<["--"], "include-with-prefix-before">, Alias<iwithprefixbefore>;
4335def _include_with_prefix_EQ : Joined<["--"], "include-with-prefix=">, Alias<iwithprefix>;
4336def _include_with_prefix : Separate<["--"], "include-with-prefix">, Alias<iwithprefix>;
4337def _include_EQ : Joined<["--"], "include=">, Alias<include_>;
4338def _language_EQ : Joined<["--"], "language=">, Alias<x>;
4339def _language : Separate<["--"], "language">, Alias<x>;
4340def _library_directory_EQ : Joined<["--"], "library-directory=">, Alias<L>;
4341def _library_directory : Separate<["--"], "library-directory">, Alias<L>;
4342def _no_line_commands : Flag<["--"], "no-line-commands">, Alias<P>;
4343def _no_standard_includes : Flag<["--"], "no-standard-includes">, Alias<nostdinc>;
4344def _no_standard_libraries : Flag<["--"], "no-standard-libraries">, Alias<nostdlib>;
4345def _no_undefined : Flag<["--"], "no-undefined">, Flags<[LinkerInput]>;
4346def _no_warnings : Flag<["--"], "no-warnings">, Alias<w>;
4347def _optimize_EQ : Joined<["--"], "optimize=">, Alias<O>;
4348def _optimize : Flag<["--"], "optimize">, Alias<O>;
4349def _output_class_directory_EQ : Joined<["--"], "output-class-directory=">, Alias<foutput_class_dir_EQ>;
4350def _output_class_directory : Separate<["--"], "output-class-directory">, Alias<foutput_class_dir_EQ>;
4351def _output_EQ : Joined<["--"], "output=">, Alias<o>;
4352def _output : Separate<["--"], "output">, Alias<o>;
4353def _param : Separate<["--"], "param">, Group<CompileOnly_Group>;
4354def _param_EQ : Joined<["--"], "param=">, Alias<_param>;
4355def _precompile : Flag<["--"], "precompile">, Flags<[NoXarchOption]>,
4356  Group<Action_Group>, HelpText<"Only precompile the input">;
4357def _prefix_EQ : Joined<["--"], "prefix=">, Alias<B>;
4358def _prefix : Separate<["--"], "prefix">, Alias<B>;
4359def _preprocess : Flag<["--"], "preprocess">, Alias<E>;
4360def _print_diagnostic_categories : Flag<["--"], "print-diagnostic-categories">;
4361def _print_file_name : Separate<["--"], "print-file-name">, Alias<print_file_name_EQ>;
4362def _print_missing_file_dependencies : Flag<["--"], "print-missing-file-dependencies">, Alias<MG>;
4363def _print_prog_name : Separate<["--"], "print-prog-name">, Alias<print_prog_name_EQ>;
4364def _profile_blocks : Flag<["--"], "profile-blocks">, Alias<a>;
4365def _profile : Flag<["--"], "profile">, Alias<p>;
4366def _resource_EQ : Joined<["--"], "resource=">, Alias<fcompile_resource_EQ>;
4367def _resource : Separate<["--"], "resource">, Alias<fcompile_resource_EQ>;
4368def _rtlib : Separate<["--"], "rtlib">, Alias<rtlib_EQ>;
4369def _serialize_diags : Separate<["-", "--"], "serialize-diagnostics">, Flags<[NoXarchOption]>,
4370  HelpText<"Serialize compiler diagnostics to a file">;
4371// We give --version different semantics from -version.
4372def _version : Flag<["--"], "version">,
4373  Flags<[CoreOption, FlangOption]>,
4374  HelpText<"Print version information">;
4375def _signed_char : Flag<["--"], "signed-char">, Alias<fsigned_char>;
4376def _std : Separate<["--"], "std">, Alias<std_EQ>;
4377def _stdlib : Separate<["--"], "stdlib">, Alias<stdlib_EQ>;
4378def _sysroot_EQ : Joined<["--"], "sysroot=">;
4379def _sysroot : Separate<["--"], "sysroot">, Alias<_sysroot_EQ>;
4380def _target_help : Flag<["--"], "target-help">;
4381def _trace_includes : Flag<["--"], "trace-includes">, Alias<H>;
4382def _undefine_macro_EQ : Joined<["--"], "undefine-macro=">, Alias<U>;
4383def _undefine_macro : Separate<["--"], "undefine-macro">, Alias<U>;
4384def _unsigned_char : Flag<["--"], "unsigned-char">, Alias<funsigned_char>;
4385def _user_dependencies : Flag<["--"], "user-dependencies">, Alias<MM>;
4386def _verbose : Flag<["--"], "verbose">, Alias<v>;
4387def _warn__EQ : Joined<["--"], "warn-=">, Alias<W_Joined>;
4388def _warn_ : Joined<["--"], "warn-">, Alias<W_Joined>;
4389def _write_dependencies : Flag<["--"], "write-dependencies">, Alias<MD>;
4390def _write_user_dependencies : Flag<["--"], "write-user-dependencies">, Alias<MMD>;
4391def _ : Joined<["--"], "">, Flags<[Unsupported]>;
4392
4393// Hexagon feature flags.
4394def mieee_rnd_near : Flag<["-"], "mieee-rnd-near">,
4395  Group<m_hexagon_Features_Group>;
4396def mv5 : Flag<["-"], "mv5">, Group<m_hexagon_Features_Group>, Alias<mcpu_EQ>,
4397  AliasArgs<["hexagonv5"]>;
4398def mv55 : Flag<["-"], "mv55">, Group<m_hexagon_Features_Group>,
4399  Alias<mcpu_EQ>, AliasArgs<["hexagonv55"]>;
4400def mv60 : Flag<["-"], "mv60">, Group<m_hexagon_Features_Group>,
4401  Alias<mcpu_EQ>, AliasArgs<["hexagonv60"]>;
4402def mv62 : Flag<["-"], "mv62">, Group<m_hexagon_Features_Group>,
4403  Alias<mcpu_EQ>, AliasArgs<["hexagonv62"]>;
4404def mv65 : Flag<["-"], "mv65">, Group<m_hexagon_Features_Group>,
4405  Alias<mcpu_EQ>, AliasArgs<["hexagonv65"]>;
4406def mv66 : Flag<["-"], "mv66">, Group<m_hexagon_Features_Group>,
4407  Alias<mcpu_EQ>, AliasArgs<["hexagonv66"]>;
4408def mv67 : Flag<["-"], "mv67">, Group<m_hexagon_Features_Group>,
4409  Alias<mcpu_EQ>, AliasArgs<["hexagonv67"]>;
4410def mv67t : Flag<["-"], "mv67t">, Group<m_hexagon_Features_Group>,
4411  Alias<mcpu_EQ>, AliasArgs<["hexagonv67t"]>;
4412def mv68 : Flag<["-"], "mv68">, Group<m_hexagon_Features_Group>,
4413  Alias<mcpu_EQ>, AliasArgs<["hexagonv68"]>;
4414def mv69 : Flag<["-"], "mv69">, Group<m_hexagon_Features_Group>,
4415  Alias<mcpu_EQ>, AliasArgs<["hexagonv69"]>;
4416def mhexagon_hvx : Flag<["-"], "mhvx">, Group<m_hexagon_Features_HVX_Group>,
4417  HelpText<"Enable Hexagon Vector eXtensions">;
4418def mhexagon_hvx_EQ : Joined<["-"], "mhvx=">,
4419  Group<m_hexagon_Features_HVX_Group>,
4420  HelpText<"Enable Hexagon Vector eXtensions">;
4421def mno_hexagon_hvx : Flag<["-"], "mno-hvx">,
4422  Group<m_hexagon_Features_HVX_Group>,
4423  HelpText<"Disable Hexagon Vector eXtensions">;
4424def mhexagon_hvx_length_EQ : Joined<["-"], "mhvx-length=">,
4425  Group<m_hexagon_Features_HVX_Group>, HelpText<"Set Hexagon Vector Length">,
4426  Values<"64B,128B">;
4427def mhexagon_hvx_qfloat : Flag<["-"], "mhvx-qfloat">,
4428  Group<m_hexagon_Features_HVX_Group>,
4429  HelpText<"Enable Hexagon HVX QFloat instructions">;
4430def mno_hexagon_hvx_qfloat : Flag<["-"], "mno-hvx-qfloat">,
4431  Group<m_hexagon_Features_HVX_Group>,
4432  HelpText<"Disable Hexagon HVX QFloat instructions">;
4433def mhexagon_hvx_ieee_fp : Flag<["-"], "mhvx-ieee-fp">,
4434  Group<m_hexagon_Features_Group>,
4435  HelpText<"Enable Hexagon HVX IEEE floating-point">;
4436def mno_hexagon_hvx_ieee_fp : Flag<["-"], "mno-hvx-ieee-fp">,
4437  Group<m_hexagon_Features_Group>,
4438  HelpText<"Disable Hexagon HVX IEEE floating-point">;
4439def ffixed_r19: Flag<["-"], "ffixed-r19">,
4440  HelpText<"Reserve register r19 (Hexagon only)">;
4441def mmemops : Flag<["-"], "mmemops">, Group<m_hexagon_Features_Group>,
4442  Flags<[CC1Option]>, HelpText<"Enable generation of memop instructions">;
4443def mno_memops : Flag<["-"], "mno-memops">, Group<m_hexagon_Features_Group>,
4444  Flags<[CC1Option]>, HelpText<"Disable generation of memop instructions">;
4445def mpackets : Flag<["-"], "mpackets">, Group<m_hexagon_Features_Group>,
4446  Flags<[CC1Option]>, HelpText<"Enable generation of instruction packets">;
4447def mno_packets : Flag<["-"], "mno-packets">, Group<m_hexagon_Features_Group>,
4448  Flags<[CC1Option]>, HelpText<"Disable generation of instruction packets">;
4449def mnvj : Flag<["-"], "mnvj">, Group<m_hexagon_Features_Group>,
4450  Flags<[CC1Option]>, HelpText<"Enable generation of new-value jumps">;
4451def mno_nvj : Flag<["-"], "mno-nvj">, Group<m_hexagon_Features_Group>,
4452  Flags<[CC1Option]>, HelpText<"Disable generation of new-value jumps">;
4453def mnvs : Flag<["-"], "mnvs">, Group<m_hexagon_Features_Group>,
4454  Flags<[CC1Option]>, HelpText<"Enable generation of new-value stores">;
4455def mno_nvs : Flag<["-"], "mno-nvs">, Group<m_hexagon_Features_Group>,
4456  Flags<[CC1Option]>, HelpText<"Disable generation of new-value stores">;
4457
4458// M68k features flags
4459def m68000 : Flag<["-"], "m68000">, Group<m_m68k_Features_Group>;
4460def m68010 : Flag<["-"], "m68010">, Group<m_m68k_Features_Group>;
4461def m68020 : Flag<["-"], "m68020">, Group<m_m68k_Features_Group>;
4462def m68030 : Flag<["-"], "m68030">, Group<m_m68k_Features_Group>;
4463def m68040 : Flag<["-"], "m68040">, Group<m_m68k_Features_Group>;
4464def m68060 : Flag<["-"], "m68060">, Group<m_m68k_Features_Group>;
4465
4466foreach i = {0-6} in
4467  def ffixed_a#i : Flag<["-"], "ffixed-a"#i>, Group<m_m68k_Features_Group>,
4468    HelpText<"Reserve the a"#i#" register (M68k only)">;
4469foreach i = {0-7} in
4470  def ffixed_d#i : Flag<["-"], "ffixed-d"#i>, Group<m_m68k_Features_Group>,
4471    HelpText<"Reserve the d"#i#" register (M68k only)">;
4472
4473// X86 feature flags
4474def mx87 : Flag<["-"], "mx87">, Group<m_x86_Features_Group>;
4475def mno_x87 : Flag<["-"], "mno-x87">, Group<m_x86_Features_Group>;
4476def m80387 : Flag<["-"], "m80387">, Alias<mx87>;
4477def mno_80387 : Flag<["-"], "mno-80387">, Alias<mno_x87>;
4478def mno_fp_ret_in_387 : Flag<["-"], "mno-fp-ret-in-387">, Alias<mno_x87>;
4479def mmmx : Flag<["-"], "mmmx">, Group<m_x86_Features_Group>;
4480def mno_mmx : Flag<["-"], "mno-mmx">, Group<m_x86_Features_Group>;
4481def m3dnow : Flag<["-"], "m3dnow">, Group<m_x86_Features_Group>;
4482def mno_3dnow : Flag<["-"], "mno-3dnow">, Group<m_x86_Features_Group>;
4483def m3dnowa : Flag<["-"], "m3dnowa">, Group<m_x86_Features_Group>;
4484def mno_3dnowa : Flag<["-"], "mno-3dnowa">, Group<m_x86_Features_Group>;
4485def mamx_bf16 : Flag<["-"], "mamx-bf16">, Group<m_x86_Features_Group>;
4486def mno_amx_bf16 : Flag<["-"], "mno-amx-bf16">, Group<m_x86_Features_Group>;
4487def mtamx_int8 : Flag<["-"], "mamx-int8">, Group<m_x86_Features_Group>;
4488def mno_amx_int8 : Flag<["-"], "mno-amx-int8">, Group<m_x86_Features_Group>;
4489def mamx_tile : Flag<["-"], "mamx-tile">, Group<m_x86_Features_Group>;
4490def mno_amx_tile : Flag<["-"], "mno-amx-tile">, Group<m_x86_Features_Group>;
4491def msse : Flag<["-"], "msse">, Group<m_x86_Features_Group>;
4492def mno_sse : Flag<["-"], "mno-sse">, Group<m_x86_Features_Group>;
4493def msse2 : Flag<["-"], "msse2">, Group<m_x86_Features_Group>;
4494def mno_sse2 : Flag<["-"], "mno-sse2">, Group<m_x86_Features_Group>;
4495def msse3 : Flag<["-"], "msse3">, Group<m_x86_Features_Group>;
4496def mno_sse3 : Flag<["-"], "mno-sse3">, Group<m_x86_Features_Group>;
4497def mssse3 : Flag<["-"], "mssse3">, Group<m_x86_Features_Group>;
4498def mno_ssse3 : Flag<["-"], "mno-ssse3">, Group<m_x86_Features_Group>;
4499def msse4_1 : Flag<["-"], "msse4.1">, Group<m_x86_Features_Group>;
4500def mno_sse4_1 : Flag<["-"], "mno-sse4.1">, Group<m_x86_Features_Group>;
4501def msse4_2 : Flag<["-"], "msse4.2">, Group<m_x86_Features_Group>;
4502def mno_sse4_2 : Flag<["-"], "mno-sse4.2">, Group<m_x86_Features_Group>;
4503def msse4 : Flag<["-"], "msse4">, Alias<msse4_2>;
4504// -mno-sse4 turns off sse4.1 which has the effect of turning off everything
4505// later than 4.1. -msse4 turns on 4.2 which has the effect of turning on
4506// everything earlier than 4.2.
4507def mno_sse4 : Flag<["-"], "mno-sse4">, Alias<mno_sse4_1>;
4508def msse4a : Flag<["-"], "msse4a">, Group<m_x86_Features_Group>;
4509def mno_sse4a : Flag<["-"], "mno-sse4a">, Group<m_x86_Features_Group>;
4510def mavx : Flag<["-"], "mavx">, Group<m_x86_Features_Group>;
4511def mno_avx : Flag<["-"], "mno-avx">, Group<m_x86_Features_Group>;
4512def mavx2 : Flag<["-"], "mavx2">, Group<m_x86_Features_Group>;
4513def mno_avx2 : Flag<["-"], "mno-avx2">, Group<m_x86_Features_Group>;
4514def mavx512f : Flag<["-"], "mavx512f">, Group<m_x86_Features_Group>;
4515def mno_avx512f : Flag<["-"], "mno-avx512f">, Group<m_x86_Features_Group>;
4516def mavx512bf16 : Flag<["-"], "mavx512bf16">, Group<m_x86_Features_Group>;
4517def mno_avx512bf16 : Flag<["-"], "mno-avx512bf16">, Group<m_x86_Features_Group>;
4518def mavx512bitalg : Flag<["-"], "mavx512bitalg">, Group<m_x86_Features_Group>;
4519def mno_avx512bitalg : Flag<["-"], "mno-avx512bitalg">, Group<m_x86_Features_Group>;
4520def mavx512bw : Flag<["-"], "mavx512bw">, Group<m_x86_Features_Group>;
4521def mno_avx512bw : Flag<["-"], "mno-avx512bw">, Group<m_x86_Features_Group>;
4522def mavx512cd : Flag<["-"], "mavx512cd">, Group<m_x86_Features_Group>;
4523def mno_avx512cd : Flag<["-"], "mno-avx512cd">, Group<m_x86_Features_Group>;
4524def mavx512dq : Flag<["-"], "mavx512dq">, Group<m_x86_Features_Group>;
4525def mno_avx512dq : Flag<["-"], "mno-avx512dq">, Group<m_x86_Features_Group>;
4526def mavx512er : Flag<["-"], "mavx512er">, Group<m_x86_Features_Group>;
4527def mno_avx512er : Flag<["-"], "mno-avx512er">, Group<m_x86_Features_Group>;
4528def mavx512fp16 : Flag<["-"], "mavx512fp16">, Group<m_x86_Features_Group>;
4529def mno_avx512fp16 : Flag<["-"], "mno-avx512fp16">, Group<m_x86_Features_Group>;
4530def mavx512ifma : Flag<["-"], "mavx512ifma">, Group<m_x86_Features_Group>;
4531def mno_avx512ifma : Flag<["-"], "mno-avx512ifma">, Group<m_x86_Features_Group>;
4532def mavx512pf : Flag<["-"], "mavx512pf">, Group<m_x86_Features_Group>;
4533def mno_avx512pf : Flag<["-"], "mno-avx512pf">, Group<m_x86_Features_Group>;
4534def mavx512vbmi : Flag<["-"], "mavx512vbmi">, Group<m_x86_Features_Group>;
4535def mno_avx512vbmi : Flag<["-"], "mno-avx512vbmi">, Group<m_x86_Features_Group>;
4536def mavx512vbmi2 : Flag<["-"], "mavx512vbmi2">, Group<m_x86_Features_Group>;
4537def mno_avx512vbmi2 : Flag<["-"], "mno-avx512vbmi2">, Group<m_x86_Features_Group>;
4538def mavx512vl : Flag<["-"], "mavx512vl">, Group<m_x86_Features_Group>;
4539def mno_avx512vl : Flag<["-"], "mno-avx512vl">, Group<m_x86_Features_Group>;
4540def mavx512vnni : Flag<["-"], "mavx512vnni">, Group<m_x86_Features_Group>;
4541def mno_avx512vnni : Flag<["-"], "mno-avx512vnni">, Group<m_x86_Features_Group>;
4542def mavx512vpopcntdq : Flag<["-"], "mavx512vpopcntdq">, Group<m_x86_Features_Group>;
4543def mno_avx512vpopcntdq : Flag<["-"], "mno-avx512vpopcntdq">, Group<m_x86_Features_Group>;
4544def mavx512vp2intersect : Flag<["-"], "mavx512vp2intersect">, Group<m_x86_Features_Group>;
4545def mno_avx512vp2intersect : Flag<["-"], "mno-avx512vp2intersect">, Group<m_x86_Features_Group>;
4546def mavxvnni : Flag<["-"], "mavxvnni">, Group<m_x86_Features_Group>;
4547def mno_avxvnni : Flag<["-"], "mno-avxvnni">, Group<m_x86_Features_Group>;
4548def madx : Flag<["-"], "madx">, Group<m_x86_Features_Group>;
4549def mno_adx : Flag<["-"], "mno-adx">, Group<m_x86_Features_Group>;
4550def maes : Flag<["-"], "maes">, Group<m_x86_Features_Group>;
4551def mno_aes : Flag<["-"], "mno-aes">, Group<m_x86_Features_Group>;
4552def mbmi : Flag<["-"], "mbmi">, Group<m_x86_Features_Group>;
4553def mno_bmi : Flag<["-"], "mno-bmi">, Group<m_x86_Features_Group>;
4554def mbmi2 : Flag<["-"], "mbmi2">, Group<m_x86_Features_Group>;
4555def mno_bmi2 : Flag<["-"], "mno-bmi2">, Group<m_x86_Features_Group>;
4556def mcldemote : Flag<["-"], "mcldemote">, Group<m_x86_Features_Group>;
4557def mno_cldemote : Flag<["-"], "mno-cldemote">, Group<m_x86_Features_Group>;
4558def mclflushopt : Flag<["-"], "mclflushopt">, Group<m_x86_Features_Group>;
4559def mno_clflushopt : Flag<["-"], "mno-clflushopt">, Group<m_x86_Features_Group>;
4560def mclwb : Flag<["-"], "mclwb">, Group<m_x86_Features_Group>;
4561def mno_clwb : Flag<["-"], "mno-clwb">, Group<m_x86_Features_Group>;
4562def mwbnoinvd : Flag<["-"], "mwbnoinvd">, Group<m_x86_Features_Group>;
4563def mno_wbnoinvd : Flag<["-"], "mno-wbnoinvd">, Group<m_x86_Features_Group>;
4564def mclzero : Flag<["-"], "mclzero">, Group<m_x86_Features_Group>;
4565def mno_clzero : Flag<["-"], "mno-clzero">, Group<m_x86_Features_Group>;
4566def mcrc32 : Flag<["-"], "mcrc32">, Group<m_x86_Features_Group>;
4567def mno_crc32 : Flag<["-"], "mno-crc32">, Group<m_x86_Features_Group>;
4568def mcx16 : Flag<["-"], "mcx16">, Group<m_x86_Features_Group>;
4569def mno_cx16 : Flag<["-"], "mno-cx16">, Group<m_x86_Features_Group>;
4570def menqcmd : Flag<["-"], "menqcmd">, Group<m_x86_Features_Group>;
4571def mno_enqcmd : Flag<["-"], "mno-enqcmd">, Group<m_x86_Features_Group>;
4572def mf16c : Flag<["-"], "mf16c">, Group<m_x86_Features_Group>;
4573def mno_f16c : Flag<["-"], "mno-f16c">, Group<m_x86_Features_Group>;
4574def mfma : Flag<["-"], "mfma">, Group<m_x86_Features_Group>;
4575def mno_fma : Flag<["-"], "mno-fma">, Group<m_x86_Features_Group>;
4576def mfma4 : Flag<["-"], "mfma4">, Group<m_x86_Features_Group>;
4577def mno_fma4 : Flag<["-"], "mno-fma4">, Group<m_x86_Features_Group>;
4578def mfsgsbase : Flag<["-"], "mfsgsbase">, Group<m_x86_Features_Group>;
4579def mno_fsgsbase : Flag<["-"], "mno-fsgsbase">, Group<m_x86_Features_Group>;
4580def mfxsr : Flag<["-"], "mfxsr">, Group<m_x86_Features_Group>;
4581def mno_fxsr : Flag<["-"], "mno-fxsr">, Group<m_x86_Features_Group>;
4582def minvpcid : Flag<["-"], "minvpcid">, Group<m_x86_Features_Group>;
4583def mno_invpcid : Flag<["-"], "mno-invpcid">, Group<m_x86_Features_Group>;
4584def mgfni : Flag<["-"], "mgfni">, Group<m_x86_Features_Group>;
4585def mno_gfni : Flag<["-"], "mno-gfni">, Group<m_x86_Features_Group>;
4586def mhreset : Flag<["-"], "mhreset">, Group<m_x86_Features_Group>;
4587def mno_hreset : Flag<["-"], "mno-hreset">, Group<m_x86_Features_Group>;
4588def mkl : Flag<["-"], "mkl">, Group<m_x86_Features_Group>;
4589def mno_kl : Flag<["-"], "mno-kl">, Group<m_x86_Features_Group>;
4590def mwidekl : Flag<["-"], "mwidekl">, Group<m_x86_Features_Group>;
4591def mno_widekl : Flag<["-"], "mno-widekl">, Group<m_x86_Features_Group>;
4592def mlwp : Flag<["-"], "mlwp">, Group<m_x86_Features_Group>;
4593def mno_lwp : Flag<["-"], "mno-lwp">, Group<m_x86_Features_Group>;
4594def mlzcnt : Flag<["-"], "mlzcnt">, Group<m_x86_Features_Group>;
4595def mno_lzcnt : Flag<["-"], "mno-lzcnt">, Group<m_x86_Features_Group>;
4596def mmovbe : Flag<["-"], "mmovbe">, Group<m_x86_Features_Group>;
4597def mno_movbe : Flag<["-"], "mno-movbe">, Group<m_x86_Features_Group>;
4598def mmovdiri : Flag<["-"], "mmovdiri">, Group<m_x86_Features_Group>;
4599def mno_movdiri : Flag<["-"], "mno-movdiri">, Group<m_x86_Features_Group>;
4600def mmovdir64b : Flag<["-"], "mmovdir64b">, Group<m_x86_Features_Group>;
4601def mno_movdir64b : Flag<["-"], "mno-movdir64b">, Group<m_x86_Features_Group>;
4602def mmwaitx : Flag<["-"], "mmwaitx">, Group<m_x86_Features_Group>;
4603def mno_mwaitx : Flag<["-"], "mno-mwaitx">, Group<m_x86_Features_Group>;
4604def mpku : Flag<["-"], "mpku">, Group<m_x86_Features_Group>;
4605def mno_pku : Flag<["-"], "mno-pku">, Group<m_x86_Features_Group>;
4606def mpclmul : Flag<["-"], "mpclmul">, Group<m_x86_Features_Group>;
4607def mno_pclmul : Flag<["-"], "mno-pclmul">, Group<m_x86_Features_Group>;
4608def mpconfig : Flag<["-"], "mpconfig">, Group<m_x86_Features_Group>;
4609def mno_pconfig : Flag<["-"], "mno-pconfig">, Group<m_x86_Features_Group>;
4610def mpopcnt : Flag<["-"], "mpopcnt">, Group<m_x86_Features_Group>;
4611def mno_popcnt : Flag<["-"], "mno-popcnt">, Group<m_x86_Features_Group>;
4612def mprefetchwt1 : Flag<["-"], "mprefetchwt1">, Group<m_x86_Features_Group>;
4613def mno_prefetchwt1 : Flag<["-"], "mno-prefetchwt1">, Group<m_x86_Features_Group>;
4614def mprfchw : Flag<["-"], "mprfchw">, Group<m_x86_Features_Group>;
4615def mno_prfchw : Flag<["-"], "mno-prfchw">, Group<m_x86_Features_Group>;
4616def mptwrite : Flag<["-"], "mptwrite">, Group<m_x86_Features_Group>;
4617def mno_ptwrite : Flag<["-"], "mno-ptwrite">, Group<m_x86_Features_Group>;
4618def mrdpid : Flag<["-"], "mrdpid">, Group<m_x86_Features_Group>;
4619def mno_rdpid : Flag<["-"], "mno-rdpid">, Group<m_x86_Features_Group>;
4620def mrdpru : Flag<["-"], "mrdpru">, Group<m_x86_Features_Group>;
4621def mno_rdpru : Flag<["-"], "mno-rdpru">, Group<m_x86_Features_Group>;
4622def mrdrnd : Flag<["-"], "mrdrnd">, Group<m_x86_Features_Group>;
4623def mno_rdrnd : Flag<["-"], "mno-rdrnd">, Group<m_x86_Features_Group>;
4624def mrtm : Flag<["-"], "mrtm">, Group<m_x86_Features_Group>;
4625def mno_rtm : Flag<["-"], "mno-rtm">, Group<m_x86_Features_Group>;
4626def mrdseed : Flag<["-"], "mrdseed">, Group<m_x86_Features_Group>;
4627def mno_rdseed : Flag<["-"], "mno-rdseed">, Group<m_x86_Features_Group>;
4628def msahf : Flag<["-"], "msahf">, Group<m_x86_Features_Group>;
4629def mno_sahf : Flag<["-"], "mno-sahf">, Group<m_x86_Features_Group>;
4630def mserialize : Flag<["-"], "mserialize">, Group<m_x86_Features_Group>;
4631def mno_serialize : Flag<["-"], "mno-serialize">, Group<m_x86_Features_Group>;
4632def msgx : Flag<["-"], "msgx">, Group<m_x86_Features_Group>;
4633def mno_sgx : Flag<["-"], "mno-sgx">, Group<m_x86_Features_Group>;
4634def msha : Flag<["-"], "msha">, Group<m_x86_Features_Group>;
4635def mno_sha : Flag<["-"], "mno-sha">, Group<m_x86_Features_Group>;
4636def mtbm : Flag<["-"], "mtbm">, Group<m_x86_Features_Group>;
4637def mno_tbm : Flag<["-"], "mno-tbm">, Group<m_x86_Features_Group>;
4638def mtsxldtrk : Flag<["-"], "mtsxldtrk">, Group<m_x86_Features_Group>;
4639def mno_tsxldtrk : Flag<["-"], "mno-tsxldtrk">, Group<m_x86_Features_Group>;
4640def muintr : Flag<["-"], "muintr">, Group<m_x86_Features_Group>;
4641def mno_uintr : Flag<["-"], "mno-uintr">, Group<m_x86_Features_Group>;
4642def mvaes : Flag<["-"], "mvaes">, Group<m_x86_Features_Group>;
4643def mno_vaes : Flag<["-"], "mno-vaes">, Group<m_x86_Features_Group>;
4644def mvpclmulqdq : Flag<["-"], "mvpclmulqdq">, Group<m_x86_Features_Group>;
4645def mno_vpclmulqdq : Flag<["-"], "mno-vpclmulqdq">, Group<m_x86_Features_Group>;
4646def mwaitpkg : Flag<["-"], "mwaitpkg">, Group<m_x86_Features_Group>;
4647def mno_waitpkg : Flag<["-"], "mno-waitpkg">, Group<m_x86_Features_Group>;
4648def mxop : Flag<["-"], "mxop">, Group<m_x86_Features_Group>;
4649def mno_xop : Flag<["-"], "mno-xop">, Group<m_x86_Features_Group>;
4650def mxsave : Flag<["-"], "mxsave">, Group<m_x86_Features_Group>;
4651def mno_xsave : Flag<["-"], "mno-xsave">, Group<m_x86_Features_Group>;
4652def mxsavec : Flag<["-"], "mxsavec">, Group<m_x86_Features_Group>;
4653def mno_xsavec : Flag<["-"], "mno-xsavec">, Group<m_x86_Features_Group>;
4654def mxsaveopt : Flag<["-"], "mxsaveopt">, Group<m_x86_Features_Group>;
4655def mno_xsaveopt : Flag<["-"], "mno-xsaveopt">, Group<m_x86_Features_Group>;
4656def mxsaves : Flag<["-"], "mxsaves">, Group<m_x86_Features_Group>;
4657def mno_xsaves : Flag<["-"], "mno-xsaves">, Group<m_x86_Features_Group>;
4658def mshstk : Flag<["-"], "mshstk">, Group<m_x86_Features_Group>;
4659def mno_shstk : Flag<["-"], "mno-shstk">, Group<m_x86_Features_Group>;
4660def mretpoline_external_thunk : Flag<["-"], "mretpoline-external-thunk">, Group<m_x86_Features_Group>;
4661def mno_retpoline_external_thunk : Flag<["-"], "mno-retpoline-external-thunk">, Group<m_x86_Features_Group>;
4662def mvzeroupper : Flag<["-"], "mvzeroupper">, Group<m_x86_Features_Group>;
4663def mno_vzeroupper : Flag<["-"], "mno-vzeroupper">, Group<m_x86_Features_Group>;
4664
4665// These are legacy user-facing driver-level option spellings. They are always
4666// aliases for options that are spelled using the more common Unix / GNU flag
4667// style of double-dash and equals-joined flags.
4668def target_legacy_spelling : Separate<["-"], "target">,
4669                             Alias<target>,
4670                             Flags<[CoreOption]>;
4671
4672// Special internal option to handle -Xlinker --no-demangle.
4673def Z_Xlinker__no_demangle : Flag<["-"], "Z-Xlinker-no-demangle">,
4674    Flags<[Unsupported, NoArgumentUnused]>;
4675
4676// Special internal option to allow forwarding arbitrary arguments to linker.
4677def Zlinker_input : Separate<["-"], "Zlinker-input">,
4678    Flags<[Unsupported, NoArgumentUnused]>;
4679
4680// Reserved library options.
4681def Z_reserved_lib_stdcxx : Flag<["-"], "Z-reserved-lib-stdc++">,
4682    Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, Group<reserved_lib_Group>;
4683def Z_reserved_lib_cckext : Flag<["-"], "Z-reserved-lib-cckext">,
4684    Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, Group<reserved_lib_Group>;
4685
4686// Ignored options
4687multiclass BooleanFFlag<string name> {
4688  def f#NAME : Flag<["-"], "f"#name>;
4689  def fno_#NAME : Flag<["-"], "fno-"#name>;
4690}
4691
4692defm : BooleanFFlag<"keep-inline-functions">, Group<clang_ignored_gcc_optimization_f_Group>;
4693
4694def fprofile_dir : Joined<["-"], "fprofile-dir=">, Group<f_Group>;
4695
4696// The default value matches BinutilsVersion in MCAsmInfo.h.
4697def fbinutils_version_EQ : Joined<["-"], "fbinutils-version=">,
4698  MetaVarName<"<major.minor>">, Group<f_Group>, Flags<[CC1Option]>,
4699  HelpText<"Produced object files can use all ELF features supported by this "
4700  "binutils version and newer. If -fno-integrated-as is specified, the "
4701  "generated assembly will consider GNU as support. 'none' means that all ELF "
4702  "features can be used, regardless of binutils support. Defaults to 2.26.">;
4703def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group<f_Group>, Flags<[CoreOption, LinkOption]>;
4704def ld_path_EQ : Joined<["--"], "ld-path=">, Group<Link_Group>;
4705
4706defm align_labels : BooleanFFlag<"align-labels">, Group<clang_ignored_gcc_optimization_f_Group>;
4707def falign_labels_EQ : Joined<["-"], "falign-labels=">, Group<clang_ignored_gcc_optimization_f_Group>;
4708defm align_loops : BooleanFFlag<"align-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
4709defm align_jumps : BooleanFFlag<"align-jumps">, Group<clang_ignored_gcc_optimization_f_Group>;
4710def falign_jumps_EQ : Joined<["-"], "falign-jumps=">, Group<clang_ignored_gcc_optimization_f_Group>;
4711
4712// FIXME: This option should be supported and wired up to our diognostics, but
4713// ignore it for now to avoid breaking builds that use it.
4714def fdiagnostics_show_location_EQ : Joined<["-"], "fdiagnostics-show-location=">, Group<clang_ignored_f_Group>;
4715
4716defm fcheck_new : BooleanFFlag<"check-new">, Group<clang_ignored_f_Group>;
4717defm caller_saves : BooleanFFlag<"caller-saves">, Group<clang_ignored_gcc_optimization_f_Group>;
4718defm reorder_blocks : BooleanFFlag<"reorder-blocks">, Group<clang_ignored_gcc_optimization_f_Group>;
4719defm branch_count_reg : BooleanFFlag<"branch-count-reg">, Group<clang_ignored_gcc_optimization_f_Group>;
4720defm default_inline : BooleanFFlag<"default-inline">, Group<clang_ignored_gcc_optimization_f_Group>;
4721defm fat_lto_objects : BooleanFFlag<"fat-lto-objects">, Group<clang_ignored_gcc_optimization_f_Group>;
4722defm float_store : BooleanFFlag<"float-store">, Group<clang_ignored_gcc_optimization_f_Group>;
4723defm friend_injection : BooleanFFlag<"friend-injection">, Group<clang_ignored_f_Group>;
4724defm function_attribute_list : BooleanFFlag<"function-attribute-list">, Group<clang_ignored_f_Group>;
4725defm gcse : BooleanFFlag<"gcse">, Group<clang_ignored_gcc_optimization_f_Group>;
4726defm gcse_after_reload: BooleanFFlag<"gcse-after-reload">, Group<clang_ignored_gcc_optimization_f_Group>;
4727defm gcse_las: BooleanFFlag<"gcse-las">, Group<clang_ignored_gcc_optimization_f_Group>;
4728defm gcse_sm: BooleanFFlag<"gcse-sm">, Group<clang_ignored_gcc_optimization_f_Group>;
4729defm gnu : BooleanFFlag<"gnu">, Group<clang_ignored_f_Group>;
4730defm implicit_templates : BooleanFFlag<"implicit-templates">, Group<clang_ignored_f_Group>;
4731defm implement_inlines : BooleanFFlag<"implement-inlines">, Group<clang_ignored_f_Group>;
4732defm merge_constants : BooleanFFlag<"merge-constants">, Group<clang_ignored_gcc_optimization_f_Group>;
4733defm modulo_sched : BooleanFFlag<"modulo-sched">, Group<clang_ignored_gcc_optimization_f_Group>;
4734defm modulo_sched_allow_regmoves : BooleanFFlag<"modulo-sched-allow-regmoves">,
4735    Group<clang_ignored_gcc_optimization_f_Group>;
4736defm inline_functions_called_once : BooleanFFlag<"inline-functions-called-once">,
4737    Group<clang_ignored_gcc_optimization_f_Group>;
4738def finline_limit_EQ : Joined<["-"], "finline-limit=">, Group<clang_ignored_gcc_optimization_f_Group>;
4739defm finline_limit : BooleanFFlag<"inline-limit">, Group<clang_ignored_gcc_optimization_f_Group>;
4740defm inline_small_functions : BooleanFFlag<"inline-small-functions">,
4741    Group<clang_ignored_gcc_optimization_f_Group>;
4742defm ipa_cp : BooleanFFlag<"ipa-cp">,
4743    Group<clang_ignored_gcc_optimization_f_Group>;
4744defm ivopts : BooleanFFlag<"ivopts">, Group<clang_ignored_gcc_optimization_f_Group>;
4745defm semantic_interposition : BoolFOption<"semantic-interposition",
4746  LangOpts<"SemanticInterposition">, DefaultFalse,
4747  PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>;
4748defm non_call_exceptions : BooleanFFlag<"non-call-exceptions">, Group<clang_ignored_f_Group>;
4749defm peel_loops : BooleanFFlag<"peel-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
4750defm permissive : BooleanFFlag<"permissive">, Group<clang_ignored_f_Group>;
4751defm prefetch_loop_arrays : BooleanFFlag<"prefetch-loop-arrays">, Group<clang_ignored_gcc_optimization_f_Group>;
4752defm printf : BooleanFFlag<"printf">, Group<clang_ignored_f_Group>;
4753defm profile : BooleanFFlag<"profile">, Group<clang_ignored_f_Group>;
4754defm profile_correction : BooleanFFlag<"profile-correction">, Group<clang_ignored_gcc_optimization_f_Group>;
4755defm profile_generate_sampling : BooleanFFlag<"profile-generate-sampling">, Group<clang_ignored_f_Group>;
4756defm profile_reusedist : BooleanFFlag<"profile-reusedist">, Group<clang_ignored_f_Group>;
4757defm profile_values : BooleanFFlag<"profile-values">, Group<clang_ignored_gcc_optimization_f_Group>;
4758defm regs_graph : BooleanFFlag<"regs-graph">, Group<clang_ignored_f_Group>;
4759defm rename_registers : BooleanFFlag<"rename-registers">, Group<clang_ignored_gcc_optimization_f_Group>;
4760defm ripa : BooleanFFlag<"ripa">, Group<clang_ignored_f_Group>;
4761defm schedule_insns : BooleanFFlag<"schedule-insns">, Group<clang_ignored_gcc_optimization_f_Group>;
4762defm schedule_insns2 : BooleanFFlag<"schedule-insns2">, Group<clang_ignored_gcc_optimization_f_Group>;
4763defm see : BooleanFFlag<"see">, Group<clang_ignored_f_Group>;
4764defm signaling_nans : BooleanFFlag<"signaling-nans">, Group<clang_ignored_gcc_optimization_f_Group>;
4765defm single_precision_constant : BooleanFFlag<"single-precision-constant">,
4766    Group<clang_ignored_gcc_optimization_f_Group>;
4767defm spec_constr_count : BooleanFFlag<"spec-constr-count">, Group<clang_ignored_f_Group>;
4768defm stack_check : BooleanFFlag<"stack-check">, Group<clang_ignored_f_Group>;
4769defm strength_reduce :
4770    BooleanFFlag<"strength-reduce">, Group<clang_ignored_gcc_optimization_f_Group>;
4771defm tls_model : BooleanFFlag<"tls-model">, Group<clang_ignored_f_Group>;
4772defm tracer : BooleanFFlag<"tracer">, Group<clang_ignored_gcc_optimization_f_Group>;
4773defm tree_dce : BooleanFFlag<"tree-dce">, Group<clang_ignored_gcc_optimization_f_Group>;
4774defm tree_salias : BooleanFFlag<"tree-salias">, Group<clang_ignored_f_Group>;
4775defm tree_ter : BooleanFFlag<"tree-ter">, Group<clang_ignored_gcc_optimization_f_Group>;
4776defm tree_vectorizer_verbose : BooleanFFlag<"tree-vectorizer-verbose">, Group<clang_ignored_f_Group>;
4777defm tree_vrp : BooleanFFlag<"tree-vrp">, Group<clang_ignored_gcc_optimization_f_Group>;
4778defm : BooleanFFlag<"unit-at-a-time">, Group<clang_ignored_gcc_optimization_f_Group>;
4779defm unroll_all_loops : BooleanFFlag<"unroll-all-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
4780defm unsafe_loop_optimizations : BooleanFFlag<"unsafe-loop-optimizations">,
4781    Group<clang_ignored_gcc_optimization_f_Group>;
4782defm unswitch_loops : BooleanFFlag<"unswitch-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
4783defm use_linker_plugin : BooleanFFlag<"use-linker-plugin">, Group<clang_ignored_gcc_optimization_f_Group>;
4784defm vect_cost_model : BooleanFFlag<"vect-cost-model">, Group<clang_ignored_gcc_optimization_f_Group>;
4785defm variable_expansion_in_unroller : BooleanFFlag<"variable-expansion-in-unroller">,
4786    Group<clang_ignored_gcc_optimization_f_Group>;
4787defm web : BooleanFFlag<"web">, Group<clang_ignored_gcc_optimization_f_Group>;
4788defm whole_program : BooleanFFlag<"whole-program">, Group<clang_ignored_gcc_optimization_f_Group>;
4789defm devirtualize : BooleanFFlag<"devirtualize">, Group<clang_ignored_gcc_optimization_f_Group>;
4790defm devirtualize_speculatively : BooleanFFlag<"devirtualize-speculatively">,
4791    Group<clang_ignored_gcc_optimization_f_Group>;
4792
4793// Generic gfortran options.
4794def A_DASH : Joined<["-"], "A-">, Group<gfortran_Group>;
4795def static_libgfortran : Flag<["-"], "static-libgfortran">, Group<gfortran_Group>;
4796
4797// "f" options with values for gfortran.
4798def fblas_matmul_limit_EQ : Joined<["-"], "fblas-matmul-limit=">, Group<gfortran_Group>;
4799def fcheck_EQ : Joined<["-"], "fcheck=">, Group<gfortran_Group>;
4800def fcoarray_EQ : Joined<["-"], "fcoarray=">, Group<gfortran_Group>;
4801def fconvert_EQ : Joined<["-"], "fconvert=">, Group<gfortran_Group>;
4802def ffpe_trap_EQ : Joined<["-"], "ffpe-trap=">, Group<gfortran_Group>;
4803def ffree_line_length_VALUE : Joined<["-"], "ffree-line-length-">, Group<gfortran_Group>;
4804def finit_character_EQ : Joined<["-"], "finit-character=">, Group<gfortran_Group>;
4805def finit_integer_EQ : Joined<["-"], "finit-integer=">, Group<gfortran_Group>;
4806def finit_logical_EQ : Joined<["-"], "finit-logical=">, Group<gfortran_Group>;
4807def finit_real_EQ : Joined<["-"], "finit-real=">, Group<gfortran_Group>;
4808def fmax_array_constructor_EQ : Joined<["-"], "fmax-array-constructor=">, Group<gfortran_Group>;
4809def fmax_errors_EQ : Joined<["-"], "fmax-errors=">, Group<gfortran_Group>;
4810def fmax_stack_var_size_EQ : Joined<["-"], "fmax-stack-var-size=">, Group<gfortran_Group>;
4811def fmax_subrecord_length_EQ : Joined<["-"], "fmax-subrecord-length=">, Group<gfortran_Group>;
4812def frecord_marker_EQ : Joined<["-"], "frecord-marker=">, Group<gfortran_Group>;
4813
4814// "f" flags for gfortran.
4815defm aggressive_function_elimination : BooleanFFlag<"aggressive-function-elimination">, Group<gfortran_Group>;
4816defm align_commons : BooleanFFlag<"align-commons">, Group<gfortran_Group>;
4817defm all_intrinsics : BooleanFFlag<"all-intrinsics">, Group<gfortran_Group>;
4818def fautomatic : Flag<["-"], "fautomatic">; // -fno-automatic is significant
4819defm backtrace : BooleanFFlag<"backtrace">, Group<gfortran_Group>;
4820defm bounds_check : BooleanFFlag<"bounds-check">, Group<gfortran_Group>;
4821defm check_array_temporaries : BooleanFFlag<"check-array-temporaries">, Group<gfortran_Group>;
4822defm cray_pointer : BooleanFFlag<"cray-pointer">, Group<gfortran_Group>;
4823defm d_lines_as_code : BooleanFFlag<"d-lines-as-code">, Group<gfortran_Group>;
4824defm d_lines_as_comments : BooleanFFlag<"d-lines-as-comments">, Group<gfortran_Group>;
4825defm dollar_ok : BooleanFFlag<"dollar-ok">, Group<gfortran_Group>;
4826defm dump_fortran_optimized : BooleanFFlag<"dump-fortran-optimized">, Group<gfortran_Group>;
4827defm dump_fortran_original : BooleanFFlag<"dump-fortran-original">, Group<gfortran_Group>;
4828defm dump_parse_tree : BooleanFFlag<"dump-parse-tree">, Group<gfortran_Group>;
4829defm external_blas : BooleanFFlag<"external-blas">, Group<gfortran_Group>;
4830defm f2c : BooleanFFlag<"f2c">, Group<gfortran_Group>;
4831defm frontend_optimize : BooleanFFlag<"frontend-optimize">, Group<gfortran_Group>;
4832defm init_local_zero : BooleanFFlag<"init-local-zero">, Group<gfortran_Group>;
4833defm integer_4_integer_8 : BooleanFFlag<"integer-4-integer-8">, Group<gfortran_Group>;
4834defm max_identifier_length : BooleanFFlag<"max-identifier-length">, Group<gfortran_Group>;
4835defm module_private : BooleanFFlag<"module-private">, Group<gfortran_Group>;
4836defm pack_derived : BooleanFFlag<"pack-derived">, Group<gfortran_Group>;
4837//defm protect_parens : BooleanFFlag<"protect-parens">, Group<gfortran_Group>;
4838defm range_check : BooleanFFlag<"range-check">, Group<gfortran_Group>;
4839defm real_4_real_10 : BooleanFFlag<"real-4-real-10">, Group<gfortran_Group>;
4840defm real_4_real_16 : BooleanFFlag<"real-4-real-16">, Group<gfortran_Group>;
4841defm real_4_real_8 : BooleanFFlag<"real-4-real-8">, Group<gfortran_Group>;
4842defm real_8_real_10 : BooleanFFlag<"real-8-real-10">, Group<gfortran_Group>;
4843defm real_8_real_16 : BooleanFFlag<"real-8-real-16">, Group<gfortran_Group>;
4844defm real_8_real_4 : BooleanFFlag<"real-8-real-4">, Group<gfortran_Group>;
4845defm realloc_lhs : BooleanFFlag<"realloc-lhs">, Group<gfortran_Group>;
4846defm recursive : BooleanFFlag<"recursive">, Group<gfortran_Group>;
4847defm repack_arrays : BooleanFFlag<"repack-arrays">, Group<gfortran_Group>;
4848defm second_underscore : BooleanFFlag<"second-underscore">, Group<gfortran_Group>;
4849defm sign_zero : BooleanFFlag<"sign-zero">, Group<gfortran_Group>;
4850defm stack_arrays : BooleanFFlag<"stack-arrays">, Group<gfortran_Group>;
4851defm underscoring : BooleanFFlag<"underscoring">, Group<gfortran_Group>;
4852defm whole_file : BooleanFFlag<"whole-file">, Group<gfortran_Group>;
4853
4854// C++ SYCL options
4855def fsycl : Flag<["-"], "fsycl">, Flags<[NoXarchOption, CoreOption]>,
4856  Group<sycl_Group>, HelpText<"Enables SYCL kernels compilation for device">;
4857def fno_sycl : Flag<["-"], "fno-sycl">, Flags<[NoXarchOption, CoreOption]>,
4858  Group<sycl_Group>, HelpText<"Disables SYCL kernels compilation for device">;
4859
4860//===----------------------------------------------------------------------===//
4861// FLangOption + NoXarchOption
4862//===----------------------------------------------------------------------===//
4863
4864def flang_experimental_exec : Flag<["-"], "flang-experimental-exec">,
4865  Flags<[FlangOption, FlangOnlyOption, NoXarchOption, HelpHidden]>,
4866  HelpText<"Enable support for generating executables (experimental)">;
4867
4868//===----------------------------------------------------------------------===//
4869// FLangOption + CoreOption + NoXarchOption
4870//===----------------------------------------------------------------------===//
4871
4872def Xflang : Separate<["-"], "Xflang">,
4873  HelpText<"Pass <arg> to the flang compiler">, MetaVarName<"<arg>">,
4874  Flags<[FlangOption, FlangOnlyOption, NoXarchOption, CoreOption]>,
4875  Group<CompileOnly_Group>;
4876
4877//===----------------------------------------------------------------------===//
4878// FlangOption and FC1 Options
4879//===----------------------------------------------------------------------===//
4880
4881let Flags = [FC1Option, FlangOption, FlangOnlyOption] in {
4882
4883def cpp : Flag<["-"], "cpp">, Group<f_Group>,
4884  HelpText<"Enable predefined and command line preprocessor macros">;
4885def nocpp : Flag<["-"], "nocpp">, Group<f_Group>,
4886  HelpText<"Disable predefined and command line preprocessor macros">;
4887def module_dir : JoinedOrSeparate<["-"], "module-dir">, MetaVarName<"<dir>">,
4888  HelpText<"Put MODULE files in <dir>">,
4889  DocBrief<[{This option specifies where to put .mod files for compiled modules.
4890It is also added to the list of directories to be searched by an USE statement.
4891The default is the current directory.}]>;
4892
4893def ffixed_form : Flag<["-"], "ffixed-form">, Group<f_Group>,
4894  HelpText<"Process source files in fixed form">;
4895def ffree_form : Flag<["-"], "ffree-form">, Group<f_Group>,
4896  HelpText<"Process source files in free form">;
4897def ffixed_line_length_EQ : Joined<["-"], "ffixed-line-length=">, Group<f_Group>,
4898  HelpText<"Use <value> as character line width in fixed mode">,
4899  DocBrief<[{Set column after which characters are ignored in typical fixed-form lines in the source
4900file}]>;
4901def ffixed_line_length_VALUE : Joined<["-"], "ffixed-line-length-">, Group<f_Group>, Alias<ffixed_line_length_EQ>;
4902def fopenacc : Flag<["-"], "fopenacc">, Group<f_Group>,
4903  HelpText<"Enable OpenACC">;
4904def fdefault_double_8 : Flag<["-"],"fdefault-double-8">, Group<f_Group>,
4905  HelpText<"Set the default double precision kind to an 8 byte wide type">;
4906def fdefault_integer_8 : Flag<["-"],"fdefault-integer-8">, Group<f_Group>,
4907  HelpText<"Set the default integer kind to an 8 byte wide type">;
4908def fdefault_real_8 : Flag<["-"],"fdefault-real-8">, Group<f_Group>,
4909  HelpText<"Set the default real kind to an 8 byte wide type">;
4910def flarge_sizes : Flag<["-"],"flarge-sizes">, Group<f_Group>,
4911  HelpText<"Use INTEGER(KIND=8) for the result type in size-related intrinsics">;
4912
4913def falternative_parameter_statement : Flag<["-"], "falternative-parameter-statement">, Group<f_Group>,
4914  HelpText<"Enable the old style PARAMETER statement">;
4915def fintrinsic_modules_path : Separate<["-"], "fintrinsic-modules-path">,  Group<f_Group>, MetaVarName<"<dir>">,
4916  HelpText<"Specify where to find the compiled intrinsic modules">,
4917  DocBrief<[{This option specifies the location of pre-compiled intrinsic modules,
4918  if they are not in the default location expected by the compiler.}]>;
4919
4920defm backslash : OptInFC1FFlag<"backslash", "Specify that backslash in string introduces an escape character">;
4921defm xor_operator : OptInFC1FFlag<"xor-operator", "Enable .XOR. as a synonym of .NEQV.">;
4922defm logical_abbreviations : OptInFC1FFlag<"logical-abbreviations", "Enable logical abbreviations">;
4923defm implicit_none : OptInFC1FFlag<"implicit-none", "No implicit typing allowed unless overridden by IMPLICIT statements">;
4924
4925def fno_automatic : Flag<["-"], "fno-automatic">, Group<f_Group>,
4926  HelpText<"Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE">;
4927
4928} // let Flags = [FC1Option, FlangOption, FlangOnlyOption]
4929
4930def J : JoinedOrSeparate<["-"], "J">,
4931  Flags<[RenderJoined, FlangOption, FC1Option, FlangOnlyOption]>,
4932  Group<gfortran_Group>,
4933  Alias<module_dir>;
4934
4935//===----------------------------------------------------------------------===//
4936// FC1 Options
4937//===----------------------------------------------------------------------===//
4938
4939let Flags = [FC1Option, FlangOnlyOption] in {
4940
4941def fget_definition : MultiArg<["-"], "fget-definition", 3>,
4942  HelpText<"Get the symbol definition from <line> <start-column> <end-column>">,
4943  Group<Action_Group>;
4944def test_io : Flag<["-"], "test-io">, Group<Action_Group>,
4945  HelpText<"Run the InputOuputTest action. Use for development and testing only.">;
4946def fdebug_unparse_no_sema : Flag<["-"], "fdebug-unparse-no-sema">, Group<Action_Group>,
4947  HelpText<"Unparse and stop (skips the semantic checks)">,
4948  DocBrief<[{Only run the parser, then unparse the parse-tree and output the
4949generated Fortran source file. Semantic checks are disabled.}]>;
4950def fdebug_unparse : Flag<["-"], "fdebug-unparse">, Group<Action_Group>,
4951  HelpText<"Unparse and stop.">,
4952  DocBrief<[{Run the parser and the semantic checks. Then unparse the
4953parse-tree and output the generated Fortran source file.}]>;
4954def fdebug_unparse_with_symbols : Flag<["-"], "fdebug-unparse-with-symbols">, Group<Action_Group>,
4955  HelpText<"Unparse and stop.">;
4956def fdebug_dump_symbols : Flag<["-"], "fdebug-dump-symbols">, Group<Action_Group>,
4957  HelpText<"Dump symbols after the semantic analysis">;
4958def fdebug_dump_parse_tree : Flag<["-"], "fdebug-dump-parse-tree">, Group<Action_Group>,
4959  HelpText<"Dump the parse tree">,
4960  DocBrief<[{Run the Parser and the semantic checks, and then output the
4961parse tree.}]>;
4962def fdebug_dump_pft : Flag<["-"], "fdebug-dump-pft">, Group<Action_Group>,
4963  HelpText<"Dump the pre-fir parse tree">;
4964def fdebug_dump_parse_tree_no_sema : Flag<["-"], "fdebug-dump-parse-tree-no-sema">, Group<Action_Group>,
4965  HelpText<"Dump the parse tree (skips the semantic checks)">,
4966  DocBrief<[{Run the Parser and then output the parse tree. Semantic
4967checks are disabled.}]>;
4968def fdebug_dump_all : Flag<["-"], "fdebug-dump-all">, Group<Action_Group>,
4969  HelpText<"Dump symbols and the parse tree after the semantic checks">;
4970def fdebug_dump_provenance : Flag<["-"], "fdebug-dump-provenance">, Group<Action_Group>,
4971  HelpText<"Dump provenance">;
4972def fdebug_dump_parsing_log : Flag<["-"], "fdebug-dump-parsing-log">, Group<Action_Group>,
4973  HelpText<"Run instrumented parse and dump the parsing log">;
4974def fdebug_measure_parse_tree : Flag<["-"], "fdebug-measure-parse-tree">, Group<Action_Group>,
4975  HelpText<"Measure the parse tree">;
4976def fdebug_pre_fir_tree : Flag<["-"], "fdebug-pre-fir-tree">, Group<Action_Group>,
4977  HelpText<"Dump the pre-FIR tree">;
4978def fdebug_module_writer : Flag<["-"],"fdebug-module-writer">,
4979  HelpText<"Enable debug messages while writing module files">;
4980def fget_symbols_sources : Flag<["-"], "fget-symbols-sources">, Group<Action_Group>,
4981  HelpText<"Dump symbols and their source code locations">;
4982
4983def module_suffix : Separate<["-"], "module-suffix">,  Group<f_Group>, MetaVarName<"<suffix>">,
4984  HelpText<"Use <suffix> as the suffix for module files (the default value is `.mod`)">;
4985def fno_reformat : Flag<["-"], "fno-reformat">, Group<Preprocessor_Group>,
4986  HelpText<"Dump the cooked character stream in -E mode">;
4987defm analyzed_objects_for_unparse : OptOutFC1FFlag<"analyzed-objects-for-unparse", "", "Do not use the analyzed objects when unparsing">;
4988
4989def emit_mlir : Flag<["-"], "emit-mlir">, Group<Action_Group>,
4990  HelpText<"Build the parse tree, then lower it to MLIR">;
4991def emit_fir : Flag<["-"], "emit-fir">, Alias<emit_mlir>;
4992
4993} // let Flags = [FC1Option, FlangOnlyOption]
4994
4995//===----------------------------------------------------------------------===//
4996// Target Options (cc1 + cc1as)
4997//===----------------------------------------------------------------------===//
4998
4999let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
5000
5001def target_cpu : Separate<["-"], "target-cpu">,
5002  HelpText<"Target a specific cpu type">,
5003  MarshallingInfoString<TargetOpts<"CPU">>;
5004def tune_cpu : Separate<["-"], "tune-cpu">,
5005  HelpText<"Tune for a specific cpu type">,
5006  MarshallingInfoString<TargetOpts<"TuneCPU">>;
5007def target_feature : Separate<["-"], "target-feature">,
5008  HelpText<"Target specific attributes">,
5009  MarshallingInfoStringVector<TargetOpts<"FeaturesAsWritten">>;
5010def target_abi : Separate<["-"], "target-abi">,
5011  HelpText<"Target a particular ABI type">,
5012  MarshallingInfoString<TargetOpts<"ABI">>;
5013def target_sdk_version_EQ : Joined<["-"], "target-sdk-version=">,
5014  HelpText<"The version of target SDK used for compilation">;
5015def darwin_target_variant_sdk_version_EQ : Joined<["-"],
5016  "darwin-target-variant-sdk-version=">,
5017  HelpText<"The version of darwin target variant SDK used for compilation">;
5018
5019} // let Flags = [CC1Option, CC1AsOption, NoDriverOption]
5020
5021let Flags = [CC1Option, CC1AsOption] in {
5022
5023def darwin_target_variant_triple : Separate<["-"], "darwin-target-variant-triple">,
5024  HelpText<"Specify the darwin target variant triple">,
5025  MarshallingInfoString<TargetOpts<"DarwinTargetVariantTriple">>,
5026  Normalizer<"normalizeTriple">;
5027
5028} // let Flags = [CC1Option, CC1AsOption]
5029
5030//===----------------------------------------------------------------------===//
5031// Target Options (cc1 + cc1as + fc1)
5032//===----------------------------------------------------------------------===//
5033
5034let Flags = [CC1Option, CC1AsOption, FC1Option, NoDriverOption] in {
5035
5036def triple : Separate<["-"], "triple">,
5037  HelpText<"Specify target triple (e.g. i686-apple-darwin9)">,
5038  MarshallingInfoString<TargetOpts<"Triple">, "llvm::Triple::normalize(llvm::sys::getDefaultTargetTriple())">,
5039  AlwaysEmit, Normalizer<"normalizeTriple">;
5040
5041} // let Flags = [CC1Option, CC1ASOption, FC1Option, NoDriverOption]
5042
5043//===----------------------------------------------------------------------===//
5044// Target Options (other)
5045//===----------------------------------------------------------------------===//
5046
5047let Flags = [CC1Option, NoDriverOption] in {
5048
5049def target_linker_version : Separate<["-"], "target-linker-version">,
5050  HelpText<"Target linker version">,
5051  MarshallingInfoString<TargetOpts<"LinkerVersion">>;
5052def triple_EQ : Joined<["-"], "triple=">, Alias<triple>;
5053def mfpmath : Separate<["-"], "mfpmath">,
5054  HelpText<"Which unit to use for fp math">,
5055  MarshallingInfoString<TargetOpts<"FPMath">>;
5056
5057defm padding_on_unsigned_fixed_point : BoolOption<"f", "padding-on-unsigned-fixed-point",
5058  LangOpts<"PaddingOnUnsignedFixedPoint">, DefaultFalse,
5059  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">,
5060  NegFlag<SetFalse>>,
5061  ShouldParseIf<ffixed_point.KeyPath>;
5062
5063} // let Flags = [CC1Option, NoDriverOption]
5064
5065//===----------------------------------------------------------------------===//
5066// Analyzer Options
5067//===----------------------------------------------------------------------===//
5068
5069let Flags = [CC1Option, NoDriverOption] in {
5070
5071def analysis_UnoptimizedCFG : Flag<["-"], "unoptimized-cfg">,
5072  HelpText<"Generate unoptimized CFGs for all analyses">,
5073  MarshallingInfoFlag<AnalyzerOpts<"UnoptimizedCFG">>;
5074def analysis_CFGAddImplicitDtors : Flag<["-"], "cfg-add-implicit-dtors">,
5075  HelpText<"Add C++ implicit destructors to CFGs for all analyses">;
5076
5077// We should remove this option in clang-16 release.
5078def analyzer_store : Separate<["-"], "analyzer-store">,
5079  HelpText<"Source Code Analysis - Abstract Memory Store Models [DEPRECATED, removing in clang-16]">;
5080def analyzer_store_EQ : Joined<["-"], "analyzer-store=">, Alias<analyzer_store>;
5081
5082def analyzer_constraints : Separate<["-"], "analyzer-constraints">,
5083  HelpText<"Source Code Analysis - Symbolic Constraint Engines">;
5084def analyzer_constraints_EQ : Joined<["-"], "analyzer-constraints=">,
5085  Alias<analyzer_constraints>;
5086
5087def analyzer_output : Separate<["-"], "analyzer-output">,
5088  HelpText<"Source Code Analysis - Output Options">;
5089def analyzer_output_EQ : Joined<["-"], "analyzer-output=">,
5090  Alias<analyzer_output>;
5091
5092def analyzer_purge : Separate<["-"], "analyzer-purge">,
5093  HelpText<"Source Code Analysis - Dead Symbol Removal Frequency">;
5094def analyzer_purge_EQ : Joined<["-"], "analyzer-purge=">, Alias<analyzer_purge>;
5095
5096def analyzer_opt_analyze_headers : Flag<["-"], "analyzer-opt-analyze-headers">,
5097  HelpText<"Force the static analyzer to analyze functions defined in header files">,
5098  MarshallingInfoFlag<AnalyzerOpts<"AnalyzeAll">>;
5099// We should remove this option in clang-16 release.
5100def analyzer_opt_analyze_nested_blocks : Flag<["-"], "analyzer-opt-analyze-nested-blocks">,
5101  HelpText<"Analyze the definitions of blocks in addition to functions [DEPRECATED, removing in clang-16]">;
5102def analyzer_display_progress : Flag<["-"], "analyzer-display-progress">,
5103  HelpText<"Emit verbose output about the analyzer's progress">,
5104  MarshallingInfoFlag<AnalyzerOpts<"AnalyzerDisplayProgress">>;
5105def analyze_function : Separate<["-"], "analyze-function">,
5106  HelpText<"Run analysis on specific function (for C++ include parameters in name)">,
5107  MarshallingInfoString<AnalyzerOpts<"AnalyzeSpecificFunction">>;
5108def analyze_function_EQ : Joined<["-"], "analyze-function=">, Alias<analyze_function>;
5109def trim_egraph : Flag<["-"], "trim-egraph">,
5110  HelpText<"Only show error-related paths in the analysis graph">,
5111  MarshallingInfoFlag<AnalyzerOpts<"TrimGraph">>;
5112def analyzer_viz_egraph_graphviz : Flag<["-"], "analyzer-viz-egraph-graphviz">,
5113  HelpText<"Display exploded graph using GraphViz">,
5114  MarshallingInfoFlag<AnalyzerOpts<"visualizeExplodedGraphWithGraphViz">>;
5115def analyzer_dump_egraph : Separate<["-"], "analyzer-dump-egraph">,
5116  HelpText<"Dump exploded graph to the specified file">,
5117  MarshallingInfoString<AnalyzerOpts<"DumpExplodedGraphTo">>;
5118def analyzer_dump_egraph_EQ : Joined<["-"], "analyzer-dump-egraph=">, Alias<analyzer_dump_egraph>;
5119
5120def analyzer_inline_max_stack_depth : Separate<["-"], "analyzer-inline-max-stack-depth">,
5121  HelpText<"Bound on stack depth while inlining (4 by default)">,
5122  // Cap the stack depth at 4 calls (5 stack frames, base + 4 calls).
5123  MarshallingInfoInt<AnalyzerOpts<"InlineMaxStackDepth">, "5">;
5124def analyzer_inline_max_stack_depth_EQ : Joined<["-"], "analyzer-inline-max-stack-depth=">,
5125  Alias<analyzer_inline_max_stack_depth>;
5126
5127def analyzer_inlining_mode : Separate<["-"], "analyzer-inlining-mode">,
5128  HelpText<"Specify the function selection heuristic used during inlining">;
5129def analyzer_inlining_mode_EQ : Joined<["-"], "analyzer-inlining-mode=">, Alias<analyzer_inlining_mode>;
5130
5131def analyzer_disable_retry_exhausted : Flag<["-"], "analyzer-disable-retry-exhausted">,
5132  HelpText<"Do not re-analyze paths leading to exhausted nodes with a different strategy (may decrease code coverage)">,
5133  MarshallingInfoFlag<AnalyzerOpts<"NoRetryExhausted">>;
5134
5135def analyzer_max_loop : Separate<["-"], "analyzer-max-loop">,
5136  HelpText<"The maximum number of times the analyzer will go through a loop">,
5137  MarshallingInfoInt<AnalyzerOpts<"maxBlockVisitOnPath">, "4">;
5138def analyzer_stats : Flag<["-"], "analyzer-stats">,
5139  HelpText<"Print internal analyzer statistics.">,
5140  MarshallingInfoFlag<AnalyzerOpts<"PrintStats">>;
5141
5142def analyzer_checker : Separate<["-"], "analyzer-checker">,
5143  HelpText<"Choose analyzer checkers to enable">,
5144  ValuesCode<[{
5145    const char *Values =
5146    #define GET_CHECKERS
5147    #define CHECKER(FULLNAME, CLASS, HT, DOC_URI, IS_HIDDEN)  FULLNAME ","
5148    #include "clang/StaticAnalyzer/Checkers/Checkers.inc"
5149    #undef GET_CHECKERS
5150    #define GET_PACKAGES
5151    #define PACKAGE(FULLNAME)  FULLNAME ","
5152    #include "clang/StaticAnalyzer/Checkers/Checkers.inc"
5153    #undef GET_PACKAGES
5154    ;
5155  }]>;
5156def analyzer_checker_EQ : Joined<["-"], "analyzer-checker=">,
5157  Alias<analyzer_checker>;
5158
5159def analyzer_disable_checker : Separate<["-"], "analyzer-disable-checker">,
5160  HelpText<"Choose analyzer checkers to disable">;
5161def analyzer_disable_checker_EQ : Joined<["-"], "analyzer-disable-checker=">,
5162  Alias<analyzer_disable_checker>;
5163
5164def analyzer_disable_all_checks : Flag<["-"], "analyzer-disable-all-checks">,
5165  HelpText<"Disable all static analyzer checks">,
5166  MarshallingInfoFlag<AnalyzerOpts<"DisableAllCheckers">>;
5167
5168def analyzer_checker_help : Flag<["-"], "analyzer-checker-help">,
5169  HelpText<"Display the list of analyzer checkers that are available">,
5170  MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerHelp">>;
5171
5172def analyzer_checker_help_alpha : Flag<["-"], "analyzer-checker-help-alpha">,
5173  HelpText<"Display the list of in development analyzer checkers. These "
5174           "are NOT considered safe, they are unstable and will emit incorrect "
5175           "reports. Enable ONLY FOR DEVELOPMENT purposes">,
5176  MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerHelpAlpha">>;
5177
5178def analyzer_checker_help_developer : Flag<["-"], "analyzer-checker-help-developer">,
5179  HelpText<"Display the list of developer-only checkers such as modeling "
5180           "and debug checkers">,
5181  MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerHelpDeveloper">>;
5182
5183def analyzer_config_help : Flag<["-"], "analyzer-config-help">,
5184  HelpText<"Display the list of -analyzer-config options. These are meant for "
5185           "development purposes only!">,
5186  MarshallingInfoFlag<AnalyzerOpts<"ShowConfigOptionsList">>;
5187
5188def analyzer_list_enabled_checkers : Flag<["-"], "analyzer-list-enabled-checkers">,
5189  HelpText<"Display the list of enabled analyzer checkers">,
5190  MarshallingInfoFlag<AnalyzerOpts<"ShowEnabledCheckerList">>;
5191
5192def analyzer_config : Separate<["-"], "analyzer-config">,
5193  HelpText<"Choose analyzer options to enable">;
5194
5195def analyzer_checker_option_help : Flag<["-"], "analyzer-checker-option-help">,
5196  HelpText<"Display the list of checker and package options">,
5197  MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionList">>;
5198
5199def analyzer_checker_option_help_alpha : Flag<["-"], "analyzer-checker-option-help-alpha">,
5200  HelpText<"Display the list of in development checker and package options. "
5201           "These are NOT considered safe, they are unstable and will emit "
5202           "incorrect reports. Enable ONLY FOR DEVELOPMENT purposes">,
5203  MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionAlphaList">>;
5204
5205def analyzer_checker_option_help_developer : Flag<["-"], "analyzer-checker-option-help-developer">,
5206  HelpText<"Display the list of checker and package options meant for "
5207           "development purposes only">,
5208  MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionDeveloperList">>;
5209
5210def analyzer_config_compatibility_mode : Separate<["-"], "analyzer-config-compatibility-mode">,
5211  HelpText<"Don't emit errors on invalid analyzer-config inputs">,
5212  Values<"true,false">, NormalizedValues<[[{false}], [{true}]]>,
5213  MarshallingInfoEnum<AnalyzerOpts<"ShouldEmitErrorsOnInvalidConfigValue">, [{true}]>;
5214
5215def analyzer_config_compatibility_mode_EQ : Joined<["-"], "analyzer-config-compatibility-mode=">,
5216  Alias<analyzer_config_compatibility_mode>;
5217
5218def analyzer_werror : Flag<["-"], "analyzer-werror">,
5219  HelpText<"Emit analyzer results as errors rather than warnings">,
5220  MarshallingInfoFlag<AnalyzerOpts<"AnalyzerWerror">>;
5221
5222} // let Flags = [CC1Option, NoDriverOption]
5223
5224//===----------------------------------------------------------------------===//
5225// Migrator Options
5226//===----------------------------------------------------------------------===//
5227
5228def migrator_no_nsalloc_error : Flag<["-"], "no-ns-alloc-error">,
5229  HelpText<"Do not error on use of NSAllocateCollectable/NSReallocateCollectable">,
5230  Flags<[CC1Option, NoDriverOption]>,
5231  MarshallingInfoFlag<MigratorOpts<"NoNSAllocReallocError">>;
5232
5233def migrator_no_finalize_removal : Flag<["-"], "no-finalize-removal">,
5234  HelpText<"Do not remove finalize method in gc mode">,
5235  Flags<[CC1Option, NoDriverOption]>,
5236  MarshallingInfoFlag<MigratorOpts<"NoFinalizeRemoval">>;
5237
5238//===----------------------------------------------------------------------===//
5239// CodeGen Options
5240//===----------------------------------------------------------------------===//
5241
5242let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
5243
5244def debug_info_kind_EQ : Joined<["-"], "debug-info-kind=">;
5245def debug_info_macro : Flag<["-"], "debug-info-macro">,
5246  HelpText<"Emit macro debug information">,
5247  MarshallingInfoFlag<CodeGenOpts<"MacroDebugInfo">>;
5248def default_function_attr : Separate<["-"], "default-function-attr">,
5249  HelpText<"Apply given attribute to all functions">,
5250  MarshallingInfoStringVector<CodeGenOpts<"DefaultFunctionAttrs">>;
5251def dwarf_version_EQ : Joined<["-"], "dwarf-version=">,
5252  MarshallingInfoInt<CodeGenOpts<"DwarfVersion">>;
5253def debugger_tuning_EQ : Joined<["-"], "debugger-tuning=">,
5254  Values<"gdb,lldb,sce,dbx">,
5255  NormalizedValuesScope<"llvm::DebuggerKind">, NormalizedValues<["GDB", "LLDB", "SCE", "DBX"]>,
5256  MarshallingInfoEnum<CodeGenOpts<"DebuggerTuning">, "Default">;
5257def dwarf_debug_flags : Separate<["-"], "dwarf-debug-flags">,
5258  HelpText<"The string to embed in the Dwarf debug flags record.">,
5259  MarshallingInfoString<CodeGenOpts<"DwarfDebugFlags">>;
5260def record_command_line : Separate<["-"], "record-command-line">,
5261  HelpText<"The string to embed in the .LLVM.command.line section.">,
5262  MarshallingInfoString<CodeGenOpts<"RecordCommandLine">>;
5263def compress_debug_sections_EQ : Joined<["-", "--"], "compress-debug-sections=">,
5264    HelpText<"DWARF debug sections compression type">, Values<"none,zlib">,
5265    NormalizedValuesScope<"llvm::DebugCompressionType">, NormalizedValues<["None", "Z"]>,
5266    MarshallingInfoEnum<CodeGenOpts<"CompressDebugSections">, "None">;
5267def compress_debug_sections : Flag<["-", "--"], "compress-debug-sections">,
5268  Alias<compress_debug_sections_EQ>, AliasArgs<["zlib"]>;
5269def mno_exec_stack : Flag<["-"], "mnoexecstack">,
5270  HelpText<"Mark the file as not needing an executable stack">,
5271  MarshallingInfoFlag<CodeGenOpts<"NoExecStack">>;
5272def massembler_no_warn : Flag<["-"], "massembler-no-warn">,
5273  HelpText<"Make assembler not emit warnings">,
5274  MarshallingInfoFlag<CodeGenOpts<"NoWarn">>;
5275def massembler_fatal_warnings : Flag<["-"], "massembler-fatal-warnings">,
5276  HelpText<"Make assembler warnings fatal">,
5277  MarshallingInfoFlag<CodeGenOpts<"FatalWarnings">>;
5278def mrelax_relocations : Flag<["--"], "mrelax-relocations">,
5279    HelpText<"Use relaxable elf relocations">,
5280    MarshallingInfoFlag<CodeGenOpts<"RelaxELFRelocations">>;
5281def msave_temp_labels : Flag<["-"], "msave-temp-labels">,
5282  HelpText<"Save temporary labels in the symbol table. "
5283           "Note this may change .s semantics and shouldn't generally be used "
5284           "on compiler-generated code.">,
5285  MarshallingInfoFlag<CodeGenOpts<"SaveTempLabels">>;
5286def mrelocation_model : Separate<["-"], "mrelocation-model">,
5287  HelpText<"The relocation model to use">, Values<"static,pic,ropi,rwpi,ropi-rwpi,dynamic-no-pic">,
5288  NormalizedValuesScope<"llvm::Reloc">,
5289  NormalizedValues<["Static", "PIC_", "ROPI", "RWPI", "ROPI_RWPI", "DynamicNoPIC"]>,
5290  MarshallingInfoEnum<CodeGenOpts<"RelocationModel">, "PIC_">;
5291def fno_math_builtin : Flag<["-"], "fno-math-builtin">,
5292  HelpText<"Disable implicit builtin knowledge of math functions">,
5293  MarshallingInfoFlag<LangOpts<"NoMathBuiltin">>;
5294def fno_use_ctor_homing: Flag<["-"], "fno-use-ctor-homing">,
5295    HelpText<"Don't use constructor homing for debug info">;
5296def fuse_ctor_homing: Flag<["-"], "fuse-ctor-homing">,
5297    HelpText<"Use constructor homing if we are using limited debug info already">;
5298
5299} // let Flags = [CC1Option, CC1AsOption, NoDriverOption]
5300
5301let Flags = [CC1Option, NoDriverOption] in {
5302
5303def disable_llvm_verifier : Flag<["-"], "disable-llvm-verifier">,
5304  HelpText<"Don't run the LLVM IR verifier pass">,
5305  MarshallingInfoNegativeFlag<CodeGenOpts<"VerifyModule">>;
5306def disable_llvm_passes : Flag<["-"], "disable-llvm-passes">,
5307  HelpText<"Use together with -emit-llvm to get pristine LLVM IR from the "
5308           "frontend by not running any LLVM passes at all">,
5309  MarshallingInfoFlag<CodeGenOpts<"DisableLLVMPasses">>;
5310def disable_llvm_optzns : Flag<["-"], "disable-llvm-optzns">,
5311  Alias<disable_llvm_passes>;
5312def disable_lifetimemarkers : Flag<["-"], "disable-lifetime-markers">,
5313  HelpText<"Disable lifetime-markers emission even when optimizations are "
5314           "enabled">,
5315  MarshallingInfoFlag<CodeGenOpts<"DisableLifetimeMarkers">>;
5316def disable_O0_optnone : Flag<["-"], "disable-O0-optnone">,
5317  HelpText<"Disable adding the optnone attribute to functions at O0">,
5318  MarshallingInfoFlag<CodeGenOpts<"DisableO0ImplyOptNone">>;
5319def disable_red_zone : Flag<["-"], "disable-red-zone">,
5320  HelpText<"Do not emit code that uses the red zone.">,
5321  MarshallingInfoFlag<CodeGenOpts<"DisableRedZone">>;
5322def dwarf_ext_refs : Flag<["-"], "dwarf-ext-refs">,
5323  HelpText<"Generate debug info with external references to clang modules"
5324           " or precompiled headers">,
5325  MarshallingInfoFlag<CodeGenOpts<"DebugTypeExtRefs">>;
5326def dwarf_explicit_import : Flag<["-"], "dwarf-explicit-import">,
5327  HelpText<"Generate explicit import from anonymous namespace to containing"
5328           " scope">,
5329  MarshallingInfoFlag<CodeGenOpts<"DebugExplicitImport">>;
5330def debug_forward_template_params : Flag<["-"], "debug-forward-template-params">,
5331  HelpText<"Emit complete descriptions of template parameters in forward"
5332           " declarations">,
5333  MarshallingInfoFlag<CodeGenOpts<"DebugFwdTemplateParams">>;
5334def fforbid_guard_variables : Flag<["-"], "fforbid-guard-variables">,
5335  HelpText<"Emit an error if a C++ static local initializer would need a guard variable">,
5336  MarshallingInfoFlag<CodeGenOpts<"ForbidGuardVariables">>;
5337def no_implicit_float : Flag<["-"], "no-implicit-float">,
5338  HelpText<"Don't generate implicit floating point instructions">,
5339  MarshallingInfoFlag<CodeGenOpts<"NoImplicitFloat">>;
5340def fdump_vtable_layouts : Flag<["-"], "fdump-vtable-layouts">,
5341  HelpText<"Dump the layouts of all vtables that will be emitted in a translation unit">,
5342  MarshallingInfoFlag<LangOpts<"DumpVTableLayouts">>;
5343def fmerge_functions : Flag<["-"], "fmerge-functions">,
5344  HelpText<"Permit merging of identical functions when optimizing.">,
5345  MarshallingInfoFlag<CodeGenOpts<"MergeFunctions">>;
5346def coverage_data_file : Separate<["-"], "coverage-data-file">,
5347  HelpText<"Emit coverage data to this filename.">,
5348  MarshallingInfoString<CodeGenOpts<"CoverageDataFile">>,
5349  ShouldParseIf<!strconcat(fprofile_arcs.KeyPath, "||", ftest_coverage.KeyPath)>;
5350def coverage_data_file_EQ : Joined<["-"], "coverage-data-file=">,
5351  Alias<coverage_data_file>;
5352def coverage_notes_file : Separate<["-"], "coverage-notes-file">,
5353  HelpText<"Emit coverage notes to this filename.">,
5354  MarshallingInfoString<CodeGenOpts<"CoverageNotesFile">>,
5355  ShouldParseIf<!strconcat(fprofile_arcs.KeyPath, "||", ftest_coverage.KeyPath)>;
5356def coverage_notes_file_EQ : Joined<["-"], "coverage-notes-file=">,
5357  Alias<coverage_notes_file>;
5358def coverage_version_EQ : Joined<["-"], "coverage-version=">,
5359  HelpText<"Four-byte version string for gcov files.">;
5360def dump_coverage_mapping : Flag<["-"], "dump-coverage-mapping">,
5361  HelpText<"Dump the coverage mapping records, for testing">,
5362  MarshallingInfoFlag<CodeGenOpts<"DumpCoverageMapping">>;
5363def fuse_register_sized_bitfield_access: Flag<["-"], "fuse-register-sized-bitfield-access">,
5364  HelpText<"Use register sized accesses to bit-fields, when possible.">,
5365  MarshallingInfoFlag<CodeGenOpts<"UseRegisterSizedBitfieldAccess">>;
5366def relaxed_aliasing : Flag<["-"], "relaxed-aliasing">,
5367  HelpText<"Turn off Type Based Alias Analysis">,
5368  MarshallingInfoFlag<CodeGenOpts<"RelaxedAliasing">>;
5369def no_struct_path_tbaa : Flag<["-"], "no-struct-path-tbaa">,
5370  HelpText<"Turn off struct-path aware Type Based Alias Analysis">,
5371  MarshallingInfoNegativeFlag<CodeGenOpts<"StructPathTBAA">>;
5372def new_struct_path_tbaa : Flag<["-"], "new-struct-path-tbaa">,
5373  HelpText<"Enable enhanced struct-path aware Type Based Alias Analysis">;
5374def mdebug_pass : Separate<["-"], "mdebug-pass">,
5375  HelpText<"Enable additional debug output">,
5376  MarshallingInfoString<CodeGenOpts<"DebugPass">>;
5377def mframe_pointer_EQ : Joined<["-"], "mframe-pointer=">,
5378  HelpText<"Specify which frame pointers to retain.">, Values<"all,non-leaf,none">,
5379  NormalizedValuesScope<"CodeGenOptions::FramePointerKind">, NormalizedValues<["All", "NonLeaf", "None"]>,
5380  MarshallingInfoEnum<CodeGenOpts<"FramePointer">, "None">;
5381def menable_no_infinities : Flag<["-"], "menable-no-infs">,
5382  HelpText<"Allow optimization to assume there are no infinities.">,
5383  MarshallingInfoFlag<LangOpts<"NoHonorInfs">>, ImpliedByAnyOf<[ffinite_math_only.KeyPath]>;
5384def menable_no_nans : Flag<["-"], "menable-no-nans">,
5385  HelpText<"Allow optimization to assume there are no NaNs.">,
5386  MarshallingInfoFlag<LangOpts<"NoHonorNaNs">>, ImpliedByAnyOf<[ffinite_math_only.KeyPath]>;
5387def mreassociate : Flag<["-"], "mreassociate">,
5388  HelpText<"Allow reassociation transformations for floating-point instructions">,
5389  MarshallingInfoFlag<LangOpts<"AllowFPReassoc">>, ImpliedByAnyOf<[menable_unsafe_fp_math.KeyPath]>;
5390def mabi_EQ_ieeelongdouble : Flag<["-"], "mabi=ieeelongdouble">,
5391  HelpText<"Use IEEE 754 quadruple-precision for long double">,
5392  MarshallingInfoFlag<LangOpts<"PPCIEEELongDouble">>;
5393def mfloat_abi : Separate<["-"], "mfloat-abi">,
5394  HelpText<"The float ABI to use">,
5395  MarshallingInfoString<CodeGenOpts<"FloatABI">>;
5396def mtp : Separate<["-"], "mtp">,
5397  HelpText<"Mode for reading thread pointer">;
5398def mlimit_float_precision : Separate<["-"], "mlimit-float-precision">,
5399  HelpText<"Limit float precision to the given value">,
5400  MarshallingInfoString<CodeGenOpts<"LimitFloatPrecision">>;
5401def mregparm : Separate<["-"], "mregparm">,
5402  HelpText<"Limit the number of registers available for integer arguments">,
5403  MarshallingInfoInt<CodeGenOpts<"NumRegisterParameters">>;
5404def msmall_data_limit : Separate<["-"], "msmall-data-limit">,
5405  HelpText<"Put global and static data smaller than the limit into a special section">,
5406  MarshallingInfoInt<CodeGenOpts<"SmallDataLimit">>;
5407def funwind_tables_EQ : Joined<["-"], "funwind-tables=">,
5408  HelpText<"Generate unwinding tables for all functions">,
5409  MarshallingInfoInt<CodeGenOpts<"UnwindTables">>;
5410defm constructor_aliases : BoolOption<"m", "constructor-aliases",
5411  CodeGenOpts<"CXXCtorDtorAliases">, DefaultFalse,
5412  PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">,
5413  BothFlags<[CC1Option], " emitting complete constructors and destructors as aliases when possible">>;
5414def mlink_bitcode_file : Separate<["-"], "mlink-bitcode-file">,
5415  HelpText<"Link the given bitcode file before performing optimizations.">;
5416def mlink_builtin_bitcode : Separate<["-"], "mlink-builtin-bitcode">,
5417  HelpText<"Link and internalize needed symbols from the given bitcode file "
5418           "before performing optimizations.">;
5419def mlink_cuda_bitcode : Separate<["-"], "mlink-cuda-bitcode">,
5420  Alias<mlink_builtin_bitcode>;
5421def vectorize_loops : Flag<["-"], "vectorize-loops">,
5422  HelpText<"Run the Loop vectorization passes">,
5423  MarshallingInfoFlag<CodeGenOpts<"VectorizeLoop">>;
5424def vectorize_slp : Flag<["-"], "vectorize-slp">,
5425  HelpText<"Run the SLP vectorization passes">,
5426  MarshallingInfoFlag<CodeGenOpts<"VectorizeSLP">>;
5427def dependent_lib : Joined<["--"], "dependent-lib=">,
5428  HelpText<"Add dependent library">,
5429  MarshallingInfoStringVector<CodeGenOpts<"DependentLibraries">>;
5430def linker_option : Joined<["--"], "linker-option=">,
5431  HelpText<"Add linker option">,
5432  MarshallingInfoStringVector<CodeGenOpts<"LinkerOptions">>;
5433def fsanitize_coverage_type : Joined<["-"], "fsanitize-coverage-type=">,
5434                              HelpText<"Sanitizer coverage type">,
5435                              MarshallingInfoInt<CodeGenOpts<"SanitizeCoverageType">>;
5436def fsanitize_coverage_indirect_calls
5437    : Flag<["-"], "fsanitize-coverage-indirect-calls">,
5438      HelpText<"Enable sanitizer coverage for indirect calls">,
5439      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageIndirectCalls">>;
5440def fsanitize_coverage_trace_bb
5441    : Flag<["-"], "fsanitize-coverage-trace-bb">,
5442      HelpText<"Enable basic block tracing in sanitizer coverage">,
5443      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceBB">>;
5444def fsanitize_coverage_trace_cmp
5445    : Flag<["-"], "fsanitize-coverage-trace-cmp">,
5446      HelpText<"Enable cmp instruction tracing in sanitizer coverage">,
5447      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceCmp">>;
5448def fsanitize_coverage_trace_div
5449    : Flag<["-"], "fsanitize-coverage-trace-div">,
5450      HelpText<"Enable div instruction tracing in sanitizer coverage">,
5451      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceDiv">>;
5452def fsanitize_coverage_trace_gep
5453    : Flag<["-"], "fsanitize-coverage-trace-gep">,
5454      HelpText<"Enable gep instruction tracing in sanitizer coverage">,
5455      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceGep">>;
5456def fsanitize_coverage_8bit_counters
5457    : Flag<["-"], "fsanitize-coverage-8bit-counters">,
5458      HelpText<"Enable frequency counters in sanitizer coverage">,
5459      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverage8bitCounters">>;
5460def fsanitize_coverage_inline_8bit_counters
5461    : Flag<["-"], "fsanitize-coverage-inline-8bit-counters">,
5462      HelpText<"Enable inline 8-bit counters in sanitizer coverage">,
5463      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageInline8bitCounters">>;
5464def fsanitize_coverage_inline_bool_flag
5465    : Flag<["-"], "fsanitize-coverage-inline-bool-flag">,
5466      HelpText<"Enable inline bool flag in sanitizer coverage">,
5467      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageInlineBoolFlag">>;
5468def fsanitize_coverage_pc_table
5469    : Flag<["-"], "fsanitize-coverage-pc-table">,
5470      HelpText<"Create a table of coverage-instrumented PCs">,
5471      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoveragePCTable">>;
5472def fsanitize_coverage_trace_pc
5473    : Flag<["-"], "fsanitize-coverage-trace-pc">,
5474      HelpText<"Enable PC tracing in sanitizer coverage">,
5475      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTracePC">>;
5476def fsanitize_coverage_trace_pc_guard
5477    : Flag<["-"], "fsanitize-coverage-trace-pc-guard">,
5478      HelpText<"Enable PC tracing with guard in sanitizer coverage">,
5479      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTracePCGuard">>;
5480def fsanitize_coverage_no_prune
5481    : Flag<["-"], "fsanitize-coverage-no-prune">,
5482      HelpText<"Disable coverage pruning (i.e. instrument all blocks/edges)">,
5483      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageNoPrune">>;
5484def fsanitize_coverage_stack_depth
5485    : Flag<["-"], "fsanitize-coverage-stack-depth">,
5486      HelpText<"Enable max stack depth tracing">,
5487      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageStackDepth">>;
5488def fsanitize_coverage_trace_loads
5489    : Flag<["-"], "fsanitize-coverage-trace-loads">,
5490      HelpText<"Enable tracing of loads">,
5491      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceLoads">>;
5492def fsanitize_coverage_trace_stores
5493    : Flag<["-"], "fsanitize-coverage-trace-stores">,
5494      HelpText<"Enable tracing of stores">,
5495      MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceStores">>;
5496def fpatchable_function_entry_offset_EQ
5497    : Joined<["-"], "fpatchable-function-entry-offset=">, MetaVarName<"<M>">,
5498      HelpText<"Generate M NOPs before function entry">,
5499      MarshallingInfoInt<CodeGenOpts<"PatchableFunctionEntryOffset">>;
5500def fprofile_instrument_EQ : Joined<["-"], "fprofile-instrument=">,
5501    HelpText<"Enable PGO instrumentation">, Values<"none,clang,llvm,csllvm">,
5502    NormalizedValuesScope<"CodeGenOptions">,
5503    NormalizedValues<["ProfileNone", "ProfileClangInstr", "ProfileIRInstr", "ProfileCSIRInstr"]>,
5504    MarshallingInfoEnum<CodeGenOpts<"ProfileInstr">, "ProfileNone">;
5505def fprofile_instrument_path_EQ : Joined<["-"], "fprofile-instrument-path=">,
5506    HelpText<"Generate instrumented code to collect execution counts into "
5507             "<file> (overridden by LLVM_PROFILE_FILE env var)">,
5508    MarshallingInfoString<CodeGenOpts<"InstrProfileOutput">>;
5509def fprofile_instrument_use_path_EQ :
5510    Joined<["-"], "fprofile-instrument-use-path=">,
5511    HelpText<"Specify the profile path in PGO use compilation">,
5512    MarshallingInfoString<CodeGenOpts<"ProfileInstrumentUsePath">>;
5513def flto_visibility_public_std:
5514    Flag<["-"], "flto-visibility-public-std">,
5515    HelpText<"Use public LTO visibility for classes in std and stdext namespaces">,
5516    MarshallingInfoFlag<CodeGenOpts<"LTOVisibilityPublicStd">>;
5517defm lto_unit : BoolOption<"f", "lto-unit",
5518  CodeGenOpts<"LTOUnit">, DefaultFalse,
5519  PosFlag<SetTrue, [CC1Option], "Emit IR to support LTO unit features (CFI, whole program vtable opt)">,
5520  NegFlag<SetFalse>>;
5521def fverify_debuginfo_preserve
5522    : Flag<["-"], "fverify-debuginfo-preserve">,
5523      HelpText<"Enable Debug Info Metadata preservation testing in "
5524               "optimizations.">,
5525      MarshallingInfoFlag<CodeGenOpts<"EnableDIPreservationVerify">>;
5526def fverify_debuginfo_preserve_export
5527    : Joined<["-"], "fverify-debuginfo-preserve-export=">,
5528      MetaVarName<"<file>">,
5529      HelpText<"Export debug info (by testing original Debug Info) failures "
5530               "into specified (JSON) file (should be abs path as we use "
5531               "append mode to insert new JSON objects).">,
5532      MarshallingInfoString<CodeGenOpts<"DIBugsReportFilePath">>;
5533def fwarn_stack_size_EQ
5534    : Joined<["-"], "fwarn-stack-size=">,
5535      MarshallingInfoInt<CodeGenOpts<"WarnStackSize">, "UINT_MAX">;
5536// The driver option takes the key as a parameter to the -msign-return-address=
5537// and -mbranch-protection= options, but CC1 has a separate option so we
5538// don't have to parse the parameter twice.
5539def msign_return_address_key_EQ : Joined<["-"], "msign-return-address-key=">,
5540    Values<"a_key,b_key">;
5541def mbranch_target_enforce : Flag<["-"], "mbranch-target-enforce">,
5542  MarshallingInfoFlag<LangOpts<"BranchTargetEnforcement">>;
5543def fno_dllexport_inlines : Flag<["-"], "fno-dllexport-inlines">,
5544  MarshallingInfoNegativeFlag<LangOpts<"DllExportInlines">>;
5545def cfguard_no_checks : Flag<["-"], "cfguard-no-checks">,
5546    HelpText<"Emit Windows Control Flow Guard tables only (no checks)">,
5547    MarshallingInfoFlag<CodeGenOpts<"ControlFlowGuardNoChecks">>;
5548def cfguard : Flag<["-"], "cfguard">,
5549    HelpText<"Emit Windows Control Flow Guard tables and checks">,
5550    MarshallingInfoFlag<CodeGenOpts<"ControlFlowGuard">>;
5551def ehcontguard : Flag<["-"], "ehcontguard">,
5552    HelpText<"Emit Windows EH Continuation Guard tables">,
5553    MarshallingInfoFlag<CodeGenOpts<"EHContGuard">>;
5554
5555def fdenormal_fp_math_f32_EQ : Joined<["-"], "fdenormal-fp-math-f32=">,
5556   Group<f_Group>;
5557
5558} // let Flags = [CC1Option, NoDriverOption]
5559
5560//===----------------------------------------------------------------------===//
5561// Dependency Output Options
5562//===----------------------------------------------------------------------===//
5563
5564let Flags = [CC1Option, NoDriverOption] in {
5565
5566def sys_header_deps : Flag<["-"], "sys-header-deps">,
5567  HelpText<"Include system headers in dependency output">,
5568  MarshallingInfoFlag<DependencyOutputOpts<"IncludeSystemHeaders">>;
5569def module_file_deps : Flag<["-"], "module-file-deps">,
5570  HelpText<"Include module files in dependency output">,
5571  MarshallingInfoFlag<DependencyOutputOpts<"IncludeModuleFiles">>;
5572def header_include_file : Separate<["-"], "header-include-file">,
5573  HelpText<"Filename (or -) to write header include output to">,
5574  MarshallingInfoString<DependencyOutputOpts<"HeaderIncludeOutputFile">>;
5575def show_includes : Flag<["--"], "show-includes">,
5576  HelpText<"Print cl.exe style /showIncludes to stdout">;
5577
5578} // let Flags = [CC1Option, NoDriverOption]
5579
5580//===----------------------------------------------------------------------===//
5581// Diagnostic Options
5582//===----------------------------------------------------------------------===//
5583
5584let Flags = [CC1Option, NoDriverOption] in {
5585
5586def diagnostic_log_file : Separate<["-"], "diagnostic-log-file">,
5587  HelpText<"Filename (or -) to log diagnostics to">,
5588  MarshallingInfoString<DiagnosticOpts<"DiagnosticLogFile">>;
5589def diagnostic_serialized_file : Separate<["-"], "serialize-diagnostic-file">,
5590  MetaVarName<"<filename>">,
5591  HelpText<"File for serializing diagnostics in a binary format">;
5592
5593def fdiagnostics_format : Separate<["-"], "fdiagnostics-format">,
5594  HelpText<"Change diagnostic formatting to match IDE and command line tools">,
5595  Values<"clang,msvc,vi,sarif,SARIF">,
5596  NormalizedValuesScope<"DiagnosticOptions">, NormalizedValues<["Clang", "MSVC", "Vi", "SARIF", "SARIF"]>,
5597  MarshallingInfoEnum<DiagnosticOpts<"Format">, "Clang">;
5598def fdiagnostics_show_category : Separate<["-"], "fdiagnostics-show-category">,
5599  HelpText<"Print diagnostic category">,
5600  Values<"none,id,name">,
5601  NormalizedValues<["0", "1", "2"]>,
5602  MarshallingInfoEnum<DiagnosticOpts<"ShowCategories">, "0">;
5603def fno_diagnostics_use_presumed_location : Flag<["-"], "fno-diagnostics-use-presumed-location">,
5604  HelpText<"Ignore #line directives when displaying diagnostic locations">,
5605  MarshallingInfoNegativeFlag<DiagnosticOpts<"ShowPresumedLoc">>;
5606def ftabstop : Separate<["-"], "ftabstop">, MetaVarName<"<N>">,
5607  HelpText<"Set the tab stop distance.">,
5608  MarshallingInfoInt<DiagnosticOpts<"TabStop">, "DiagnosticOptions::DefaultTabStop">;
5609def ferror_limit : Separate<["-"], "ferror-limit">, MetaVarName<"<N>">,
5610  HelpText<"Set the maximum number of errors to emit before stopping (0 = no limit).">,
5611  MarshallingInfoInt<DiagnosticOpts<"ErrorLimit">>;
5612def fmacro_backtrace_limit : Separate<["-"], "fmacro-backtrace-limit">, MetaVarName<"<N>">,
5613  HelpText<"Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit).">,
5614  MarshallingInfoInt<DiagnosticOpts<"MacroBacktraceLimit">, "DiagnosticOptions::DefaultMacroBacktraceLimit">;
5615def ftemplate_backtrace_limit : Separate<["-"], "ftemplate-backtrace-limit">, MetaVarName<"<N>">,
5616  HelpText<"Set the maximum number of entries to print in a template instantiation backtrace (0 = no limit).">,
5617  MarshallingInfoInt<DiagnosticOpts<"TemplateBacktraceLimit">, "DiagnosticOptions::DefaultTemplateBacktraceLimit">;
5618def fconstexpr_backtrace_limit : Separate<["-"], "fconstexpr-backtrace-limit">, MetaVarName<"<N>">,
5619  HelpText<"Set the maximum number of entries to print in a constexpr evaluation backtrace (0 = no limit).">,
5620  MarshallingInfoInt<DiagnosticOpts<"ConstexprBacktraceLimit">, "DiagnosticOptions::DefaultConstexprBacktraceLimit">;
5621def fspell_checking_limit : Separate<["-"], "fspell-checking-limit">, MetaVarName<"<N>">,
5622  HelpText<"Set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit).">,
5623  MarshallingInfoInt<DiagnosticOpts<"SpellCheckingLimit">, "DiagnosticOptions::DefaultSpellCheckingLimit">;
5624def fcaret_diagnostics_max_lines :
5625  Separate<["-"], "fcaret-diagnostics-max-lines">, MetaVarName<"<N>">,
5626  HelpText<"Set the maximum number of source lines to show in a caret diagnostic">,
5627  MarshallingInfoInt<DiagnosticOpts<"SnippetLineLimit">, "DiagnosticOptions::DefaultSnippetLineLimit">;
5628def verify_EQ : CommaJoined<["-"], "verify=">,
5629  MetaVarName<"<prefixes>">,
5630  HelpText<"Verify diagnostic output using comment directives that start with"
5631           " prefixes in the comma-separated sequence <prefixes>">;
5632def verify : Flag<["-"], "verify">,
5633  HelpText<"Equivalent to -verify=expected">;
5634def verify_ignore_unexpected : Flag<["-"], "verify-ignore-unexpected">,
5635  HelpText<"Ignore unexpected diagnostic messages">;
5636def verify_ignore_unexpected_EQ : CommaJoined<["-"], "verify-ignore-unexpected=">,
5637  HelpText<"Ignore unexpected diagnostic messages">;
5638def Wno_rewrite_macros : Flag<["-"], "Wno-rewrite-macros">,
5639  HelpText<"Silence ObjC rewriting warnings">,
5640  MarshallingInfoFlag<DiagnosticOpts<"NoRewriteMacros">>;
5641
5642} // let Flags = [CC1Option, NoDriverOption]
5643
5644//===----------------------------------------------------------------------===//
5645// Frontend Options
5646//===----------------------------------------------------------------------===//
5647
5648let Flags = [CC1Option, NoDriverOption] in {
5649
5650// This isn't normally used, it is just here so we can parse a
5651// CompilerInvocation out of a driver-derived argument vector.
5652def cc1 : Flag<["-"], "cc1">;
5653def cc1as : Flag<["-"], "cc1as">;
5654
5655def ast_merge : Separate<["-"], "ast-merge">,
5656  MetaVarName<"<ast file>">,
5657  HelpText<"Merge the given AST file into the translation unit being compiled.">,
5658  MarshallingInfoStringVector<FrontendOpts<"ASTMergeFiles">>;
5659def aux_target_cpu : Separate<["-"], "aux-target-cpu">,
5660  HelpText<"Target a specific auxiliary cpu type">;
5661def aux_target_feature : Separate<["-"], "aux-target-feature">,
5662  HelpText<"Target specific auxiliary attributes">;
5663def aux_triple : Separate<["-"], "aux-triple">,
5664  HelpText<"Auxiliary target triple.">,
5665  MarshallingInfoString<FrontendOpts<"AuxTriple">>;
5666def code_completion_at : Separate<["-"], "code-completion-at">,
5667  MetaVarName<"<file>:<line>:<column>">,
5668  HelpText<"Dump code-completion information at a location">;
5669def remap_file : Separate<["-"], "remap-file">,
5670  MetaVarName<"<from>;<to>">,
5671  HelpText<"Replace the contents of the <from> file with the contents of the <to> file">;
5672def code_completion_at_EQ : Joined<["-"], "code-completion-at=">,
5673  Alias<code_completion_at>;
5674def code_completion_macros : Flag<["-"], "code-completion-macros">,
5675  HelpText<"Include macros in code-completion results">,
5676  MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeMacros">>;
5677def code_completion_patterns : Flag<["-"], "code-completion-patterns">,
5678  HelpText<"Include code patterns in code-completion results">,
5679  MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeCodePatterns">>;
5680def no_code_completion_globals : Flag<["-"], "no-code-completion-globals">,
5681  HelpText<"Do not include global declarations in code-completion results.">,
5682  MarshallingInfoNegativeFlag<FrontendOpts<"CodeCompleteOpts.IncludeGlobals">>;
5683def no_code_completion_ns_level_decls : Flag<["-"], "no-code-completion-ns-level-decls">,
5684  HelpText<"Do not include declarations inside namespaces (incl. global namespace) in the code-completion results.">,
5685  MarshallingInfoNegativeFlag<FrontendOpts<"CodeCompleteOpts.IncludeNamespaceLevelDecls">>;
5686def code_completion_brief_comments : Flag<["-"], "code-completion-brief-comments">,
5687  HelpText<"Include brief documentation comments in code-completion results.">,
5688  MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeBriefComments">>;
5689def code_completion_with_fixits : Flag<["-"], "code-completion-with-fixits">,
5690  HelpText<"Include code completion results which require small fix-its.">,
5691  MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeFixIts">>;
5692def disable_free : Flag<["-"], "disable-free">,
5693  HelpText<"Disable freeing of memory on exit">,
5694  MarshallingInfoFlag<FrontendOpts<"DisableFree">>;
5695defm clear_ast_before_backend : BoolOption<"",
5696  "clear-ast-before-backend",
5697  CodeGenOpts<"ClearASTBeforeBackend">,
5698  DefaultFalse,
5699  PosFlag<SetTrue, [], "Clear">,
5700  NegFlag<SetFalse, [], "Don't clear">,
5701  BothFlags<[], " the Clang AST before running backend code generation">>;
5702defm enable_noundef_analysis : BoolOption<"",
5703  "enable-noundef-analysis",
5704  CodeGenOpts<"EnableNoundefAttrs">,
5705  DefaultTrue,
5706  PosFlag<SetTrue, [], "Enable">,
5707  NegFlag<SetFalse, [], "Disable">,
5708  BothFlags<[], " analyzing function argument and return types for mandatory definedness">>;
5709defm opaque_pointers : BoolOption<"",
5710  "opaque-pointers",
5711  CodeGenOpts<"OpaquePointers">,
5712  DefaultTrue,
5713  PosFlag<SetTrue, [], "Enable">,
5714  NegFlag<SetFalse, [], "Disable">,
5715  BothFlags<[], " opaque pointers">>;
5716def discard_value_names : Flag<["-"], "discard-value-names">,
5717  HelpText<"Discard value names in LLVM IR">,
5718  MarshallingInfoFlag<CodeGenOpts<"DiscardValueNames">>;
5719def plugin_arg : JoinedAndSeparate<["-"], "plugin-arg-">,
5720    MetaVarName<"<name> <arg>">,
5721    HelpText<"Pass <arg> to plugin <name>">;
5722def add_plugin : Separate<["-"], "add-plugin">, MetaVarName<"<name>">,
5723  HelpText<"Use the named plugin action in addition to the default action">,
5724  MarshallingInfoStringVector<FrontendOpts<"AddPluginActions">>;
5725def ast_dump_filter : Separate<["-"], "ast-dump-filter">,
5726  MetaVarName<"<dump_filter>">,
5727  HelpText<"Use with -ast-dump or -ast-print to dump/print only AST declaration"
5728           " nodes having a certain substring in a qualified name. Use"
5729           " -ast-list to list all filterable declaration node names.">,
5730  MarshallingInfoString<FrontendOpts<"ASTDumpFilter">>;
5731def ast_dump_filter_EQ : Joined<["-"], "ast-dump-filter=">,
5732  Alias<ast_dump_filter>;
5733def fno_modules_global_index : Flag<["-"], "fno-modules-global-index">,
5734  HelpText<"Do not automatically generate or update the global module index">,
5735  MarshallingInfoNegativeFlag<FrontendOpts<"UseGlobalModuleIndex">>;
5736def fno_modules_error_recovery : Flag<["-"], "fno-modules-error-recovery">,
5737  HelpText<"Do not automatically import modules for error recovery">,
5738  MarshallingInfoNegativeFlag<LangOpts<"ModulesErrorRecovery">>;
5739def fmodule_map_file_home_is_cwd : Flag<["-"], "fmodule-map-file-home-is-cwd">,
5740  HelpText<"Use the current working directory as the home directory of "
5741           "module maps specified by -fmodule-map-file=<FILE>">,
5742  MarshallingInfoFlag<HeaderSearchOpts<"ModuleMapFileHomeIsCwd">>;
5743def fmodule_file_home_is_cwd : Flag<["-"], "fmodule-file-home-is-cwd">,
5744  HelpText<"Use the current working directory as the base directory of "
5745           "compiled module files.">,
5746  MarshallingInfoFlag<HeaderSearchOpts<"ModuleFileHomeIsCwd">>;
5747def fmodule_feature : Separate<["-"], "fmodule-feature">,
5748  MetaVarName<"<feature>">,
5749  HelpText<"Enable <feature> in module map requires declarations">,
5750  MarshallingInfoStringVector<LangOpts<"ModuleFeatures">>;
5751def fmodules_embed_file_EQ : Joined<["-"], "fmodules-embed-file=">,
5752  MetaVarName<"<file>">,
5753  HelpText<"Embed the contents of the specified file into the module file "
5754           "being compiled.">,
5755  MarshallingInfoStringVector<FrontendOpts<"ModulesEmbedFiles">>;
5756def fmodules_embed_all_files : Joined<["-"], "fmodules-embed-all-files">,
5757  HelpText<"Embed the contents of all files read by this compilation into "
5758           "the produced module file.">,
5759  MarshallingInfoFlag<FrontendOpts<"ModulesEmbedAllFiles">>;
5760defm fimplicit_modules_use_lock : BoolOption<"f", "implicit-modules-use-lock",
5761  FrontendOpts<"BuildingImplicitModuleUsesLock">, DefaultTrue,
5762  NegFlag<SetFalse>,
5763  PosFlag<SetTrue, [],
5764          "Use filesystem locks for implicit modules builds to avoid "
5765          "duplicating work in competing clang invocations.">>;
5766// FIXME: We only need this in C++ modules / Modules TS if we might textually
5767// enter a different module (eg, when building a header unit).
5768def fmodules_local_submodule_visibility :
5769  Flag<["-"], "fmodules-local-submodule-visibility">,
5770  HelpText<"Enforce name visibility rules across submodules of the same "
5771           "top-level module.">,
5772  MarshallingInfoFlag<LangOpts<"ModulesLocalVisibility">>,
5773  ImpliedByAnyOf<[fmodules_ts.KeyPath, fcxx_modules.KeyPath]>;
5774def fmodules_codegen :
5775  Flag<["-"], "fmodules-codegen">,
5776  HelpText<"Generate code for uses of this module that assumes an explicit "
5777           "object file will be built for the module">,
5778  MarshallingInfoFlag<LangOpts<"ModulesCodegen">>;
5779def fmodules_debuginfo :
5780  Flag<["-"], "fmodules-debuginfo">,
5781  HelpText<"Generate debug info for types in an object file built from this "
5782           "module and do not generate them elsewhere">,
5783  MarshallingInfoFlag<LangOpts<"ModulesDebugInfo">>;
5784def fmodule_format_EQ : Joined<["-"], "fmodule-format=">,
5785  HelpText<"Select the container format for clang modules and PCH. "
5786           "Supported options are 'raw' and 'obj'.">,
5787  MarshallingInfoString<HeaderSearchOpts<"ModuleFormat">, [{"raw"}]>;
5788def ftest_module_file_extension_EQ :
5789  Joined<["-"], "ftest-module-file-extension=">,
5790  HelpText<"introduce a module file extension for testing purposes. "
5791           "The argument is parsed as blockname:major:minor:hashed:user info">;
5792def fconcepts_ts : Flag<["-"], "fconcepts-ts">,
5793  HelpText<"Enable C++ Extensions for Concepts. (deprecated - use -std=c++2a)">;
5794
5795defm recovery_ast : BoolOption<"f", "recovery-ast",
5796  LangOpts<"RecoveryAST">, DefaultTrue,
5797  NegFlag<SetFalse>, PosFlag<SetTrue, [], "Preserve expressions in AST rather "
5798                              "than dropping them when encountering semantic errors">>;
5799defm recovery_ast_type : BoolOption<"f", "recovery-ast-type",
5800  LangOpts<"RecoveryASTType">, DefaultTrue,
5801  NegFlag<SetFalse>, PosFlag<SetTrue, [], "Preserve the type for recovery "
5802                              "expressions when possible">>;
5803
5804let Group = Action_Group in {
5805
5806def Eonly : Flag<["-"], "Eonly">,
5807  HelpText<"Just run preprocessor, no output (for timings)">;
5808def dump_raw_tokens : Flag<["-"], "dump-raw-tokens">,
5809  HelpText<"Lex file in raw mode and dump raw tokens">;
5810def analyze : Flag<["-"], "analyze">,
5811  HelpText<"Run static analysis engine">;
5812def dump_tokens : Flag<["-"], "dump-tokens">,
5813  HelpText<"Run preprocessor, dump internal rep of tokens">;
5814def fixit : Flag<["-"], "fixit">,
5815  HelpText<"Apply fix-it advice to the input source">;
5816def fixit_EQ : Joined<["-"], "fixit=">,
5817  HelpText<"Apply fix-it advice creating a file with the given suffix">;
5818def print_preamble : Flag<["-"], "print-preamble">,
5819  HelpText<"Print the \"preamble\" of a file, which is a candidate for implicit"
5820           " precompiled headers.">;
5821def emit_html : Flag<["-"], "emit-html">,
5822  HelpText<"Output input source as HTML">;
5823def ast_print : Flag<["-"], "ast-print">,
5824  HelpText<"Build ASTs and then pretty-print them">;
5825def ast_list : Flag<["-"], "ast-list">,
5826  HelpText<"Build ASTs and print the list of declaration node qualified names">;
5827def ast_dump : Flag<["-"], "ast-dump">,
5828  HelpText<"Build ASTs and then debug dump them">;
5829def ast_dump_EQ : Joined<["-"], "ast-dump=">,
5830  HelpText<"Build ASTs and then debug dump them in the specified format. "
5831           "Supported formats include: default, json">;
5832def ast_dump_all : Flag<["-"], "ast-dump-all">,
5833  HelpText<"Build ASTs and then debug dump them, forcing deserialization">;
5834def ast_dump_all_EQ : Joined<["-"], "ast-dump-all=">,
5835  HelpText<"Build ASTs and then debug dump them in the specified format, "
5836           "forcing deserialization. Supported formats include: default, json">;
5837def ast_dump_decl_types : Flag<["-"], "ast-dump-decl-types">,
5838  HelpText<"Include declaration types in AST dumps">,
5839  MarshallingInfoFlag<FrontendOpts<"ASTDumpDeclTypes">>;
5840def templight_dump : Flag<["-"], "templight-dump">,
5841  HelpText<"Dump templight information to stdout">;
5842def ast_dump_lookups : Flag<["-"], "ast-dump-lookups">,
5843  HelpText<"Build ASTs and then debug dump their name lookup tables">,
5844  MarshallingInfoFlag<FrontendOpts<"ASTDumpLookups">>;
5845def ast_view : Flag<["-"], "ast-view">,
5846  HelpText<"Build ASTs and view them with GraphViz">;
5847def emit_module : Flag<["-"], "emit-module">,
5848  HelpText<"Generate pre-compiled module file from a module map">;
5849def emit_module_interface : Flag<["-"], "emit-module-interface">,
5850  HelpText<"Generate pre-compiled module file from a C++ module interface">;
5851def emit_header_module : Flag<["-"], "emit-header-module">,
5852  HelpText<"Generate pre-compiled module file from a set of header files">;
5853def emit_header_unit : Flag<["-"], "emit-header-unit">,
5854  HelpText<"Generate C++20 header units from header files">;
5855def emit_pch : Flag<["-"], "emit-pch">,
5856  HelpText<"Generate pre-compiled header file">;
5857def emit_llvm_only : Flag<["-"], "emit-llvm-only">,
5858  HelpText<"Build ASTs and convert to LLVM, discarding output">;
5859def emit_codegen_only : Flag<["-"], "emit-codegen-only">,
5860  HelpText<"Generate machine code, but discard output">;
5861def rewrite_test : Flag<["-"], "rewrite-test">,
5862  HelpText<"Rewriter playground">;
5863def rewrite_macros : Flag<["-"], "rewrite-macros">,
5864  HelpText<"Expand macros without full preprocessing">;
5865def migrate : Flag<["-"], "migrate">,
5866  HelpText<"Migrate source code">;
5867def compiler_options_dump : Flag<["-"], "compiler-options-dump">,
5868  HelpText<"Dump the compiler configuration options">;
5869def print_dependency_directives_minimized_source : Flag<["-"],
5870  "print-dependency-directives-minimized-source">,
5871  HelpText<"Print the output of the dependency directives source minimizer">;
5872}
5873
5874defm emit_llvm_uselists : BoolOption<"", "emit-llvm-uselists",
5875  CodeGenOpts<"EmitLLVMUseLists">, DefaultFalse,
5876  PosFlag<SetTrue, [], "Preserve">,
5877  NegFlag<SetFalse, [], "Don't preserve">,
5878  BothFlags<[], " order of LLVM use-lists when serializing">>;
5879
5880def mt_migrate_directory : Separate<["-"], "mt-migrate-directory">,
5881  HelpText<"Directory for temporary files produced during ARC or ObjC migration">,
5882  MarshallingInfoString<FrontendOpts<"MTMigrateDir">>;
5883
5884def arcmt_action_EQ : Joined<["-"], "arcmt-action=">, Flags<[CC1Option, NoDriverOption]>,
5885  HelpText<"The ARC migration action to take">,
5886  Values<"check,modify,migrate">,
5887  NormalizedValuesScope<"FrontendOptions">,
5888  NormalizedValues<["ARCMT_Check", "ARCMT_Modify", "ARCMT_Migrate"]>,
5889  MarshallingInfoEnum<FrontendOpts<"ARCMTAction">, "ARCMT_None">;
5890
5891def opt_record_file : Separate<["-"], "opt-record-file">,
5892  HelpText<"File name to use for YAML optimization record output">,
5893  MarshallingInfoString<CodeGenOpts<"OptRecordFile">>;
5894def opt_record_passes : Separate<["-"], "opt-record-passes">,
5895  HelpText<"Only record remark information for passes whose names match the given regular expression">;
5896def opt_record_format : Separate<["-"], "opt-record-format">,
5897  HelpText<"The format used for serializing remarks (default: YAML)">;
5898
5899def print_stats : Flag<["-"], "print-stats">,
5900  HelpText<"Print performance metrics and statistics">,
5901  MarshallingInfoFlag<FrontendOpts<"ShowStats">>;
5902def stats_file : Joined<["-"], "stats-file=">,
5903  HelpText<"Filename to write statistics to">,
5904  MarshallingInfoString<FrontendOpts<"StatsFile">>;
5905def fdump_record_layouts_simple : Flag<["-"], "fdump-record-layouts-simple">,
5906  HelpText<"Dump record layout information in a simple form used for testing">,
5907  MarshallingInfoFlag<LangOpts<"DumpRecordLayoutsSimple">>;
5908def fdump_record_layouts_canonical : Flag<["-"], "fdump-record-layouts-canonical">,
5909  HelpText<"Dump record layout information with canonical field types">,
5910  MarshallingInfoFlag<LangOpts<"DumpRecordLayoutsCanonical">>;
5911def fdump_record_layouts_complete : Flag<["-"], "fdump-record-layouts-complete">,
5912  HelpText<"Dump record layout information for all complete types">,
5913  MarshallingInfoFlag<LangOpts<"DumpRecordLayoutsComplete">>;
5914def fdump_record_layouts : Flag<["-"], "fdump-record-layouts">,
5915  HelpText<"Dump record layout information">,
5916  MarshallingInfoFlag<LangOpts<"DumpRecordLayouts">>,
5917  ImpliedByAnyOf<[fdump_record_layouts_simple.KeyPath, fdump_record_layouts_complete.KeyPath, fdump_record_layouts_canonical.KeyPath]>;
5918def fix_what_you_can : Flag<["-"], "fix-what-you-can">,
5919  HelpText<"Apply fix-it advice even in the presence of unfixable errors">,
5920  MarshallingInfoFlag<FrontendOpts<"FixWhatYouCan">>;
5921def fix_only_warnings : Flag<["-"], "fix-only-warnings">,
5922  HelpText<"Apply fix-it advice only for warnings, not errors">,
5923  MarshallingInfoFlag<FrontendOpts<"FixOnlyWarnings">>;
5924def fixit_recompile : Flag<["-"], "fixit-recompile">,
5925  HelpText<"Apply fix-it changes and recompile">,
5926  MarshallingInfoFlag<FrontendOpts<"FixAndRecompile">>;
5927def fixit_to_temp : Flag<["-"], "fixit-to-temporary">,
5928  HelpText<"Apply fix-it changes to temporary files">,
5929  MarshallingInfoFlag<FrontendOpts<"FixToTemporaries">>;
5930
5931def foverride_record_layout_EQ : Joined<["-"], "foverride-record-layout=">,
5932  HelpText<"Override record layouts with those in the given file">,
5933  MarshallingInfoString<FrontendOpts<"OverrideRecordLayoutsFile">>;
5934def pch_through_header_EQ : Joined<["-"], "pch-through-header=">,
5935  HelpText<"Stop PCH generation after including this file.  When using a PCH, "
5936           "skip tokens until after this file is included.">,
5937  MarshallingInfoString<PreprocessorOpts<"PCHThroughHeader">>;
5938def pch_through_hdrstop_create : Flag<["-"], "pch-through-hdrstop-create">,
5939  HelpText<"When creating a PCH, stop PCH generation after #pragma hdrstop.">,
5940  MarshallingInfoFlag<PreprocessorOpts<"PCHWithHdrStopCreate">>;
5941def pch_through_hdrstop_use : Flag<["-"], "pch-through-hdrstop-use">,
5942  HelpText<"When using a PCH, skip tokens until after a #pragma hdrstop.">;
5943def fno_pch_timestamp : Flag<["-"], "fno-pch-timestamp">,
5944  HelpText<"Disable inclusion of timestamp in precompiled headers">,
5945  MarshallingInfoNegativeFlag<FrontendOpts<"IncludeTimestamps">>;
5946def building_pch_with_obj : Flag<["-"], "building-pch-with-obj">,
5947  HelpText<"This compilation is part of building a PCH with corresponding object file.">,
5948  MarshallingInfoFlag<LangOpts<"BuildingPCHWithObjectFile">>;
5949
5950def aligned_alloc_unavailable : Flag<["-"], "faligned-alloc-unavailable">,
5951  HelpText<"Aligned allocation/deallocation functions are unavailable">,
5952  MarshallingInfoFlag<LangOpts<"AlignedAllocationUnavailable">>,
5953  ShouldParseIf<faligned_allocation.KeyPath>;
5954
5955} // let Flags = [CC1Option, NoDriverOption]
5956
5957//===----------------------------------------------------------------------===//
5958// Language Options
5959//===----------------------------------------------------------------------===//
5960
5961def version : Flag<["-"], "version">,
5962  HelpText<"Print the compiler version">,
5963  Flags<[CC1Option, CC1AsOption, FC1Option, NoDriverOption]>,
5964  MarshallingInfoFlag<FrontendOpts<"ShowVersion">>;
5965
5966def main_file_name : Separate<["-"], "main-file-name">,
5967  HelpText<"Main file name to use for debug info and source if missing">,
5968  Flags<[CC1Option, CC1AsOption, NoDriverOption]>,
5969  MarshallingInfoString<CodeGenOpts<"MainFileName">>;
5970def split_dwarf_output : Separate<["-"], "split-dwarf-output">,
5971  HelpText<"File name to use for split dwarf debug info output">,
5972  Flags<[CC1Option, CC1AsOption, NoDriverOption]>,
5973  MarshallingInfoString<CodeGenOpts<"SplitDwarfOutput">>;
5974
5975let Flags = [CC1Option, NoDriverOption] in {
5976
5977def fblocks_runtime_optional : Flag<["-"], "fblocks-runtime-optional">,
5978  HelpText<"Weakly link in the blocks runtime">,
5979  MarshallingInfoFlag<LangOpts<"BlocksRuntimeOptional">>;
5980def fexternc_nounwind : Flag<["-"], "fexternc-nounwind">,
5981  HelpText<"Assume all functions with C linkage do not unwind">,
5982  MarshallingInfoFlag<LangOpts<"ExternCNoUnwind">>;
5983def split_dwarf_file : Separate<["-"], "split-dwarf-file">,
5984  HelpText<"Name of the split dwarf debug info file to encode in the object file">,
5985  MarshallingInfoString<CodeGenOpts<"SplitDwarfFile">>;
5986def fno_wchar : Flag<["-"], "fno-wchar">,
5987  HelpText<"Disable C++ builtin type wchar_t">,
5988  MarshallingInfoNegativeFlag<LangOpts<"WChar">, cplusplus.KeyPath>,
5989  ShouldParseIf<cplusplus.KeyPath>;
5990def fconstant_string_class : Separate<["-"], "fconstant-string-class">,
5991  MetaVarName<"<class name>">,
5992  HelpText<"Specify the class to use for constant Objective-C string objects.">,
5993  MarshallingInfoString<LangOpts<"ObjCConstantStringClass">>;
5994def fobjc_arc_cxxlib_EQ : Joined<["-"], "fobjc-arc-cxxlib=">,
5995  HelpText<"Objective-C++ Automatic Reference Counting standard library kind">,
5996  Values<"libc++,libstdc++,none">,
5997  NormalizedValues<["ARCXX_libcxx", "ARCXX_libstdcxx", "ARCXX_nolib"]>,
5998  MarshallingInfoEnum<PreprocessorOpts<"ObjCXXARCStandardLibrary">, "ARCXX_nolib">;
5999def fobjc_runtime_has_weak : Flag<["-"], "fobjc-runtime-has-weak">,
6000  HelpText<"The target Objective-C runtime supports ARC weak operations">;
6001def fobjc_dispatch_method_EQ : Joined<["-"], "fobjc-dispatch-method=">,
6002  HelpText<"Objective-C dispatch method to use">,
6003  Values<"legacy,non-legacy,mixed">,
6004  NormalizedValuesScope<"CodeGenOptions">, NormalizedValues<["Legacy", "NonLegacy", "Mixed"]>,
6005  MarshallingInfoEnum<CodeGenOpts<"ObjCDispatchMethod">, "Legacy">;
6006def disable_objc_default_synthesize_properties : Flag<["-"], "disable-objc-default-synthesize-properties">,
6007  HelpText<"disable the default synthesis of Objective-C properties">,
6008  MarshallingInfoNegativeFlag<LangOpts<"ObjCDefaultSynthProperties">>;
6009def fencode_extended_block_signature : Flag<["-"], "fencode-extended-block-signature">,
6010  HelpText<"enable extended encoding of block type signature">,
6011  MarshallingInfoFlag<LangOpts<"EncodeExtendedBlockSig">>;
6012def function_alignment : Separate<["-"], "function-alignment">,
6013    HelpText<"default alignment for functions">,
6014    MarshallingInfoInt<LangOpts<"FunctionAlignment">>;
6015def pic_level : Separate<["-"], "pic-level">,
6016  HelpText<"Value for __PIC__">,
6017  MarshallingInfoInt<LangOpts<"PICLevel">>;
6018def pic_is_pie : Flag<["-"], "pic-is-pie">,
6019  HelpText<"File is for a position independent executable">,
6020  MarshallingInfoFlag<LangOpts<"PIE">>;
6021def fhalf_no_semantic_interposition : Flag<["-"], "fhalf-no-semantic-interposition">,
6022  HelpText<"Like -fno-semantic-interposition but don't use local aliases">,
6023  MarshallingInfoFlag<LangOpts<"HalfNoSemanticInterposition">>;
6024def fno_validate_pch : Flag<["-"], "fno-validate-pch">,
6025  HelpText<"Disable validation of precompiled headers">,
6026  MarshallingInfoFlag<PreprocessorOpts<"DisablePCHOrModuleValidation">, "DisableValidationForModuleKind::None">,
6027  Normalizer<"makeFlagToValueNormalizer(DisableValidationForModuleKind::All)">;
6028def fallow_pcm_with_errors : Flag<["-"], "fallow-pcm-with-compiler-errors">,
6029  HelpText<"Accept a PCM file that was created with compiler errors">,
6030  MarshallingInfoFlag<FrontendOpts<"AllowPCMWithCompilerErrors">>;
6031def fallow_pch_with_errors : Flag<["-"], "fallow-pch-with-compiler-errors">,
6032  HelpText<"Accept a PCH file that was created with compiler errors">,
6033  MarshallingInfoFlag<PreprocessorOpts<"AllowPCHWithCompilerErrors">>,
6034  ImpliedByAnyOf<[fallow_pcm_with_errors.KeyPath]>;
6035def fallow_pch_with_different_modules_cache_path :
6036  Flag<["-"], "fallow-pch-with-different-modules-cache-path">,
6037  HelpText<"Accept a PCH file that was created with a different modules cache path">,
6038  MarshallingInfoFlag<PreprocessorOpts<"AllowPCHWithDifferentModulesCachePath">>;
6039def dump_deserialized_pch_decls : Flag<["-"], "dump-deserialized-decls">,
6040  HelpText<"Dump declarations that are deserialized from PCH, for testing">,
6041  MarshallingInfoFlag<PreprocessorOpts<"DumpDeserializedPCHDecls">>;
6042def error_on_deserialized_pch_decl : Separate<["-"], "error-on-deserialized-decl">,
6043  HelpText<"Emit error if a specific declaration is deserialized from PCH, for testing">;
6044def error_on_deserialized_pch_decl_EQ : Joined<["-"], "error-on-deserialized-decl=">,
6045  Alias<error_on_deserialized_pch_decl>;
6046def static_define : Flag<["-"], "static-define">,
6047  HelpText<"Should __STATIC__ be defined">,
6048  MarshallingInfoFlag<LangOpts<"Static">>;
6049def stack_protector : Separate<["-"], "stack-protector">,
6050  HelpText<"Enable stack protectors">,
6051  Values<"0,1,2,3">,
6052  NormalizedValuesScope<"LangOptions">,
6053  NormalizedValues<["SSPOff", "SSPOn", "SSPStrong", "SSPReq"]>,
6054  MarshallingInfoEnum<LangOpts<"StackProtector">, "SSPOff">;
6055def stack_protector_buffer_size : Separate<["-"], "stack-protector-buffer-size">,
6056  HelpText<"Lower bound for a buffer to be considered for stack protection">,
6057  MarshallingInfoInt<CodeGenOpts<"SSPBufferSize">, "8">;
6058def fvisibility : Separate<["-"], "fvisibility">,
6059  HelpText<"Default type and symbol visibility">,
6060  MarshallingInfoVisibility<LangOpts<"ValueVisibilityMode">, "DefaultVisibility">;
6061def ftype_visibility : Separate<["-"], "ftype-visibility">,
6062  HelpText<"Default type visibility">,
6063  MarshallingInfoVisibility<LangOpts<"TypeVisibilityMode">, fvisibility.KeyPath>;
6064def fapply_global_visibility_to_externs : Flag<["-"], "fapply-global-visibility-to-externs">,
6065  HelpText<"Apply global symbol visibility to external declarations without an explicit visibility">,
6066  MarshallingInfoFlag<LangOpts<"SetVisibilityForExternDecls">>;
6067def ftemplate_depth : Separate<["-"], "ftemplate-depth">,
6068  HelpText<"Maximum depth of recursive template instantiation">,
6069  MarshallingInfoInt<LangOpts<"InstantiationDepth">, "1024">;
6070def foperator_arrow_depth : Separate<["-"], "foperator-arrow-depth">,
6071  HelpText<"Maximum number of 'operator->'s to call for a member access">,
6072  MarshallingInfoInt<LangOpts<"ArrowDepth">, "256">;
6073def fconstexpr_depth : Separate<["-"], "fconstexpr-depth">,
6074  HelpText<"Maximum depth of recursive constexpr function calls">,
6075  MarshallingInfoInt<LangOpts<"ConstexprCallDepth">, "512">;
6076def fconstexpr_steps : Separate<["-"], "fconstexpr-steps">,
6077  HelpText<"Maximum number of steps in constexpr function evaluation">,
6078  MarshallingInfoInt<LangOpts<"ConstexprStepLimit">, "1048576">;
6079def fbracket_depth : Separate<["-"], "fbracket-depth">,
6080  HelpText<"Maximum nesting level for parentheses, brackets, and braces">,
6081  MarshallingInfoInt<LangOpts<"BracketDepth">, "256">;
6082defm const_strings : BoolOption<"f", "const-strings",
6083  LangOpts<"ConstStrings">, DefaultFalse,
6084  PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">,
6085  BothFlags<[], " a const qualified type for string literals in C and ObjC">>;
6086def fno_bitfield_type_align : Flag<["-"], "fno-bitfield-type-align">,
6087  HelpText<"Ignore bit-field types when aligning structures">,
6088  MarshallingInfoFlag<LangOpts<"NoBitFieldTypeAlign">>;
6089def ffake_address_space_map : Flag<["-"], "ffake-address-space-map">,
6090  HelpText<"Use a fake address space map; OpenCL testing purposes only">,
6091  MarshallingInfoFlag<LangOpts<"FakeAddressSpaceMap">>;
6092def faddress_space_map_mangling_EQ : Joined<["-"], "faddress-space-map-mangling=">,
6093  HelpText<"Set the mode for address space map based mangling; OpenCL testing purposes only">,
6094  Values<"target,no,yes">,
6095  NormalizedValuesScope<"LangOptions">,
6096  NormalizedValues<["ASMM_Target", "ASMM_Off", "ASMM_On"]>,
6097  MarshallingInfoEnum<LangOpts<"AddressSpaceMapMangling">, "ASMM_Target">;
6098def funknown_anytype : Flag<["-"], "funknown-anytype">,
6099  HelpText<"Enable parser support for the __unknown_anytype type; for testing purposes only">,
6100  MarshallingInfoFlag<LangOpts<"ParseUnknownAnytype">>;
6101def fdebugger_support : Flag<["-"], "fdebugger-support">,
6102  HelpText<"Enable special debugger support behavior">,
6103  MarshallingInfoFlag<LangOpts<"DebuggerSupport">>;
6104def fdebugger_cast_result_to_id : Flag<["-"], "fdebugger-cast-result-to-id">,
6105  HelpText<"Enable casting unknown expression results to id">,
6106  MarshallingInfoFlag<LangOpts<"DebuggerCastResultToId">>;
6107def fdebugger_objc_literal : Flag<["-"], "fdebugger-objc-literal">,
6108  HelpText<"Enable special debugger support for Objective-C subscripting and literals">,
6109  MarshallingInfoFlag<LangOpts<"DebuggerObjCLiteral">>;
6110defm deprecated_macro : BoolOption<"f", "deprecated-macro",
6111  LangOpts<"Deprecated">, DefaultFalse,
6112  PosFlag<SetTrue, [], "Defines">, NegFlag<SetFalse, [], "Undefines">,
6113  BothFlags<[], " the __DEPRECATED macro">>;
6114def fobjc_subscripting_legacy_runtime : Flag<["-"], "fobjc-subscripting-legacy-runtime">,
6115  HelpText<"Allow Objective-C array and dictionary subscripting in legacy runtime">;
6116// TODO: Enforce values valid for MSVtorDispMode.
6117def vtordisp_mode_EQ : Joined<["-"], "vtordisp-mode=">,
6118  HelpText<"Control vtordisp placement on win32 targets">,
6119  MarshallingInfoInt<LangOpts<"VtorDispMode">, "1">;
6120def fnative_half_type: Flag<["-"], "fnative-half-type">,
6121  HelpText<"Use the native half type for __fp16 instead of promoting to float">,
6122  MarshallingInfoFlag<LangOpts<"NativeHalfType">>,
6123  ImpliedByAnyOf<[open_cl.KeyPath, render_script.KeyPath]>;
6124def fnative_half_arguments_and_returns : Flag<["-"], "fnative-half-arguments-and-returns">,
6125  HelpText<"Use the native __fp16 type for arguments and returns (and skip ABI-specific lowering)">,
6126  MarshallingInfoFlag<LangOpts<"NativeHalfArgsAndReturns">>,
6127  ImpliedByAnyOf<[open_cl.KeyPath, render_script.KeyPath]>;
6128def fallow_half_arguments_and_returns : Flag<["-"], "fallow-half-arguments-and-returns">,
6129  HelpText<"Allow function arguments and returns of type half">,
6130  MarshallingInfoFlag<LangOpts<"HalfArgsAndReturns">>,
6131  ImpliedByAnyOf<[fnative_half_arguments_and_returns.KeyPath]>;
6132def fdefault_calling_conv_EQ : Joined<["-"], "fdefault-calling-conv=">,
6133  HelpText<"Set default calling convention">,
6134  Values<"cdecl,fastcall,stdcall,vectorcall,regcall">,
6135  NormalizedValuesScope<"LangOptions">,
6136  NormalizedValues<["DCC_CDecl", "DCC_FastCall", "DCC_StdCall", "DCC_VectorCall", "DCC_RegCall"]>,
6137  MarshallingInfoEnum<LangOpts<"DefaultCallingConv">, "DCC_None">;
6138
6139// These options cannot be marshalled, because they are used to set up the LangOptions defaults.
6140def finclude_default_header : Flag<["-"], "finclude-default-header">,
6141  HelpText<"Include default header file for OpenCL and HLSL">;
6142def fdeclare_opencl_builtins : Flag<["-"], "fdeclare-opencl-builtins">,
6143  HelpText<"Add OpenCL builtin function declarations (experimental)">;
6144
6145def fpreserve_vec3_type : Flag<["-"], "fpreserve-vec3-type">,
6146  HelpText<"Preserve 3-component vector type">,
6147  MarshallingInfoFlag<CodeGenOpts<"PreserveVec3Type">>;
6148def fwchar_type_EQ : Joined<["-"], "fwchar-type=">,
6149  HelpText<"Select underlying type for wchar_t">,
6150  Values<"char,short,int">,
6151  NormalizedValues<["1", "2", "4"]>,
6152  MarshallingInfoEnum<LangOpts<"WCharSize">, "0">;
6153defm signed_wchar : BoolOption<"f", "signed-wchar",
6154  LangOpts<"WCharIsSigned">, DefaultTrue,
6155  NegFlag<SetFalse, [CC1Option], "Use an unsigned">, PosFlag<SetTrue, [], "Use a signed">,
6156  BothFlags<[], " type for wchar_t">>;
6157def fcompatibility_qualified_id_block_param_type_checking : Flag<["-"], "fcompatibility-qualified-id-block-type-checking">,
6158  HelpText<"Allow using blocks with parameters of more specific type than "
6159           "the type system guarantees when a parameter is qualified id">,
6160  MarshallingInfoFlag<LangOpts<"CompatibilityQualifiedIdBlockParamTypeChecking">>;
6161def fpass_by_value_is_noalias: Flag<["-"], "fpass-by-value-is-noalias">,
6162  HelpText<"Allows assuming by-value parameters do not alias any other value. "
6163           "Has no effect on non-trivially-copyable classes in C++.">, Group<f_Group>,
6164  MarshallingInfoFlag<CodeGenOpts<"PassByValueIsNoAlias">>;
6165
6166// FIXME: Remove these entirely once functionality/tests have been excised.
6167def fobjc_gc_only : Flag<["-"], "fobjc-gc-only">, Group<f_Group>,
6168  HelpText<"Use GC exclusively for Objective-C related memory management">;
6169def fobjc_gc : Flag<["-"], "fobjc-gc">, Group<f_Group>,
6170  HelpText<"Enable Objective-C garbage collection">;
6171
6172def fexperimental_max_bitint_width_EQ:
6173  Joined<["-"], "fexperimental-max-bitint-width=">, Group<f_Group>,
6174  MetaVarName<"<N>">,
6175  HelpText<"Set the maximum bitwidth for _BitInt (this option is expected to be removed in the future)">,
6176  MarshallingInfoInt<LangOpts<"MaxBitIntWidth">>;
6177
6178} // let Flags = [CC1Option, NoDriverOption]
6179
6180//===----------------------------------------------------------------------===//
6181// Header Search Options
6182//===----------------------------------------------------------------------===//
6183
6184let Flags = [CC1Option, NoDriverOption] in {
6185
6186def nostdsysteminc : Flag<["-"], "nostdsysteminc">,
6187  HelpText<"Disable standard system #include directories">,
6188  MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseStandardSystemIncludes">>;
6189def fdisable_module_hash : Flag<["-"], "fdisable-module-hash">,
6190  HelpText<"Disable the module hash">,
6191  MarshallingInfoFlag<HeaderSearchOpts<"DisableModuleHash">>;
6192def fmodules_hash_content : Flag<["-"], "fmodules-hash-content">,
6193  HelpText<"Enable hashing the content of a module file">,
6194  MarshallingInfoFlag<HeaderSearchOpts<"ModulesHashContent">>;
6195def fmodules_strict_context_hash : Flag<["-"], "fmodules-strict-context-hash">,
6196  HelpText<"Enable hashing of all compiler options that could impact the "
6197           "semantics of a module in an implicit build">,
6198  MarshallingInfoFlag<HeaderSearchOpts<"ModulesStrictContextHash">>;
6199def c_isystem : JoinedOrSeparate<["-"], "c-isystem">, MetaVarName<"<directory>">,
6200  HelpText<"Add directory to the C SYSTEM include search path">;
6201def objc_isystem : JoinedOrSeparate<["-"], "objc-isystem">,
6202  MetaVarName<"<directory>">,
6203  HelpText<"Add directory to the ObjC SYSTEM include search path">;
6204def objcxx_isystem : JoinedOrSeparate<["-"], "objcxx-isystem">,
6205  MetaVarName<"<directory>">,
6206  HelpText<"Add directory to the ObjC++ SYSTEM include search path">;
6207def internal_isystem : JoinedOrSeparate<["-"], "internal-isystem">,
6208  MetaVarName<"<directory>">,
6209  HelpText<"Add directory to the internal system include search path; these "
6210           "are assumed to not be user-provided and are used to model system "
6211           "and standard headers' paths.">;
6212def internal_externc_isystem : JoinedOrSeparate<["-"], "internal-externc-isystem">,
6213  MetaVarName<"<directory>">,
6214  HelpText<"Add directory to the internal system include search path with "
6215           "implicit extern \"C\" semantics; these are assumed to not be "
6216           "user-provided and are used to model system and standard headers' "
6217           "paths.">;
6218
6219} // let Flags = [CC1Option, NoDriverOption]
6220
6221//===----------------------------------------------------------------------===//
6222// Preprocessor Options
6223//===----------------------------------------------------------------------===//
6224
6225let Flags = [CC1Option, NoDriverOption] in {
6226
6227def chain_include : Separate<["-"], "chain-include">, MetaVarName<"<file>">,
6228  HelpText<"Include and chain a header file after turning it into PCH">;
6229def preamble_bytes_EQ : Joined<["-"], "preamble-bytes=">,
6230  HelpText<"Assume that the precompiled header is a precompiled preamble "
6231           "covering the first N bytes of the main file">;
6232def detailed_preprocessing_record : Flag<["-"], "detailed-preprocessing-record">,
6233  HelpText<"include a detailed record of preprocessing actions">,
6234  MarshallingInfoFlag<PreprocessorOpts<"DetailedRecord">>;
6235def setup_static_analyzer : Flag<["-"], "setup-static-analyzer">,
6236  HelpText<"Set up preprocessor for static analyzer (done automatically when static analyzer is run).">,
6237  MarshallingInfoFlag<PreprocessorOpts<"SetUpStaticAnalyzer">>;
6238def disable_pragma_debug_crash : Flag<["-"], "disable-pragma-debug-crash">,
6239  HelpText<"Disable any #pragma clang __debug that can lead to crashing behavior. This is meant for testing.">,
6240  MarshallingInfoFlag<PreprocessorOpts<"DisablePragmaDebugCrash">>;
6241
6242} // let Flags = [CC1Option, NoDriverOption]
6243
6244//===----------------------------------------------------------------------===//
6245// CUDA Options
6246//===----------------------------------------------------------------------===//
6247
6248let Flags = [CC1Option, NoDriverOption] in {
6249
6250def fcuda_is_device : Flag<["-"], "fcuda-is-device">,
6251  HelpText<"Generate code for CUDA device">,
6252  MarshallingInfoFlag<LangOpts<"CUDAIsDevice">>;
6253def fcuda_include_gpubinary : Separate<["-"], "fcuda-include-gpubinary">,
6254  HelpText<"Incorporate CUDA device-side binary into host object file.">,
6255  MarshallingInfoString<CodeGenOpts<"CudaGpuBinaryFileName">>;
6256def fcuda_allow_variadic_functions : Flag<["-"], "fcuda-allow-variadic-functions">,
6257  HelpText<"Allow variadic functions in CUDA device code.">,
6258  MarshallingInfoFlag<LangOpts<"CUDAAllowVariadicFunctions">>;
6259def fno_cuda_host_device_constexpr : Flag<["-"], "fno-cuda-host-device-constexpr">,
6260  HelpText<"Don't treat unattributed constexpr functions as __host__ __device__.">,
6261  MarshallingInfoNegativeFlag<LangOpts<"CUDAHostDeviceConstexpr">>;
6262
6263} // let Flags = [CC1Option, NoDriverOption]
6264
6265//===----------------------------------------------------------------------===//
6266// OpenMP Options
6267//===----------------------------------------------------------------------===//
6268
6269def fopenmp_is_device : Flag<["-"], "fopenmp-is-device">,
6270  HelpText<"Generate code only for an OpenMP target device.">,
6271  Flags<[CC1Option, NoDriverOption]>;
6272def fopenmp_host_ir_file_path : Separate<["-"], "fopenmp-host-ir-file-path">,
6273  HelpText<"Path to the IR file produced by the frontend for the host.">,
6274  Flags<[CC1Option, NoDriverOption]>;
6275
6276//===----------------------------------------------------------------------===//
6277// SYCL Options
6278//===----------------------------------------------------------------------===//
6279
6280def fsycl_is_device : Flag<["-"], "fsycl-is-device">,
6281  HelpText<"Generate code for SYCL device.">,
6282  Flags<[CC1Option, NoDriverOption]>,
6283  MarshallingInfoFlag<LangOpts<"SYCLIsDevice">>;
6284def fsycl_is_host : Flag<["-"], "fsycl-is-host">,
6285  HelpText<"SYCL host compilation">,
6286  Flags<[CC1Option, NoDriverOption]>,
6287  MarshallingInfoFlag<LangOpts<"SYCLIsHost">>;
6288
6289def sycl_std_EQ : Joined<["-"], "sycl-std=">, Group<sycl_Group>,
6290  Flags<[CC1Option, NoArgumentUnused, CoreOption]>,
6291  HelpText<"SYCL language standard to compile for.">,
6292  Values<"2020,2017,121,1.2.1,sycl-1.2.1">,
6293  NormalizedValues<["SYCL_2020", "SYCL_2017", "SYCL_2017", "SYCL_2017", "SYCL_2017"]>,
6294  NormalizedValuesScope<"LangOptions">,
6295  MarshallingInfoEnum<LangOpts<"SYCLVersion">, "SYCL_None">,
6296  ShouldParseIf<!strconcat(fsycl_is_device.KeyPath, "||", fsycl_is_host.KeyPath)>;
6297
6298defm cuda_approx_transcendentals : BoolFOption<"cuda-approx-transcendentals",
6299  LangOpts<"CUDADeviceApproxTranscendentals">, DefaultFalse,
6300  PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">,
6301  BothFlags<[], " approximate transcendental functions">>,
6302  ShouldParseIf<fcuda_is_device.KeyPath>;
6303
6304//===----------------------------------------------------------------------===//
6305// Frontend Options - cc1 + fc1
6306//===----------------------------------------------------------------------===//
6307
6308let Flags = [CC1Option, FC1Option, NoDriverOption] in {
6309let Group = Action_Group in {
6310
6311def emit_obj : Flag<["-"], "emit-obj">,
6312  HelpText<"Emit native object files">;
6313def init_only : Flag<["-"], "init-only">,
6314  HelpText<"Only execute frontend initialization">;
6315def emit_llvm_bc : Flag<["-"], "emit-llvm-bc">,
6316  HelpText<"Build ASTs then convert to LLVM, emit .bc file">;
6317
6318} // let Group = Action_Group
6319
6320def load : Separate<["-"], "load">, MetaVarName<"<dsopath>">,
6321  HelpText<"Load the named plugin (dynamic shared object)">;
6322def plugin : Separate<["-"], "plugin">, MetaVarName<"<name>">,
6323  HelpText<"Use the named plugin action instead of the default action (use \"help\" to list available options)">;
6324defm debug_pass_manager : BoolOption<"f", "debug-pass-manager",
6325  CodeGenOpts<"DebugPassManager">, DefaultFalse,
6326  PosFlag<SetTrue, [], "Prints debug information for the new pass manager">,
6327  NegFlag<SetFalse, [], "Disables debug printing for the new pass manager">>;
6328
6329} // let Flags = [CC1Option, FC1Option, NoDriverOption]
6330
6331//===----------------------------------------------------------------------===//
6332// cc1as-only Options
6333//===----------------------------------------------------------------------===//
6334
6335let Flags = [CC1AsOption, NoDriverOption] in {
6336
6337// Language Options
6338def n : Flag<["-"], "n">,
6339  HelpText<"Don't automatically start assembly file with a text section">;
6340
6341// Frontend Options
6342def filetype : Separate<["-"], "filetype">,
6343    HelpText<"Specify the output file type ('asm', 'null', or 'obj')">;
6344
6345// Transliterate Options
6346def output_asm_variant : Separate<["-"], "output-asm-variant">,
6347    HelpText<"Select the asm variant index to use for output">;
6348def show_encoding : Flag<["-"], "show-encoding">,
6349    HelpText<"Show instruction encoding information in transliterate mode">;
6350def show_inst : Flag<["-"], "show-inst">,
6351    HelpText<"Show internal instruction representation in transliterate mode">;
6352
6353// Assemble Options
6354def dwarf_debug_producer : Separate<["-"], "dwarf-debug-producer">,
6355  HelpText<"The string to embed in the Dwarf debug AT_producer record.">;
6356
6357def defsym : Separate<["-"], "defsym">,
6358  HelpText<"Define a value for a symbol">;
6359
6360} // let Flags = [CC1AsOption]
6361
6362//===----------------------------------------------------------------------===//
6363// clang-cl Options
6364//===----------------------------------------------------------------------===//
6365
6366def cl_Group : OptionGroup<"<clang-cl options>">, Flags<[CLDXCOption]>,
6367  HelpText<"CL.EXE COMPATIBILITY OPTIONS">;
6368
6369def cl_compile_Group : OptionGroup<"<clang-cl compile-only options>">,
6370  Group<cl_Group>;
6371
6372def cl_ignored_Group : OptionGroup<"<clang-cl ignored options>">,
6373  Group<cl_Group>;
6374
6375class CLFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
6376  Group<cl_Group>, Flags<[CLOption, NoXarchOption]>;
6377
6378class CLCompileFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
6379  Group<cl_compile_Group>, Flags<[CLOption, NoXarchOption]>;
6380
6381class CLIgnoredFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
6382  Group<cl_ignored_Group>, Flags<[CLOption, NoXarchOption]>;
6383
6384class CLJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
6385  Group<cl_Group>, Flags<[CLOption, NoXarchOption]>;
6386
6387class CLCompileJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
6388  Group<cl_compile_Group>, Flags<[CLOption, NoXarchOption]>;
6389
6390class CLIgnoredJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
6391  Group<cl_ignored_Group>, Flags<[CLOption, NoXarchOption, HelpHidden]>;
6392
6393class CLJoinedOrSeparate<string name> : Option<["/", "-"], name,
6394  KIND_JOINED_OR_SEPARATE>, Group<cl_Group>, Flags<[CLOption, NoXarchOption]>;
6395
6396class CLDXCJoinedOrSeparate<string name> : Option<["/", "-"], name,
6397  KIND_JOINED_OR_SEPARATE>, Group<cl_Group>, Flags<[CLDXCOption, NoXarchOption]>;
6398
6399class CLCompileJoinedOrSeparate<string name> : Option<["/", "-"], name,
6400  KIND_JOINED_OR_SEPARATE>, Group<cl_compile_Group>,
6401  Flags<[CLOption, NoXarchOption]>;
6402
6403class CLRemainingArgsJoined<string name> : Option<["/", "-"], name,
6404  KIND_REMAINING_ARGS_JOINED>, Group<cl_Group>, Flags<[CLOption, NoXarchOption]>;
6405
6406// Aliases:
6407// (We don't put any of these in cl_compile_Group as the options they alias are
6408// already in the right group.)
6409
6410def _SLASH_Brepro : CLFlag<"Brepro">,
6411  HelpText<"Do not write current time into COFF output (breaks link.exe /incremental)">,
6412  Alias<mno_incremental_linker_compatible>;
6413def _SLASH_Brepro_ : CLFlag<"Brepro-">,
6414  HelpText<"Write current time into COFF output (default)">,
6415  Alias<mincremental_linker_compatible>;
6416def _SLASH_C : CLFlag<"C">,
6417  HelpText<"Do not discard comments when preprocessing">, Alias<C>;
6418def _SLASH_c : CLFlag<"c">, HelpText<"Compile only">, Alias<c>;
6419def _SLASH_d1PP : CLFlag<"d1PP">,
6420  HelpText<"Retain macro definitions in /E mode">, Alias<dD>;
6421def _SLASH_d1reportAllClassLayout : CLFlag<"d1reportAllClassLayout">,
6422  HelpText<"Dump record layout information">,
6423  Alias<Xclang>, AliasArgs<["-fdump-record-layouts"]>;
6424def _SLASH_diagnostics_caret : CLFlag<"diagnostics:caret">,
6425  HelpText<"Enable caret and column diagnostics (default)">;
6426def _SLASH_diagnostics_column : CLFlag<"diagnostics:column">,
6427  HelpText<"Disable caret diagnostics but keep column info">;
6428def _SLASH_diagnostics_classic : CLFlag<"diagnostics:classic">,
6429  HelpText<"Disable column and caret diagnostics">;
6430def _SLASH_D : CLJoinedOrSeparate<"D">, HelpText<"Define macro">,
6431  MetaVarName<"<macro[=value]>">, Alias<D>;
6432def _SLASH_E : CLFlag<"E">, HelpText<"Preprocess to stdout">, Alias<E>;
6433def _SLASH_external_COLON_I : CLJoinedOrSeparate<"external:I">, Alias<isystem>,
6434  HelpText<"Add directory to include search path with warnings suppressed">,
6435  MetaVarName<"<dir>">;
6436def _SLASH_fp_except : CLFlag<"fp:except">, HelpText<"">, Alias<ftrapping_math>;
6437def _SLASH_fp_except_ : CLFlag<"fp:except-">,
6438  HelpText<"">, Alias<fno_trapping_math>;
6439def _SLASH_fp_fast : CLFlag<"fp:fast">, HelpText<"">, Alias<ffast_math>;
6440def _SLASH_fp_precise : CLFlag<"fp:precise">,
6441  HelpText<"">, Alias<fno_fast_math>;
6442def _SLASH_fp_strict : CLFlag<"fp:strict">, HelpText<"">, Alias<fno_fast_math>;
6443def _SLASH_fsanitize_EQ_address : CLFlag<"fsanitize=address">,
6444  HelpText<"Enable AddressSanitizer">,
6445  Alias<fsanitize_EQ>, AliasArgs<["address"]>;
6446def _SLASH_GA : CLFlag<"GA">, Alias<ftlsmodel_EQ>, AliasArgs<["local-exec"]>,
6447  HelpText<"Assume thread-local variables are defined in the executable">;
6448def _SLASH_GR : CLFlag<"GR">, HelpText<"Emit RTTI data (default)">;
6449def _SLASH_GR_ : CLFlag<"GR-">, HelpText<"Do not emit RTTI data">;
6450def _SLASH_GF : CLIgnoredFlag<"GF">,
6451  HelpText<"Enable string pooling (default)">;
6452def _SLASH_GF_ : CLFlag<"GF-">, HelpText<"Disable string pooling">,
6453  Alias<fwritable_strings>;
6454def _SLASH_GS : CLFlag<"GS">,
6455  HelpText<"Enable buffer security check (default)">;
6456def _SLASH_GS_ : CLFlag<"GS-">, HelpText<"Disable buffer security check">;
6457def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">,
6458  Alias<mstack_probe_size>, AliasArgs<["4096"]>;
6459def _SLASH_Gs : CLJoined<"Gs">,
6460  HelpText<"Set stack probe size (default 4096)">, Alias<mstack_probe_size>;
6461def _SLASH_Gy : CLFlag<"Gy">, HelpText<"Put each function in its own section">,
6462  Alias<ffunction_sections>;
6463def _SLASH_Gy_ : CLFlag<"Gy-">,
6464  HelpText<"Do not put each function in its own section (default)">,
6465  Alias<fno_function_sections>;
6466def _SLASH_Gw : CLFlag<"Gw">, HelpText<"Put each data item in its own section">,
6467  Alias<fdata_sections>;
6468def _SLASH_Gw_ : CLFlag<"Gw-">,
6469  HelpText<"Do not put each data item in its own section (default)">,
6470  Alias<fno_data_sections>;
6471def _SLASH_help : CLFlag<"help">, Alias<help>,
6472  HelpText<"Display available options">;
6473def _SLASH_HELP : CLFlag<"HELP">, Alias<help>;
6474def _SLASH_hotpatch : CLFlag<"hotpatch">, Alias<fms_hotpatch>,
6475  HelpText<"Create hotpatchable image">;
6476def _SLASH_I : CLDXCJoinedOrSeparate<"I">,
6477  HelpText<"Add directory to include search path">, MetaVarName<"<dir>">,
6478  Alias<I>;
6479def _SLASH_J : CLFlag<"J">, HelpText<"Make char type unsigned">,
6480  Alias<funsigned_char>;
6481
6482// The _SLASH_O option handles all the /O flags, but we also provide separate
6483// aliased options to provide separate help messages.
6484def _SLASH_O : CLJoined<"O">,
6485  HelpText<"Set multiple /O flags at once; e.g. '/O2y-' for '/O2 /Oy-'">,
6486  MetaVarName<"<flags>">;
6487def : CLFlag<"O1">, Alias<_SLASH_O>, AliasArgs<["1"]>,
6488  HelpText<"Optimize for size  (like /Og     /Os /Oy /Ob2 /GF /Gy)">;
6489def : CLFlag<"O2">, Alias<_SLASH_O>, AliasArgs<["2"]>,
6490  HelpText<"Optimize for speed (like /Og /Oi /Ot /Oy /Ob2 /GF /Gy)">;
6491def : CLFlag<"Ob0">, Alias<_SLASH_O>, AliasArgs<["b0"]>,
6492  HelpText<"Disable function inlining">;
6493def : CLFlag<"Ob1">, Alias<_SLASH_O>, AliasArgs<["b1"]>,
6494  HelpText<"Only inline functions explicitly or implicitly marked inline">;
6495def : CLFlag<"Ob2">, Alias<_SLASH_O>, AliasArgs<["b2"]>,
6496  HelpText<"Inline functions as deemed beneficial by the compiler">;
6497def : CLFlag<"Od">, Alias<_SLASH_O>, AliasArgs<["d"]>,
6498  HelpText<"Disable optimization">;
6499def : CLFlag<"Og">, Alias<_SLASH_O>, AliasArgs<["g"]>,
6500  HelpText<"No effect">;
6501def : CLFlag<"Oi">, Alias<_SLASH_O>, AliasArgs<["i"]>,
6502  HelpText<"Enable use of builtin functions">;
6503def : CLFlag<"Oi-">, Alias<_SLASH_O>, AliasArgs<["i-"]>,
6504  HelpText<"Disable use of builtin functions">;
6505def : CLFlag<"Os">, Alias<_SLASH_O>, AliasArgs<["s"]>,
6506  HelpText<"Optimize for size">;
6507def : CLFlag<"Ot">, Alias<_SLASH_O>, AliasArgs<["t"]>,
6508  HelpText<"Optimize for speed">;
6509def : CLFlag<"Ox">, Alias<_SLASH_O>, AliasArgs<["x"]>,
6510  HelpText<"Deprecated (like /Og /Oi /Ot /Oy /Ob2); use /O2">;
6511def : CLFlag<"Oy">, Alias<_SLASH_O>, AliasArgs<["y"]>,
6512  HelpText<"Enable frame pointer omission (x86 only)">;
6513def : CLFlag<"Oy-">, Alias<_SLASH_O>, AliasArgs<["y-"]>,
6514  HelpText<"Disable frame pointer omission (x86 only, default)">;
6515
6516def _SLASH_QUESTION : CLFlag<"?">, Alias<help>,
6517  HelpText<"Display available options">;
6518def _SLASH_Qvec : CLFlag<"Qvec">,
6519  HelpText<"Enable the loop vectorization passes">, Alias<fvectorize>;
6520def _SLASH_Qvec_ : CLFlag<"Qvec-">,
6521  HelpText<"Disable the loop vectorization passes">, Alias<fno_vectorize>;
6522def _SLASH_showIncludes : CLFlag<"showIncludes">,
6523  HelpText<"Print info about included files to stderr">;
6524def _SLASH_showIncludes_user : CLFlag<"showIncludes:user">,
6525  HelpText<"Like /showIncludes but omit system headers">;
6526def _SLASH_showFilenames : CLFlag<"showFilenames">,
6527  HelpText<"Print the name of each compiled file">;
6528def _SLASH_showFilenames_ : CLFlag<"showFilenames-">,
6529  HelpText<"Do not print the name of each compiled file (default)">;
6530def _SLASH_source_charset : CLCompileJoined<"source-charset:">,
6531  HelpText<"Set source encoding, supports only UTF-8">,
6532  Alias<finput_charset_EQ>;
6533def _SLASH_execution_charset : CLCompileJoined<"execution-charset:">,
6534  HelpText<"Set runtime encoding, supports only UTF-8">,
6535  Alias<fexec_charset_EQ>;
6536def _SLASH_std : CLCompileJoined<"std:">,
6537  HelpText<"Set language version (c++14,c++17,c++20,c++latest,c11,c17)">;
6538def _SLASH_U : CLJoinedOrSeparate<"U">, HelpText<"Undefine macro">,
6539  MetaVarName<"<macro>">, Alias<U>;
6540def _SLASH_validate_charset : CLFlag<"validate-charset">,
6541  Alias<W_Joined>, AliasArgs<["invalid-source-encoding"]>;
6542def _SLASH_validate_charset_ : CLFlag<"validate-charset-">,
6543  Alias<W_Joined>, AliasArgs<["no-invalid-source-encoding"]>;
6544def _SLASH_external_W0 : CLFlag<"external:W0">, HelpText<"Ignore warnings from system headers (default)">, Alias<Wno_system_headers>;
6545def _SLASH_external_W1 : CLFlag<"external:W1">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>;
6546def _SLASH_external_W2 : CLFlag<"external:W2">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>;
6547def _SLASH_external_W3 : CLFlag<"external:W3">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>;
6548def _SLASH_external_W4 : CLFlag<"external:W4">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>;
6549def _SLASH_W0 : CLFlag<"W0">, HelpText<"Disable all warnings">, Alias<w>;
6550def _SLASH_W1 : CLFlag<"W1">, HelpText<"Enable -Wall">, Alias<Wall>;
6551def _SLASH_W2 : CLFlag<"W2">, HelpText<"Enable -Wall">, Alias<Wall>;
6552def _SLASH_W3 : CLFlag<"W3">, HelpText<"Enable -Wall">, Alias<Wall>;
6553def _SLASH_W4 : CLFlag<"W4">, HelpText<"Enable -Wall and -Wextra">, Alias<WCL4>;
6554def _SLASH_Wall : CLFlag<"Wall">, HelpText<"Enable -Weverything">,
6555  Alias<W_Joined>, AliasArgs<["everything"]>;
6556def _SLASH_WX : CLFlag<"WX">, HelpText<"Treat warnings as errors">,
6557  Alias<W_Joined>, AliasArgs<["error"]>;
6558def _SLASH_WX_ : CLFlag<"WX-">,
6559  HelpText<"Do not treat warnings as errors (default)">,
6560  Alias<W_Joined>, AliasArgs<["no-error"]>;
6561def _SLASH_w_flag : CLFlag<"w">, HelpText<"Disable all warnings">, Alias<w>;
6562def _SLASH_wd : CLCompileJoined<"wd">;
6563def _SLASH_vd : CLJoined<"vd">, HelpText<"Control vtordisp placement">,
6564  Alias<vtordisp_mode_EQ>;
6565def _SLASH_X : CLFlag<"X">,
6566  HelpText<"Do not add %INCLUDE% to include search path">, Alias<nostdlibinc>;
6567def _SLASH_Zc_sizedDealloc : CLFlag<"Zc:sizedDealloc">,
6568  HelpText<"Enable C++14 sized global deallocation functions">,
6569  Alias<fsized_deallocation>;
6570def _SLASH_Zc_sizedDealloc_ : CLFlag<"Zc:sizedDealloc-">,
6571  HelpText<"Disable C++14 sized global deallocation functions">,
6572  Alias<fno_sized_deallocation>;
6573def _SLASH_Zc_alignedNew : CLFlag<"Zc:alignedNew">,
6574  HelpText<"Enable C++17 aligned allocation functions">,
6575  Alias<faligned_allocation>;
6576def _SLASH_Zc_alignedNew_ : CLFlag<"Zc:alignedNew-">,
6577  HelpText<"Disable C++17 aligned allocation functions">,
6578  Alias<fno_aligned_allocation>;
6579def _SLASH_Zc_char8_t : CLFlag<"Zc:char8_t">,
6580  HelpText<"Enable char8_t from C++2a">,
6581  Alias<fchar8__t>;
6582def _SLASH_Zc_char8_t_ : CLFlag<"Zc:char8_t-">,
6583  HelpText<"Disable char8_t from c++2a">,
6584  Alias<fno_char8__t>;
6585def _SLASH_Zc_strictStrings : CLFlag<"Zc:strictStrings">,
6586  HelpText<"Treat string literals as const">, Alias<W_Joined>,
6587  AliasArgs<["error=c++11-compat-deprecated-writable-strings"]>;
6588def _SLASH_Zc_threadSafeInit : CLFlag<"Zc:threadSafeInit">,
6589  HelpText<"Enable thread-safe initialization of static variables">,
6590  Alias<fthreadsafe_statics>;
6591def _SLASH_Zc_threadSafeInit_ : CLFlag<"Zc:threadSafeInit-">,
6592  HelpText<"Disable thread-safe initialization of static variables">,
6593  Alias<fno_threadsafe_statics>;
6594def _SLASH_Zc_trigraphs : CLFlag<"Zc:trigraphs">,
6595  HelpText<"Enable trigraphs">, Alias<ftrigraphs>;
6596def _SLASH_Zc_trigraphs_off : CLFlag<"Zc:trigraphs-">,
6597  HelpText<"Disable trigraphs (default)">, Alias<fno_trigraphs>;
6598def _SLASH_Zc_twoPhase : CLFlag<"Zc:twoPhase">,
6599  HelpText<"Enable two-phase name lookup in templates">,
6600  Alias<fno_delayed_template_parsing>;
6601def _SLASH_Zc_twoPhase_ : CLFlag<"Zc:twoPhase-">,
6602  HelpText<"Disable two-phase name lookup in templates (default)">,
6603  Alias<fdelayed_template_parsing>;
6604def _SLASH_Zc_wchar_t : CLFlag<"Zc:wchar_t">,
6605  HelpText<"Enable C++ builtin type wchar_t (default)">;
6606def _SLASH_Zc_wchar_t_ : CLFlag<"Zc:wchar_t-">,
6607  HelpText<"Disable C++ builtin type wchar_t">;
6608def _SLASH_Z7 : CLFlag<"Z7">,
6609  HelpText<"Enable CodeView debug information in object files">;
6610def _SLASH_Zi : CLFlag<"Zi">, Alias<_SLASH_Z7>,
6611  HelpText<"Like /Z7">;
6612def _SLASH_Zp : CLJoined<"Zp">,
6613  HelpText<"Set default maximum struct packing alignment">,
6614  Alias<fpack_struct_EQ>;
6615def _SLASH_Zp_flag : CLFlag<"Zp">,
6616  HelpText<"Set default maximum struct packing alignment to 1">,
6617  Alias<fpack_struct_EQ>, AliasArgs<["1"]>;
6618def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Syntax-check only">,
6619  Alias<fsyntax_only>;
6620def _SLASH_openmp_ : CLFlag<"openmp-">,
6621  HelpText<"Disable OpenMP support">, Alias<fno_openmp>;
6622def _SLASH_openmp : CLFlag<"openmp">, HelpText<"Enable OpenMP support">,
6623  Alias<fopenmp>;
6624def _SLASH_openmp_experimental : CLFlag<"openmp:experimental">,
6625  HelpText<"Enable OpenMP support with experimental SIMD support">,
6626  Alias<fopenmp>;
6627def _SLASH_tune : CLCompileJoined<"tune:">,
6628  HelpText<"Set CPU for optimization without affecting instruction set">,
6629  Alias<mtune_EQ>;
6630def _SLASH_QIntel_jcc_erratum : CLFlag<"QIntel-jcc-erratum">,
6631  HelpText<"Align branches within 32-byte boundaries to mitigate the performance impact of the Intel JCC erratum.">,
6632  Alias<mbranches_within_32B_boundaries>;
6633
6634// Non-aliases:
6635
6636def _SLASH_arch : CLCompileJoined<"arch:">,
6637  HelpText<"Set architecture for code generation">;
6638
6639def _SLASH_M_Group : OptionGroup<"</M group>">, Group<cl_compile_Group>;
6640def _SLASH_volatile_Group : OptionGroup<"</volatile group>">,
6641  Group<cl_compile_Group>;
6642
6643def _SLASH_EH : CLJoined<"EH">, HelpText<"Set exception handling model">;
6644def _SLASH_EP : CLFlag<"EP">,
6645  HelpText<"Disable linemarker output and preprocess to stdout">;
6646def _SLASH_external_env : CLJoined<"external:env:">,
6647  HelpText<"Add dirs in env var <var> to include search path with warnings suppressed">,
6648  MetaVarName<"<var>">;
6649def _SLASH_FA : CLJoined<"FA">,
6650  HelpText<"Output assembly code file during compilation">;
6651def _SLASH_Fa : CLJoined<"Fa">,
6652  HelpText<"Set assembly output file name (with /FA)">,
6653  MetaVarName<"<file or dir/>">;
6654def _SLASH_FI : CLJoinedOrSeparate<"FI">,
6655  HelpText<"Include file before parsing">, Alias<include_>;
6656def _SLASH_Fe : CLJoined<"Fe">,
6657  HelpText<"Set output executable file name">,
6658  MetaVarName<"<file or dir/>">;
6659def _SLASH_Fe_COLON : CLJoined<"Fe:">, Alias<_SLASH_Fe>;
6660def _SLASH_Fi : CLCompileJoined<"Fi">,
6661  HelpText<"Set preprocess output file name (with /P)">,
6662  MetaVarName<"<file>">;
6663def _SLASH_Fo : CLCompileJoined<"Fo">,
6664  HelpText<"Set output object file (with /c)">,
6665  MetaVarName<"<file or dir/>">;
6666def _SLASH_guard : CLJoined<"guard:">,
6667  HelpText<"Enable Control Flow Guard with /guard:cf, or only the table with /guard:cf,nochecks. "
6668           "Enable EH Continuation Guard with /guard:ehcont">;
6669def _SLASH_GX : CLFlag<"GX">,
6670  HelpText<"Deprecated; use /EHsc">;
6671def _SLASH_GX_ : CLFlag<"GX-">,
6672  HelpText<"Deprecated (like not passing /EH)">;
6673def _SLASH_imsvc : CLJoinedOrSeparate<"imsvc">,
6674  HelpText<"Add <dir> to system include search path, as if in %INCLUDE%">,
6675  MetaVarName<"<dir>">;
6676def _SLASH_JMC : CLFlag<"JMC">,
6677  HelpText<"Enable just-my-code debugging">;
6678def _SLASH_JMC_ : CLFlag<"JMC-">,
6679  HelpText<"Disable just-my-code debugging (default)">;
6680def _SLASH_LD : CLFlag<"LD">, HelpText<"Create DLL">;
6681def _SLASH_LDd : CLFlag<"LDd">, HelpText<"Create debug DLL">;
6682def _SLASH_link : CLRemainingArgsJoined<"link">,
6683  HelpText<"Forward options to the linker">, MetaVarName<"<options>">;
6684def _SLASH_MD : Option<["/", "-"], "MD", KIND_FLAG>, Group<_SLASH_M_Group>,
6685  Flags<[CLOption, NoXarchOption]>, HelpText<"Use DLL run-time">;
6686def _SLASH_MDd : Option<["/", "-"], "MDd", KIND_FLAG>, Group<_SLASH_M_Group>,
6687  Flags<[CLOption, NoXarchOption]>, HelpText<"Use DLL debug run-time">;
6688def _SLASH_MT : Option<["/", "-"], "MT", KIND_FLAG>, Group<_SLASH_M_Group>,
6689  Flags<[CLOption, NoXarchOption]>, HelpText<"Use static run-time">;
6690def _SLASH_MTd : Option<["/", "-"], "MTd", KIND_FLAG>, Group<_SLASH_M_Group>,
6691  Flags<[CLOption, NoXarchOption]>, HelpText<"Use static debug run-time">;
6692def _SLASH_o : CLJoinedOrSeparate<"o">,
6693  HelpText<"Deprecated (set output file name); use /Fe or /Fe">,
6694  MetaVarName<"<file or dir/>">;
6695def _SLASH_P : CLFlag<"P">, HelpText<"Preprocess to file">;
6696def _SLASH_permissive : CLFlag<"permissive">,
6697  HelpText<"Enable some non conforming code to compile">;
6698def _SLASH_permissive_ : CLFlag<"permissive-">,
6699  HelpText<"Disable non conforming code from compiling (default)">;
6700def _SLASH_Tc : CLCompileJoinedOrSeparate<"Tc">,
6701  HelpText<"Treat <file> as C source file">, MetaVarName<"<file>">;
6702def _SLASH_TC : CLCompileFlag<"TC">, HelpText<"Treat all source files as C">;
6703def _SLASH_Tp : CLCompileJoinedOrSeparate<"Tp">,
6704  HelpText<"Treat <file> as C++ source file">, MetaVarName<"<file>">;
6705def _SLASH_TP : CLCompileFlag<"TP">, HelpText<"Treat all source files as C++">;
6706def _SLASH_diasdkdir : CLJoinedOrSeparate<"diasdkdir">,
6707  HelpText<"Path to the DIA SDK">, MetaVarName<"<dir>">;
6708def _SLASH_vctoolsdir : CLJoinedOrSeparate<"vctoolsdir">,
6709  HelpText<"Path to the VCToolChain">, MetaVarName<"<dir>">;
6710def _SLASH_vctoolsversion : CLJoinedOrSeparate<"vctoolsversion">,
6711  HelpText<"For use with /winsysroot, defaults to newest found">;
6712def _SLASH_winsdkdir : CLJoinedOrSeparate<"winsdkdir">,
6713  HelpText<"Path to the Windows SDK">, MetaVarName<"<dir>">;
6714def _SLASH_winsdkversion : CLJoinedOrSeparate<"winsdkversion">,
6715  HelpText<"Full version of the Windows SDK, defaults to newest found">;
6716def _SLASH_winsysroot : CLJoinedOrSeparate<"winsysroot">,
6717  HelpText<"Same as \"/diasdkdir <dir>/DIA SDK\" /vctoolsdir <dir>/VC/Tools/MSVC/<vctoolsversion> \"/winsdkdir <dir>/Windows Kits/10\"">,
6718  MetaVarName<"<dir>">;
6719def _SLASH_volatile_iso : Option<["/", "-"], "volatile:iso", KIND_FLAG>,
6720  Group<_SLASH_volatile_Group>, Flags<[CLOption, NoXarchOption]>,
6721  HelpText<"Volatile loads and stores have standard semantics">;
6722def _SLASH_vmb : CLFlag<"vmb">,
6723  HelpText<"Use a best-case representation method for member pointers">;
6724def _SLASH_vmg : CLFlag<"vmg">,
6725  HelpText<"Use a most-general representation for member pointers">;
6726def _SLASH_vms : CLFlag<"vms">,
6727  HelpText<"Set the default most-general representation to single inheritance">;
6728def _SLASH_vmm : CLFlag<"vmm">,
6729  HelpText<"Set the default most-general representation to "
6730           "multiple inheritance">;
6731def _SLASH_vmv : CLFlag<"vmv">,
6732  HelpText<"Set the default most-general representation to "
6733           "virtual inheritance">;
6734def _SLASH_volatile_ms  : Option<["/", "-"], "volatile:ms", KIND_FLAG>,
6735  Group<_SLASH_volatile_Group>, Flags<[CLOption, NoXarchOption]>,
6736  HelpText<"Volatile loads and stores have acquire and release semantics">;
6737def _SLASH_clang : CLJoined<"clang:">,
6738  HelpText<"Pass <arg> to the clang driver">, MetaVarName<"<arg>">;
6739def _SLASH_Zl : CLFlag<"Zl">,
6740  HelpText<"Do not let object file auto-link default libraries">;
6741
6742def _SLASH_Yc : CLJoined<"Yc">,
6743  HelpText<"Generate a pch file for all code up to and including <filename>">,
6744  MetaVarName<"<filename>">;
6745def _SLASH_Yu : CLJoined<"Yu">,
6746  HelpText<"Load a pch file and use it instead of all code up to "
6747           "and including <filename>">,
6748  MetaVarName<"<filename>">;
6749def _SLASH_Y_ : CLFlag<"Y-">,
6750  HelpText<"Disable precompiled headers, overrides /Yc and /Yu">;
6751def _SLASH_Zc_dllexportInlines : CLFlag<"Zc:dllexportInlines">,
6752  HelpText<"dllexport/dllimport inline member functions of dllexport/import classes (default)">;
6753def _SLASH_Zc_dllexportInlines_ : CLFlag<"Zc:dllexportInlines-">,
6754  HelpText<"Do not dllexport/dllimport inline member functions of dllexport/import classes">;
6755def _SLASH_Fp : CLJoined<"Fp">,
6756  HelpText<"Set pch file name (with /Yc and /Yu)">, MetaVarName<"<file>">;
6757
6758def _SLASH_Gd : CLFlag<"Gd">,
6759  HelpText<"Set __cdecl as a default calling convention">;
6760def _SLASH_Gr : CLFlag<"Gr">,
6761  HelpText<"Set __fastcall as a default calling convention">;
6762def _SLASH_Gz : CLFlag<"Gz">,
6763  HelpText<"Set __stdcall as a default calling convention">;
6764def _SLASH_Gv : CLFlag<"Gv">,
6765  HelpText<"Set __vectorcall as a default calling convention">;
6766def _SLASH_Gregcall : CLFlag<"Gregcall">,
6767  HelpText<"Set __regcall as a default calling convention">;
6768
6769// Ignored:
6770
6771def _SLASH_analyze_ : CLIgnoredFlag<"analyze-">;
6772def _SLASH_bigobj : CLIgnoredFlag<"bigobj">;
6773def _SLASH_cgthreads : CLIgnoredJoined<"cgthreads">;
6774def _SLASH_d2FastFail : CLIgnoredFlag<"d2FastFail">;
6775def _SLASH_d2Zi_PLUS : CLIgnoredFlag<"d2Zi+">;
6776def _SLASH_errorReport : CLIgnoredJoined<"errorReport">;
6777def _SLASH_FC : CLIgnoredFlag<"FC">;
6778def _SLASH_Fd : CLIgnoredJoined<"Fd">;
6779def _SLASH_FS : CLIgnoredFlag<"FS">;
6780def _SLASH_kernel_ : CLIgnoredFlag<"kernel-">;
6781def _SLASH_nologo : CLIgnoredFlag<"nologo">;
6782def _SLASH_RTC : CLIgnoredJoined<"RTC">;
6783def _SLASH_sdl : CLIgnoredFlag<"sdl">;
6784def _SLASH_sdl_ : CLIgnoredFlag<"sdl-">;
6785def _SLASH_utf8 : CLIgnoredFlag<"utf-8">,
6786  HelpText<"Set source and runtime encoding to UTF-8 (default)">;
6787def _SLASH_w : CLIgnoredJoined<"w">;
6788def _SLASH_Wv_ : CLIgnoredJoined<"Wv">;
6789def _SLASH_Zc___cplusplus : CLIgnoredFlag<"Zc:__cplusplus">;
6790def _SLASH_Zc_auto : CLIgnoredFlag<"Zc:auto">;
6791def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">;
6792def _SLASH_Zc_inline : CLIgnoredFlag<"Zc:inline">;
6793def _SLASH_Zc_rvalueCast : CLIgnoredFlag<"Zc:rvalueCast">;
6794def _SLASH_Zc_ternary : CLIgnoredFlag<"Zc:ternary">;
6795def _SLASH_ZH_MD5 : CLIgnoredFlag<"ZH:MD5">;
6796def _SLASH_ZH_SHA1 : CLIgnoredFlag<"ZH:SHA1">;
6797def _SLASH_ZH_SHA_256 : CLIgnoredFlag<"ZH:SHA_256">;
6798def _SLASH_Zm : CLIgnoredJoined<"Zm">;
6799def _SLASH_Zo : CLIgnoredFlag<"Zo">;
6800def _SLASH_Zo_ : CLIgnoredFlag<"Zo-">;
6801
6802
6803// Unsupported:
6804
6805def _SLASH_await : CLFlag<"await">;
6806def _SLASH_await_COLON : CLJoined<"await:">;
6807def _SLASH_constexpr : CLJoined<"constexpr:">;
6808def _SLASH_AI : CLJoinedOrSeparate<"AI">;
6809def _SLASH_Bt : CLFlag<"Bt">;
6810def _SLASH_Bt_plus : CLFlag<"Bt+">;
6811def _SLASH_clr : CLJoined<"clr">;
6812def _SLASH_d2 : CLJoined<"d2">;
6813def _SLASH_doc : CLJoined<"doc">;
6814def _SLASH_experimental : CLJoined<"experimental:">;
6815def _SLASH_exportHeader : CLFlag<"exportHeader">;
6816def _SLASH_external : CLJoined<"external:">;
6817def _SLASH_favor : CLJoined<"favor">;
6818def _SLASH_fsanitize_address_use_after_return : CLJoined<"fsanitize-address-use-after-return">;
6819def _SLASH_fno_sanitize_address_vcasan_lib : CLJoined<"fno-sanitize-address-vcasan-lib">;
6820def _SLASH_F : CLJoinedOrSeparate<"F">;
6821def _SLASH_Fm : CLJoined<"Fm">;
6822def _SLASH_Fr : CLJoined<"Fr">;
6823def _SLASH_FR : CLJoined<"FR">;
6824def _SLASH_FU : CLJoinedOrSeparate<"FU">;
6825def _SLASH_Fx : CLFlag<"Fx">;
6826def _SLASH_G1 : CLFlag<"G1">;
6827def _SLASH_G2 : CLFlag<"G2">;
6828def _SLASH_Ge : CLFlag<"Ge">;
6829def _SLASH_Gh : CLFlag<"Gh">;
6830def _SLASH_GH : CLFlag<"GH">;
6831def _SLASH_GL : CLFlag<"GL">;
6832def _SLASH_GL_ : CLFlag<"GL-">;
6833def _SLASH_Gm : CLFlag<"Gm">;
6834def _SLASH_Gm_ : CLFlag<"Gm-">;
6835def _SLASH_GT : CLFlag<"GT">;
6836def _SLASH_GZ : CLFlag<"GZ">;
6837def _SLASH_H : CLFlag<"H">;
6838def _SLASH_headername : CLJoined<"headerName:">;
6839def _SLASH_headerUnit : CLJoinedOrSeparate<"headerUnit">;
6840def _SLASH_headerUnitAngle : CLJoinedOrSeparate<"headerUnit:angle">;
6841def _SLASH_headerUnitQuote : CLJoinedOrSeparate<"headerUnit:quote">;
6842def _SLASH_homeparams : CLFlag<"homeparams">;
6843def _SLASH_kernel : CLFlag<"kernel">;
6844def _SLASH_LN : CLFlag<"LN">;
6845def _SLASH_MP : CLJoined<"MP">;
6846def _SLASH_Qfast_transcendentals : CLFlag<"Qfast_transcendentals">;
6847def _SLASH_QIfist : CLFlag<"QIfist">;
6848def _SLASH_Qimprecise_fwaits : CLFlag<"Qimprecise_fwaits">;
6849def _SLASH_Qpar : CLFlag<"Qpar">;
6850def _SLASH_Qpar_report : CLJoined<"Qpar-report">;
6851def _SLASH_Qsafe_fp_loads : CLFlag<"Qsafe_fp_loads">;
6852def _SLASH_Qspectre : CLFlag<"Qspectre">;
6853def _SLASH_Qspectre_load : CLFlag<"Qspectre-load">;
6854def _SLASH_Qspectre_load_cf : CLFlag<"Qspectre-load-cf">;
6855def _SLASH_Qvec_report : CLJoined<"Qvec-report">;
6856def _SLASH_reference : CLJoinedOrSeparate<"reference">;
6857def _SLASH_sourceDependencies : CLJoinedOrSeparate<"sourceDependencies">;
6858def _SLASH_sourceDependenciesDirectives : CLJoinedOrSeparate<"sourceDependencies:directives">;
6859def _SLASH_translateInclude : CLFlag<"translateInclude">;
6860def _SLASH_u : CLFlag<"u">;
6861def _SLASH_V : CLFlag<"V">;
6862def _SLASH_WL : CLFlag<"WL">;
6863def _SLASH_Wp64 : CLFlag<"Wp64">;
6864def _SLASH_Yd : CLFlag<"Yd">;
6865def _SLASH_Yl : CLJoined<"Yl">;
6866def _SLASH_Za : CLFlag<"Za">;
6867def _SLASH_Zc : CLJoined<"Zc:">;
6868def _SLASH_Ze : CLFlag<"Ze">;
6869def _SLASH_Zg : CLFlag<"Zg">;
6870def _SLASH_ZI : CLFlag<"ZI">;
6871def _SLASH_ZW : CLJoined<"ZW">;
6872
6873//===----------------------------------------------------------------------===//
6874// clang-dxc Options
6875//===----------------------------------------------------------------------===//
6876
6877def dxc_Group : OptionGroup<"<clang-dxc options>">, Flags<[DXCOption]>,
6878  HelpText<"dxc compatibility options">;
6879class DXCFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
6880  Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>;
6881class DXCJoinedOrSeparate<string name> : Option<["/", "-"], name,
6882  KIND_JOINED_OR_SEPARATE>, Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>;
6883
6884def dxc_help : Option<["/", "-", "--"], "help", KIND_JOINED>,
6885  Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>, Alias<help>,
6886  HelpText<"Display available options">;
6887def dxc_no_stdinc : DXCFlag<"hlsl-no-stdinc">,
6888  HelpText<"HLSL only. Disables all standard includes containing non-native compiler types and functions.">;
6889def Fo : DXCJoinedOrSeparate<"Fo">, Alias<o>,
6890  HelpText<"Output object file">;
6891def dxil_validator_version : Option<["/", "-"], "validator-version", KIND_SEPARATE>,
6892  Group<dxc_Group>, Flags<[DXCOption, NoXarchOption, CC1Option, HelpHidden]>,
6893  HelpText<"Override validator version for module. Format: <major.minor>;"
6894           "Default: DXIL.dll version or current internal version">,
6895  MarshallingInfoString<TargetOpts<"DxilValidatorVersion">>;
6896def target_profile : DXCJoinedOrSeparate<"T">, MetaVarName<"<profile>">,
6897  HelpText<"Set target profile">,
6898  Values<"ps_6_0, ps_6_1, ps_6_2, ps_6_3, ps_6_4, ps_6_5, ps_6_6, ps_6_7,"
6899         "vs_6_0, vs_6_1, vs_6_2, vs_6_3, vs_6_4, vs_6_5, vs_6_6, vs_6_7,"
6900         "gs_6_0, gs_6_1, gs_6_2, gs_6_3, gs_6_4, gs_6_5, gs_6_6, gs_6_7,"
6901         "hs_6_0, hs_6_1, hs_6_2, hs_6_3, hs_6_4, hs_6_5, hs_6_6, hs_6_7,"
6902         "ds_6_0, ds_6_1, ds_6_2, ds_6_3, ds_6_4, ds_6_5, ds_6_6, ds_6_7,"
6903         "cs_6_0, cs_6_1, cs_6_2, cs_6_3, cs_6_4, cs_6_5, cs_6_6, cs_6_7,"
6904         "lib_6_3, lib_6_4, lib_6_5, lib_6_6, lib_6_7, lib_6_x,"
6905         "ms_6_5, ms_6_6, ms_6_7,"
6906         "as_6_5, as_6_6, as_6_7">;
6907def dxc_D : Option<["--", "/", "-"], "D", KIND_JOINED_OR_SEPARATE>,
6908  Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>, Alias<D>;
6909def emit_pristine_llvm : DXCFlag<"emit-pristine-llvm">,
6910  HelpText<"Emit pristine LLVM IR from the frontend by not running any LLVM passes at all."
6911           "Same as -S + -emit-llvm + -disable-llvm-passes.">;
6912def fcgl : DXCFlag<"fcgl">, Alias<emit_pristine_llvm>;
6913def enable_16bit_types : DXCFlag<"enable-16bit-types">, Alias<fnative_half_type>,
6914  HelpText<"Enable 16-bit types and disable min precision types."
6915           "Available in HLSL 2018 and shader model 6.2.">;
6916