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// This is a target-specific option for compilation. Using it on an unsupported 79// target will lead to an err_drv_unsupported_opt_for_target error. 80def TargetSpecific : OptionFlag; 81 82// A short name to show in documentation. The name will be interpreted as rST. 83class DocName<string name> { string DocName = name; } 84 85// A brief description to show in documentation, interpreted as rST. 86class DocBrief<code descr> { code DocBrief = descr; } 87 88// Indicates that this group should be flattened into its parent when generating 89// documentation. 90class DocFlatten { bit DocFlatten = 1; } 91 92// Indicates that this warning is ignored, but accepted with a warning for 93// GCC compatibility. 94class IgnoredGCCCompat : Flags<[HelpHidden]> {} 95 96class TargetSpecific : Flags<[TargetSpecific]> {} 97 98///////// 99// Groups 100 101def Action_Group : OptionGroup<"<action group>">, DocName<"Actions">, 102 DocBrief<[{The action to perform on the input.}]>; 103 104// Meta-group for options which are only used for compilation, 105// and not linking etc. 106def CompileOnly_Group : OptionGroup<"<CompileOnly group>">, 107 DocName<"Compilation flags">, DocBrief<[{ 108Flags controlling the behavior of Clang during compilation. These flags have 109no effect during actions that do not perform compilation.}]>; 110 111def Preprocessor_Group : OptionGroup<"<Preprocessor group>">, 112 Group<CompileOnly_Group>, 113 DocName<"Preprocessor flags">, DocBrief<[{ 114Flags controlling the behavior of the Clang preprocessor.}]>; 115 116def IncludePath_Group : OptionGroup<"<I/i group>">, Group<Preprocessor_Group>, 117 DocName<"Include path management">, 118 DocBrief<[{ 119Flags controlling how ``#include``\s are resolved to files.}]>; 120 121def I_Group : OptionGroup<"<I group>">, Group<IncludePath_Group>, DocFlatten; 122def i_Group : OptionGroup<"<i group>">, Group<IncludePath_Group>, DocFlatten; 123def clang_i_Group : OptionGroup<"<clang i group>">, Group<i_Group>, DocFlatten; 124 125def M_Group : OptionGroup<"<M group>">, Group<Preprocessor_Group>, 126 DocName<"Dependency file generation">, DocBrief<[{ 127Flags controlling generation of a dependency file for ``make``-like build 128systems.}]>; 129 130def d_Group : OptionGroup<"<d group>">, Group<Preprocessor_Group>, 131 DocName<"Dumping preprocessor state">, DocBrief<[{ 132Flags allowing the state of the preprocessor to be dumped in various ways.}]>; 133 134def Diag_Group : OptionGroup<"<W/R group>">, Group<CompileOnly_Group>, 135 DocName<"Diagnostic flags">, DocBrief<[{ 136Flags controlling which warnings, errors, and remarks Clang will generate. 137See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.}]>; 138 139def R_Group : OptionGroup<"<R group>">, Group<Diag_Group>, DocFlatten; 140def R_value_Group : OptionGroup<"<R (with value) group>">, Group<R_Group>, 141 DocFlatten; 142def W_Group : OptionGroup<"<W group>">, Group<Diag_Group>, DocFlatten; 143def W_value_Group : OptionGroup<"<W (with value) group>">, Group<W_Group>, 144 DocFlatten; 145 146def f_Group : OptionGroup<"<f group>">, Group<CompileOnly_Group>, 147 DocName<"Target-independent compilation options">; 148 149def f_clang_Group : OptionGroup<"<f (clang-only) group>">, 150 Group<CompileOnly_Group>, DocFlatten; 151def pedantic_Group : OptionGroup<"<pedantic group>">, Group<f_Group>, 152 DocFlatten; 153def opencl_Group : OptionGroup<"<opencl group>">, Group<f_Group>, 154 DocName<"OpenCL flags">; 155 156def sycl_Group : OptionGroup<"<SYCL group>">, Group<f_Group>, 157 DocName<"SYCL flags">; 158 159def m_Group : OptionGroup<"<m group>">, Group<CompileOnly_Group>, 160 DocName<"Target-dependent compilation options">; 161 162// Feature groups - these take command line options that correspond directly to 163// target specific features and can be translated directly from command line 164// options. 165def m_aarch64_Features_Group : OptionGroup<"<aarch64 features group>">, 166 Group<m_Group>, DocName<"AARCH64">; 167def m_amdgpu_Features_Group : OptionGroup<"<amdgpu features group>">, 168 Group<m_Group>, DocName<"AMDGPU">; 169def m_arm_Features_Group : OptionGroup<"<arm features group>">, 170 Group<m_Group>, DocName<"ARM">; 171def m_hexagon_Features_Group : OptionGroup<"<hexagon features group>">, 172 Group<m_Group>, DocName<"Hexagon">; 173def m_sparc_Features_Group : OptionGroup<"<sparc features group>">, 174 Group<m_Group>, DocName<"SPARC">; 175// The features added by this group will not be added to target features. 176// These are explicitly handled. 177def m_hexagon_Features_HVX_Group : OptionGroup<"<hexagon features group>">, 178 Group<m_Group>, DocName<"Hexagon">; 179def m_m68k_Features_Group: OptionGroup<"<m68k features group>">, 180 Group<m_Group>, DocName<"M68k">; 181def m_mips_Features_Group : OptionGroup<"<mips features group>">, 182 Group<m_Group>, DocName<"MIPS">; 183def m_ppc_Features_Group : OptionGroup<"<ppc features group>">, 184 Group<m_Group>, DocName<"PowerPC">; 185def m_wasm_Features_Group : OptionGroup<"<wasm features group>">, 186 Group<m_Group>, DocName<"WebAssembly">; 187// The features added by this group will not be added to target features. 188// These are explicitly handled. 189def m_wasm_Features_Driver_Group : OptionGroup<"<wasm driver features group>">, 190 Group<m_Group>, DocName<"WebAssembly Driver">; 191def m_x86_Features_Group : OptionGroup<"<x86 features group>">, 192 Group<m_Group>, Flags<[CoreOption]>, DocName<"X86">; 193def m_riscv_Features_Group : OptionGroup<"<riscv features group>">, 194 Group<m_Group>, DocName<"RISC-V">; 195 196def m_libc_Group : OptionGroup<"<m libc group>">, Group<m_mips_Features_Group>, 197 Flags<[HelpHidden]>; 198 199def O_Group : OptionGroup<"<O group>">, Group<CompileOnly_Group>, 200 DocName<"Optimization level">, DocBrief<[{ 201Flags controlling how much optimization should be performed.}]>; 202 203def DebugInfo_Group : OptionGroup<"<g group>">, Group<CompileOnly_Group>, 204 DocName<"Debug information generation">, DocBrief<[{ 205Flags controlling how much and what kind of debug information should be 206generated.}]>; 207 208def g_Group : OptionGroup<"<g group>">, Group<DebugInfo_Group>, 209 DocName<"Kind and level of debug information">; 210def gN_Group : OptionGroup<"<gN group>">, Group<g_Group>, 211 DocName<"Debug level">; 212def ggdbN_Group : OptionGroup<"<ggdbN group>">, Group<gN_Group>, DocFlatten; 213def gTune_Group : OptionGroup<"<gTune group>">, Group<g_Group>, 214 DocName<"Debugger to tune debug information for">; 215def g_flags_Group : OptionGroup<"<g flags group>">, Group<DebugInfo_Group>, 216 DocName<"Debug information flags">; 217 218def StaticAnalyzer_Group : OptionGroup<"<Static analyzer group>">, 219 DocName<"Static analyzer flags">, DocBrief<[{ 220Flags controlling the behavior of the Clang Static Analyzer.}]>; 221 222// gfortran options that we recognize in the driver and pass along when 223// invoking GCC to compile Fortran code. 224def gfortran_Group : OptionGroup<"<gfortran group>">, 225 DocName<"Fortran compilation flags">, DocBrief<[{ 226Flags that will be passed onto the ``gfortran`` compiler when Clang is given 227a Fortran input.}]>; 228 229def Link_Group : OptionGroup<"<T/e/s/t/u group>">, DocName<"Linker flags">, 230 DocBrief<[{Flags that are passed on to the linker}]>; 231def T_Group : OptionGroup<"<T group>">, Group<Link_Group>, DocFlatten; 232def u_Group : OptionGroup<"<u group>">, Group<Link_Group>, DocFlatten; 233 234def reserved_lib_Group : OptionGroup<"<reserved libs group>">, 235 Flags<[Unsupported]>; 236 237// Temporary groups for clang options which we know we don't support, 238// but don't want to verbosely warn the user about. 239def clang_ignored_f_Group : OptionGroup<"<clang ignored f group>">, 240 Group<f_Group>, Flags<[Ignored]>; 241def clang_ignored_m_Group : OptionGroup<"<clang ignored m group>">, 242 Group<m_Group>, Flags<[Ignored]>; 243 244// Unsupported flang groups 245def flang_ignored_w_Group : OptionGroup<"<flang ignored W group>">, 246 Group<W_Group>, Flags<[FlangOnlyOption, Ignored]>; 247 248// Group for clang options in the process of deprecation. 249// Please include the version that deprecated the flag as comment to allow 250// easier garbage collection. 251def clang_ignored_legacy_options_Group : OptionGroup<"<clang legacy flags>">, 252 Group<f_Group>, Flags<[Ignored]>; 253 254def LongDouble_Group : OptionGroup<"<LongDouble group>">, Group<m_Group>, 255 DocName<"Long double flags">, 256 DocBrief<[{Selects the long double implementation}]>; 257 258// Retired with clang-5.0 259def : Flag<["-"], "fslp-vectorize-aggressive">, Group<clang_ignored_legacy_options_Group>; 260def : Flag<["-"], "fno-slp-vectorize-aggressive">, Group<clang_ignored_legacy_options_Group>; 261 262// Retired with clang-10.0. Previously controlled X86 MPX ISA. 263def mmpx : Flag<["-"], "mmpx">, Group<clang_ignored_legacy_options_Group>; 264def mno_mpx : Flag<["-"], "mno-mpx">, Group<clang_ignored_legacy_options_Group>; 265 266// Retired with clang-16.0, to provide a deprecation period; it should 267// be removed in Clang 18 or later. 268def enable_trivial_var_init_zero : Flag<["-"], "enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang">, 269 Flags<[CC1Option, CoreOption, NoArgumentUnused]>, 270 Group<clang_ignored_legacy_options_Group>; 271 272// Group that ignores all gcc optimizations that won't be implemented 273def clang_ignored_gcc_optimization_f_Group : OptionGroup< 274 "<clang_ignored_gcc_optimization_f_Group>">, Group<f_Group>, Flags<[Ignored]>; 275 276class DiagnosticOpts<string base> 277 : KeyPathAndMacro<"DiagnosticOpts->", base, "DIAG_"> {} 278class LangOpts<string base> 279 : KeyPathAndMacro<"LangOpts->", base, "LANG_"> {} 280class TargetOpts<string base> 281 : KeyPathAndMacro<"TargetOpts->", base, "TARGET_"> {} 282class FrontendOpts<string base> 283 : KeyPathAndMacro<"FrontendOpts.", base, "FRONTEND_"> {} 284class PreprocessorOutputOpts<string base> 285 : KeyPathAndMacro<"PreprocessorOutputOpts.", base, "PREPROCESSOR_OUTPUT_"> {} 286class DependencyOutputOpts<string base> 287 : KeyPathAndMacro<"DependencyOutputOpts.", base, "DEPENDENCY_OUTPUT_"> {} 288class CodeGenOpts<string base> 289 : KeyPathAndMacro<"CodeGenOpts.", base, "CODEGEN_"> {} 290class HeaderSearchOpts<string base> 291 : KeyPathAndMacro<"HeaderSearchOpts->", base, "HEADER_SEARCH_"> {} 292class PreprocessorOpts<string base> 293 : KeyPathAndMacro<"PreprocessorOpts->", base, "PREPROCESSOR_"> {} 294class FileSystemOpts<string base> 295 : KeyPathAndMacro<"FileSystemOpts.", base, "FILE_SYSTEM_"> {} 296class AnalyzerOpts<string base> 297 : KeyPathAndMacro<"AnalyzerOpts->", base, "ANALYZER_"> {} 298class MigratorOpts<string base> 299 : KeyPathAndMacro<"MigratorOpts.", base, "MIGRATOR_"> {} 300 301// A boolean option which is opt-in in CC1. The positive option exists in CC1 and 302// Args.hasArg(OPT_ffoo) can be used to check that the flag is enabled. 303// This is useful if the option is usually disabled. 304// Use this only when the option cannot be declared via BoolFOption. 305multiclass OptInCC1FFlag<string name, string pos_prefix, string neg_prefix="", 306 string help="", list<OptionFlag> flags=[]> { 307 def f#NAME : Flag<["-"], "f"#name>, Flags<[CC1Option] # 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 CC1. The negative option exists in CC1 and 314// Args.hasArg(OPT_fno_foo) can be used to check that the flag is disabled. 315// Use this only when the option cannot be declared via BoolFOption. 316multiclass OptOutCC1FFlag<string name, string pos_prefix, string neg_prefix, 317 string help="", list<OptionFlag> flags=[]> { 318 def f#NAME : Flag<["-"], "f"#name>, Flags<flags>, 319 Group<f_Group>, HelpText<pos_prefix # help>; 320 def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<[CC1Option] # flags>, 321 Group<f_Group>, HelpText<neg_prefix # help>; 322} 323 324// A boolean option which is opt-in in FC1. The positive option exists in FC1 and 325// Args.hasArg(OPT_ffoo) can be used to check that the flag is enabled. 326// This is useful if the option is usually disabled. 327multiclass OptInFC1FFlag<string name, string pos_prefix, string neg_prefix="", 328 string help="", list<OptionFlag> flags=[]> { 329 def f#NAME : Flag<["-"], "f"#name>, Flags<[FC1Option] # flags>, 330 Group<f_Group>, HelpText<pos_prefix # help>; 331 def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<flags>, 332 Group<f_Group>, HelpText<neg_prefix # help>; 333} 334 335// A boolean option which is opt-out in FC1. The negative option exists in FC1 and 336// Args.hasArg(OPT_fno_foo) can be used to check that the flag is disabled. 337multiclass OptOutFC1FFlag<string name, string pos_prefix, string neg_prefix, 338 string help="", list<OptionFlag> flags=[]> { 339 def f#NAME : Flag<["-"], "f"#name>, Flags<flags>, 340 Group<f_Group>, HelpText<pos_prefix # help>; 341 def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<[FC1Option] # flags>, 342 Group<f_Group>, HelpText<neg_prefix # help>; 343} 344 345// Creates a positive and negative flags where both of them are prefixed with 346// "m", have help text specified for positive and negative option, and a Group 347// optionally specified by the opt_group argument, otherwise Group<m_Group>. 348multiclass SimpleMFlag<string name, string pos_prefix, string neg_prefix, 349 string help, OptionGroup opt_group = m_Group> { 350 def m#NAME : Flag<["-"], "m"#name>, Group<opt_group>, 351 HelpText<pos_prefix # help>; 352 def mno_#NAME : Flag<["-"], "mno-"#name>, Group<opt_group>, 353 HelpText<neg_prefix # help>; 354} 355 356//===----------------------------------------------------------------------===// 357// BoolOption 358//===----------------------------------------------------------------------===// 359 360// The default value of a marshalled key path. 361class Default<code value> { code Value = value; } 362 363// Convenience variables for boolean defaults. 364def DefaultTrue : Default<"true"> {} 365def DefaultFalse : Default<"false"> {} 366 367// The value set to the key path when the flag is present on the command line. 368class Set<bit value> { bit Value = value; } 369def SetTrue : Set<true> {} 370def SetFalse : Set<false> {} 371 372// Definition of single command line flag. This is an implementation detail, use 373// SetTrueBy or SetFalseBy instead. 374class FlagDef<bit polarity, bit value, list<OptionFlag> option_flags, 375 string help, list<code> implied_by_expressions = []> { 376 // The polarity. Besides spelling, this also decides whether the TableGen 377 // record will be prefixed with "no_". 378 bit Polarity = polarity; 379 380 // The value assigned to key path when the flag is present on command line. 381 bit Value = value; 382 383 // OptionFlags that control visibility of the flag in different tools. 384 list<OptionFlag> OptionFlags = option_flags; 385 386 // The help text associated with the flag. 387 string Help = help; 388 389 // List of expressions that, when true, imply this flag. 390 list<code> ImpliedBy = implied_by_expressions; 391} 392 393// Additional information to be appended to both positive and negative flag. 394class BothFlags<list<OptionFlag> option_flags, string help = ""> { 395 list<OptionFlag> OptionFlags = option_flags; 396 string Help = help; 397} 398 399// Functor that appends the suffix to the base flag definition. 400class ApplySuffix<FlagDef flag, BothFlags suffix> { 401 FlagDef Result 402 = FlagDef<flag.Polarity, flag.Value, 403 flag.OptionFlags # suffix.OptionFlags, 404 flag.Help # suffix.Help, flag.ImpliedBy>; 405} 406 407// Definition of the command line flag with positive spelling, e.g. "-ffoo". 408class PosFlag<Set value, list<OptionFlag> flags = [], string help = "", 409 list<code> implied_by_expressions = []> 410 : FlagDef<true, value.Value, flags, help, implied_by_expressions> {} 411 412// Definition of the command line flag with negative spelling, e.g. "-fno-foo". 413class NegFlag<Set value, list<OptionFlag> flags = [], string help = "", 414 list<code> implied_by_expressions = []> 415 : FlagDef<false, value.Value, flags, help, implied_by_expressions> {} 416 417// Expanded FlagDef that's convenient for creation of TableGen records. 418class FlagDefExpanded<FlagDef flag, string prefix, string name, string spelling> 419 : FlagDef<flag.Polarity, flag.Value, flag.OptionFlags, flag.Help, 420 flag.ImpliedBy> { 421 // Name of the TableGen record. 422 string RecordName = prefix # !if(flag.Polarity, "", "no_") # name; 423 424 // Spelling of the flag. 425 string Spelling = prefix # !if(flag.Polarity, "", "no-") # spelling; 426 427 // Can the flag be implied by another flag? 428 bit CanBeImplied = !not(!empty(flag.ImpliedBy)); 429 430 // C++ code that will be assigned to the keypath when the flag is present. 431 code ValueAsCode = !if(flag.Value, "true", "false"); 432} 433 434// TableGen record for a single marshalled flag. 435class MarshalledFlagRec<FlagDefExpanded flag, FlagDefExpanded other, 436 FlagDefExpanded implied, KeyPathAndMacro kpm, 437 Default default> 438 : Flag<["-"], flag.Spelling>, Flags<flag.OptionFlags>, HelpText<flag.Help>, 439 MarshallingInfoBooleanFlag<kpm, default.Value, flag.ValueAsCode, 440 other.ValueAsCode, other.RecordName>, 441 ImpliedByAnyOf<implied.ImpliedBy, implied.ValueAsCode> {} 442 443// Generates TableGen records for two command line flags that control the same 444// key path via the marshalling infrastructure. 445// Names of the records consist of the specified prefix, "no_" for the negative 446// flag, and NAME. 447// Used for -cc1 frontend options. Driver-only options do not map to 448// CompilerInvocation. 449multiclass BoolOption<string prefix = "", string spelling_base, 450 KeyPathAndMacro kpm, Default default, 451 FlagDef flag1_base, FlagDef flag2_base, 452 BothFlags suffix = BothFlags<[], "">> { 453 defvar flag1 = FlagDefExpanded<ApplySuffix<flag1_base, suffix>.Result, prefix, 454 NAME, spelling_base>; 455 456 defvar flag2 = FlagDefExpanded<ApplySuffix<flag2_base, suffix>.Result, prefix, 457 NAME, spelling_base>; 458 459 // The flags must have different polarity, different values, and only 460 // one can be implied. 461 assert !xor(flag1.Polarity, flag2.Polarity), 462 "the flags must have different polarity: flag1: " # 463 flag1.Polarity # ", flag2: " # flag2.Polarity; 464 assert !ne(flag1.Value, flag2.Value), 465 "the flags must have different values: flag1: " # 466 flag1.Value # ", flag2: " # flag2.Value; 467 assert !not(!and(flag1.CanBeImplied, flag2.CanBeImplied)), 468 "only one of the flags can be implied: flag1: " # 469 flag1.CanBeImplied # ", flag2: " # flag2.CanBeImplied; 470 471 defvar implied = !if(flag1.CanBeImplied, flag1, flag2); 472 473 def flag1.RecordName : MarshalledFlagRec<flag1, flag2, implied, kpm, default>; 474 def flag2.RecordName : MarshalledFlagRec<flag2, flag1, implied, kpm, default>; 475} 476 477/// Creates a BoolOption where both of the flags are prefixed with "f", are in 478/// the Group<f_Group>. 479/// Used for -cc1 frontend options. Driver-only options do not map to 480/// CompilerInvocation. 481multiclass BoolFOption<string flag_base, KeyPathAndMacro kpm, 482 Default default, FlagDef flag1, FlagDef flag2, 483 BothFlags both = BothFlags<[], "">> { 484 defm NAME : BoolOption<"f", flag_base, kpm, default, flag1, flag2, both>, 485 Group<f_Group>; 486} 487 488// Creates a BoolOption where both of the flags are prefixed with "g" and have 489// the Group<g_Group>. 490// Used for -cc1 frontend options. Driver-only options do not map to 491// CompilerInvocation. 492multiclass BoolGOption<string flag_base, KeyPathAndMacro kpm, 493 Default default, FlagDef flag1, FlagDef flag2, 494 BothFlags both = BothFlags<[], "">> { 495 defm NAME : BoolOption<"g", flag_base, kpm, default, flag1, flag2, both>, 496 Group<g_Group>; 497} 498 499// Works like BoolOption except without marshalling 500multiclass BoolOptionWithoutMarshalling<string prefix = "", string spelling_base, 501 FlagDef flag1_base, FlagDef flag2_base, 502 BothFlags suffix = BothFlags<[], "">> { 503 defvar flag1 = FlagDefExpanded<ApplySuffix<flag1_base, suffix>.Result, prefix, 504 NAME, spelling_base>; 505 506 defvar flag2 = FlagDefExpanded<ApplySuffix<flag2_base, suffix>.Result, prefix, 507 NAME, spelling_base>; 508 509 // The flags must have different polarity, different values, and only 510 // one can be implied. 511 assert !xor(flag1.Polarity, flag2.Polarity), 512 "the flags must have different polarity: flag1: " # 513 flag1.Polarity # ", flag2: " # flag2.Polarity; 514 assert !ne(flag1.Value, flag2.Value), 515 "the flags must have different values: flag1: " # 516 flag1.Value # ", flag2: " # flag2.Value; 517 assert !not(!and(flag1.CanBeImplied, flag2.CanBeImplied)), 518 "only one of the flags can be implied: flag1: " # 519 flag1.CanBeImplied # ", flag2: " # flag2.CanBeImplied; 520 521 defvar implied = !if(flag1.CanBeImplied, flag1, flag2); 522 523 def flag1.RecordName : Flag<["-"], flag1.Spelling>, Flags<flag1.OptionFlags>, 524 HelpText<flag1.Help>, 525 ImpliedByAnyOf<implied.ImpliedBy, implied.ValueAsCode> 526 {} 527 def flag2.RecordName : Flag<["-"], flag2.Spelling>, Flags<flag2.OptionFlags>, 528 HelpText<flag2.Help>, 529 ImpliedByAnyOf<implied.ImpliedBy, implied.ValueAsCode> 530 {} 531} 532 533// FIXME: Diagnose if target does not support protected visibility. 534class MarshallingInfoVisibility<KeyPathAndMacro kpm, code default> 535 : MarshallingInfoEnum<kpm, default>, 536 Values<"default,hidden,internal,protected">, 537 NormalizedValues<["DefaultVisibility", "HiddenVisibility", 538 "HiddenVisibility", "ProtectedVisibility"]> {} 539 540// Key paths that are constant during parsing of options with the same key path prefix. 541defvar cplusplus = LangOpts<"CPlusPlus">; 542defvar cpp11 = LangOpts<"CPlusPlus11">; 543defvar cpp17 = LangOpts<"CPlusPlus17">; 544defvar cpp20 = LangOpts<"CPlusPlus20">; 545defvar c99 = LangOpts<"C99">; 546defvar c2x = LangOpts<"C2x">; 547defvar lang_std = LangOpts<"LangStd">; 548defvar open_cl = LangOpts<"OpenCL">; 549defvar cuda = LangOpts<"CUDA">; 550defvar render_script = LangOpts<"RenderScript">; 551defvar hip = LangOpts<"HIP">; 552defvar gnu_mode = LangOpts<"GNUMode">; 553defvar asm_preprocessor = LangOpts<"AsmPreprocessor">; 554defvar hlsl = LangOpts<"HLSL">; 555 556defvar std = !strconcat("LangStandard::getLangStandardForKind(", lang_std.KeyPath, ")"); 557 558///////// 559// Options 560 561// The internal option ID must be a valid C++ identifier and results in a 562// clang::driver::options::OPT_XX enum constant for XX. 563// 564// We want to unambiguously be able to refer to options from the driver source 565// code, for this reason the option name is mangled into an ID. This mangling 566// isn't guaranteed to have an inverse, but for practical purposes it does. 567// 568// The mangling scheme is to ignore the leading '-', and perform the following 569// substitutions: 570// _ => __ 571// - => _ 572// / => _SLASH 573// # => _HASH 574// ? => _QUESTION 575// , => _COMMA 576// = => _EQ 577// C++ => CXX 578// . => _ 579 580// Developer Driver Options 581 582def internal_Group : OptionGroup<"<clang internal options>">, Flags<[HelpHidden]>; 583def internal_driver_Group : OptionGroup<"<clang driver internal options>">, 584 Group<internal_Group>, HelpText<"DRIVER OPTIONS">; 585def internal_debug_Group : 586 OptionGroup<"<clang debug/development internal options>">, 587 Group<internal_Group>, HelpText<"DEBUG/DEVELOPMENT OPTIONS">; 588 589class InternalDriverOpt : Group<internal_driver_Group>, 590 Flags<[NoXarchOption, HelpHidden]>; 591def driver_mode : Joined<["--"], "driver-mode=">, Group<internal_driver_Group>, 592 Flags<[CoreOption, NoXarchOption, HelpHidden]>, 593 HelpText<"Set the driver mode to either 'gcc', 'g++', 'cpp', or 'cl'">; 594def rsp_quoting : Joined<["--"], "rsp-quoting=">, Group<internal_driver_Group>, 595 Flags<[CoreOption, NoXarchOption, HelpHidden]>, 596 HelpText<"Set the rsp quoting to either 'posix', or 'windows'">; 597def ccc_gcc_name : Separate<["-"], "ccc-gcc-name">, InternalDriverOpt, 598 HelpText<"Name for native GCC compiler">, 599 MetaVarName<"<gcc-path>">; 600 601class InternalDebugOpt : Group<internal_debug_Group>, 602 Flags<[NoXarchOption, HelpHidden, CoreOption]>; 603def ccc_install_dir : Separate<["-"], "ccc-install-dir">, InternalDebugOpt, 604 HelpText<"Simulate installation in the given directory">; 605def ccc_print_phases : Flag<["-"], "ccc-print-phases">, InternalDebugOpt, 606 HelpText<"Dump list of actions to perform">; 607def ccc_print_bindings : Flag<["-"], "ccc-print-bindings">, InternalDebugOpt, 608 HelpText<"Show bindings of tools to actions">; 609 610def ccc_arcmt_check : Flag<["-"], "ccc-arcmt-check">, InternalDriverOpt, 611 HelpText<"Check for ARC migration issues that need manual handling">; 612def ccc_arcmt_modify : Flag<["-"], "ccc-arcmt-modify">, InternalDriverOpt, 613 HelpText<"Apply modifications to files to conform to ARC">; 614def ccc_arcmt_migrate : Separate<["-"], "ccc-arcmt-migrate">, InternalDriverOpt, 615 HelpText<"Apply modifications and produces temporary files that conform to ARC">; 616def arcmt_migrate_report_output : Separate<["-"], "arcmt-migrate-report-output">, 617 HelpText<"Output path for the plist report">, Flags<[CC1Option]>, 618 MarshallingInfoString<FrontendOpts<"ARCMTMigrateReportOut">>; 619def arcmt_migrate_emit_arc_errors : Flag<["-"], "arcmt-migrate-emit-errors">, 620 HelpText<"Emit ARC errors even if the migrator can fix them">, Flags<[CC1Option]>, 621 MarshallingInfoFlag<FrontendOpts<"ARCMTMigrateEmitARCErrors">>; 622def gen_reproducer_eq: Joined<["-"], "gen-reproducer=">, Flags<[NoArgumentUnused, CoreOption]>, 623 HelpText<"Emit reproducer on (option: off, crash (default), error, always)">; 624def gen_reproducer: Flag<["-"], "gen-reproducer">, InternalDebugOpt, 625 Alias<gen_reproducer_eq>, AliasArgs<["always"]>, 626 HelpText<"Auto-generates preprocessed source files and a reproduction script">; 627def gen_cdb_fragment_path: Separate<["-"], "gen-cdb-fragment-path">, InternalDebugOpt, 628 HelpText<"Emit a compilation database fragment to the specified directory">; 629 630def round_trip_args : Flag<["-"], "round-trip-args">, Flags<[CC1Option, NoDriverOption]>, 631 HelpText<"Enable command line arguments round-trip.">; 632def no_round_trip_args : Flag<["-"], "no-round-trip-args">, Flags<[CC1Option, NoDriverOption]>, 633 HelpText<"Disable command line arguments round-trip.">; 634 635def _migrate : Flag<["--"], "migrate">, Flags<[NoXarchOption]>, 636 HelpText<"Run the migrator">; 637def ccc_objcmt_migrate : Separate<["-"], "ccc-objcmt-migrate">, 638 InternalDriverOpt, 639 HelpText<"Apply modifications and produces temporary files to migrate to " 640 "modern ObjC syntax">; 641 642def objcmt_migrate_literals : Flag<["-"], "objcmt-migrate-literals">, Flags<[CC1Option]>, 643 HelpText<"Enable migration to modern ObjC literals">, 644 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Literals">; 645def objcmt_migrate_subscripting : Flag<["-"], "objcmt-migrate-subscripting">, Flags<[CC1Option]>, 646 HelpText<"Enable migration to modern ObjC subscripting">, 647 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Subscripting">; 648def objcmt_migrate_property : Flag<["-"], "objcmt-migrate-property">, Flags<[CC1Option]>, 649 HelpText<"Enable migration to modern ObjC property">, 650 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Property">; 651def objcmt_migrate_all : Flag<["-"], "objcmt-migrate-all">, Flags<[CC1Option]>, 652 HelpText<"Enable migration to modern ObjC">, 653 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_MigrateDecls">; 654def objcmt_migrate_readonly_property : Flag<["-"], "objcmt-migrate-readonly-property">, Flags<[CC1Option]>, 655 HelpText<"Enable migration to modern ObjC readonly property">, 656 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ReadonlyProperty">; 657def objcmt_migrate_readwrite_property : Flag<["-"], "objcmt-migrate-readwrite-property">, Flags<[CC1Option]>, 658 HelpText<"Enable migration to modern ObjC readwrite property">, 659 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ReadwriteProperty">; 660def objcmt_migrate_property_dot_syntax : Flag<["-"], "objcmt-migrate-property-dot-syntax">, Flags<[CC1Option]>, 661 HelpText<"Enable migration of setter/getter messages to property-dot syntax">, 662 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_PropertyDotSyntax">; 663def objcmt_migrate_annotation : Flag<["-"], "objcmt-migrate-annotation">, Flags<[CC1Option]>, 664 HelpText<"Enable migration to property and method annotations">, 665 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Annotation">; 666def objcmt_migrate_instancetype : Flag<["-"], "objcmt-migrate-instancetype">, Flags<[CC1Option]>, 667 HelpText<"Enable migration to infer instancetype for method result type">, 668 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Instancetype">; 669def objcmt_migrate_nsmacros : Flag<["-"], "objcmt-migrate-ns-macros">, Flags<[CC1Option]>, 670 HelpText<"Enable migration to NS_ENUM/NS_OPTIONS macros">, 671 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_NsMacros">; 672def objcmt_migrate_protocol_conformance : Flag<["-"], "objcmt-migrate-protocol-conformance">, Flags<[CC1Option]>, 673 HelpText<"Enable migration to add protocol conformance on classes">, 674 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ProtocolConformance">; 675def objcmt_atomic_property : Flag<["-"], "objcmt-atomic-property">, Flags<[CC1Option]>, 676 HelpText<"Make migration to 'atomic' properties">, 677 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_AtomicProperty">; 678def objcmt_returns_innerpointer_property : Flag<["-"], "objcmt-returns-innerpointer-property">, Flags<[CC1Option]>, 679 HelpText<"Enable migration to annotate property with NS_RETURNS_INNER_POINTER">, 680 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ReturnsInnerPointerProperty">; 681def objcmt_ns_nonatomic_iosonly: Flag<["-"], "objcmt-ns-nonatomic-iosonly">, Flags<[CC1Option]>, 682 HelpText<"Enable migration to use NS_NONATOMIC_IOSONLY macro for setting property's 'atomic' attribute">, 683 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_NsAtomicIOSOnlyProperty">; 684def objcmt_migrate_designated_init : Flag<["-"], "objcmt-migrate-designated-init">, Flags<[CC1Option]>, 685 HelpText<"Enable migration to infer NS_DESIGNATED_INITIALIZER for initializer methods">, 686 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_DesignatedInitializer">; 687 688def objcmt_allowlist_dir_path: Joined<["-"], "objcmt-allowlist-dir-path=">, Flags<[CC1Option]>, 689 HelpText<"Only modify files with a filename contained in the provided directory path">, 690 MarshallingInfoString<FrontendOpts<"ObjCMTAllowListPath">>; 691def : Joined<["-"], "objcmt-whitelist-dir-path=">, Flags<[CC1Option]>, 692 HelpText<"Alias for -objcmt-allowlist-dir-path">, 693 Alias<objcmt_allowlist_dir_path>; 694// The misspelt "white-list" [sic] alias is due for removal. 695def : Joined<["-"], "objcmt-white-list-dir-path=">, Flags<[CC1Option]>, 696 Alias<objcmt_allowlist_dir_path>; 697 698// Make sure all other -ccc- options are rejected. 699def ccc_ : Joined<["-"], "ccc-">, Group<internal_Group>, Flags<[Unsupported]>; 700 701// Standard Options 702 703def _HASH_HASH_HASH : Flag<["-"], "###">, Flags<[NoXarchOption, CoreOption, FlangOption]>, 704 HelpText<"Print (but do not run) the commands to run for this compilation">; 705def _DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>, 706 Flags<[NoXarchOption, CoreOption]>; 707def A : JoinedOrSeparate<["-"], "A">, Flags<[RenderJoined]>, Group<gfortran_Group>; 708def B : JoinedOrSeparate<["-"], "B">, MetaVarName<"<prefix>">, 709 HelpText<"Search $prefix$file for executables, libraries, and data files. " 710 "If $prefix is a directory, search $prefix/$file">; 711def gcc_install_dir_EQ : Joined<["--"], "gcc-install-dir=">, 712 HelpText<"Use GCC installation in the specified directory. The directory ends with path components like 'lib{,32,64}/gcc{,-cross}/$triple/$version'. " 713 "Note: executables (e.g. ld) used by the compiler are not overridden by the selected GCC installation">; 714def gcc_toolchain : Joined<["--"], "gcc-toolchain=">, Flags<[NoXarchOption]>, 715 HelpText<"Specify a directory where Clang can find 'include' and 'lib{,32,64}/gcc{,-cross}/$triple/$version'. " 716 "Clang will use the GCC installation with the largest version">; 717def CC : Flag<["-"], "CC">, Flags<[CC1Option]>, Group<Preprocessor_Group>, 718 HelpText<"Include comments from within macros in preprocessed output">, 719 MarshallingInfoFlag<PreprocessorOutputOpts<"ShowMacroComments">>; 720def C : Flag<["-"], "C">, Flags<[CC1Option]>, Group<Preprocessor_Group>, 721 HelpText<"Include comments in preprocessed output">, 722 MarshallingInfoFlag<PreprocessorOutputOpts<"ShowComments">>; 723def D : JoinedOrSeparate<["-"], "D">, Group<Preprocessor_Group>, 724 Flags<[CC1Option, FlangOption, FC1Option]>, MetaVarName<"<macro>=<value>">, 725 HelpText<"Define <macro> to <value> (or 1 if <value> omitted)">; 726def E : Flag<["-"], "E">, Flags<[NoXarchOption,CC1Option, FlangOption, FC1Option]>, Group<Action_Group>, 727 HelpText<"Only run the preprocessor">; 728def F : JoinedOrSeparate<["-"], "F">, Flags<[RenderJoined,CC1Option]>, 729 HelpText<"Add directory to framework include search path">; 730def G : JoinedOrSeparate<["-"], "G">, Flags<[NoXarchOption,TargetSpecific]>, Group<m_Group>, 731 MetaVarName<"<size>">, HelpText<"Put objects of at most <size> bytes " 732 "into small data section (MIPS / Hexagon)">; 733def G_EQ : Joined<["-"], "G=">, Flags<[NoXarchOption]>, Group<m_Group>, Alias<G>; 734def H : Flag<["-"], "H">, Flags<[CC1Option]>, Group<Preprocessor_Group>, 735 HelpText<"Show header includes and nesting depth">, 736 MarshallingInfoFlag<DependencyOutputOpts<"ShowHeaderIncludes">>; 737def fshow_skipped_includes : Flag<["-"], "fshow-skipped-includes">, 738 Flags<[CC1Option]>, HelpText<"Show skipped includes in -H output.">, 739 DocBrief<[{#include files may be "skipped" due to include guard optimization 740 or #pragma once. This flag makes -H show also such includes.}]>, 741 MarshallingInfoFlag<DependencyOutputOpts<"ShowSkippedHeaderIncludes">>; 742 743def I_ : Flag<["-"], "I-">, Group<I_Group>, 744 HelpText<"Restrict all prior -I flags to double-quoted inclusion and " 745 "remove current directory from include path">; 746def I : JoinedOrSeparate<["-"], "I">, Group<I_Group>, 747 Flags<[CC1Option,CC1AsOption,FlangOption,FC1Option]>, MetaVarName<"<dir>">, 748 HelpText<"Add directory to the end of the list of include search paths">, 749 DocBrief<[{Add directory to include search path. For C++ inputs, if 750there are multiple -I options, these directories are searched 751in the order they are given before the standard system directories 752are searched. If the same directory is in the SYSTEM include search 753paths, for example if also specified with -isystem, the -I option 754will be ignored}]>; 755def L : JoinedOrSeparate<["-"], "L">, Flags<[RenderJoined]>, Group<Link_Group>, 756 MetaVarName<"<dir>">, HelpText<"Add directory to library search path">; 757def MD : Flag<["-"], "MD">, Group<M_Group>, 758 HelpText<"Write a depfile containing user and system headers">; 759def MMD : Flag<["-"], "MMD">, Group<M_Group>, 760 HelpText<"Write a depfile containing user headers">; 761def M : Flag<["-"], "M">, Group<M_Group>, 762 HelpText<"Like -MD, but also implies -E and writes to stdout by default">; 763def MM : Flag<["-"], "MM">, Group<M_Group>, 764 HelpText<"Like -MMD, but also implies -E and writes to stdout by default">; 765def MF : JoinedOrSeparate<["-"], "MF">, Group<M_Group>, 766 HelpText<"Write depfile output from -MMD, -MD, -MM, or -M to <file>">, 767 MetaVarName<"<file>">; 768def MG : Flag<["-"], "MG">, Group<M_Group>, Flags<[CC1Option]>, 769 HelpText<"Add missing headers to depfile">, 770 MarshallingInfoFlag<DependencyOutputOpts<"AddMissingHeaderDeps">>; 771def MJ : JoinedOrSeparate<["-"], "MJ">, Group<M_Group>, 772 HelpText<"Write a compilation database entry per input">; 773def MP : Flag<["-"], "MP">, Group<M_Group>, Flags<[CC1Option]>, 774 HelpText<"Create phony target for each dependency (other than main file)">, 775 MarshallingInfoFlag<DependencyOutputOpts<"UsePhonyTargets">>; 776def MQ : JoinedOrSeparate<["-"], "MQ">, Group<M_Group>, Flags<[CC1Option]>, 777 HelpText<"Specify name of main file output to quote in depfile">; 778def MT : JoinedOrSeparate<["-"], "MT">, Group<M_Group>, Flags<[CC1Option]>, 779 HelpText<"Specify name of main file output in depfile">, 780 MarshallingInfoStringVector<DependencyOutputOpts<"Targets">>; 781def MV : Flag<["-"], "MV">, Group<M_Group>, Flags<[CC1Option]>, 782 HelpText<"Use NMake/Jom format for the depfile">, 783 MarshallingInfoFlag<DependencyOutputOpts<"OutputFormat">, "DependencyOutputFormat::Make">, 784 Normalizer<"makeFlagToValueNormalizer(DependencyOutputFormat::NMake)">; 785def Mach : Flag<["-"], "Mach">, Group<Link_Group>; 786def O0 : Flag<["-"], "O0">, Group<O_Group>, Flags<[CC1Option, FC1Option, HelpHidden]>; 787def O4 : Flag<["-"], "O4">, Group<O_Group>, Flags<[CC1Option, FC1Option, HelpHidden]>; 788def ObjCXX : Flag<["-"], "ObjC++">, Flags<[NoXarchOption]>, 789 HelpText<"Treat source input files as Objective-C++ inputs">; 790def ObjC : Flag<["-"], "ObjC">, Flags<[NoXarchOption]>, 791 HelpText<"Treat source input files as Objective-C inputs">; 792def O : Joined<["-"], "O">, Group<O_Group>, Flags<[CC1Option,FC1Option]>; 793def O_flag : Flag<["-"], "O">, Flags<[CC1Option,FC1Option]>, Alias<O>, AliasArgs<["1"]>; 794def Ofast : Joined<["-"], "Ofast">, Group<O_Group>, Flags<[CC1Option, FlangOption]>; 795def P : Flag<["-"], "P">, Flags<[CC1Option,FlangOption,FC1Option]>, Group<Preprocessor_Group>, 796 HelpText<"Disable linemarker output in -E mode">, 797 MarshallingInfoNegativeFlag<PreprocessorOutputOpts<"ShowLineMarkers">>; 798def Qy : Flag<["-"], "Qy">, Flags<[CC1Option]>, 799 HelpText<"Emit metadata containing compiler name and version">; 800def Qn : Flag<["-"], "Qn">, Flags<[CC1Option]>, 801 HelpText<"Do not emit metadata containing compiler name and version">; 802def : Flag<["-"], "fident">, Group<f_Group>, Alias<Qy>, 803 Flags<[CoreOption, CC1Option]>; 804def : Flag<["-"], "fno-ident">, Group<f_Group>, Alias<Qn>, 805 Flags<[CoreOption, CC1Option]>; 806def Qunused_arguments : Flag<["-"], "Qunused-arguments">, Flags<[NoXarchOption, CoreOption]>, 807 HelpText<"Don't emit warning for unused driver arguments">; 808def Q : Flag<["-"], "Q">, IgnoredGCCCompat; 809def Rpass_EQ : Joined<["-"], "Rpass=">, Group<R_value_Group>, Flags<[CC1Option]>, 810 HelpText<"Report transformations performed by optimization passes whose " 811 "name matches the given POSIX regular expression">; 812def Rpass_missed_EQ : Joined<["-"], "Rpass-missed=">, Group<R_value_Group>, 813 Flags<[CC1Option]>, 814 HelpText<"Report missed transformations by optimization passes whose " 815 "name matches the given POSIX regular expression">; 816def Rpass_analysis_EQ : Joined<["-"], "Rpass-analysis=">, Group<R_value_Group>, 817 Flags<[CC1Option]>, 818 HelpText<"Report transformation analysis from optimization passes whose " 819 "name matches the given POSIX regular expression">; 820def R_Joined : Joined<["-"], "R">, Group<R_Group>, Flags<[CC1Option, CoreOption]>, 821 MetaVarName<"<remark>">, HelpText<"Enable the specified remark">; 822def S : Flag<["-"], "S">, Flags<[NoXarchOption,CC1Option,FlangOption,FC1Option]>, Group<Action_Group>, 823 HelpText<"Only run preprocess and compilation steps">; 824def T : JoinedOrSeparate<["-"], "T">, Group<T_Group>, 825 MetaVarName<"<script>">, HelpText<"Specify <script> as linker script">; 826def U : JoinedOrSeparate<["-"], "U">, Group<Preprocessor_Group>, 827 Flags<[CC1Option, FlangOption, FC1Option]>, MetaVarName<"<macro>">, HelpText<"Undefine macro <macro>">; 828def V : JoinedOrSeparate<["-"], "V">, Flags<[NoXarchOption, Unsupported]>; 829def Wa_COMMA : CommaJoined<["-"], "Wa,">, 830 HelpText<"Pass the comma separated arguments in <arg> to the assembler">, 831 MetaVarName<"<arg>">; 832def Wall : Flag<["-"], "Wall">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>; 833def WCL4 : Flag<["-"], "WCL4">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>; 834def Wsystem_headers : Flag<["-"], "Wsystem-headers">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>; 835def Wno_system_headers : Flag<["-"], "Wno-system-headers">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>; 836def Wdeprecated : Flag<["-"], "Wdeprecated">, Group<W_Group>, Flags<[CC1Option]>, 837 HelpText<"Enable warnings for deprecated constructs and define __DEPRECATED">; 838def Wno_deprecated : Flag<["-"], "Wno-deprecated">, Group<W_Group>, Flags<[CC1Option]>; 839def Wl_COMMA : CommaJoined<["-"], "Wl,">, Flags<[LinkerInput, RenderAsInput]>, 840 HelpText<"Pass the comma separated arguments in <arg> to the linker">, 841 MetaVarName<"<arg>">, Group<Link_Group>; 842// FIXME: This is broken; these should not be Joined arguments. 843def Wno_nonportable_cfstrings : Joined<["-"], "Wno-nonportable-cfstrings">, Group<W_Group>, 844 Flags<[CC1Option]>; 845def Wnonportable_cfstrings : Joined<["-"], "Wnonportable-cfstrings">, Group<W_Group>, 846 Flags<[CC1Option]>; 847def Wp_COMMA : CommaJoined<["-"], "Wp,">, 848 HelpText<"Pass the comma separated arguments in <arg> to the preprocessor">, 849 MetaVarName<"<arg>">, Group<Preprocessor_Group>; 850def Wundef_prefix_EQ : CommaJoined<["-"], "Wundef-prefix=">, Group<W_value_Group>, 851 Flags<[CC1Option, CoreOption, HelpHidden]>, MetaVarName<"<arg>">, 852 HelpText<"Enable warnings for undefined macros with a prefix in the comma separated list <arg>">, 853 MarshallingInfoStringVector<DiagnosticOpts<"UndefPrefixes">>; 854def Wwrite_strings : Flag<["-"], "Wwrite-strings">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>; 855def Wno_write_strings : Flag<["-"], "Wno-write-strings">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>; 856def W_Joined : Joined<["-"], "W">, Group<W_Group>, Flags<[CC1Option, CoreOption, FC1Option, FlangOption]>, 857 MetaVarName<"<warning>">, HelpText<"Enable the specified warning">; 858def Xanalyzer : Separate<["-"], "Xanalyzer">, 859 HelpText<"Pass <arg> to the static analyzer">, MetaVarName<"<arg>">, 860 Group<StaticAnalyzer_Group>; 861def Xarch__ : JoinedAndSeparate<["-"], "Xarch_">, Flags<[NoXarchOption]>; 862def Xarch_host : Separate<["-"], "Xarch_host">, Flags<[NoXarchOption]>, 863 HelpText<"Pass <arg> to the CUDA/HIP host compilation">, MetaVarName<"<arg>">; 864def Xarch_device : Separate<["-"], "Xarch_device">, Flags<[NoXarchOption]>, 865 HelpText<"Pass <arg> to the CUDA/HIP device compilation">, MetaVarName<"<arg>">; 866def Xassembler : Separate<["-"], "Xassembler">, 867 HelpText<"Pass <arg> to the assembler">, MetaVarName<"<arg>">, 868 Group<CompileOnly_Group>; 869def Xclang : Separate<["-"], "Xclang">, 870 HelpText<"Pass <arg> to clang -cc1">, MetaVarName<"<arg>">, 871 Flags<[NoXarchOption, CoreOption]>, Group<CompileOnly_Group>; 872def : Joined<["-"], "Xclang=">, Group<CompileOnly_Group>, Flags<[NoXarchOption, CoreOption]>, Alias<Xclang>, 873 HelpText<"Alias for -Xclang">, MetaVarName<"<arg>">; 874def Xcuda_fatbinary : Separate<["-"], "Xcuda-fatbinary">, 875 HelpText<"Pass <arg> to fatbinary invocation">, MetaVarName<"<arg>">; 876def Xcuda_ptxas : Separate<["-"], "Xcuda-ptxas">, 877 HelpText<"Pass <arg> to the ptxas assembler">, MetaVarName<"<arg>">; 878def Xopenmp_target : Separate<["-"], "Xopenmp-target">, Group<CompileOnly_Group>, 879 HelpText<"Pass <arg> to the target offloading toolchain.">, MetaVarName<"<arg>">; 880def Xopenmp_target_EQ : JoinedAndSeparate<["-"], "Xopenmp-target=">, Group<CompileOnly_Group>, 881 HelpText<"Pass <arg> to the target offloading toolchain identified by <triple>.">, 882 MetaVarName<"<triple> <arg>">; 883def z : Separate<["-"], "z">, Flags<[LinkerInput]>, 884 HelpText<"Pass -z <arg> to the linker">, MetaVarName<"<arg>">, 885 Group<Link_Group>; 886def offload_link : Flag<["--"], "offload-link">, Group<Link_Group>, 887 HelpText<"Use the new offloading linker to perform the link job.">; 888def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, RenderAsInput]>, 889 HelpText<"Pass <arg> to the linker">, MetaVarName<"<arg>">, 890 Group<Link_Group>; 891def Xoffload_linker : JoinedAndSeparate<["-"], "Xoffload-linker">, 892 HelpText<"Pass <arg> to the offload linkers or the ones idenfied by -<triple>">, 893 MetaVarName<"<triple> <arg>">, Group<Link_Group>; 894def Xpreprocessor : Separate<["-"], "Xpreprocessor">, Group<Preprocessor_Group>, 895 HelpText<"Pass <arg> to the preprocessor">, MetaVarName<"<arg>">; 896def X_Flag : Flag<["-"], "X">, Group<Link_Group>; 897// Used by some macOS projects. IgnoredGCCCompat is a misnomer since GCC doesn't allow it. 898def : Flag<["-"], "Xparser">, IgnoredGCCCompat; 899// FIXME -Xcompiler is misused by some ChromeOS packages. Remove it after a while. 900def : Flag<["-"], "Xcompiler">, IgnoredGCCCompat; 901def Z_Flag : Flag<["-"], "Z">, Group<Link_Group>; 902def all__load : Flag<["-"], "all_load">; 903def allowable__client : Separate<["-"], "allowable_client">; 904def ansi : Flag<["-", "--"], "ansi">, Group<CompileOnly_Group>; 905def arch__errors__fatal : Flag<["-"], "arch_errors_fatal">; 906def arch : Separate<["-"], "arch">, Flags<[NoXarchOption]>; 907def arch__only : Separate<["-"], "arch_only">; 908def autocomplete : Joined<["--"], "autocomplete=">; 909def bind__at__load : Flag<["-"], "bind_at_load">; 910def bundle__loader : Separate<["-"], "bundle_loader">; 911def bundle : Flag<["-"], "bundle">; 912def b : JoinedOrSeparate<["-"], "b">, Flags<[LinkerInput]>, 913 HelpText<"Pass -b <arg> to the linker on AIX">, MetaVarName<"<arg>">, 914 Group<Link_Group>; 915// OpenCL-only Options 916def cl_opt_disable : Flag<["-"], "cl-opt-disable">, Group<opencl_Group>, Flags<[CC1Option]>, 917 HelpText<"OpenCL only. This option disables all optimizations. By default optimizations are enabled.">; 918def cl_strict_aliasing : Flag<["-"], "cl-strict-aliasing">, Group<opencl_Group>, Flags<[CC1Option]>, 919 HelpText<"OpenCL only. This option is added for compatibility with OpenCL 1.0.">; 920def cl_single_precision_constant : Flag<["-"], "cl-single-precision-constant">, Group<opencl_Group>, Flags<[CC1Option]>, 921 HelpText<"OpenCL only. Treat double precision floating-point constant as single precision constant.">, 922 MarshallingInfoFlag<LangOpts<"SinglePrecisionConstants">>; 923def cl_finite_math_only : Flag<["-"], "cl-finite-math-only">, Group<opencl_Group>, Flags<[CC1Option]>, 924 HelpText<"OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.">, 925 MarshallingInfoFlag<LangOpts<"CLFiniteMathOnly">>; 926def cl_kernel_arg_info : Flag<["-"], "cl-kernel-arg-info">, Group<opencl_Group>, Flags<[CC1Option]>, 927 HelpText<"OpenCL only. Generate kernel argument metadata.">, 928 MarshallingInfoFlag<CodeGenOpts<"EmitOpenCLArgMetadata">>; 929def cl_unsafe_math_optimizations : Flag<["-"], "cl-unsafe-math-optimizations">, Group<opencl_Group>, Flags<[CC1Option]>, 930 HelpText<"OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable.">, 931 MarshallingInfoFlag<LangOpts<"CLUnsafeMath">>; 932def cl_fast_relaxed_math : Flag<["-"], "cl-fast-relaxed-math">, Group<opencl_Group>, Flags<[CC1Option]>, 933 HelpText<"OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines __FAST_RELAXED_MATH__.">, 934 MarshallingInfoFlag<LangOpts<"FastRelaxedMath">>; 935def cl_mad_enable : Flag<["-"], "cl-mad-enable">, Group<opencl_Group>, Flags<[CC1Option]>, 936 HelpText<"OpenCL only. Allow use of less precise MAD computations in the generated binary.">, 937 MarshallingInfoFlag<CodeGenOpts<"LessPreciseFPMAD">>, 938 ImpliedByAnyOf<[cl_unsafe_math_optimizations.KeyPath, cl_fast_relaxed_math.KeyPath]>; 939def cl_no_signed_zeros : Flag<["-"], "cl-no-signed-zeros">, Group<opencl_Group>, Flags<[CC1Option]>, 940 HelpText<"OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.">, 941 MarshallingInfoFlag<LangOpts<"CLNoSignedZero">>; 942def cl_std_EQ : Joined<["-"], "cl-std=">, Group<opencl_Group>, Flags<[CC1Option]>, 943 HelpText<"OpenCL language standard to compile for.">, 944 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">; 945def cl_denorms_are_zero : Flag<["-"], "cl-denorms-are-zero">, Group<opencl_Group>, 946 HelpText<"OpenCL only. Allow denormals to be flushed to zero.">; 947def cl_fp32_correctly_rounded_divide_sqrt : Flag<["-"], "cl-fp32-correctly-rounded-divide-sqrt">, Group<opencl_Group>, Flags<[CC1Option]>, 948 HelpText<"OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.">, 949 MarshallingInfoFlag<CodeGenOpts<"OpenCLCorrectlyRoundedDivSqrt">>; 950def cl_uniform_work_group_size : Flag<["-"], "cl-uniform-work-group-size">, Group<opencl_Group>, Flags<[CC1Option]>, 951 HelpText<"OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel">, 952 MarshallingInfoFlag<CodeGenOpts<"UniformWGSize">>; 953def cl_no_stdinc : Flag<["-"], "cl-no-stdinc">, Group<opencl_Group>, 954 HelpText<"OpenCL only. Disables all standard includes containing non-native compiler types and functions.">; 955def cl_ext_EQ : CommaJoined<["-"], "cl-ext=">, Group<opencl_Group>, Flags<[CC1Option]>, 956 HelpText<"OpenCL only. Enable or disable OpenCL extensions/optional features. The argument is a comma-separated " 957 "sequence of one or more extension names, each prefixed by '+' or '-'.">, 958 MarshallingInfoStringVector<TargetOpts<"OpenCLExtensionsAsWritten">>; 959 960def client__name : JoinedOrSeparate<["-"], "client_name">; 961def combine : Flag<["-", "--"], "combine">, Flags<[NoXarchOption, Unsupported]>; 962def compatibility__version : JoinedOrSeparate<["-"], "compatibility_version">; 963def config : Joined<["--"], "config=">, Flags<[NoXarchOption, CoreOption]>, MetaVarName<"<file>">, 964 HelpText<"Specify configuration file">; 965def : Separate<["--"], "config">, Alias<config>; 966def no_default_config : Flag<["--"], "no-default-config">, Flags<[NoXarchOption, CoreOption]>, 967 HelpText<"Disable loading default configuration files">; 968def config_system_dir_EQ : Joined<["--"], "config-system-dir=">, Flags<[NoXarchOption, CoreOption, HelpHidden]>, 969 HelpText<"System directory for configuration files">; 970def config_user_dir_EQ : Joined<["--"], "config-user-dir=">, Flags<[NoXarchOption, CoreOption, HelpHidden]>, 971 HelpText<"User directory for configuration files">; 972def coverage : Flag<["-", "--"], "coverage">, Group<Link_Group>, Flags<[CoreOption]>; 973def cpp_precomp : Flag<["-"], "cpp-precomp">, Group<clang_ignored_f_Group>; 974def current__version : JoinedOrSeparate<["-"], "current_version">; 975def cxx_isystem : JoinedOrSeparate<["-"], "cxx-isystem">, Group<clang_i_Group>, 976 HelpText<"Add directory to the C++ SYSTEM include search path">, Flags<[CC1Option]>, 977 MetaVarName<"<directory>">; 978def c : Flag<["-"], "c">, Flags<[NoXarchOption, FlangOption]>, Group<Action_Group>, 979 HelpText<"Only run preprocess, compile, and assemble steps">; 980defm convergent_functions : BoolFOption<"convergent-functions", 981 LangOpts<"ConvergentFunctions">, DefaultFalse, 982 NegFlag<SetFalse, [], "Assume all functions may be convergent.">, 983 PosFlag<SetTrue, [CC1Option]>>; 984 985def gpu_use_aux_triple_only : Flag<["--"], "gpu-use-aux-triple-only">, 986 InternalDriverOpt, HelpText<"Prepare '-aux-triple' only without populating " 987 "'-aux-target-cpu' and '-aux-target-feature'.">; 988def cuda_include_ptx_EQ : Joined<["--"], "cuda-include-ptx=">, Flags<[NoXarchOption]>, 989 HelpText<"Include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">; 990def no_cuda_include_ptx_EQ : Joined<["--"], "no-cuda-include-ptx=">, Flags<[NoXarchOption]>, 991 HelpText<"Do not include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">; 992def offload_arch_EQ : Joined<["--"], "offload-arch=">, Flags<[NoXarchOption]>, 993 HelpText<"Specify an offloading device architecture for CUDA, HIP, or OpenMP. (e.g. sm_35). " 994 "If 'native' is used the compiler will detect locally installed architectures. " 995 "For HIP offloading, the device architecture can be followed by target ID features " 996 "delimited by a colon (e.g. gfx908:xnack+:sramecc-). May be specified more than once.">; 997def cuda_gpu_arch_EQ : Joined<["--"], "cuda-gpu-arch=">, Flags<[NoXarchOption]>, 998 Alias<offload_arch_EQ>; 999def cuda_feature_EQ : Joined<["--"], "cuda-feature=">, HelpText<"Manually specify the CUDA feature to use">; 1000def hip_link : Flag<["--"], "hip-link">, 1001 HelpText<"Link clang-offload-bundler bundles for HIP">; 1002def no_hip_rt: Flag<["-"], "no-hip-rt">, 1003 HelpText<"Do not link against HIP runtime libraries">; 1004def no_offload_arch_EQ : Joined<["--"], "no-offload-arch=">, Flags<[NoXarchOption]>, 1005 HelpText<"Remove CUDA/HIP offloading device architecture (e.g. sm_35, gfx906) from the list of devices to compile for. " 1006 "'all' resets the list to its default value.">; 1007def emit_static_lib : Flag<["--"], "emit-static-lib">, 1008 HelpText<"Enable linker job to emit a static library.">; 1009def no_cuda_gpu_arch_EQ : Joined<["--"], "no-cuda-gpu-arch=">, Flags<[NoXarchOption]>, 1010 Alias<no_offload_arch_EQ>; 1011def cuda_noopt_device_debug : Flag<["--"], "cuda-noopt-device-debug">, 1012 HelpText<"Enable device-side debug info generation. Disables ptxas optimizations.">; 1013def no_cuda_version_check : Flag<["--"], "no-cuda-version-check">, 1014 HelpText<"Don't error out if the detected version of the CUDA install is " 1015 "too low for the requested CUDA gpu architecture.">; 1016def no_cuda_noopt_device_debug : Flag<["--"], "no-cuda-noopt-device-debug">; 1017def cuda_path_EQ : Joined<["--"], "cuda-path=">, Group<i_Group>, 1018 HelpText<"CUDA installation path">; 1019def cuda_path_ignore_env : Flag<["--"], "cuda-path-ignore-env">, Group<i_Group>, 1020 HelpText<"Ignore environment variables to detect CUDA installation">; 1021def ptxas_path_EQ : Joined<["--"], "ptxas-path=">, Group<i_Group>, 1022 HelpText<"Path to ptxas (used for compiling CUDA code)">; 1023def fgpu_flush_denormals_to_zero : Flag<["-"], "fgpu-flush-denormals-to-zero">, 1024 HelpText<"Flush denormal floating point values to zero in CUDA/HIP device mode.">; 1025def fno_gpu_flush_denormals_to_zero : Flag<["-"], "fno-gpu-flush-denormals-to-zero">; 1026def fcuda_flush_denormals_to_zero : Flag<["-"], "fcuda-flush-denormals-to-zero">, 1027 Alias<fgpu_flush_denormals_to_zero>; 1028def fno_cuda_flush_denormals_to_zero : Flag<["-"], "fno-cuda-flush-denormals-to-zero">, 1029 Alias<fno_gpu_flush_denormals_to_zero>; 1030defm gpu_rdc : BoolFOption<"gpu-rdc", 1031 LangOpts<"GPURelocatableDeviceCode">, DefaultFalse, 1032 PosFlag<SetTrue, [CC1Option], "Generate relocatable device code, also known as separate compilation mode">, 1033 NegFlag<SetFalse>>; 1034def : Flag<["-"], "fcuda-rdc">, Alias<fgpu_rdc>; 1035def : Flag<["-"], "fno-cuda-rdc">, Alias<fno_gpu_rdc>; 1036defm cuda_short_ptr : BoolFOption<"cuda-short-ptr", 1037 TargetOpts<"NVPTXUseShortPointers">, DefaultFalse, 1038 PosFlag<SetTrue, [CC1Option], "Use 32-bit pointers for accessing const/local/shared address spaces">, 1039 NegFlag<SetFalse>>; 1040def mprintf_kind_EQ : Joined<["-"], "mprintf-kind=">, Group<m_Group>, 1041 HelpText<"Specify the printf lowering scheme (AMDGPU only), allowed values are " 1042 "\"hostcall\"(printing happens during kernel execution, this scheme " 1043 "relies on hostcalls which require system to support pcie atomics) " 1044 "and \"buffered\"(printing happens after all kernel threads exit, " 1045 "this uses a printf buffer and does not rely on pcie atomic support)">, 1046 Flags<[CC1Option]>, 1047 Values<"hostcall,buffered">, 1048 NormalizedValuesScope<"TargetOptions::AMDGPUPrintfKind">, 1049 NormalizedValues<["Hostcall", "Buffered"]>, 1050 MarshallingInfoEnum<TargetOpts<"AMDGPUPrintfKindVal">, "Hostcall">; 1051def fgpu_default_stream_EQ : Joined<["-"], "fgpu-default-stream=">, 1052 HelpText<"Specify default stream. The default value is 'legacy'. (HIP only)">, 1053 Flags<[CC1Option]>, 1054 Values<"legacy,per-thread">, 1055 NormalizedValuesScope<"LangOptions::GPUDefaultStreamKind">, 1056 NormalizedValues<["Legacy", "PerThread"]>, 1057 MarshallingInfoEnum<LangOpts<"GPUDefaultStream">, "Legacy">; 1058def rocm_path_EQ : Joined<["--"], "rocm-path=">, Group<i_Group>, 1059 HelpText<"ROCm installation path, used for finding and automatically linking required bitcode libraries.">; 1060def hip_path_EQ : Joined<["--"], "hip-path=">, Group<i_Group>, 1061 HelpText<"HIP runtime installation path, used for finding HIP version and adding HIP include path.">; 1062def amdgpu_arch_tool_EQ : Joined<["--"], "amdgpu-arch-tool=">, Group<i_Group>, 1063 HelpText<"Tool used for detecting AMD GPU arch in the system.">; 1064def nvptx_arch_tool_EQ : Joined<["--"], "nvptx-arch-tool=">, Group<i_Group>, 1065 HelpText<"Tool used for detecting NVIDIA GPU arch in the system.">; 1066def rocm_device_lib_path_EQ : Joined<["--"], "rocm-device-lib-path=">, Group<Link_Group>, 1067 HelpText<"ROCm device library path. Alternative to rocm-path.">; 1068def : Joined<["--"], "hip-device-lib-path=">, Alias<rocm_device_lib_path_EQ>; 1069def hip_device_lib_EQ : Joined<["--"], "hip-device-lib=">, Group<Link_Group>, 1070 HelpText<"HIP device library">; 1071def hip_version_EQ : Joined<["--"], "hip-version=">, 1072 HelpText<"HIP version in the format of major.minor.patch">; 1073def fhip_dump_offload_linker_script : Flag<["-"], "fhip-dump-offload-linker-script">, 1074 Group<f_Group>, Flags<[NoArgumentUnused, HelpHidden]>; 1075defm hip_new_launch_api : BoolFOption<"hip-new-launch-api", 1076 LangOpts<"HIPUseNewLaunchAPI">, DefaultFalse, 1077 PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">, 1078 BothFlags<[], " new kernel launching API for HIP">>; 1079defm hip_fp32_correctly_rounded_divide_sqrt : BoolFOption<"hip-fp32-correctly-rounded-divide-sqrt", 1080 CodeGenOpts<"HIPCorrectlyRoundedDivSqrt">, DefaultTrue, 1081 PosFlag<SetTrue, [], "Specify">, 1082 NegFlag<SetFalse, [CC1Option], "Don't specify">, 1083 BothFlags<[], " that single precision floating-point divide and sqrt used in " 1084 "the program source are correctly rounded (HIP device compilation only)">>, 1085 ShouldParseIf<hip.KeyPath>; 1086defm hip_kernel_arg_name : BoolFOption<"hip-kernel-arg-name", 1087 CodeGenOpts<"HIPSaveKernelArgName">, DefaultFalse, 1088 PosFlag<SetTrue, [CC1Option], "Specify">, 1089 NegFlag<SetFalse, [], "Don't specify">, 1090 BothFlags<[], " that kernel argument names are preserved (HIP only)">>, 1091 ShouldParseIf<hip.KeyPath>; 1092def hipspv_pass_plugin_EQ : Joined<["--"], "hipspv-pass-plugin=">, 1093 Group<Link_Group>, MetaVarName<"<dsopath>">, 1094 HelpText<"path to a pass plugin for HIP to SPIR-V passes.">; 1095defm gpu_allow_device_init : BoolFOption<"gpu-allow-device-init", 1096 LangOpts<"GPUAllowDeviceInit">, DefaultFalse, 1097 PosFlag<SetTrue, [CC1Option], "Allow">, NegFlag<SetFalse, [], "Don't allow">, 1098 BothFlags<[], " device side init function in HIP (experimental)">>, 1099 ShouldParseIf<hip.KeyPath>; 1100defm gpu_defer_diag : BoolFOption<"gpu-defer-diag", 1101 LangOpts<"GPUDeferDiag">, DefaultFalse, 1102 PosFlag<SetTrue, [CC1Option], "Defer">, NegFlag<SetFalse, [], "Don't defer">, 1103 BothFlags<[], " host/device related diagnostic messages for CUDA/HIP">>; 1104defm gpu_exclude_wrong_side_overloads : BoolFOption<"gpu-exclude-wrong-side-overloads", 1105 LangOpts<"GPUExcludeWrongSideOverloads">, DefaultFalse, 1106 PosFlag<SetTrue, [CC1Option], "Always exclude wrong side overloads">, 1107 NegFlag<SetFalse, [], "Exclude wrong side overloads only if there are same side overloads">, 1108 BothFlags<[HelpHidden], " in overloading resolution for CUDA/HIP">>; 1109def gpu_max_threads_per_block_EQ : Joined<["--"], "gpu-max-threads-per-block=">, 1110 Flags<[CC1Option]>, 1111 HelpText<"Default max threads per block for kernel launch bounds for HIP">, 1112 MarshallingInfoInt<LangOpts<"GPUMaxThreadsPerBlock">, "1024">, 1113 ShouldParseIf<hip.KeyPath>; 1114def fgpu_inline_threshold_EQ : Joined<["-"], "fgpu-inline-threshold=">, 1115 Flags<[HelpHidden]>, 1116 HelpText<"Inline threshold for device compilation for CUDA/HIP">; 1117def gpu_instrument_lib_EQ : Joined<["--"], "gpu-instrument-lib=">, 1118 HelpText<"Instrument device library for HIP, which is a LLVM bitcode containing " 1119 "__cyg_profile_func_enter and __cyg_profile_func_exit">; 1120def fgpu_sanitize : Flag<["-"], "fgpu-sanitize">, Group<f_Group>, 1121 HelpText<"Enable sanitizer for AMDGPU target">; 1122def fno_gpu_sanitize : Flag<["-"], "fno-gpu-sanitize">, Group<f_Group>; 1123def gpu_bundle_output : Flag<["--"], "gpu-bundle-output">, 1124 Group<f_Group>, HelpText<"Bundle output files of HIP device compilation">; 1125def no_gpu_bundle_output : Flag<["--"], "no-gpu-bundle-output">, 1126 Group<f_Group>, HelpText<"Do not bundle output files of HIP device compilation">; 1127def fhip_emit_relocatable : Flag<["-"], "fhip-emit-relocatable">, Group<f_Group>, 1128 HelpText<"Compile HIP source to relocatable">; 1129def fno_hip_emit_relocatable : Flag<["-"], "fno-hip-emit-relocatable">, Group<f_Group>, 1130 HelpText<"Do not override toolchain to compile HIP source to relocatable">; 1131def cuid_EQ : Joined<["-"], "cuid=">, Flags<[CC1Option]>, 1132 HelpText<"An ID for compilation unit, which should be the same for the same " 1133 "compilation unit but different for different compilation units. " 1134 "It is used to externalize device-side static variables for single " 1135 "source offloading languages CUDA and HIP so that they can be " 1136 "accessed by the host code of the same compilation unit.">, 1137 MarshallingInfoString<LangOpts<"CUID">>; 1138def fuse_cuid_EQ : Joined<["-"], "fuse-cuid=">, 1139 HelpText<"Method to generate ID's for compilation units for single source " 1140 "offloading languages CUDA and HIP: 'hash' (ID's generated by hashing " 1141 "file path and command line options) | 'random' (ID's generated as " 1142 "random numbers) | 'none' (disabled). Default is 'hash'. This option " 1143 "will be overridden by option '-cuid=[ID]' if it is specified." >; 1144def libomptarget_amdgpu_bc_path_EQ : Joined<["--"], "libomptarget-amdgpu-bc-path=">, Group<i_Group>, 1145 HelpText<"Path to libomptarget-amdgcn bitcode library">; 1146def libomptarget_amdgcn_bc_path_EQ : Joined<["--"], "libomptarget-amdgcn-bc-path=">, Group<i_Group>, 1147 HelpText<"Path to libomptarget-amdgcn bitcode library">, Alias<libomptarget_amdgpu_bc_path_EQ>; 1148def libomptarget_nvptx_bc_path_EQ : Joined<["--"], "libomptarget-nvptx-bc-path=">, Group<i_Group>, 1149 HelpText<"Path to libomptarget-nvptx bitcode library">; 1150def dD : Flag<["-"], "dD">, Group<d_Group>, Flags<[CC1Option]>, 1151 HelpText<"Print macro definitions in -E mode in addition to normal output">; 1152def dI : Flag<["-"], "dI">, Group<d_Group>, Flags<[CC1Option]>, 1153 HelpText<"Print include directives in -E mode in addition to normal output">, 1154 MarshallingInfoFlag<PreprocessorOutputOpts<"ShowIncludeDirectives">>; 1155def dM : Flag<["-"], "dM">, Group<d_Group>, Flags<[CC1Option]>, 1156 HelpText<"Print macro definitions in -E mode instead of normal output">; 1157def dead__strip : Flag<["-"], "dead_strip">; 1158def dependency_file : Separate<["-"], "dependency-file">, Flags<[CC1Option]>, 1159 HelpText<"Filename (or -) to write dependency output to">, 1160 MarshallingInfoString<DependencyOutputOpts<"OutputFile">>; 1161def dependency_dot : Separate<["-"], "dependency-dot">, Flags<[CC1Option]>, 1162 HelpText<"Filename to write DOT-formatted header dependencies to">, 1163 MarshallingInfoString<DependencyOutputOpts<"DOTOutputFile">>; 1164def module_dependency_dir : Separate<["-"], "module-dependency-dir">, 1165 Flags<[CC1Option]>, HelpText<"Directory to dump module dependencies to">, 1166 MarshallingInfoString<DependencyOutputOpts<"ModuleDependencyOutputDir">>; 1167def dsym_dir : JoinedOrSeparate<["-"], "dsym-dir">, 1168 Flags<[NoXarchOption, RenderAsInput]>, 1169 HelpText<"Directory to output dSYM's (if any) to">, MetaVarName<"<dir>">; 1170// GCC style -dumpdir. We intentionally don't implement the less useful -dumpbase{,-ext}. 1171def dumpdir : Separate<["-"], "dumpdir">, Flags<[CC1Option]>, 1172 MetaVarName<"<dumppfx>">, 1173 HelpText<"Use <dumpfpx> as a prefix to form auxiliary and dump file names">; 1174def dumpmachine : Flag<["-"], "dumpmachine">; 1175def dumpspecs : Flag<["-"], "dumpspecs">, Flags<[Unsupported]>; 1176def dumpversion : Flag<["-"], "dumpversion">; 1177def dylib__file : Separate<["-"], "dylib_file">; 1178def dylinker__install__name : JoinedOrSeparate<["-"], "dylinker_install_name">; 1179def dylinker : Flag<["-"], "dylinker">; 1180def dynamiclib : Flag<["-"], "dynamiclib">; 1181def dynamic : Flag<["-"], "dynamic">, Flags<[NoArgumentUnused]>; 1182def d_Flag : Flag<["-"], "d">, Group<d_Group>; 1183def d_Joined : Joined<["-"], "d">, Group<d_Group>; 1184def emit_ast : Flag<["-"], "emit-ast">, Flags<[CoreOption]>, 1185 HelpText<"Emit Clang AST files for source inputs">; 1186def emit_llvm : Flag<["-"], "emit-llvm">, Flags<[CC1Option, FC1Option, FlangOption]>, Group<Action_Group>, 1187 HelpText<"Use the LLVM representation for assembler and object files">; 1188def emit_interface_stubs : Flag<["-"], "emit-interface-stubs">, Flags<[CC1Option]>, Group<Action_Group>, 1189 HelpText<"Generate Interface Stub Files.">; 1190def emit_merged_ifs : Flag<["-"], "emit-merged-ifs">, 1191 Flags<[CC1Option]>, Group<Action_Group>, 1192 HelpText<"Generate Interface Stub Files, emit merged text not binary.">; 1193def end_no_unused_arguments : Flag<["--"], "end-no-unused-arguments">, Flags<[CoreOption]>, 1194 HelpText<"Start emitting warnings for unused driver arguments">; 1195def interface_stub_version_EQ : JoinedOrSeparate<["-"], "interface-stub-version=">, Flags<[CC1Option]>; 1196def exported__symbols__list : Separate<["-"], "exported_symbols_list">; 1197def extract_api : Flag<["-"], "extract-api">, Flags<[CC1Option]>, Group<Action_Group>, 1198 HelpText<"Extract API information">; 1199def product_name_EQ: Joined<["--"], "product-name=">, Flags<[CC1Option]>, 1200 MarshallingInfoString<FrontendOpts<"ProductName">>; 1201def emit_symbol_graph_EQ: JoinedOrSeparate<["--"], "emit-symbol-graph=">, Flags<[CC1Option]>, 1202 HelpText<"Generate Extract API information as a side effect of compilation.">, 1203 MarshallingInfoString<FrontendOpts<"SymbolGraphOutputDir">>; 1204def extract_api_ignores_EQ: CommaJoined<["--"], "extract-api-ignores=">, Flags<[CC1Option]>, 1205 HelpText<"Comma separated list of files containing a new line separated list of API symbols to ignore when extracting API information.">, 1206 MarshallingInfoStringVector<FrontendOpts<"ExtractAPIIgnoresFileList">>; 1207def e : JoinedOrSeparate<["-"], "e">, Flags<[LinkerInput]>, Group<Link_Group>; 1208def fmax_tokens_EQ : Joined<["-"], "fmax-tokens=">, Group<f_Group>, Flags<[CC1Option]>, 1209 HelpText<"Max total number of preprocessed tokens for -Wmax-tokens.">, 1210 MarshallingInfoInt<LangOpts<"MaxTokens">>; 1211def fPIC : Flag<["-"], "fPIC">, Group<f_Group>; 1212def fno_PIC : Flag<["-"], "fno-PIC">, Group<f_Group>; 1213def fPIE : Flag<["-"], "fPIE">, Group<f_Group>; 1214def fno_PIE : Flag<["-"], "fno-PIE">, Group<f_Group>; 1215defm access_control : BoolFOption<"access-control", 1216 LangOpts<"AccessControl">, DefaultTrue, 1217 NegFlag<SetFalse, [CC1Option], "Disable C++ access control">, 1218 PosFlag<SetTrue>>; 1219def falign_functions : Flag<["-"], "falign-functions">, Group<f_Group>; 1220def falign_functions_EQ : Joined<["-"], "falign-functions=">, Group<f_Group>; 1221def falign_loops_EQ : Joined<["-"], "falign-loops=">, Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<N>">, 1222 HelpText<"N must be a power of two. Align loops to the boundary">, 1223 MarshallingInfoInt<CodeGenOpts<"LoopAlignment">>; 1224def fno_align_functions: Flag<["-"], "fno-align-functions">, Group<f_Group>; 1225defm allow_editor_placeholders : BoolFOption<"allow-editor-placeholders", 1226 LangOpts<"AllowEditorPlaceholders">, DefaultFalse, 1227 PosFlag<SetTrue, [CC1Option], "Treat editor placeholders as valid source code">, 1228 NegFlag<SetFalse>>; 1229def fallow_unsupported : Flag<["-"], "fallow-unsupported">, Group<f_Group>; 1230def fapple_kext : Flag<["-"], "fapple-kext">, Group<f_Group>, Flags<[CC1Option]>, 1231 HelpText<"Use Apple's kernel extensions ABI">, 1232 MarshallingInfoFlag<LangOpts<"AppleKext">>; 1233def fstrict_flex_arrays_EQ : Joined<["-"], "fstrict-flex-arrays=">, Group<f_Group>, 1234 MetaVarName<"<n>">, Values<"0,1,2,3">, 1235 LangOpts<"StrictFlexArraysLevel">, 1236 Flags<[CC1Option]>, 1237 NormalizedValuesScope<"LangOptions::StrictFlexArraysLevelKind">, 1238 NormalizedValues<["Default", "OneZeroOrIncomplete", "ZeroOrIncomplete", "IncompleteOnly"]>, 1239 HelpText<"Enable optimizations based on the strict definition of flexible arrays">, 1240 MarshallingInfoEnum<LangOpts<"StrictFlexArraysLevel">, "Default">; 1241defm apple_pragma_pack : BoolFOption<"apple-pragma-pack", 1242 LangOpts<"ApplePragmaPack">, DefaultFalse, 1243 PosFlag<SetTrue, [CC1Option], "Enable Apple gcc-compatible #pragma pack handling">, 1244 NegFlag<SetFalse>>; 1245defm xl_pragma_pack : BoolFOption<"xl-pragma-pack", 1246 LangOpts<"XLPragmaPack">, DefaultFalse, 1247 PosFlag<SetTrue, [CC1Option], "Enable IBM XL #pragma pack handling">, 1248 NegFlag<SetFalse>>; 1249def shared_libsan : Flag<["-"], "shared-libsan">, 1250 HelpText<"Dynamically link the sanitizer runtime">; 1251def static_libsan : Flag<["-"], "static-libsan">, 1252 HelpText<"Statically link the sanitizer runtime (Not supported for ASan, TSan or UBSan on darwin)">; 1253def : Flag<["-"], "shared-libasan">, Alias<shared_libsan>; 1254def fasm : Flag<["-"], "fasm">, Group<f_Group>; 1255 1256defm assume_unique_vtables : BoolFOption<"assume-unique-vtables", 1257 CodeGenOpts<"AssumeUniqueVTables">, DefaultTrue, 1258 PosFlag<SetTrue>, 1259 NegFlag<SetFalse, [CC1Option], 1260 "Disable optimizations based on vtable pointer identity">, 1261 BothFlags<[CoreOption]>>; 1262 1263def fassume_sane_operator_new : Flag<["-"], "fassume-sane-operator-new">, Group<f_Group>; 1264def fastcp : Flag<["-"], "fastcp">, Group<f_Group>; 1265def fastf : Flag<["-"], "fastf">, Group<f_Group>; 1266def fast : Flag<["-"], "fast">, Group<f_Group>; 1267def fasynchronous_unwind_tables : Flag<["-"], "fasynchronous-unwind-tables">, Group<f_Group>; 1268 1269defm double_square_bracket_attributes : BoolFOption<"double-square-bracket-attributes", 1270 LangOpts<"DoubleSquareBracketAttributes">, DefaultTrue, PosFlag<SetTrue>, NegFlag<SetFalse>>; 1271 1272defm autolink : BoolFOption<"autolink", 1273 CodeGenOpts<"Autolink">, DefaultTrue, 1274 NegFlag<SetFalse, [CC1Option], "Disable generation of linker directives for automatic library linking">, 1275 PosFlag<SetTrue>>; 1276 1277// In the future this option will be supported by other offloading 1278// languages and accept other values such as CPU/GPU architectures, 1279// offload kinds and target aliases. 1280def offload_EQ : CommaJoined<["--"], "offload=">, Flags<[NoXarchOption]>, 1281 HelpText<"Specify comma-separated list of offloading target triples (CUDA and HIP only)">; 1282 1283// C++ Coroutines 1284defm coroutines : BoolFOption<"coroutines", 1285 LangOpts<"Coroutines">, Default<cpp20.KeyPath>, 1286 PosFlag<SetTrue, [CC1Option], "Enable support for the C++ Coroutines">, 1287 NegFlag<SetFalse>>; 1288 1289defm coro_aligned_allocation : BoolFOption<"coro-aligned-allocation", 1290 LangOpts<"CoroAlignedAllocation">, DefaultFalse, 1291 PosFlag<SetTrue, [CC1Option], "Prefer aligned allocation for C++ Coroutines">, 1292 NegFlag<SetFalse>>; 1293 1294defm experimental_library : BoolFOption<"experimental-library", 1295 LangOpts<"ExperimentalLibrary">, DefaultFalse, 1296 PosFlag<SetTrue, [CC1Option, CoreOption], "Control whether unstable and experimental library features are enabled. " 1297 "This option enables various library features that are either experimental (also known as TSes), or have been " 1298 "but are not stable yet in the selected Standard Library implementation. It is not recommended to use this option " 1299 "in production code, since neither ABI nor API stability are guaranteed. This is intended to provide a preview " 1300 "of features that will ship in the future for experimentation purposes">, 1301 NegFlag<SetFalse>>; 1302 1303def fembed_offload_object_EQ : Joined<["-"], "fembed-offload-object=">, 1304 Group<f_Group>, Flags<[NoXarchOption, CC1Option, FC1Option]>, 1305 HelpText<"Embed Offloading device-side binary into host object file as a section.">, 1306 MarshallingInfoStringVector<CodeGenOpts<"OffloadObjects">>; 1307def fembed_bitcode_EQ : Joined<["-"], "fembed-bitcode=">, 1308 Group<f_Group>, Flags<[NoXarchOption, CC1Option, CC1AsOption]>, MetaVarName<"<option>">, 1309 HelpText<"Embed LLVM bitcode">, 1310 Values<"off,all,bitcode,marker">, NormalizedValuesScope<"CodeGenOptions">, 1311 NormalizedValues<["Embed_Off", "Embed_All", "Embed_Bitcode", "Embed_Marker"]>, 1312 MarshallingInfoEnum<CodeGenOpts<"EmbedBitcode">, "Embed_Off">; 1313def fembed_bitcode : Flag<["-"], "fembed-bitcode">, Group<f_Group>, 1314 Alias<fembed_bitcode_EQ>, AliasArgs<["all"]>, 1315 HelpText<"Embed LLVM IR bitcode as data">; 1316def fembed_bitcode_marker : Flag<["-"], "fembed-bitcode-marker">, 1317 Alias<fembed_bitcode_EQ>, AliasArgs<["marker"]>, 1318 HelpText<"Embed placeholder LLVM IR data as a marker">; 1319defm gnu_inline_asm : BoolFOption<"gnu-inline-asm", 1320 LangOpts<"GNUAsm">, DefaultTrue, 1321 NegFlag<SetFalse, [CC1Option], "Disable GNU style inline asm">, PosFlag<SetTrue>>; 1322 1323def fprofile_sample_use : Flag<["-"], "fprofile-sample-use">, Group<f_Group>, 1324 Flags<[CoreOption]>; 1325def fno_profile_sample_use : Flag<["-"], "fno-profile-sample-use">, Group<f_Group>, 1326 Flags<[CoreOption]>; 1327def fprofile_sample_use_EQ : Joined<["-"], "fprofile-sample-use=">, 1328 Group<f_Group>, Flags<[NoXarchOption, CC1Option]>, 1329 HelpText<"Enable sample-based profile guided optimizations">, 1330 MarshallingInfoString<CodeGenOpts<"SampleProfileFile">>; 1331def fprofile_sample_accurate : Flag<["-"], "fprofile-sample-accurate">, 1332 Group<f_Group>, Flags<[NoXarchOption, CC1Option]>, 1333 HelpText<"Specifies that the sample profile is accurate">, 1334 DocBrief<[{Specifies that the sample profile is accurate. If the sample 1335 profile is accurate, callsites without profile samples are marked 1336 as cold. Otherwise, treat callsites without profile samples as if 1337 we have no profile}]>, 1338 MarshallingInfoFlag<CodeGenOpts<"ProfileSampleAccurate">>; 1339def fsample_profile_use_profi : Flag<["-"], "fsample-profile-use-profi">, 1340 Flags<[NoXarchOption, CC1Option]>, Group<f_Group>, 1341 HelpText<"Use profi to infer block and edge counts">, 1342 DocBrief<[{Infer block and edge counts. If the profiles have errors or missing 1343 blocks caused by sampling, profile inference (profi) can convert 1344 basic block counts to branch probabilites to fix them by extended 1345 and re-engineered classic MCMF (min-cost max-flow) approach.}]>; 1346def fno_profile_sample_accurate : Flag<["-"], "fno-profile-sample-accurate">, 1347 Group<f_Group>, Flags<[NoXarchOption]>; 1348def fauto_profile : Flag<["-"], "fauto-profile">, Group<f_Group>, 1349 Alias<fprofile_sample_use>; 1350def fno_auto_profile : Flag<["-"], "fno-auto-profile">, Group<f_Group>, 1351 Alias<fno_profile_sample_use>; 1352def fauto_profile_EQ : Joined<["-"], "fauto-profile=">, 1353 Alias<fprofile_sample_use_EQ>; 1354def fauto_profile_accurate : Flag<["-"], "fauto-profile-accurate">, 1355 Group<f_Group>, Alias<fprofile_sample_accurate>; 1356def fno_auto_profile_accurate : Flag<["-"], "fno-auto-profile-accurate">, 1357 Group<f_Group>, Alias<fno_profile_sample_accurate>; 1358def fdebug_compilation_dir_EQ : Joined<["-"], "fdebug-compilation-dir=">, 1359 Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>, 1360 HelpText<"The compilation directory to embed in the debug info">, 1361 MarshallingInfoString<CodeGenOpts<"DebugCompilationDir">>; 1362def fdebug_compilation_dir : Separate<["-"], "fdebug-compilation-dir">, 1363 Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>, 1364 Alias<fdebug_compilation_dir_EQ>; 1365def fcoverage_compilation_dir_EQ : Joined<["-"], "fcoverage-compilation-dir=">, 1366 Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>, 1367 HelpText<"The compilation directory to embed in the coverage mapping.">, 1368 MarshallingInfoString<CodeGenOpts<"CoverageCompilationDir">>; 1369def ffile_compilation_dir_EQ : Joined<["-"], "ffile-compilation-dir=">, Group<f_Group>, 1370 Flags<[CoreOption]>, 1371 HelpText<"The compilation directory to embed in the debug info and coverage mapping.">; 1372defm debug_info_for_profiling : BoolFOption<"debug-info-for-profiling", 1373 CodeGenOpts<"DebugInfoForProfiling">, DefaultFalse, 1374 PosFlag<SetTrue, [CC1Option], "Emit extra debug info to make sample profile more accurate">, 1375 NegFlag<SetFalse>>; 1376def fprofile_instr_generate : Flag<["-"], "fprofile-instr-generate">, 1377 Group<f_Group>, Flags<[CoreOption]>, 1378 HelpText<"Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">; 1379def fprofile_instr_generate_EQ : Joined<["-"], "fprofile-instr-generate=">, 1380 Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<file>">, 1381 HelpText<"Generate instrumented code to collect execution counts into <file> (overridden by LLVM_PROFILE_FILE env var)">; 1382def fprofile_instr_use : Flag<["-"], "fprofile-instr-use">, Group<f_Group>, 1383 Flags<[CoreOption]>; 1384def fprofile_instr_use_EQ : Joined<["-"], "fprofile-instr-use=">, 1385 Group<f_Group>, Flags<[CoreOption]>, 1386 HelpText<"Use instrumentation data for profile-guided optimization">; 1387def fprofile_remapping_file_EQ : Joined<["-"], "fprofile-remapping-file=">, 1388 Group<f_Group>, Flags<[CC1Option, CoreOption]>, MetaVarName<"<file>">, 1389 HelpText<"Use the remappings described in <file> to match the profile data against names in the program">, 1390 MarshallingInfoString<CodeGenOpts<"ProfileRemappingFile">>; 1391defm coverage_mapping : BoolFOption<"coverage-mapping", 1392 CodeGenOpts<"CoverageMapping">, DefaultFalse, 1393 PosFlag<SetTrue, [CC1Option], "Generate coverage mapping to enable code coverage analysis">, 1394 NegFlag<SetFalse, [], "Disable code coverage analysis">, BothFlags<[CoreOption]>>; 1395def fprofile_generate : Flag<["-"], "fprofile-generate">, 1396 Group<f_Group>, Flags<[CoreOption]>, 1397 HelpText<"Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">; 1398def fprofile_generate_EQ : Joined<["-"], "fprofile-generate=">, 1399 Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<directory>">, 1400 HelpText<"Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">; 1401def fcs_profile_generate : Flag<["-"], "fcs-profile-generate">, 1402 Group<f_Group>, Flags<[CoreOption]>, 1403 HelpText<"Generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">; 1404def fcs_profile_generate_EQ : Joined<["-"], "fcs-profile-generate=">, 1405 Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<directory>">, 1406 HelpText<"Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">; 1407def fprofile_use : Flag<["-"], "fprofile-use">, Group<f_Group>, 1408 Flags<[CoreOption]>, Alias<fprofile_instr_use>; 1409def fprofile_use_EQ : Joined<["-"], "fprofile-use=">, 1410 Group<f_Group>, Flags<[NoXarchOption, CoreOption]>, 1411 MetaVarName<"<pathname>">, 1412 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>.">; 1413def fno_profile_instr_generate : Flag<["-"], "fno-profile-instr-generate">, 1414 Group<f_Group>, Flags<[CoreOption]>, 1415 HelpText<"Disable generation of profile instrumentation.">; 1416def fno_profile_generate : Flag<["-"], "fno-profile-generate">, 1417 Group<f_Group>, Flags<[CoreOption]>, 1418 HelpText<"Disable generation of profile instrumentation.">; 1419def fno_profile_instr_use : Flag<["-"], "fno-profile-instr-use">, 1420 Group<f_Group>, Flags<[CoreOption]>, 1421 HelpText<"Disable using instrumentation data for profile-guided optimization">; 1422def fno_profile_use : Flag<["-"], "fno-profile-use">, 1423 Alias<fno_profile_instr_use>; 1424def ftest_coverage : Flag<["-"], "ftest-coverage">, Group<f_Group>, 1425 HelpText<"Produce gcov notes files (*.gcno)">; 1426def fno_test_coverage : Flag<["-"], "fno-test-coverage">, Group<f_Group>; 1427def fprofile_arcs : Flag<["-"], "fprofile-arcs">, Group<f_Group>, 1428 HelpText<"Instrument code to produce gcov data files (*.gcda)">; 1429def fno_profile_arcs : Flag<["-"], "fno-profile-arcs">, Group<f_Group>; 1430def fprofile_filter_files_EQ : Joined<["-"], "fprofile-filter-files=">, 1431 Group<f_Group>, Flags<[CC1Option, CoreOption]>, 1432 HelpText<"Instrument only functions from files where names match any regex separated by a semi-colon">, 1433 MarshallingInfoString<CodeGenOpts<"ProfileFilterFiles">>; 1434def fprofile_exclude_files_EQ : Joined<["-"], "fprofile-exclude-files=">, 1435 Group<f_Group>, Flags<[CC1Option, CoreOption]>, 1436 HelpText<"Instrument only functions from files where names don't match all the regexes separated by a semi-colon">, 1437 MarshallingInfoString<CodeGenOpts<"ProfileExcludeFiles">>; 1438def fprofile_update_EQ : Joined<["-"], "fprofile-update=">, 1439 Group<f_Group>, Flags<[CC1Option, CoreOption]>, Values<"atomic,prefer-atomic,single">, 1440 MetaVarName<"<method>">, HelpText<"Set update method of profile counters">, 1441 MarshallingInfoFlag<CodeGenOpts<"AtomicProfileUpdate">>; 1442defm pseudo_probe_for_profiling : BoolFOption<"pseudo-probe-for-profiling", 1443 CodeGenOpts<"PseudoProbeForProfiling">, DefaultFalse, 1444 PosFlag<SetTrue, [], "Emit">, NegFlag<SetFalse, [], "Do not emit">, 1445 BothFlags<[NoXarchOption, CC1Option], " pseudo probes for sample profiling">>; 1446def forder_file_instrumentation : Flag<["-"], "forder-file-instrumentation">, 1447 Group<f_Group>, Flags<[CC1Option, CoreOption]>, 1448 HelpText<"Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">; 1449def fprofile_list_EQ : Joined<["-"], "fprofile-list=">, 1450 Group<f_Group>, Flags<[CC1Option, CoreOption]>, 1451 HelpText<"Filename defining the list of functions/files to instrument. " 1452 "The file uses the sanitizer special case list format.">, 1453 MarshallingInfoStringVector<LangOpts<"ProfileListFiles">>; 1454def fprofile_function_groups : Joined<["-"], "fprofile-function-groups=">, 1455 Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<N>">, 1456 HelpText<"Partition functions into N groups and select only functions in group i to be instrumented using -fprofile-selected-function-group">, 1457 MarshallingInfoInt<CodeGenOpts<"ProfileTotalFunctionGroups">, "1">; 1458def fprofile_selected_function_group : 1459 Joined<["-"], "fprofile-selected-function-group=">, Group<f_Group>, 1460 Flags<[CC1Option]>, MetaVarName<"<i>">, 1461 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">, 1462 MarshallingInfoInt<CodeGenOpts<"ProfileSelectedFunctionGroup">>; 1463def fswift_async_fp_EQ : Joined<["-"], "fswift-async-fp=">, 1464 Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>, MetaVarName<"<option>">, 1465 HelpText<"Control emission of Swift async extended frame info">, 1466 Values<"auto,always,never">, 1467 NormalizedValuesScope<"CodeGenOptions::SwiftAsyncFramePointerKind">, 1468 NormalizedValues<["Auto", "Always", "Never"]>, 1469 MarshallingInfoEnum<CodeGenOpts<"SwiftAsyncFramePointer">, "Always">; 1470 1471defm addrsig : BoolFOption<"addrsig", 1472 CodeGenOpts<"Addrsig">, DefaultFalse, 1473 PosFlag<SetTrue, [CC1Option], "Emit">, NegFlag<SetFalse, [], "Don't emit">, 1474 BothFlags<[CoreOption], " an address-significance table">>; 1475defm blocks : OptInCC1FFlag<"blocks", "Enable the 'blocks' language feature", "", "", [CoreOption]>; 1476def fbootclasspath_EQ : Joined<["-"], "fbootclasspath=">, Group<f_Group>; 1477defm borland_extensions : BoolFOption<"borland-extensions", 1478 LangOpts<"Borland">, DefaultFalse, 1479 PosFlag<SetTrue, [CC1Option], "Accept non-standard constructs supported by the Borland compiler">, 1480 NegFlag<SetFalse>>; 1481def fbuiltin : Flag<["-"], "fbuiltin">, Group<f_Group>, Flags<[CoreOption]>; 1482def fbuiltin_module_map : Flag <["-"], "fbuiltin-module-map">, Group<f_Group>, 1483 Flags<[NoXarchOption]>, HelpText<"Load the clang builtins module map file.">; 1484defm caret_diagnostics : BoolFOption<"caret-diagnostics", 1485 DiagnosticOpts<"ShowCarets">, DefaultTrue, 1486 NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>>; 1487def fclang_abi_compat_EQ : Joined<["-"], "fclang-abi-compat=">, Group<f_clang_Group>, 1488 Flags<[CC1Option]>, MetaVarName<"<version>">, Values<"<major>.<minor>,latest">, 1489 HelpText<"Attempt to match the ABI of Clang <version>">; 1490def fclasspath_EQ : Joined<["-"], "fclasspath=">, Group<f_Group>; 1491def fcolor_diagnostics : Flag<["-"], "fcolor-diagnostics">, Group<f_Group>, 1492 Flags<[CoreOption, CC1Option, FlangOption, FC1Option]>, 1493 HelpText<"Enable colors in diagnostics">; 1494def fno_color_diagnostics : Flag<["-"], "fno-color-diagnostics">, Group<f_Group>, 1495 Flags<[CoreOption, FlangOption]>, HelpText<"Disable colors in diagnostics">; 1496def : Flag<["-"], "fdiagnostics-color">, Group<f_Group>, Flags<[CoreOption]>, Alias<fcolor_diagnostics>; 1497def : Flag<["-"], "fno-diagnostics-color">, Group<f_Group>, Flags<[CoreOption]>, Alias<fno_color_diagnostics>; 1498def fdiagnostics_color_EQ : Joined<["-"], "fdiagnostics-color=">, Group<f_Group>; 1499def fansi_escape_codes : Flag<["-"], "fansi-escape-codes">, Group<f_Group>, 1500 Flags<[CoreOption, CC1Option]>, HelpText<"Use ANSI escape codes for diagnostics">, 1501 MarshallingInfoFlag<DiagnosticOpts<"UseANSIEscapeCodes">>; 1502def fcomment_block_commands : CommaJoined<["-"], "fcomment-block-commands=">, Group<f_clang_Group>, Flags<[CC1Option]>, 1503 HelpText<"Treat each comma separated argument in <arg> as a documentation comment block command">, 1504 MetaVarName<"<arg>">, MarshallingInfoStringVector<LangOpts<"CommentOpts.BlockCommandNames">>; 1505def fparse_all_comments : Flag<["-"], "fparse-all-comments">, Group<f_clang_Group>, Flags<[CC1Option]>, 1506 MarshallingInfoFlag<LangOpts<"CommentOpts.ParseAllComments">>; 1507def frecord_command_line : Flag<["-"], "frecord-command-line">, 1508 DocBrief<[{Generate a section named ".GCC.command.line" containing the clang 1509driver command-line. After linking, the section may contain multiple command 1510lines, which will be individually terminated by null bytes. Separate arguments 1511within a command line are combined with spaces; spaces and backslashes within an 1512argument are escaped with backslashes. This format differs from the format of 1513the equivalent section produced by GCC with the -frecord-gcc-switches flag. 1514This option is currently only supported on ELF targets.}]>, 1515 Group<f_clang_Group>; 1516def fno_record_command_line : Flag<["-"], "fno-record-command-line">, 1517 Group<f_clang_Group>; 1518def : Flag<["-"], "frecord-gcc-switches">, Alias<frecord_command_line>; 1519def : Flag<["-"], "fno-record-gcc-switches">, Alias<fno_record_command_line>; 1520def fcommon : Flag<["-"], "fcommon">, Group<f_Group>, 1521 Flags<[CoreOption, CC1Option]>, HelpText<"Place uninitialized global variables in a common block">, 1522 MarshallingInfoNegativeFlag<CodeGenOpts<"NoCommon">>, 1523 DocBrief<[{Place definitions of variables with no storage class and no initializer 1524(tentative definitions) in a common block, instead of generating individual 1525zero-initialized definitions (default -fno-common).}]>; 1526def fcompile_resource_EQ : Joined<["-"], "fcompile-resource=">, Group<f_Group>; 1527defm complete_member_pointers : BoolOption<"f", "complete-member-pointers", 1528 LangOpts<"CompleteMemberPointers">, DefaultFalse, 1529 PosFlag<SetTrue, [CC1Option], "Require">, NegFlag<SetFalse, [], "Do not require">, 1530 BothFlags<[CoreOption], " member pointer base types to be complete if they" 1531 " would be significant under the Microsoft ABI">>, 1532 Group<f_clang_Group>; 1533def fcf_runtime_abi_EQ : Joined<["-"], "fcf-runtime-abi=">, Group<f_Group>, 1534 Flags<[CC1Option]>, Values<"unspecified,standalone,objc,swift,swift-5.0,swift-4.2,swift-4.1">, 1535 NormalizedValuesScope<"LangOptions::CoreFoundationABI">, 1536 NormalizedValues<["ObjectiveC", "ObjectiveC", "ObjectiveC", "Swift5_0", "Swift5_0", "Swift4_2", "Swift4_1"]>, 1537 MarshallingInfoEnum<LangOpts<"CFRuntime">, "ObjectiveC">; 1538defm constant_cfstrings : BoolFOption<"constant-cfstrings", 1539 LangOpts<"NoConstantCFStrings">, DefaultFalse, 1540 NegFlag<SetTrue, [CC1Option], "Disable creation of CodeFoundation-type constant strings">, 1541 PosFlag<SetFalse>>; 1542def fconstant_string_class_EQ : Joined<["-"], "fconstant-string-class=">, Group<f_Group>; 1543def fconstexpr_depth_EQ : Joined<["-"], "fconstexpr-depth=">, Group<f_Group>, Flags<[CC1Option]>, 1544 HelpText<"Set the maximum depth of recursive constexpr function calls">, 1545 MarshallingInfoInt<LangOpts<"ConstexprCallDepth">, "512">; 1546def fconstexpr_steps_EQ : Joined<["-"], "fconstexpr-steps=">, Group<f_Group>, Flags<[CC1Option]>, 1547 HelpText<"Set the maximum number of steps in constexpr function evaluation">, 1548 MarshallingInfoInt<LangOpts<"ConstexprStepLimit">, "1048576">; 1549def fexperimental_new_constant_interpreter : Flag<["-"], "fexperimental-new-constant-interpreter">, Group<f_Group>, 1550 HelpText<"Enable the experimental new constant interpreter">, Flags<[CC1Option]>, 1551 MarshallingInfoFlag<LangOpts<"EnableNewConstInterp">>; 1552def fconstexpr_backtrace_limit_EQ : Joined<["-"], "fconstexpr-backtrace-limit=">, Group<f_Group>, Flags<[CC1Option]>, 1553 HelpText<"Set the maximum number of entries to print in a constexpr evaluation backtrace (0 = no limit)">, 1554 MarshallingInfoInt<DiagnosticOpts<"ConstexprBacktraceLimit">, "DiagnosticOptions::DefaultConstexprBacktraceLimit">; 1555def fcrash_diagnostics_EQ : Joined<["-"], "fcrash-diagnostics=">, Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>, 1556 HelpText<"Set level of crash diagnostic reporting, (option: off, compiler, all)">; 1557def fcrash_diagnostics : Flag<["-"], "fcrash-diagnostics">, Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>, 1558 HelpText<"Enable crash diagnostic reporting (default)">, Alias<fcrash_diagnostics_EQ>, AliasArgs<["compiler"]>; 1559def fno_crash_diagnostics : Flag<["-"], "fno-crash-diagnostics">, Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>, 1560 Alias<gen_reproducer_eq>, AliasArgs<["off"]>, 1561 HelpText<"Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash">; 1562def fcrash_diagnostics_dir : Joined<["-"], "fcrash-diagnostics-dir=">, 1563 Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>, 1564 HelpText<"Put crash-report files in <dir>">, MetaVarName<"<dir>">; 1565def fcreate_profile : Flag<["-"], "fcreate-profile">, Group<f_Group>; 1566defm cxx_exceptions: BoolFOption<"cxx-exceptions", 1567 LangOpts<"CXXExceptions">, DefaultFalse, 1568 PosFlag<SetTrue, [CC1Option], "Enable C++ exceptions">, NegFlag<SetFalse>>; 1569defm async_exceptions: BoolFOption<"async-exceptions", 1570 LangOpts<"EHAsynch">, DefaultFalse, 1571 PosFlag<SetTrue, [CC1Option], "Enable EH Asynchronous exceptions">, NegFlag<SetFalse>>; 1572defm cxx_modules : BoolFOption<"cxx-modules", 1573 LangOpts<"CPlusPlusModules">, Default<cpp20.KeyPath>, 1574 NegFlag<SetFalse, [CC1Option], "Disable">, PosFlag<SetTrue, [], "Enable">, 1575 BothFlags<[NoXarchOption], " modules for C++">>, 1576 ShouldParseIf<cplusplus.KeyPath>; 1577def fdebug_pass_arguments : Flag<["-"], "fdebug-pass-arguments">, Group<f_Group>; 1578def fdebug_pass_structure : Flag<["-"], "fdebug-pass-structure">, Group<f_Group>; 1579def fdepfile_entry : Joined<["-"], "fdepfile-entry=">, 1580 Group<f_clang_Group>, Flags<[CC1Option]>; 1581def fdiagnostics_fixit_info : Flag<["-"], "fdiagnostics-fixit-info">, Group<f_clang_Group>; 1582def fno_diagnostics_fixit_info : Flag<["-"], "fno-diagnostics-fixit-info">, Group<f_Group>, 1583 Flags<[CC1Option]>, HelpText<"Do not include fixit information in diagnostics">, 1584 MarshallingInfoNegativeFlag<DiagnosticOpts<"ShowFixits">>; 1585def fdiagnostics_parseable_fixits : Flag<["-"], "fdiagnostics-parseable-fixits">, Group<f_clang_Group>, 1586 Flags<[CoreOption, CC1Option]>, HelpText<"Print fix-its in machine parseable form">, 1587 MarshallingInfoFlag<DiagnosticOpts<"ShowParseableFixits">>; 1588def fdiagnostics_print_source_range_info : Flag<["-"], "fdiagnostics-print-source-range-info">, 1589 Group<f_clang_Group>, Flags<[CC1Option]>, 1590 HelpText<"Print source range spans in numeric form">, 1591 MarshallingInfoFlag<DiagnosticOpts<"ShowSourceRanges">>; 1592defm diagnostics_show_hotness : BoolFOption<"diagnostics-show-hotness", 1593 CodeGenOpts<"DiagnosticsWithHotness">, DefaultFalse, 1594 PosFlag<SetTrue, [CC1Option], "Enable profile hotness information in diagnostic line">, 1595 NegFlag<SetFalse>>; 1596def fdiagnostics_hotness_threshold_EQ : Joined<["-"], "fdiagnostics-hotness-threshold=">, 1597 Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<value>">, 1598 HelpText<"Prevent optimization remarks from being output if they do not have at least this profile count. " 1599 "Use 'auto' to apply the threshold from profile summary">; 1600def fdiagnostics_misexpect_tolerance_EQ : Joined<["-"], "fdiagnostics-misexpect-tolerance=">, 1601 Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<value>">, 1602 HelpText<"Prevent misexpect diagnostics from being output if the profile counts are within N% of the expected. ">; 1603defm diagnostics_show_option : BoolFOption<"diagnostics-show-option", 1604 DiagnosticOpts<"ShowOptionNames">, DefaultTrue, 1605 NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue, [], "Print option name with mappable diagnostics">>; 1606defm diagnostics_show_note_include_stack : BoolFOption<"diagnostics-show-note-include-stack", 1607 DiagnosticOpts<"ShowNoteIncludeStack">, DefaultFalse, 1608 PosFlag<SetTrue, [], "Display include stacks for diagnostic notes">, 1609 NegFlag<SetFalse>, BothFlags<[CC1Option]>>; 1610def fdiagnostics_format_EQ : Joined<["-"], "fdiagnostics-format=">, Group<f_clang_Group>; 1611def fdiagnostics_show_category_EQ : Joined<["-"], "fdiagnostics-show-category=">, Group<f_clang_Group>; 1612def fdiagnostics_show_template_tree : Flag<["-"], "fdiagnostics-show-template-tree">, 1613 Group<f_Group>, Flags<[CC1Option]>, 1614 HelpText<"Print a template comparison tree for differing templates">, 1615 MarshallingInfoFlag<DiagnosticOpts<"ShowTemplateTree">>; 1616defm safe_buffer_usage_suggestions : BoolFOption<"safe-buffer-usage-suggestions", 1617 DiagnosticOpts<"ShowSafeBufferUsageSuggestions">, DefaultFalse, 1618 PosFlag<SetTrue, [CC1Option], 1619 "Display suggestions to update code associated with -Wunsafe-buffer-usage warnings">, 1620 NegFlag<SetFalse>>; 1621def fdiscard_value_names : Flag<["-"], "fdiscard-value-names">, Group<f_clang_Group>, 1622 HelpText<"Discard value names in LLVM IR">, Flags<[NoXarchOption]>; 1623def fno_discard_value_names : Flag<["-"], "fno-discard-value-names">, Group<f_clang_Group>, 1624 HelpText<"Do not discard value names in LLVM IR">, Flags<[NoXarchOption]>; 1625defm dollars_in_identifiers : BoolFOption<"dollars-in-identifiers", 1626 LangOpts<"DollarIdents">, Default<!strconcat("!", asm_preprocessor.KeyPath)>, 1627 PosFlag<SetTrue, [], "Allow">, NegFlag<SetFalse, [], "Disallow">, 1628 BothFlags<[CC1Option], " '$' in identifiers">>; 1629def fdwarf2_cfi_asm : Flag<["-"], "fdwarf2-cfi-asm">, Group<clang_ignored_f_Group>; 1630def fno_dwarf2_cfi_asm : Flag<["-"], "fno-dwarf2-cfi-asm">, Group<clang_ignored_f_Group>; 1631defm dwarf_directory_asm : BoolFOption<"dwarf-directory-asm", 1632 CodeGenOpts<"NoDwarfDirectoryAsm">, DefaultFalse, 1633 NegFlag<SetTrue, [CC1Option]>, PosFlag<SetFalse>>; 1634defm elide_constructors : BoolFOption<"elide-constructors", 1635 LangOpts<"ElideConstructors">, DefaultTrue, 1636 NegFlag<SetFalse, [CC1Option], "Disable C++ copy constructor elision">, 1637 PosFlag<SetTrue>>; 1638def fno_elide_type : Flag<["-"], "fno-elide-type">, Group<f_Group>, 1639 Flags<[CC1Option]>, 1640 HelpText<"Do not elide types when printing diagnostics">, 1641 MarshallingInfoNegativeFlag<DiagnosticOpts<"ElideType">>; 1642def feliminate_unused_debug_symbols : Flag<["-"], "feliminate-unused-debug-symbols">, Group<f_Group>; 1643defm eliminate_unused_debug_types : OptOutCC1FFlag<"eliminate-unused-debug-types", 1644 "Do not emit ", "Emit ", " debug info for defined but unused types">; 1645def femit_all_decls : Flag<["-"], "femit-all-decls">, Group<f_Group>, Flags<[CC1Option]>, 1646 HelpText<"Emit all declarations, even if unused">, 1647 MarshallingInfoFlag<LangOpts<"EmitAllDecls">>; 1648defm emulated_tls : BoolFOption<"emulated-tls", 1649 CodeGenOpts<"EmulatedTLS">, DefaultFalse, 1650 PosFlag<SetTrue, [CC1Option], "Use emutls functions to access thread_local variables">, 1651 NegFlag<SetFalse>>; 1652def fencoding_EQ : Joined<["-"], "fencoding=">, Group<f_Group>; 1653def ferror_limit_EQ : Joined<["-"], "ferror-limit=">, Group<f_Group>, Flags<[CoreOption]>; 1654defm exceptions : BoolFOption<"exceptions", 1655 LangOpts<"Exceptions">, DefaultFalse, 1656 PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">, 1657 BothFlags<[], " support for exception handling">>; 1658def fdwarf_exceptions : Flag<["-"], "fdwarf-exceptions">, Group<f_Group>, 1659 HelpText<"Use DWARF style exceptions">; 1660def fsjlj_exceptions : Flag<["-"], "fsjlj-exceptions">, Group<f_Group>, 1661 HelpText<"Use SjLj style exceptions">; 1662def fseh_exceptions : Flag<["-"], "fseh-exceptions">, Group<f_Group>, 1663 HelpText<"Use SEH style exceptions">; 1664def fwasm_exceptions : Flag<["-"], "fwasm-exceptions">, Group<f_Group>, 1665 HelpText<"Use WebAssembly style exceptions">; 1666def exception_model : Separate<["-"], "exception-model">, 1667 Flags<[CC1Option, NoDriverOption]>, HelpText<"The exception model">, 1668 Values<"dwarf,sjlj,seh,wasm">, 1669 NormalizedValuesScope<"LangOptions::ExceptionHandlingKind">, 1670 NormalizedValues<["DwarfCFI", "SjLj", "WinEH", "Wasm"]>, 1671 MarshallingInfoEnum<LangOpts<"ExceptionHandling">, "None">; 1672def exception_model_EQ : Joined<["-"], "exception-model=">, 1673 Flags<[CC1Option, NoDriverOption]>, Alias<exception_model>; 1674def fignore_exceptions : Flag<["-"], "fignore-exceptions">, Group<f_Group>, Flags<[CC1Option]>, 1675 HelpText<"Enable support for ignoring exception handling constructs">, 1676 MarshallingInfoFlag<LangOpts<"IgnoreExceptions">>; 1677def fexcess_precision_EQ : Joined<["-"], "fexcess-precision=">, Group<f_Group>, 1678 Flags<[CoreOption]>, 1679 HelpText<"Allows control over excess precision on targets where native " 1680 "support for the precision types is not available. By default, excess " 1681 "precision is used to calculate intermediate results following the " 1682 "rules specified in ISO C99.">, 1683 Values<"standard,fast,none">, NormalizedValuesScope<"LangOptions">, 1684 NormalizedValues<["FPP_Standard", "FPP_Fast", "FPP_None"]>; 1685def ffloat16_excess_precision_EQ : Joined<["-"], "ffloat16-excess-precision=">, 1686 Group<f_Group>, Flags<[CC1Option, NoDriverOption]>, 1687 HelpText<"Allows control over excess precision on targets where native " 1688 "support for Float16 precision types is not available. By default, excess " 1689 "precision is used to calculate intermediate results following the " 1690 "rules specified in ISO C99.">, 1691 Values<"standard,fast,none">, NormalizedValuesScope<"LangOptions">, 1692 NormalizedValues<["FPP_Standard", "FPP_Fast", "FPP_None"]>, 1693 MarshallingInfoEnum<LangOpts<"Float16ExcessPrecision">, "FPP_Standard">; 1694def fbfloat16_excess_precision_EQ : Joined<["-"], "fbfloat16-excess-precision=">, 1695 Group<f_Group>, Flags<[CC1Option, NoDriverOption]>, 1696 HelpText<"Allows control over excess precision on targets where native " 1697 "support for BFloat16 precision types is not available. By default, excess " 1698 "precision is used to calculate intermediate results following the " 1699 "rules specified in ISO C99.">, 1700 Values<"standard,fast,none">, NormalizedValuesScope<"LangOptions">, 1701 NormalizedValues<["FPP_Standard", "FPP_Fast", "FPP_None"]>, 1702 MarshallingInfoEnum<LangOpts<"BFloat16ExcessPrecision">, "FPP_Standard">; 1703def : Flag<["-"], "fexpensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>; 1704def : Flag<["-"], "fno-expensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>; 1705def fextdirs_EQ : Joined<["-"], "fextdirs=">, Group<f_Group>; 1706def : Flag<["-"], "fdefer-pop">, Group<clang_ignored_gcc_optimization_f_Group>; 1707def : Flag<["-"], "fno-defer-pop">, Group<clang_ignored_gcc_optimization_f_Group>; 1708def : Flag<["-"], "fextended-identifiers">, Group<clang_ignored_f_Group>; 1709def : Flag<["-"], "fno-extended-identifiers">, Group<f_Group>, Flags<[Unsupported]>; 1710def fhosted : Flag<["-"], "fhosted">, Group<f_Group>; 1711def fdenormal_fp_math_EQ : Joined<["-"], "fdenormal-fp-math=">, Group<f_Group>, Flags<[CC1Option]>; 1712def ffile_reproducible : Flag<["-"], "ffile-reproducible">, Group<f_Group>, 1713 Flags<[CoreOption, CC1Option]>, 1714 HelpText<"Use the target's platform-specific path separator character when " 1715 "expanding the __FILE__ macro">; 1716def fno_file_reproducible : Flag<["-"], "fno-file-reproducible">, 1717 Group<f_Group>, Flags<[CoreOption, CC1Option]>, 1718 HelpText<"Use the host's platform-specific path separator character when " 1719 "expanding the __FILE__ macro">; 1720def ffp_eval_method_EQ : Joined<["-"], "ffp-eval-method=">, Group<f_Group>, Flags<[CC1Option]>, 1721 HelpText<"Specifies the evaluation method to use for floating-point arithmetic.">, 1722 Values<"source,double,extended">, NormalizedValuesScope<"LangOptions">, 1723 NormalizedValues<["FEM_Source", "FEM_Double", "FEM_Extended"]>, 1724 MarshallingInfoEnum<LangOpts<"FPEvalMethod">, "FEM_UnsetOnCommandLine">; 1725def ffp_model_EQ : Joined<["-"], "ffp-model=">, Group<f_Group>, Flags<[NoXarchOption]>, 1726 HelpText<"Controls the semantics of floating-point calculations.">; 1727def ffp_exception_behavior_EQ : Joined<["-"], "ffp-exception-behavior=">, Group<f_Group>, Flags<[CC1Option]>, 1728 HelpText<"Specifies the exception behavior of floating-point operations.">, 1729 Values<"ignore,maytrap,strict">, NormalizedValuesScope<"LangOptions">, 1730 NormalizedValues<["FPE_Ignore", "FPE_MayTrap", "FPE_Strict"]>, 1731 MarshallingInfoEnum<LangOpts<"FPExceptionMode">, "FPE_Default">; 1732defm fast_math : BoolFOption<"fast-math", 1733 LangOpts<"FastMath">, DefaultFalse, 1734 PosFlag<SetTrue, [CC1Option, FC1Option, FlangOption], "Allow aggressive, lossy floating-point optimizations", 1735 [cl_fast_relaxed_math.KeyPath]>, 1736 NegFlag<SetFalse>>; 1737defm math_errno : BoolFOption<"math-errno", 1738 LangOpts<"MathErrno">, DefaultFalse, 1739 PosFlag<SetTrue, [CC1Option], "Require math functions to indicate errors by setting errno">, 1740 NegFlag<SetFalse>>, 1741 ShouldParseIf<!strconcat("!", open_cl.KeyPath)>; 1742def fextend_args_EQ : Joined<["-"], "fextend-arguments=">, Group<f_Group>, 1743 Flags<[CC1Option, NoArgumentUnused]>, 1744 HelpText<"Controls how scalar integer arguments are extended in calls " 1745 "to unprototyped and varargs functions">, 1746 Values<"32,64">, 1747 NormalizedValues<["ExtendTo32", "ExtendTo64"]>, 1748 NormalizedValuesScope<"LangOptions::ExtendArgsKind">, 1749 MarshallingInfoEnum<LangOpts<"ExtendIntArgs">,"ExtendTo32">; 1750def fbracket_depth_EQ : Joined<["-"], "fbracket-depth=">, Group<f_Group>, Flags<[CoreOption]>; 1751def fsignaling_math : Flag<["-"], "fsignaling-math">, Group<f_Group>; 1752def fno_signaling_math : Flag<["-"], "fno-signaling-math">, Group<f_Group>; 1753defm jump_tables : BoolFOption<"jump-tables", 1754 CodeGenOpts<"NoUseJumpTables">, DefaultFalse, 1755 NegFlag<SetTrue, [CC1Option], "Do not use">, PosFlag<SetFalse, [], "Use">, 1756 BothFlags<[], " jump tables for lowering switches">>; 1757defm force_enable_int128 : BoolFOption<"force-enable-int128", 1758 TargetOpts<"ForceEnableInt128">, DefaultFalse, 1759 PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">, 1760 BothFlags<[], " support for int128_t type">>; 1761defm keep_static_consts : BoolFOption<"keep-static-consts", 1762 CodeGenOpts<"KeepStaticConsts">, DefaultFalse, 1763 PosFlag<SetTrue, [CC1Option], "Keep">, NegFlag<SetFalse, [], "Don't keep">, 1764 BothFlags<[NoXarchOption], " static const variables even if unused">>; 1765defm keep_persistent_storage_variables : BoolFOption<"keep-persistent-storage-variables", 1766 CodeGenOpts<"KeepPersistentStorageVariables">, DefaultFalse, 1767 PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">, 1768 BothFlags<[NoXarchOption], " keeping all variables that have a persistent storage duration, including global, static and thread-local variables, to guarantee that they can be directly addressed">>; 1769defm fixed_point : BoolFOption<"fixed-point", 1770 LangOpts<"FixedPoint">, DefaultFalse, 1771 PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">, 1772 BothFlags<[], " fixed point types">>, ShouldParseIf<!strconcat("!", cplusplus.KeyPath)>; 1773defm cxx_static_destructors : BoolFOption<"c++-static-destructors", 1774 LangOpts<"RegisterStaticDestructors">, DefaultTrue, 1775 NegFlag<SetFalse, [CC1Option], "Disable C++ static destructor registration">, 1776 PosFlag<SetTrue>>; 1777def fsymbol_partition_EQ : Joined<["-"], "fsymbol-partition=">, Group<f_Group>, 1778 Flags<[CC1Option]>, MarshallingInfoString<CodeGenOpts<"SymbolPartition">>; 1779 1780defm memory_profile : OptInCC1FFlag<"memory-profile", "Enable", "Disable", " heap memory profiling">; 1781def fmemory_profile_EQ : Joined<["-"], "fmemory-profile=">, 1782 Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<directory>">, 1783 HelpText<"Enable heap memory profiling and dump results into <directory>">; 1784def fmemory_profile_use_EQ : Joined<["-"], "fmemory-profile-use=">, 1785 Group<f_Group>, Flags<[CC1Option, CoreOption]>, MetaVarName<"<pathname>">, 1786 HelpText<"Use memory profile for profile-guided memory optimization">, 1787 MarshallingInfoString<CodeGenOpts<"MemoryProfileUsePath">>; 1788 1789// Begin sanitizer flags. These should all be core options exposed in all driver 1790// modes. 1791let Flags = [CC1Option, CoreOption] in { 1792 1793def fsanitize_EQ : CommaJoined<["-"], "fsanitize=">, Group<f_clang_Group>, 1794 MetaVarName<"<check>">, 1795 HelpText<"Turn on runtime checks for various forms of undefined " 1796 "or suspicious behavior. See user manual for available checks">; 1797def fno_sanitize_EQ : CommaJoined<["-"], "fno-sanitize=">, Group<f_clang_Group>, 1798 Flags<[CoreOption, NoXarchOption]>; 1799 1800def fsanitize_ignorelist_EQ : Joined<["-"], "fsanitize-ignorelist=">, 1801 Group<f_clang_Group>, HelpText<"Path to ignorelist file for sanitizers">; 1802def : Joined<["-"], "fsanitize-blacklist=">, 1803 Group<f_clang_Group>, Flags<[HelpHidden]>, Alias<fsanitize_ignorelist_EQ>, 1804 HelpText<"Alias for -fsanitize-ignorelist=">; 1805 1806def fsanitize_system_ignorelist_EQ : Joined<["-"], "fsanitize-system-ignorelist=">, 1807 HelpText<"Path to system ignorelist file for sanitizers">, Flags<[CC1Option]>; 1808 1809def fno_sanitize_ignorelist : Flag<["-"], "fno-sanitize-ignorelist">, 1810 Group<f_clang_Group>, HelpText<"Don't use ignorelist file for sanitizers">; 1811def : Flag<["-"], "fno-sanitize-blacklist">, 1812 Group<f_clang_Group>, Flags<[HelpHidden]>, Alias<fno_sanitize_ignorelist>; 1813 1814def fsanitize_coverage : CommaJoined<["-"], "fsanitize-coverage=">, 1815 Group<f_clang_Group>, 1816 HelpText<"Specify the type of coverage instrumentation for Sanitizers">; 1817def fno_sanitize_coverage : CommaJoined<["-"], "fno-sanitize-coverage=">, 1818 Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>, 1819 HelpText<"Disable features of coverage instrumentation for Sanitizers">, 1820 Values<"func,bb,edge,indirect-calls,trace-bb,trace-cmp,trace-div,trace-gep," 1821 "8bit-counters,trace-pc,trace-pc-guard,no-prune,inline-8bit-counters," 1822 "inline-bool-flag">; 1823def fsanitize_coverage_allowlist : Joined<["-"], "fsanitize-coverage-allowlist=">, 1824 Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>, 1825 HelpText<"Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones">, 1826 MarshallingInfoStringVector<CodeGenOpts<"SanitizeCoverageAllowlistFiles">>; 1827def fsanitize_coverage_ignorelist : Joined<["-"], "fsanitize-coverage-ignorelist=">, 1828 Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>, 1829 HelpText<"Disable sanitizer coverage instrumentation for modules and functions " 1830 "that match the provided special case list, even the allowed ones">, 1831 MarshallingInfoStringVector<CodeGenOpts<"SanitizeCoverageIgnorelistFiles">>; 1832def fexperimental_sanitize_metadata_EQ : CommaJoined<["-"], "fexperimental-sanitize-metadata=">, 1833 Group<f_Group>, 1834 HelpText<"Specify the type of metadata to emit for binary analysis sanitizers">; 1835def fno_experimental_sanitize_metadata_EQ : CommaJoined<["-"], "fno-experimental-sanitize-metadata=">, 1836 Group<f_Group>, Flags<[CoreOption]>, 1837 HelpText<"Disable emitting metadata for binary analysis sanitizers">; 1838def fexperimental_sanitize_metadata_ignorelist_EQ : Joined<["-"], "fexperimental-sanitize-metadata-ignorelist=">, 1839 Group<f_Group>, Flags<[CoreOption]>, 1840 HelpText<"Disable sanitizer metadata for modules and functions that match the provided special case list">, 1841 MarshallingInfoStringVector<CodeGenOpts<"SanitizeMetadataIgnorelistFiles">>; 1842def fsanitize_memory_track_origins_EQ : Joined<["-"], "fsanitize-memory-track-origins=">, 1843 Group<f_clang_Group>, 1844 HelpText<"Enable origins tracking in MemorySanitizer">, 1845 MarshallingInfoInt<CodeGenOpts<"SanitizeMemoryTrackOrigins">>; 1846def fsanitize_memory_track_origins : Flag<["-"], "fsanitize-memory-track-origins">, 1847 Group<f_clang_Group>, 1848 Alias<fsanitize_memory_track_origins_EQ>, AliasArgs<["2"]>, 1849 HelpText<"Enable origins tracking in MemorySanitizer">; 1850def fno_sanitize_memory_track_origins : Flag<["-"], "fno-sanitize-memory-track-origins">, 1851 Group<f_clang_Group>, 1852 Flags<[CoreOption, NoXarchOption]>, 1853 HelpText<"Disable origins tracking in MemorySanitizer">; 1854def fsanitize_address_outline_instrumentation : Flag<["-"], "fsanitize-address-outline-instrumentation">, 1855 Group<f_clang_Group>, 1856 HelpText<"Always generate function calls for address sanitizer instrumentation">; 1857def fno_sanitize_address_outline_instrumentation : Flag<["-"], "fno-sanitize-address-outline-instrumentation">, 1858 Group<f_clang_Group>, 1859 HelpText<"Use default code inlining logic for the address sanitizer">; 1860defm sanitize_stable_abi 1861 : OptInCC1FFlag<"sanitize-stable-abi", "Stable ", "Conventional ", 1862 "ABI instrumentation for sanitizer runtime. Default: Conventional">; 1863 1864def fsanitize_memtag_mode_EQ : Joined<["-"], "fsanitize-memtag-mode=">, 1865 Group<f_clang_Group>, 1866 HelpText<"Set default MTE mode to 'sync' (default) or 'async'">; 1867def fsanitize_hwaddress_experimental_aliasing 1868 : Flag<["-"], "fsanitize-hwaddress-experimental-aliasing">, 1869 Group<f_clang_Group>, 1870 HelpText<"Enable aliasing mode in HWAddressSanitizer">; 1871def fno_sanitize_hwaddress_experimental_aliasing 1872 : Flag<["-"], "fno-sanitize-hwaddress-experimental-aliasing">, 1873 Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>, 1874 HelpText<"Disable aliasing mode in HWAddressSanitizer">; 1875defm sanitize_memory_use_after_dtor : BoolOption<"f", "sanitize-memory-use-after-dtor", 1876 CodeGenOpts<"SanitizeMemoryUseAfterDtor">, DefaultFalse, 1877 PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">, 1878 BothFlags<[], " use-after-destroy detection in MemorySanitizer">>, 1879 Group<f_clang_Group>; 1880def fsanitize_address_field_padding : Joined<["-"], "fsanitize-address-field-padding=">, 1881 Group<f_clang_Group>, 1882 HelpText<"Level of field padding for AddressSanitizer">, 1883 MarshallingInfoInt<LangOpts<"SanitizeAddressFieldPadding">>; 1884defm sanitize_address_use_after_scope : BoolOption<"f", "sanitize-address-use-after-scope", 1885 CodeGenOpts<"SanitizeAddressUseAfterScope">, DefaultFalse, 1886 PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Disable">, 1887 BothFlags<[], " use-after-scope detection in AddressSanitizer">>, 1888 Group<f_clang_Group>; 1889def sanitize_address_use_after_return_EQ 1890 : Joined<["-"], "fsanitize-address-use-after-return=">, 1891 MetaVarName<"<mode>">, 1892 Flags<[CC1Option]>, 1893 HelpText<"Select the mode of detecting stack use-after-return in AddressSanitizer">, 1894 Group<f_clang_Group>, 1895 Values<"never,runtime,always">, 1896 NormalizedValuesScope<"llvm::AsanDetectStackUseAfterReturnMode">, 1897 NormalizedValues<["Never", "Runtime", "Always"]>, 1898 MarshallingInfoEnum<CodeGenOpts<"SanitizeAddressUseAfterReturn">, "Runtime">; 1899defm sanitize_address_poison_custom_array_cookie : BoolOption<"f", "sanitize-address-poison-custom-array-cookie", 1900 CodeGenOpts<"SanitizeAddressPoisonCustomArrayCookie">, DefaultFalse, 1901 PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">, 1902 BothFlags<[], " poisoning array cookies when using custom operator new[] in AddressSanitizer">>, 1903 DocBrief<[{Enable "poisoning" array cookies when allocating arrays with a 1904custom operator new\[\] in Address Sanitizer, preventing accesses to the 1905cookies from user code. An array cookie is a small implementation-defined 1906header added to certain array allocations to record metadata such as the 1907length of the array. Accesses to array cookies from user code are technically 1908allowed by the standard but are more likely to be the result of an 1909out-of-bounds array access. 1910 1911An operator new\[\] is "custom" if it is not one of the allocation functions 1912provided by the C++ standard library. Array cookies from non-custom allocation 1913functions are always poisoned.}]>, 1914 Group<f_clang_Group>; 1915defm sanitize_address_globals_dead_stripping : BoolOption<"f", "sanitize-address-globals-dead-stripping", 1916 CodeGenOpts<"SanitizeAddressGlobalsDeadStripping">, DefaultFalse, 1917 PosFlag<SetTrue, [], "Enable linker dead stripping of globals in AddressSanitizer">, 1918 NegFlag<SetFalse, [], "Disable linker dead stripping of globals in AddressSanitizer">>, 1919 Group<f_clang_Group>; 1920defm sanitize_address_use_odr_indicator : BoolOption<"f", "sanitize-address-use-odr-indicator", 1921 CodeGenOpts<"SanitizeAddressUseOdrIndicator">, DefaultTrue, 1922 PosFlag<SetTrue, [], "Enable ODR indicator globals to avoid false ODR violation" 1923 " reports in partially sanitized programs at the cost of an increase in binary size">, 1924 NegFlag<SetFalse, [], "Disable ODR indicator globals">>, 1925 Group<f_clang_Group>; 1926def sanitize_address_destructor_EQ 1927 : Joined<["-"], "fsanitize-address-destructor=">, 1928 Flags<[CC1Option]>, 1929 HelpText<"Set the kind of module destructors emitted by " 1930 "AddressSanitizer instrumentation. These destructors are " 1931 "emitted to unregister instrumented global variables when " 1932 "code is unloaded (e.g. via `dlclose()`).">, 1933 Group<f_clang_Group>, 1934 Values<"none,global">, 1935 NormalizedValuesScope<"llvm::AsanDtorKind">, 1936 NormalizedValues<["None", "Global"]>, 1937 MarshallingInfoEnum<CodeGenOpts<"SanitizeAddressDtor">, "Global">; 1938defm sanitize_memory_param_retval 1939 : BoolFOption<"sanitize-memory-param-retval", 1940 CodeGenOpts<"SanitizeMemoryParamRetval">, 1941 DefaultTrue, 1942 PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">, 1943 BothFlags<[], " detection of uninitialized parameters and return values">>; 1944//// Note: This flag was introduced when it was necessary to distinguish between 1945// ABI for correct codegen. This is no longer needed, but the flag is 1946// not removed since targeting either ABI will behave the same. 1947// This way we cause no disturbance to existing scripts & code, and if we 1948// want to use this flag in the future we will cause no disturbance then 1949// either. 1950def fsanitize_hwaddress_abi_EQ 1951 : Joined<["-"], "fsanitize-hwaddress-abi=">, 1952 Group<f_clang_Group>, 1953 HelpText<"Select the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor). This option is currently unused.">; 1954def fsanitize_recover_EQ : CommaJoined<["-"], "fsanitize-recover=">, 1955 Group<f_clang_Group>, 1956 HelpText<"Enable recovery for specified sanitizers">; 1957def fno_sanitize_recover_EQ : CommaJoined<["-"], "fno-sanitize-recover=">, 1958 Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>, 1959 HelpText<"Disable recovery for specified sanitizers">; 1960def fsanitize_recover : Flag<["-"], "fsanitize-recover">, Group<f_clang_Group>, 1961 Alias<fsanitize_recover_EQ>, AliasArgs<["all"]>; 1962def fno_sanitize_recover : Flag<["-"], "fno-sanitize-recover">, 1963 Flags<[CoreOption, NoXarchOption]>, Group<f_clang_Group>, 1964 Alias<fno_sanitize_recover_EQ>, AliasArgs<["all"]>; 1965def fsanitize_trap_EQ : CommaJoined<["-"], "fsanitize-trap=">, Group<f_clang_Group>, 1966 HelpText<"Enable trapping for specified sanitizers">; 1967def fno_sanitize_trap_EQ : CommaJoined<["-"], "fno-sanitize-trap=">, Group<f_clang_Group>, 1968 Flags<[CoreOption, NoXarchOption]>, 1969 HelpText<"Disable trapping for specified sanitizers">; 1970def fsanitize_trap : Flag<["-"], "fsanitize-trap">, Group<f_clang_Group>, 1971 Alias<fsanitize_trap_EQ>, AliasArgs<["all"]>, 1972 HelpText<"Enable trapping for all sanitizers">; 1973def fno_sanitize_trap : Flag<["-"], "fno-sanitize-trap">, Group<f_clang_Group>, 1974 Alias<fno_sanitize_trap_EQ>, AliasArgs<["all"]>, 1975 Flags<[CoreOption, NoXarchOption]>, 1976 HelpText<"Disable trapping for all sanitizers">; 1977def fsanitize_undefined_trap_on_error 1978 : Flag<["-"], "fsanitize-undefined-trap-on-error">, Group<f_clang_Group>, 1979 Alias<fsanitize_trap_EQ>, AliasArgs<["undefined"]>; 1980def fno_sanitize_undefined_trap_on_error 1981 : Flag<["-"], "fno-sanitize-undefined-trap-on-error">, Group<f_clang_Group>, 1982 Alias<fno_sanitize_trap_EQ>, AliasArgs<["undefined"]>; 1983defm sanitize_minimal_runtime : BoolOption<"f", "sanitize-minimal-runtime", 1984 CodeGenOpts<"SanitizeMinimalRuntime">, DefaultFalse, 1985 PosFlag<SetTrue>, NegFlag<SetFalse>>, 1986 Group<f_clang_Group>; 1987def fsanitize_link_runtime : Flag<["-"], "fsanitize-link-runtime">, 1988 Group<f_clang_Group>; 1989def fno_sanitize_link_runtime : Flag<["-"], "fno-sanitize-link-runtime">, 1990 Group<f_clang_Group>; 1991def fsanitize_link_cxx_runtime : Flag<["-"], "fsanitize-link-c++-runtime">, 1992 Group<f_clang_Group>; 1993def fno_sanitize_link_cxx_runtime : Flag<["-"], "fno-sanitize-link-c++-runtime">, 1994 Group<f_clang_Group>; 1995defm sanitize_cfi_cross_dso : BoolOption<"f", "sanitize-cfi-cross-dso", 1996 CodeGenOpts<"SanitizeCfiCrossDso">, DefaultFalse, 1997 PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Disable">, 1998 BothFlags<[], " control flow integrity (CFI) checks for cross-DSO calls.">>, 1999 Group<f_clang_Group>; 2000def fsanitize_cfi_icall_generalize_pointers : Flag<["-"], "fsanitize-cfi-icall-generalize-pointers">, 2001 Group<f_clang_Group>, 2002 HelpText<"Generalize pointers in CFI indirect call type signature checks">, 2003 MarshallingInfoFlag<CodeGenOpts<"SanitizeCfiICallGeneralizePointers">>; 2004def fsanitize_cfi_icall_normalize_integers : Flag<["-"], "fsanitize-cfi-icall-experimental-normalize-integers">, 2005 Group<f_clang_Group>, 2006 HelpText<"Normalize integers in CFI indirect call type signature checks">, 2007 MarshallingInfoFlag<CodeGenOpts<"SanitizeCfiICallNormalizeIntegers">>; 2008defm sanitize_cfi_canonical_jump_tables : BoolOption<"f", "sanitize-cfi-canonical-jump-tables", 2009 CodeGenOpts<"SanitizeCfiCanonicalJumpTables">, DefaultFalse, 2010 PosFlag<SetTrue, [], "Make">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Do not make">, 2011 BothFlags<[], " the jump table addresses canonical in the symbol table">>, 2012 Group<f_clang_Group>; 2013defm sanitize_stats : BoolOption<"f", "sanitize-stats", 2014 CodeGenOpts<"SanitizeStats">, DefaultFalse, 2015 PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Disable">, 2016 BothFlags<[], " sanitizer statistics gathering.">>, 2017 Group<f_clang_Group>; 2018def fsanitize_thread_memory_access : Flag<["-"], "fsanitize-thread-memory-access">, 2019 Group<f_clang_Group>, 2020 HelpText<"Enable memory access instrumentation in ThreadSanitizer (default)">; 2021def fno_sanitize_thread_memory_access : Flag<["-"], "fno-sanitize-thread-memory-access">, 2022 Group<f_clang_Group>, 2023 Flags<[CoreOption, NoXarchOption]>, 2024 HelpText<"Disable memory access instrumentation in ThreadSanitizer">; 2025def fsanitize_thread_func_entry_exit : Flag<["-"], "fsanitize-thread-func-entry-exit">, 2026 Group<f_clang_Group>, 2027 HelpText<"Enable function entry/exit instrumentation in ThreadSanitizer (default)">; 2028def fno_sanitize_thread_func_entry_exit : Flag<["-"], "fno-sanitize-thread-func-entry-exit">, 2029 Group<f_clang_Group>, 2030 Flags<[CoreOption, NoXarchOption]>, 2031 HelpText<"Disable function entry/exit instrumentation in ThreadSanitizer">; 2032def fsanitize_thread_atomics : Flag<["-"], "fsanitize-thread-atomics">, 2033 Group<f_clang_Group>, 2034 HelpText<"Enable atomic operations instrumentation in ThreadSanitizer (default)">; 2035def fno_sanitize_thread_atomics : Flag<["-"], "fno-sanitize-thread-atomics">, 2036 Group<f_clang_Group>, 2037 Flags<[CoreOption, NoXarchOption]>, 2038 HelpText<"Disable atomic operations instrumentation in ThreadSanitizer">; 2039def fsanitize_undefined_strip_path_components_EQ : Joined<["-"], "fsanitize-undefined-strip-path-components=">, 2040 Group<f_clang_Group>, MetaVarName<"<number>">, 2041 HelpText<"Strip (or keep only, if negative) a given number of path components " 2042 "when emitting check metadata.">, 2043 MarshallingInfoInt<CodeGenOpts<"EmitCheckPathComponentsToStrip">, "0", "int">; 2044 2045} // end -f[no-]sanitize* flags 2046 2047def funsafe_math_optimizations : Flag<["-"], "funsafe-math-optimizations">, 2048 Group<f_Group>, Flags<[CC1Option]>, 2049 HelpText<"Allow unsafe floating-point math optimizations which may decrease precision">, 2050 MarshallingInfoFlag<LangOpts<"UnsafeFPMath">>, 2051 ImpliedByAnyOf<[cl_unsafe_math_optimizations.KeyPath, ffast_math.KeyPath]>; 2052def fno_unsafe_math_optimizations : Flag<["-"], "fno-unsafe-math-optimizations">, 2053 Group<f_Group>; 2054def fassociative_math : Flag<["-"], "fassociative-math">, Group<f_Group>; 2055def fno_associative_math : Flag<["-"], "fno-associative-math">, Group<f_Group>; 2056defm reciprocal_math : BoolFOption<"reciprocal-math", 2057 LangOpts<"AllowRecip">, DefaultFalse, 2058 PosFlag<SetTrue, [CC1Option, FC1Option, FlangOption], "Allow division operations to be reassociated", 2059 [funsafe_math_optimizations.KeyPath]>, 2060 NegFlag<SetFalse>>; 2061defm approx_func : BoolFOption<"approx-func", LangOpts<"ApproxFunc">, DefaultFalse, 2062 PosFlag<SetTrue, [CC1Option, FC1Option, FlangOption], "Allow certain math function calls to be replaced " 2063 "with an approximately equivalent calculation", 2064 [funsafe_math_optimizations.KeyPath]>, 2065 NegFlag<SetFalse>>; 2066defm finite_math_only : BoolFOption<"finite-math-only", 2067 LangOpts<"FiniteMathOnly">, DefaultFalse, 2068 PosFlag<SetTrue, [CC1Option], "Allow floating-point optimizations that " 2069 "assume arguments and results are not NaNs or +-inf. This defines " 2070 "the \\_\\_FINITE\\_MATH\\_ONLY\\_\\_ preprocessor macro.", 2071 [cl_finite_math_only.KeyPath, ffast_math.KeyPath]>, 2072 NegFlag<SetFalse>>; 2073defm signed_zeros : BoolFOption<"signed-zeros", 2074 LangOpts<"NoSignedZero">, DefaultFalse, 2075 NegFlag<SetTrue, [CC1Option, FC1Option, FlangOption], "Allow optimizations that ignore the sign of floating point zeros", 2076 [cl_no_signed_zeros.KeyPath, funsafe_math_optimizations.KeyPath]>, 2077 PosFlag<SetFalse>>; 2078def fhonor_nans : Flag<["-"], "fhonor-nans">, Group<f_Group>, 2079 HelpText<"Specify that floating-point optimizations are not allowed that " 2080 "assume arguments and results are not NANs.">; 2081def fno_honor_nans : Flag<["-"], "fno-honor-nans">, Group<f_Group>; 2082def fhonor_infinities : Flag<["-"], "fhonor-infinities">, 2083 Group<f_Group>, 2084 HelpText<"Specify that floating-point optimizations are not allowed that " 2085 "assume arguments and results are not +-inf.">; 2086def fno_honor_infinities : Flag<["-"], "fno-honor-infinities">, Group<f_Group>; 2087// This option was originally misspelt "infinites" [sic]. 2088def : Flag<["-"], "fhonor-infinites">, Alias<fhonor_infinities>; 2089def : Flag<["-"], "fno-honor-infinites">, Alias<fno_honor_infinities>; 2090def frounding_math : Flag<["-"], "frounding-math">, Group<f_Group>, Flags<[CC1Option]>, 2091 MarshallingInfoFlag<LangOpts<"RoundingMath">>, 2092 Normalizer<"makeFlagToValueNormalizer(llvm::RoundingMode::Dynamic)">; 2093def fno_rounding_math : Flag<["-"], "fno-rounding-math">, Group<f_Group>, Flags<[CC1Option]>; 2094def ftrapping_math : Flag<["-"], "ftrapping-math">, Group<f_Group>; 2095def fno_trapping_math : Flag<["-"], "fno-trapping-math">, Group<f_Group>; 2096def ffp_contract : Joined<["-"], "ffp-contract=">, Group<f_Group>, 2097 Flags<[CC1Option, FC1Option, FlangOption]>, 2098 DocBrief<"Form fused FP ops (e.g. FMAs):" 2099 " fast (fuses across statements disregarding pragmas)" 2100 " | on (only fuses in the same statement unless dictated by pragmas)" 2101 " | off (never fuses)" 2102 " | fast-honor-pragmas (fuses across statements unless dictated by pragmas)." 2103 " Default is 'fast' for CUDA, 'fast-honor-pragmas' for HIP, and 'on' otherwise.">, 2104 HelpText<"Form fused FP ops (e.g. FMAs)">, 2105 Values<"fast,on,off,fast-honor-pragmas">; 2106 2107defm strict_float_cast_overflow : BoolFOption<"strict-float-cast-overflow", 2108 CodeGenOpts<"StrictFloatCastOverflow">, DefaultTrue, 2109 NegFlag<SetFalse, [CC1Option], "Relax language rules and try to match the behavior" 2110 " of the target's native float-to-int conversion instructions">, 2111 PosFlag<SetTrue, [], "Assume that overflowing float-to-int casts are undefined (default)">>; 2112 2113defm protect_parens : BoolFOption<"protect-parens", 2114 LangOpts<"ProtectParens">, DefaultFalse, 2115 PosFlag<SetTrue, [CoreOption, CC1Option], 2116 "Determines whether the optimizer honors parentheses when " 2117 "floating-point expressions are evaluated">, 2118 NegFlag<SetFalse>>; 2119 2120def ffor_scope : Flag<["-"], "ffor-scope">, Group<f_Group>; 2121def fno_for_scope : Flag<["-"], "fno-for-scope">, Group<f_Group>; 2122 2123defm rewrite_imports : BoolFOption<"rewrite-imports", 2124 PreprocessorOutputOpts<"RewriteImports">, DefaultFalse, 2125 PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>; 2126defm rewrite_includes : BoolFOption<"rewrite-includes", 2127 PreprocessorOutputOpts<"RewriteIncludes">, DefaultFalse, 2128 PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>; 2129 2130defm directives_only : OptInCC1FFlag<"directives-only", "">; 2131 2132defm delete_null_pointer_checks : BoolFOption<"delete-null-pointer-checks", 2133 CodeGenOpts<"NullPointerIsValid">, DefaultFalse, 2134 NegFlag<SetTrue, [CC1Option], "Do not treat usage of null pointers as undefined behavior">, 2135 PosFlag<SetFalse, [], "Treat usage of null pointers as undefined behavior (default)">, 2136 BothFlags<[CoreOption]>>, 2137 DocBrief<[{When enabled, treat null pointer dereference, creation of a reference to null, 2138or passing a null pointer to a function parameter annotated with the "nonnull" 2139attribute as undefined behavior. (And, thus the optimizer may assume that any 2140pointer used in such a way must not have been null and optimize away the 2141branches accordingly.) On by default.}]>; 2142 2143defm use_line_directives : BoolFOption<"use-line-directives", 2144 PreprocessorOutputOpts<"UseLineDirectives">, DefaultFalse, 2145 PosFlag<SetTrue, [CC1Option], "Use #line in preprocessed output">, NegFlag<SetFalse>>; 2146defm minimize_whitespace : BoolFOption<"minimize-whitespace", 2147 PreprocessorOutputOpts<"MinimizeWhitespace">, DefaultFalse, 2148 PosFlag<SetTrue, [CC1Option], "Ignore the whitespace from the input file " 2149 "when emitting preprocessor output. It will only contain whitespace " 2150 "when necessary, e.g. to keep two minus signs from merging into to " 2151 "an increment operator. Useful with the -P option to normalize " 2152 "whitespace such that two files with only formatting changes are " 2153 "equal.\n\nOnly valid with -E on C-like inputs and incompatible " 2154 "with -traditional-cpp.">, NegFlag<SetFalse>>; 2155 2156def ffreestanding : Flag<["-"], "ffreestanding">, Group<f_Group>, Flags<[CC1Option]>, 2157 HelpText<"Assert that the compilation takes place in a freestanding environment">, 2158 MarshallingInfoFlag<LangOpts<"Freestanding">>; 2159def fgnuc_version_EQ : Joined<["-"], "fgnuc-version=">, Group<f_Group>, 2160 HelpText<"Sets various macros to claim compatibility with the given GCC version (default is 4.2.1)">, 2161 Flags<[CC1Option, CoreOption]>; 2162// We abuse '-f[no-]gnu-keywords' to force overriding all GNU-extension 2163// keywords. This behavior is provided by GCC's poorly named '-fasm' flag, 2164// while a subset (the non-C++ GNU keywords) is provided by GCC's 2165// '-fgnu-keywords'. Clang conflates the two for simplicity under the single 2166// name, as it doesn't seem a useful distinction. 2167defm gnu_keywords : BoolFOption<"gnu-keywords", 2168 LangOpts<"GNUKeywords">, Default<gnu_mode.KeyPath>, 2169 PosFlag<SetTrue, [], "Allow GNU-extension keywords regardless of language standard">, 2170 NegFlag<SetFalse>, BothFlags<[CC1Option]>>; 2171defm gnu89_inline : BoolFOption<"gnu89-inline", 2172 LangOpts<"GNUInline">, Default<!strconcat("!", c99.KeyPath, " && !", cplusplus.KeyPath)>, 2173 PosFlag<SetTrue, [CC1Option], "Use the gnu89 inline semantics">, 2174 NegFlag<SetFalse>>, ShouldParseIf<!strconcat("!", cplusplus.KeyPath)>; 2175def fgnu_runtime : Flag<["-"], "fgnu-runtime">, Group<f_Group>, 2176 HelpText<"Generate output compatible with the standard GNU Objective-C runtime">; 2177def fheinous_gnu_extensions : Flag<["-"], "fheinous-gnu-extensions">, Flags<[CC1Option]>, 2178 MarshallingInfoFlag<LangOpts<"HeinousExtensions">>; 2179def filelist : Separate<["-"], "filelist">, Flags<[LinkerInput]>, 2180 Group<Link_Group>; 2181def : Flag<["-"], "findirect-virtual-calls">, Alias<fapple_kext>; 2182def finline_functions : Flag<["-"], "finline-functions">, Group<f_clang_Group>, Flags<[CC1Option]>, 2183 HelpText<"Inline suitable functions">; 2184def finline_hint_functions: Flag<["-"], "finline-hint-functions">, Group<f_clang_Group>, Flags<[CC1Option]>, 2185 HelpText<"Inline functions which are (explicitly or implicitly) marked inline">; 2186def finline : Flag<["-"], "finline">, Group<clang_ignored_f_Group>; 2187def finline_max_stacksize_EQ 2188 : Joined<["-"], "finline-max-stacksize=">, 2189 Group<f_Group>, Flags<[CoreOption, CC1Option]>, 2190 HelpText<"Suppress inlining of functions whose stack size exceeds the given value">, 2191 MarshallingInfoInt<CodeGenOpts<"InlineMaxStackSize">, "UINT_MAX">; 2192defm jmc : BoolFOption<"jmc", 2193 CodeGenOpts<"JMCInstrument">, DefaultFalse, 2194 PosFlag<SetTrue, [CC1Option], "Enable just-my-code debugging">, 2195 NegFlag<SetFalse>>; 2196def fglobal_isel : Flag<["-"], "fglobal-isel">, Group<f_clang_Group>, 2197 HelpText<"Enables the global instruction selector">; 2198def fexperimental_isel : Flag<["-"], "fexperimental-isel">, Group<f_clang_Group>, 2199 Alias<fglobal_isel>; 2200def fexperimental_strict_floating_point : Flag<["-"], "fexperimental-strict-floating-point">, 2201 Group<f_clang_Group>, Flags<[CC1Option]>, 2202 HelpText<"Enables the use of non-default rounding modes and non-default exception handling on targets that are not currently ready.">, 2203 MarshallingInfoFlag<LangOpts<"ExpStrictFP">>; 2204def finput_charset_EQ : Joined<["-"], "finput-charset=">, Flags<[FlangOption, FC1Option]>, Group<f_Group>, 2205 HelpText<"Specify the default character set for source files">; 2206def fexec_charset_EQ : Joined<["-"], "fexec-charset=">, Group<f_Group>; 2207def finstrument_functions : Flag<["-"], "finstrument-functions">, Group<f_Group>, Flags<[CC1Option]>, 2208 HelpText<"Generate calls to instrument function entry and exit">, 2209 MarshallingInfoFlag<CodeGenOpts<"InstrumentFunctions">>; 2210def finstrument_functions_after_inlining : Flag<["-"], "finstrument-functions-after-inlining">, Group<f_Group>, Flags<[CC1Option]>, 2211 HelpText<"Like -finstrument-functions, but insert the calls after inlining">, 2212 MarshallingInfoFlag<CodeGenOpts<"InstrumentFunctionsAfterInlining">>; 2213def finstrument_function_entry_bare : Flag<["-"], "finstrument-function-entry-bare">, Group<f_Group>, Flags<[CC1Option]>, 2214 HelpText<"Instrument function entry only, after inlining, without arguments to the instrumentation call">, 2215 MarshallingInfoFlag<CodeGenOpts<"InstrumentFunctionEntryBare">>; 2216def fcf_protection_EQ : Joined<["-"], "fcf-protection=">, Flags<[CoreOption, CC1Option]>, Group<f_Group>, 2217 HelpText<"Instrument control-flow architecture protection">, Values<"return,branch,full,none">; 2218def fcf_protection : Flag<["-"], "fcf-protection">, Group<f_Group>, Flags<[CoreOption, CC1Option]>, 2219 Alias<fcf_protection_EQ>, AliasArgs<["full"]>, 2220 HelpText<"Enable cf-protection in 'full' mode">; 2221def mfunction_return_EQ : Joined<["-"], "mfunction-return=">, 2222 Group<m_Group>, Flags<[CoreOption, CC1Option]>, 2223 HelpText<"Replace returns with jumps to ``__x86_return_thunk`` (x86 only, error otherwise)">, 2224 Values<"keep,thunk-extern">, 2225 NormalizedValues<["Keep", "Extern"]>, 2226 NormalizedValuesScope<"llvm::FunctionReturnThunksKind">, 2227 MarshallingInfoEnum<CodeGenOpts<"FunctionReturnThunks">, "Keep">; 2228def mindirect_branch_cs_prefix : Flag<["-"], "mindirect-branch-cs-prefix">, 2229 Group<m_Group>, Flags<[CoreOption, CC1Option]>, 2230 HelpText<"Add cs prefix to call and jmp to indirect thunk">, 2231 MarshallingInfoFlag<CodeGenOpts<"IndirectBranchCSPrefix">>; 2232 2233defm xray_instrument : BoolFOption<"xray-instrument", 2234 LangOpts<"XRayInstrument">, DefaultFalse, 2235 PosFlag<SetTrue, [CC1Option], "Generate XRay instrumentation sleds on function entry and exit">, 2236 NegFlag<SetFalse>>; 2237 2238def fxray_instruction_threshold_EQ : 2239 Joined<["-"], "fxray-instruction-threshold=">, 2240 Group<f_Group>, Flags<[CC1Option]>, 2241 HelpText<"Sets the minimum function size to instrument with XRay">, 2242 MarshallingInfoInt<CodeGenOpts<"XRayInstructionThreshold">, "200">; 2243 2244def fxray_always_instrument : 2245 Joined<["-"], "fxray-always-instrument=">, 2246 Group<f_Group>, Flags<[CC1Option]>, 2247 HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.">, 2248 MarshallingInfoStringVector<LangOpts<"XRayAlwaysInstrumentFiles">>; 2249def fxray_never_instrument : 2250 Joined<["-"], "fxray-never-instrument=">, 2251 Group<f_Group>, Flags<[CC1Option]>, 2252 HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.">, 2253 MarshallingInfoStringVector<LangOpts<"XRayNeverInstrumentFiles">>; 2254def fxray_attr_list : 2255 Joined<["-"], "fxray-attr-list=">, 2256 Group<f_Group>, Flags<[CC1Option]>, 2257 HelpText<"Filename defining the list of functions/types for imbuing XRay attributes.">, 2258 MarshallingInfoStringVector<LangOpts<"XRayAttrListFiles">>; 2259def fxray_modes : 2260 Joined<["-"], "fxray-modes=">, 2261 Group<f_Group>, Flags<[CC1Option]>, 2262 HelpText<"List of modes to link in by default into XRay instrumented binaries.">; 2263 2264defm xray_always_emit_customevents : BoolFOption<"xray-always-emit-customevents", 2265 LangOpts<"XRayAlwaysEmitCustomEvents">, DefaultFalse, 2266 PosFlag<SetTrue, [CC1Option], "Always emit __xray_customevent(...) calls" 2267 " even if the containing function is not always instrumented">, 2268 NegFlag<SetFalse>>; 2269 2270defm xray_always_emit_typedevents : BoolFOption<"xray-always-emit-typedevents", 2271 LangOpts<"XRayAlwaysEmitTypedEvents">, DefaultFalse, 2272 PosFlag<SetTrue, [CC1Option], "Always emit __xray_typedevent(...) calls" 2273 " even if the containing function is not always instrumented">, 2274 NegFlag<SetFalse>>; 2275 2276defm xray_ignore_loops : BoolFOption<"xray-ignore-loops", 2277 CodeGenOpts<"XRayIgnoreLoops">, DefaultFalse, 2278 PosFlag<SetTrue, [CC1Option], "Don't instrument functions with loops" 2279 " unless they also meet the minimum function size">, 2280 NegFlag<SetFalse>>; 2281 2282defm xray_function_index : BoolFOption<"xray-function-index", 2283 CodeGenOpts<"XRayFunctionIndex">, DefaultTrue, 2284 PosFlag<SetTrue, []>, 2285 NegFlag<SetFalse, [CC1Option], "Omit function index section at the" 2286 " expense of single-function patching performance">>; 2287 2288def fxray_link_deps : Flag<["-"], "fxray-link-deps">, Group<f_Group>, 2289 HelpText<"Link XRay runtime library when -fxray-instrument is specified (default)">; 2290def fno_xray_link_deps : Flag<["-"], "fno-xray-link-deps">, Group<f_Group>; 2291 2292def fxray_instrumentation_bundle : 2293 Joined<["-"], "fxray-instrumentation-bundle=">, 2294 Group<f_Group>, Flags<[CC1Option]>, 2295 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'.">; 2296 2297def fxray_function_groups : 2298 Joined<["-"], "fxray-function-groups=">, 2299 Group<f_Group>, Flags<[CC1Option]>, 2300 HelpText<"Only instrument 1 of N groups">, 2301 MarshallingInfoInt<CodeGenOpts<"XRayTotalFunctionGroups">, "1">; 2302 2303def fxray_selected_function_group : 2304 Joined<["-"], "fxray-selected-function-group=">, 2305 Group<f_Group>, Flags<[CC1Option]>, 2306 HelpText<"When using -fxray-function-groups, select which group of functions to instrument. Valid range is 0 to fxray-function-groups - 1">, 2307 MarshallingInfoInt<CodeGenOpts<"XRaySelectedFunctionGroup">, "0">; 2308 2309 2310defm fine_grained_bitfield_accesses : BoolOption<"f", "fine-grained-bitfield-accesses", 2311 CodeGenOpts<"FineGrainedBitfieldAccesses">, DefaultFalse, 2312 PosFlag<SetTrue, [], "Use separate accesses for consecutive bitfield runs with legal widths and alignments.">, 2313 NegFlag<SetFalse, [], "Use large-integer access for consecutive bitfield runs.">, 2314 BothFlags<[CC1Option]>>, 2315 Group<f_clang_Group>; 2316 2317def fexperimental_relative_cxx_abi_vtables : 2318 Flag<["-"], "fexperimental-relative-c++-abi-vtables">, 2319 Group<f_clang_Group>, Flags<[CC1Option]>, 2320 HelpText<"Use the experimental C++ class ABI for classes with virtual tables">; 2321def fno_experimental_relative_cxx_abi_vtables : 2322 Flag<["-"], "fno-experimental-relative-c++-abi-vtables">, 2323 Group<f_clang_Group>, Flags<[CC1Option]>, 2324 HelpText<"Do not use the experimental C++ class ABI for classes with virtual tables">; 2325 2326def fcxx_abi_EQ : Joined<["-"], "fc++-abi=">, 2327 Group<f_clang_Group>, Flags<[CC1Option]>, 2328 HelpText<"C++ ABI to use. This will override the target C++ ABI.">; 2329 2330def flat__namespace : Flag<["-"], "flat_namespace">; 2331def flax_vector_conversions_EQ : Joined<["-"], "flax-vector-conversions=">, Group<f_Group>, 2332 HelpText<"Enable implicit vector bit-casts">, Values<"none,integer,all">, Flags<[CC1Option]>, 2333 NormalizedValues<["LangOptions::LaxVectorConversionKind::None", 2334 "LangOptions::LaxVectorConversionKind::Integer", 2335 "LangOptions::LaxVectorConversionKind::All"]>, 2336 MarshallingInfoEnum<LangOpts<"LaxVectorConversions">, 2337 open_cl.KeyPath # 2338 " ? LangOptions::LaxVectorConversionKind::None" # 2339 " : LangOptions::LaxVectorConversionKind::All">; 2340def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group<f_Group>, 2341 Alias<flax_vector_conversions_EQ>, AliasArgs<["integer"]>; 2342def flimited_precision_EQ : Joined<["-"], "flimited-precision=">, Group<f_Group>; 2343def fapple_link_rtlib : Flag<["-"], "fapple-link-rtlib">, Group<f_Group>, 2344 HelpText<"Force linking the clang builtins runtime library">; 2345def flto_EQ : Joined<["-"], "flto=">, Flags<[CoreOption, CC1Option, FC1Option, FlangOption]>, Group<f_Group>, 2346 HelpText<"Set LTO mode">, Values<"thin,full">; 2347def flto_EQ_jobserver : Flag<["-"], "flto=jobserver">, Group<f_Group>, 2348 Alias<flto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode">; 2349def flto_EQ_auto : Flag<["-"], "flto=auto">, Group<f_Group>, 2350 Alias<flto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode">; 2351def flto : Flag<["-"], "flto">, Flags<[CoreOption, CC1Option, FC1Option, FlangOption]>, Group<f_Group>, 2352 Alias<flto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode">; 2353defm unified_lto : BoolFOption<"unified-lto", 2354 CodeGenOpts<"UnifiedLTO">, DefaultFalse, 2355 PosFlag<SetTrue, [], "Use the unified LTO pipeline">, 2356 NegFlag<SetFalse, [], "Use distinct LTO pipelines">, 2357 BothFlags<[CC1Option], "">>; 2358def fno_lto : Flag<["-"], "fno-lto">, Flags<[CoreOption, CC1Option]>, Group<f_Group>, 2359 HelpText<"Disable LTO mode (default)">; 2360def foffload_lto_EQ : Joined<["-"], "foffload-lto=">, Flags<[CoreOption]>, Group<f_Group>, 2361 HelpText<"Set LTO mode for offload compilation">, Values<"thin,full">; 2362def foffload_lto : Flag<["-"], "foffload-lto">, Flags<[CoreOption]>, Group<f_Group>, 2363 Alias<foffload_lto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode for offload compilation">; 2364def fno_offload_lto : Flag<["-"], "fno-offload-lto">, Flags<[CoreOption]>, Group<f_Group>, 2365 HelpText<"Disable LTO mode (default) for offload compilation">; 2366def flto_jobs_EQ : Joined<["-"], "flto-jobs=">, 2367 Flags<[CC1Option]>, Group<f_Group>, 2368 HelpText<"Controls the backend parallelism of -flto=thin (default " 2369 "of 0 means the number of threads will be derived from " 2370 "the number of CPUs detected)">; 2371def fthinlto_index_EQ : Joined<["-"], "fthinlto-index=">, 2372 Flags<[CoreOption, CC1Option]>, Group<f_Group>, 2373 HelpText<"Perform ThinLTO importing using provided function summary index">; 2374def fthin_link_bitcode_EQ : Joined<["-"], "fthin-link-bitcode=">, 2375 Flags<[CoreOption, CC1Option]>, Group<f_Group>, 2376 HelpText<"Write minimized bitcode to <file> for the ThinLTO thin link only">, 2377 MarshallingInfoString<CodeGenOpts<"ThinLinkBitcodeFile">>; 2378def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">, 2379 Group<f_Group>, Flags<[NoXarchOption, CC1Option, CoreOption]>, 2380 HelpText<"Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit)">, 2381 MarshallingInfoInt<DiagnosticOpts<"MacroBacktraceLimit">, "DiagnosticOptions::DefaultMacroBacktraceLimit">; 2382def fcaret_diagnostics_max_lines_EQ : 2383 Joined<["-"], "fcaret-diagnostics-max-lines=">, 2384 Group<f_Group>, Flags<[CC1Option, CoreOption]>, 2385 HelpText<"Set the maximum number of source lines to show in a caret diagnostic (0 = no limit).">, 2386 MarshallingInfoInt<DiagnosticOpts<"SnippetLineLimit">, "DiagnosticOptions::DefaultSnippetLineLimit">; 2387defm merge_all_constants : BoolFOption<"merge-all-constants", 2388 CodeGenOpts<"MergeAllConstants">, DefaultFalse, 2389 PosFlag<SetTrue, [CC1Option, CoreOption], "Allow">, NegFlag<SetFalse, [], "Disallow">, 2390 BothFlags<[], " merging of constants">>; 2391def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group<f_Group>, Flags<[CC1Option]>, 2392 HelpText<"Format message diagnostics so that they fit within N columns">, 2393 MarshallingInfoInt<DiagnosticOpts<"MessageLength">>; 2394def frandomize_layout_seed_EQ : Joined<["-"], "frandomize-layout-seed=">, 2395 MetaVarName<"<seed>">, Group<f_clang_Group>, Flags<[CC1Option]>, 2396 HelpText<"The seed used by the randomize structure layout feature">; 2397def frandomize_layout_seed_file_EQ : Joined<["-"], "frandomize-layout-seed-file=">, 2398 MetaVarName<"<file>">, Group<f_clang_Group>, Flags<[CC1Option]>, 2399 HelpText<"File holding the seed used by the randomize structure layout feature">; 2400def fms_compatibility : Flag<["-"], "fms-compatibility">, Group<f_Group>, Flags<[CC1Option, CoreOption]>, 2401 HelpText<"Enable full Microsoft Visual C++ compatibility">, 2402 MarshallingInfoFlag<LangOpts<"MSVCCompat">>; 2403def fms_extensions : Flag<["-"], "fms-extensions">, Group<f_Group>, Flags<[CC1Option, CoreOption]>, 2404 HelpText<"Accept some non-standard constructs supported by the Microsoft compiler">, 2405 MarshallingInfoFlag<LangOpts<"MicrosoftExt">>, ImpliedByAnyOf<[fms_compatibility.KeyPath]>; 2406defm asm_blocks : BoolFOption<"asm-blocks", 2407 LangOpts<"AsmBlocks">, Default<fms_extensions.KeyPath>, 2408 PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>; 2409def fms_volatile : Flag<["-"], "fms-volatile">, Group<f_Group>, Flags<[CC1Option]>, 2410 MarshallingInfoFlag<LangOpts<"MSVolatile">>; 2411def fmsc_version : Joined<["-"], "fmsc-version=">, Group<f_Group>, Flags<[NoXarchOption, CoreOption]>, 2412 HelpText<"Microsoft compiler version number to report in _MSC_VER (0 = don't define it (default))">; 2413def fms_compatibility_version 2414 : Joined<["-"], "fms-compatibility-version=">, 2415 Group<f_Group>, 2416 Flags<[ CC1Option, CoreOption ]>, 2417 HelpText<"Dot-separated value representing the Microsoft compiler " 2418 "version number to report in _MSC_VER (0 = don't define it " 2419 "(default))">; 2420def fms_runtime_lib_EQ : Joined<["-"], "fms-runtime-lib=">, Group<f_Group>, 2421 Flags<[NoXarchOption, CoreOption]>, Values<"static,static_dbg,dll,dll_dbg">, 2422 HelpText<"Select Windows run-time library">, 2423 DocBrief<[{ 2424Specify Visual Studio C runtime library. "static" and "static_dbg" correspond 2425to the cl flags /MT and /MTd which use the multithread, static version. "dll" 2426and "dll_dbg" correspond to the cl flags /MD and /MDd which use the multithread, 2427dll version.}]>; 2428def fms_omit_default_lib : Joined<["-"], "fms-omit-default-lib">, 2429 Group<f_Group>, Flags<[NoXarchOption, CoreOption]>; 2430defm delayed_template_parsing : BoolFOption<"delayed-template-parsing", 2431 LangOpts<"DelayedTemplateParsing">, DefaultFalse, 2432 PosFlag<SetTrue, [CC1Option], "Parse templated function definitions at the end of the translation unit">, 2433 NegFlag<SetFalse, [NoXarchOption], "Disable delayed template parsing">, 2434 BothFlags<[CoreOption]>>; 2435def fms_memptr_rep_EQ : Joined<["-"], "fms-memptr-rep=">, Group<f_Group>, Flags<[CC1Option]>, 2436 Values<"single,multiple,virtual">, NormalizedValuesScope<"LangOptions">, 2437 NormalizedValues<["PPTMK_FullGeneralitySingleInheritance", "PPTMK_FullGeneralityMultipleInheritance", 2438 "PPTMK_FullGeneralityVirtualInheritance"]>, 2439 MarshallingInfoEnum<LangOpts<"MSPointerToMemberRepresentationMethod">, "PPTMK_BestCase">; 2440def fms_kernel : Flag<["-"], "fms-kernel">, Group<f_Group>, Flags<[CC1Option, NoDriverOption]>, 2441 MarshallingInfoFlag<LangOpts<"Kernel">>; 2442// __declspec is enabled by default for the PS4 by the driver, and also 2443// enabled for Microsoft Extensions or Borland Extensions, here. 2444// 2445// FIXME: __declspec is also currently enabled for CUDA, but isn't really a 2446// CUDA extension. However, it is required for supporting 2447// __clang_cuda_builtin_vars.h, which uses __declspec(property). Once that has 2448// been rewritten in terms of something more generic, remove the Opts.CUDA 2449// term here. 2450defm declspec : BoolOption<"f", "declspec", 2451 LangOpts<"DeclSpecKeyword">, DefaultFalse, 2452 PosFlag<SetTrue, [], "Allow", [fms_extensions.KeyPath, fborland_extensions.KeyPath, cuda.KeyPath]>, 2453 NegFlag<SetFalse, [], "Disallow">, 2454 BothFlags<[CC1Option], " __declspec as a keyword">>, Group<f_clang_Group>; 2455def fmodules_cache_path : Joined<["-"], "fmodules-cache-path=">, Group<i_Group>, 2456 Flags<[NoXarchOption, CC1Option]>, MetaVarName<"<directory>">, 2457 HelpText<"Specify the module cache path">; 2458def fmodules_user_build_path : Separate<["-"], "fmodules-user-build-path">, Group<i_Group>, 2459 Flags<[NoXarchOption, CC1Option]>, MetaVarName<"<directory>">, 2460 HelpText<"Specify the module user build path">, 2461 MarshallingInfoString<HeaderSearchOpts<"ModuleUserBuildPath">>; 2462def fprebuilt_module_path : Joined<["-"], "fprebuilt-module-path=">, Group<i_Group>, 2463 Flags<[NoXarchOption, CC1Option]>, MetaVarName<"<directory>">, 2464 HelpText<"Specify the prebuilt module path">; 2465defm prebuilt_implicit_modules : BoolFOption<"prebuilt-implicit-modules", 2466 HeaderSearchOpts<"EnablePrebuiltImplicitModules">, DefaultFalse, 2467 PosFlag<SetTrue, [], "Look up implicit modules in the prebuilt module path">, 2468 NegFlag<SetFalse>, BothFlags<[NoXarchOption, CC1Option]>>; 2469 2470def fmodule_output_EQ : Joined<["-"], "fmodule-output=">, Flags<[NoXarchOption, CC1Option]>, 2471 HelpText<"Save intermediate module file results when compiling a standard C++ module unit.">; 2472def fmodule_output : Flag<["-"], "fmodule-output">, Flags<[NoXarchOption, CC1Option]>, 2473 HelpText<"Save intermediate module file results when compiling a standard C++ module unit.">; 2474 2475def fmodules_prune_interval : Joined<["-"], "fmodules-prune-interval=">, Group<i_Group>, 2476 Flags<[CC1Option]>, MetaVarName<"<seconds>">, 2477 HelpText<"Specify the interval (in seconds) between attempts to prune the module cache">, 2478 MarshallingInfoInt<HeaderSearchOpts<"ModuleCachePruneInterval">, "7 * 24 * 60 * 60">; 2479def fmodules_prune_after : Joined<["-"], "fmodules-prune-after=">, Group<i_Group>, 2480 Flags<[CC1Option]>, MetaVarName<"<seconds>">, 2481 HelpText<"Specify the interval (in seconds) after which a module file will be considered unused">, 2482 MarshallingInfoInt<HeaderSearchOpts<"ModuleCachePruneAfter">, "31 * 24 * 60 * 60">; 2483def fbuild_session_timestamp : Joined<["-"], "fbuild-session-timestamp=">, 2484 Group<i_Group>, Flags<[CC1Option]>, MetaVarName<"<time since Epoch in seconds>">, 2485 HelpText<"Time when the current build session started">, 2486 MarshallingInfoInt<HeaderSearchOpts<"BuildSessionTimestamp">, "0", "uint64_t">; 2487def fbuild_session_file : Joined<["-"], "fbuild-session-file=">, 2488 Group<i_Group>, MetaVarName<"<file>">, 2489 HelpText<"Use the last modification time of <file> as the build session timestamp">; 2490def fmodules_validate_once_per_build_session : Flag<["-"], "fmodules-validate-once-per-build-session">, 2491 Group<i_Group>, Flags<[CC1Option]>, 2492 HelpText<"Don't verify input files for the modules if the module has been " 2493 "successfully validated or loaded during this build session">, 2494 MarshallingInfoFlag<HeaderSearchOpts<"ModulesValidateOncePerBuildSession">>; 2495def fmodules_disable_diagnostic_validation : Flag<["-"], "fmodules-disable-diagnostic-validation">, 2496 Group<i_Group>, Flags<[CC1Option]>, 2497 HelpText<"Disable validation of the diagnostic options when loading the module">, 2498 MarshallingInfoNegativeFlag<HeaderSearchOpts<"ModulesValidateDiagnosticOptions">>; 2499defm modules_validate_system_headers : BoolOption<"f", "modules-validate-system-headers", 2500 HeaderSearchOpts<"ModulesValidateSystemHeaders">, DefaultFalse, 2501 PosFlag<SetTrue, [CC1Option], "Validate the system headers that a module depends on when loading the module">, 2502 NegFlag<SetFalse, [NoXarchOption]>>, Group<i_Group>; 2503def fno_modules_validate_textual_header_includes : 2504 Flag<["-"], "fno-modules-validate-textual-header-includes">, 2505 Group<f_Group>, Flags<[CC1Option, NoXarchOption]>, 2506 MarshallingInfoNegativeFlag<LangOpts<"ModulesValidateTextualHeaderIncludes">>, 2507 HelpText<"Do not enforce -fmodules-decluse and private header restrictions for textual headers. " 2508 "This flag will be removed in a future Clang release.">; 2509 2510def fincremental_extensions : 2511 Flag<["-"], "fincremental-extensions">, 2512 Group<f_Group>, Flags<[CC1Option]>, 2513 HelpText<"Enable incremental processing extensions such as processing" 2514 "statements on the global scope.">, 2515 MarshallingInfoFlag<LangOpts<"IncrementalExtensions">>; 2516 2517def fvalidate_ast_input_files_content: 2518 Flag <["-"], "fvalidate-ast-input-files-content">, 2519 Group<f_Group>, Flags<[CC1Option]>, 2520 HelpText<"Compute and store the hash of input files used to build an AST." 2521 " Files with mismatching mtime's are considered valid" 2522 " if both contents is identical">, 2523 MarshallingInfoFlag<HeaderSearchOpts<"ValidateASTInputFilesContent">>; 2524def fmodules_validate_input_files_content: 2525 Flag <["-"], "fmodules-validate-input-files-content">, 2526 Group<f_Group>, Flags<[NoXarchOption]>, 2527 HelpText<"Validate PCM input files based on content if mtime differs">; 2528def fno_modules_validate_input_files_content: 2529 Flag <["-"], "fno_modules-validate-input-files-content">, 2530 Group<f_Group>, Flags<[NoXarchOption]>; 2531def fpch_validate_input_files_content: 2532 Flag <["-"], "fpch-validate-input-files-content">, 2533 Group<f_Group>, Flags<[NoXarchOption]>, 2534 HelpText<"Validate PCH input files based on content if mtime differs">; 2535def fno_pch_validate_input_files_content: 2536 Flag <["-"], "fno_pch-validate-input-files-content">, 2537 Group<f_Group>, Flags<[NoXarchOption]>; 2538defm pch_instantiate_templates : BoolFOption<"pch-instantiate-templates", 2539 LangOpts<"PCHInstantiateTemplates">, DefaultFalse, 2540 PosFlag<SetTrue, [], "Instantiate templates already while building a PCH">, 2541 NegFlag<SetFalse>, BothFlags<[CC1Option, CoreOption]>>; 2542defm pch_codegen: OptInCC1FFlag<"pch-codegen", "Generate ", "Do not generate ", 2543 "code for uses of this PCH that assumes an explicit object file will be built for the PCH">; 2544defm pch_debuginfo: OptInCC1FFlag<"pch-debuginfo", "Generate ", "Do not generate ", 2545 "debug info for types in an object file built from this PCH and do not generate them elsewhere">; 2546 2547def fimplicit_module_maps : Flag <["-"], "fimplicit-module-maps">, Group<f_Group>, 2548 Flags<[NoXarchOption, CC1Option, CoreOption]>, 2549 HelpText<"Implicitly search the file system for module map files.">, 2550 MarshallingInfoFlag<HeaderSearchOpts<"ImplicitModuleMaps">>; 2551defm modules : BoolFOption<"modules", 2552 LangOpts<"Modules">, Default<fcxx_modules.KeyPath>, 2553 PosFlag<SetTrue, [CC1Option], "Enable the 'modules' language feature">, 2554 NegFlag<SetFalse>, BothFlags<[NoXarchOption, CoreOption]>>; 2555def fmodule_maps : Flag <["-"], "fmodule-maps">, Flags<[CoreOption]>, Alias<fimplicit_module_maps>; 2556def fmodule_name_EQ : Joined<["-"], "fmodule-name=">, Group<f_Group>, 2557 Flags<[NoXarchOption,CC1Option,CoreOption]>, MetaVarName<"<name>">, 2558 HelpText<"Specify the name of the module to build">, 2559 MarshallingInfoString<LangOpts<"ModuleName">>; 2560def fmodule_implementation_of : Separate<["-"], "fmodule-implementation-of">, 2561 Flags<[CC1Option,CoreOption]>, Alias<fmodule_name_EQ>; 2562def fsystem_module : Flag<["-"], "fsystem-module">, Flags<[CC1Option,CoreOption]>, 2563 HelpText<"Build this module as a system module. Only used with -emit-module">, 2564 MarshallingInfoFlag<FrontendOpts<"IsSystemModule">>; 2565def fmodule_map_file : Joined<["-"], "fmodule-map-file=">, 2566 Group<f_Group>, Flags<[NoXarchOption,CC1Option,CoreOption]>, MetaVarName<"<file>">, 2567 HelpText<"Load this module map file">, 2568 MarshallingInfoStringVector<FrontendOpts<"ModuleMapFiles">>; 2569def fmodule_file : Joined<["-"], "fmodule-file=">, 2570 Group<i_Group>, Flags<[NoXarchOption,CC1Option,CoreOption]>, MetaVarName<"[<name>=]<file>">, 2571 HelpText<"Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.">; 2572def fmodules_ignore_macro : Joined<["-"], "fmodules-ignore-macro=">, Group<f_Group>, 2573 Flags<[CC1Option,CoreOption]>, 2574 HelpText<"Ignore the definition of the given macro when building and loading modules">; 2575def fmodules_strict_decluse : Flag <["-"], "fmodules-strict-decluse">, Group<f_Group>, 2576 Flags<[NoXarchOption,CC1Option,CoreOption]>, 2577 HelpText<"Like -fmodules-decluse but requires all headers to be in modules">, 2578 MarshallingInfoFlag<LangOpts<"ModulesStrictDeclUse">>; 2579defm modules_decluse : BoolFOption<"modules-decluse", 2580 LangOpts<"ModulesDeclUse">, Default<fmodules_strict_decluse.KeyPath>, 2581 PosFlag<SetTrue, [CC1Option], "Require declaration of modules used within a module">, 2582 NegFlag<SetFalse>, BothFlags<[NoXarchOption,CoreOption]>>; 2583defm modules_search_all : BoolFOption<"modules-search-all", 2584 LangOpts<"ModulesSearchAll">, DefaultFalse, 2585 PosFlag<SetTrue, [], "Search even non-imported modules to resolve references">, 2586 NegFlag<SetFalse>, BothFlags<[NoXarchOption, CC1Option,CoreOption]>>, 2587 ShouldParseIf<fmodules.KeyPath>; 2588defm implicit_modules : BoolFOption<"implicit-modules", 2589 LangOpts<"ImplicitModules">, DefaultTrue, 2590 NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>, BothFlags<[NoXarchOption,CoreOption]>>; 2591def fno_modules_check_relocated : Joined<["-"], "fno-modules-check-relocated">, 2592 Group<f_Group>, Flags<[CC1Option]>, 2593 HelpText<"Skip checks for relocated modules when loading PCM files">, 2594 MarshallingInfoNegativeFlag<PreprocessorOpts<"ModulesCheckRelocated">>; 2595def fretain_comments_from_system_headers : Flag<["-"], "fretain-comments-from-system-headers">, Group<f_Group>, Flags<[CC1Option]>, 2596 MarshallingInfoFlag<LangOpts<"RetainCommentsFromSystemHeaders">>; 2597def fmodule_header : Flag <["-"], "fmodule-header">, Group<f_Group>, 2598 Flags<[NoXarchOption]>, HelpText<"Build a C++20 Header Unit from a header.">; 2599def fmodule_header_EQ : Joined<["-"], "fmodule-header=">, Group<f_Group>, 2600 Flags<[NoXarchOption]>, MetaVarName<"<kind>">, 2601 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.">; 2602 2603def fno_knr_functions : Flag<["-"], "fno-knr-functions">, Group<f_Group>, 2604 MarshallingInfoFlag<LangOpts<"DisableKNRFunctions">>, 2605 HelpText<"Disable support for K&R C function declarations">, 2606 Flags<[CC1Option, CoreOption]>; 2607 2608def fmudflapth : Flag<["-"], "fmudflapth">, Group<f_Group>; 2609def fmudflap : Flag<["-"], "fmudflap">, Group<f_Group>; 2610def fnested_functions : Flag<["-"], "fnested-functions">, Group<f_Group>; 2611def fnext_runtime : Flag<["-"], "fnext-runtime">, Group<f_Group>; 2612def fno_asm : Flag<["-"], "fno-asm">, Group<f_Group>; 2613def fno_asynchronous_unwind_tables : Flag<["-"], "fno-asynchronous-unwind-tables">, Group<f_Group>; 2614def fno_assume_sane_operator_new : Flag<["-"], "fno-assume-sane-operator-new">, Group<f_Group>, 2615 HelpText<"Don't assume that C++'s global operator new can't alias any pointer">, 2616 Flags<[CC1Option]>, MarshallingInfoNegativeFlag<CodeGenOpts<"AssumeSaneOperatorNew">>; 2617def fno_builtin : Flag<["-"], "fno-builtin">, Group<f_Group>, Flags<[CC1Option, CoreOption]>, 2618 HelpText<"Disable implicit builtin knowledge of functions">; 2619def fno_builtin_ : Joined<["-"], "fno-builtin-">, Group<f_Group>, Flags<[CC1Option, CoreOption]>, 2620 HelpText<"Disable implicit builtin knowledge of a specific function">; 2621def fno_common : Flag<["-"], "fno-common">, Group<f_Group>, Flags<[CC1Option]>, 2622 HelpText<"Compile common globals like normal definitions">; 2623defm digraphs : BoolFOption<"digraphs", 2624 LangOpts<"Digraphs">, Default<std#".hasDigraphs()">, 2625 PosFlag<SetTrue, [], "Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default)">, 2626 NegFlag<SetFalse, [], "Disallow alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:'">, 2627 BothFlags<[CC1Option]>>; 2628def fno_eliminate_unused_debug_symbols : Flag<["-"], "fno-eliminate-unused-debug-symbols">, Group<f_Group>; 2629def fno_inline_functions : Flag<["-"], "fno-inline-functions">, Group<f_clang_Group>, Flags<[CC1Option]>; 2630def fno_inline : Flag<["-"], "fno-inline">, Group<f_clang_Group>, Flags<[CC1Option]>; 2631def fno_global_isel : Flag<["-"], "fno-global-isel">, Group<f_clang_Group>, 2632 HelpText<"Disables the global instruction selector">; 2633def fno_experimental_isel : Flag<["-"], "fno-experimental-isel">, Group<f_clang_Group>, 2634 Alias<fno_global_isel>; 2635def fveclib : Joined<["-"], "fveclib=">, Group<f_Group>, Flags<[CC1Option]>, 2636 HelpText<"Use the given vector functions library">, 2637 Values<"Accelerate,libmvec,MASSV,SVML,SLEEF,Darwin_libsystem_m,ArmPL,none">, 2638 NormalizedValuesScope<"CodeGenOptions">, 2639 NormalizedValues<["Accelerate", "LIBMVEC", "MASSV", "SVML", "SLEEF", 2640 "Darwin_libsystem_m", "ArmPL", "NoLibrary"]>, 2641 MarshallingInfoEnum<CodeGenOpts<"VecLib">, "NoLibrary">; 2642def fno_lax_vector_conversions : Flag<["-"], "fno-lax-vector-conversions">, Group<f_Group>, 2643 Alias<flax_vector_conversions_EQ>, AliasArgs<["none"]>; 2644def fno_implicit_module_maps : Flag <["-"], "fno-implicit-module-maps">, Group<f_Group>, 2645 Flags<[NoXarchOption]>; 2646def fno_module_maps : Flag <["-"], "fno-module-maps">, Alias<fno_implicit_module_maps>; 2647def fno_modules_strict_decluse : Flag <["-"], "fno-strict-modules-decluse">, Group<f_Group>, 2648 Flags<[NoXarchOption]>; 2649def fmodule_file_deps : Flag <["-"], "fmodule-file-deps">, Group<f_Group>, 2650 Flags<[NoXarchOption]>; 2651def fno_module_file_deps : Flag <["-"], "fno-module-file-deps">, Group<f_Group>, 2652 Flags<[NoXarchOption]>; 2653def fno_ms_extensions : Flag<["-"], "fno-ms-extensions">, Group<f_Group>, 2654 Flags<[CoreOption]>; 2655def fno_ms_compatibility : Flag<["-"], "fno-ms-compatibility">, Group<f_Group>, 2656 Flags<[CoreOption]>; 2657def fno_objc_legacy_dispatch : Flag<["-"], "fno-objc-legacy-dispatch">, Group<f_Group>; 2658def fno_objc_weak : Flag<["-"], "fno-objc-weak">, Group<f_Group>, Flags<[CC1Option]>; 2659def fno_omit_frame_pointer : Flag<["-"], "fno-omit-frame-pointer">, Group<f_Group>; 2660defm operator_names : BoolFOption<"operator-names", 2661 LangOpts<"CXXOperatorNames">, Default<cplusplus.KeyPath>, 2662 NegFlag<SetFalse, [CC1Option], "Do not treat C++ operator name keywords as synonyms for operators">, 2663 PosFlag<SetTrue>>; 2664def fdiagnostics_absolute_paths : Flag<["-"], "fdiagnostics-absolute-paths">, Group<f_Group>, 2665 Flags<[CC1Option, CoreOption]>, HelpText<"Print absolute paths in diagnostics">, 2666 MarshallingInfoFlag<DiagnosticOpts<"AbsolutePath">>; 2667defm diagnostics_show_line_numbers : BoolFOption<"diagnostics-show-line-numbers", 2668 DiagnosticOpts<"ShowLineNumbers">, DefaultTrue, 2669 NegFlag<SetFalse, [CC1Option], "Show line numbers in diagnostic code snippets">, 2670 PosFlag<SetTrue>>; 2671def fno_stack_protector : Flag<["-"], "fno-stack-protector">, Group<f_Group>, 2672 HelpText<"Disable the use of stack protectors">; 2673def fno_strict_aliasing : Flag<["-"], "fno-strict-aliasing">, Group<f_Group>, 2674 Flags<[NoXarchOption, CoreOption]>; 2675def fstruct_path_tbaa : Flag<["-"], "fstruct-path-tbaa">, Group<f_Group>; 2676def fno_struct_path_tbaa : Flag<["-"], "fno-struct-path-tbaa">, Group<f_Group>; 2677def fno_strict_enums : Flag<["-"], "fno-strict-enums">, Group<f_Group>; 2678def fno_strict_overflow : Flag<["-"], "fno-strict-overflow">, Group<f_Group>; 2679def fno_temp_file : Flag<["-"], "fno-temp-file">, Group<f_Group>, 2680 Flags<[CC1Option, CoreOption]>, HelpText< 2681 "Directly create compilation output files. This may lead to incorrect incremental builds if the compiler crashes">, 2682 MarshallingInfoNegativeFlag<FrontendOpts<"UseTemporary">>; 2683defm use_cxa_atexit : BoolFOption<"use-cxa-atexit", 2684 CodeGenOpts<"CXAAtExit">, DefaultTrue, 2685 NegFlag<SetFalse, [CC1Option], "Don't use __cxa_atexit for calling destructors">, 2686 PosFlag<SetTrue>>; 2687def fno_unwind_tables : Flag<["-"], "fno-unwind-tables">, Group<f_Group>; 2688def fno_verbose_asm : Flag<["-"], "fno-verbose-asm">, Group<f_Group>, Flags<[CC1Option]>, 2689 MarshallingInfoNegativeFlag<CodeGenOpts<"AsmVerbose">>; 2690def fno_working_directory : Flag<["-"], "fno-working-directory">, Group<f_Group>; 2691def fno_wrapv : Flag<["-"], "fno-wrapv">, Group<f_Group>; 2692def fobjc_arc : Flag<["-"], "fobjc-arc">, Group<f_Group>, Flags<[CC1Option]>, 2693 HelpText<"Synthesize retain and release calls for Objective-C pointers">; 2694def fno_objc_arc : Flag<["-"], "fno-objc-arc">, Group<f_Group>; 2695defm objc_encode_cxx_class_template_spec : BoolFOption<"objc-encode-cxx-class-template-spec", 2696 LangOpts<"EncodeCXXClassTemplateSpec">, DefaultFalse, 2697 PosFlag<SetTrue, [CC1Option], "Fully encode c++ class template specialization">, 2698 NegFlag<SetFalse>>; 2699defm objc_convert_messages_to_runtime_calls : BoolFOption<"objc-convert-messages-to-runtime-calls", 2700 CodeGenOpts<"ObjCConvertMessagesToRuntimeCalls">, DefaultTrue, 2701 NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>>; 2702defm objc_arc_exceptions : BoolFOption<"objc-arc-exceptions", 2703 CodeGenOpts<"ObjCAutoRefCountExceptions">, DefaultFalse, 2704 PosFlag<SetTrue, [CC1Option], "Use EH-safe code when synthesizing retains and releases in -fobjc-arc">, 2705 NegFlag<SetFalse>>; 2706def fobjc_atdefs : Flag<["-"], "fobjc-atdefs">, Group<clang_ignored_f_Group>; 2707def fobjc_call_cxx_cdtors : Flag<["-"], "fobjc-call-cxx-cdtors">, Group<clang_ignored_f_Group>; 2708defm objc_exceptions : BoolFOption<"objc-exceptions", 2709 LangOpts<"ObjCExceptions">, DefaultFalse, 2710 PosFlag<SetTrue, [CC1Option], "Enable Objective-C exceptions">, NegFlag<SetFalse>>; 2711defm application_extension : BoolFOption<"application-extension", 2712 LangOpts<"AppExt">, DefaultFalse, 2713 PosFlag<SetTrue, [CC1Option], "Restrict code to those available for App Extensions">, 2714 NegFlag<SetFalse>>; 2715defm relaxed_template_template_args : BoolFOption<"relaxed-template-template-args", 2716 LangOpts<"RelaxedTemplateTemplateArgs">, DefaultFalse, 2717 PosFlag<SetTrue, [CC1Option], "Enable C++17 relaxed template template argument matching">, 2718 NegFlag<SetFalse>>; 2719defm sized_deallocation : BoolFOption<"sized-deallocation", 2720 LangOpts<"SizedDeallocation">, DefaultFalse, 2721 PosFlag<SetTrue, [CC1Option], "Enable C++14 sized global deallocation functions">, 2722 NegFlag<SetFalse>>; 2723defm aligned_allocation : BoolFOption<"aligned-allocation", 2724 LangOpts<"AlignedAllocation">, Default<cpp17.KeyPath>, 2725 PosFlag<SetTrue, [], "Enable C++17 aligned allocation functions">, 2726 NegFlag<SetFalse>, BothFlags<[CC1Option]>>; 2727def fnew_alignment_EQ : Joined<["-"], "fnew-alignment=">, 2728 HelpText<"Specifies the largest alignment guaranteed by '::operator new(size_t)'">, 2729 MetaVarName<"<align>">, Group<f_Group>, Flags<[CC1Option]>, 2730 MarshallingInfoInt<LangOpts<"NewAlignOverride">>; 2731def : Separate<["-"], "fnew-alignment">, Alias<fnew_alignment_EQ>; 2732def : Flag<["-"], "faligned-new">, Alias<faligned_allocation>; 2733def : Flag<["-"], "fno-aligned-new">, Alias<fno_aligned_allocation>; 2734def faligned_new_EQ : Joined<["-"], "faligned-new=">; 2735 2736def fobjc_legacy_dispatch : Flag<["-"], "fobjc-legacy-dispatch">, Group<f_Group>; 2737def fobjc_new_property : Flag<["-"], "fobjc-new-property">, Group<clang_ignored_f_Group>; 2738defm objc_infer_related_result_type : BoolFOption<"objc-infer-related-result-type", 2739 LangOpts<"ObjCInferRelatedResultType">, DefaultTrue, 2740 NegFlag<SetFalse, [CC1Option], "do not infer Objective-C related result type based on method family">, 2741 PosFlag<SetTrue>>; 2742def fobjc_link_runtime: Flag<["-"], "fobjc-link-runtime">, Group<f_Group>; 2743def fobjc_weak : Flag<["-"], "fobjc-weak">, Group<f_Group>, Flags<[CC1Option]>, 2744 HelpText<"Enable ARC-style weak references in Objective-C">; 2745 2746// Objective-C ABI options. 2747def fobjc_runtime_EQ : Joined<["-"], "fobjc-runtime=">, Group<f_Group>, Flags<[CC1Option, CoreOption]>, 2748 HelpText<"Specify the target Objective-C runtime kind and version">; 2749def fobjc_abi_version_EQ : Joined<["-"], "fobjc-abi-version=">, Group<f_Group>; 2750def fobjc_nonfragile_abi_version_EQ : Joined<["-"], "fobjc-nonfragile-abi-version=">, Group<f_Group>; 2751def fobjc_nonfragile_abi : Flag<["-"], "fobjc-nonfragile-abi">, Group<f_Group>; 2752def fno_objc_nonfragile_abi : Flag<["-"], "fno-objc-nonfragile-abi">, Group<f_Group>; 2753 2754def fobjc_sender_dependent_dispatch : Flag<["-"], "fobjc-sender-dependent-dispatch">, Group<f_Group>; 2755def fobjc_disable_direct_methods_for_testing : 2756 Flag<["-"], "fobjc-disable-direct-methods-for-testing">, 2757 Group<f_Group>, Flags<[CC1Option]>, 2758 HelpText<"Ignore attribute objc_direct so that direct methods can be tested">, 2759 MarshallingInfoFlag<LangOpts<"ObjCDisableDirectMethodsForTesting">>; 2760defm objc_avoid_heapify_local_blocks : BoolFOption<"objc-avoid-heapify-local-blocks", 2761 CodeGenOpts<"ObjCAvoidHeapifyLocalBlocks">, DefaultFalse, 2762 PosFlag<SetTrue, [], "Try">, 2763 NegFlag<SetFalse, [], "Don't try">, 2764 BothFlags<[CC1Option, NoDriverOption], " to avoid heapifying local blocks">>; 2765 2766def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group<f_Group>, 2767 HelpText<"Omit the frame pointer from functions that don't need it. " 2768 "Some stack unwinding cases, such as profilers and sanitizers, may prefer specifying -fno-omit-frame-pointer. " 2769 "On many targets, -O1 and higher omit the frame pointer by default. " 2770 "-m[no-]omit-leaf-frame-pointer takes precedence for leaf functions">; 2771def fopenmp : Flag<["-"], "fopenmp">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, FlangOption, FC1Option]>, 2772 HelpText<"Parse OpenMP pragmas and generate parallel code.">; 2773def fno_openmp : Flag<["-"], "fno-openmp">, Group<f_Group>, Flags<[NoArgumentUnused]>; 2774def fopenmp_version_EQ : Joined<["-"], "fopenmp-version=">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, FlangOption, FC1Option]>, 2775 HelpText<"Set OpenMP version (e.g. 45 for OpenMP 4.5, 50 for OpenMP 5.0). Default value is 50 for Clang and 11 for Flang">; 2776defm openmp_extensions: BoolFOption<"openmp-extensions", 2777 LangOpts<"OpenMPExtensions">, DefaultTrue, 2778 PosFlag<SetTrue, [CC1Option, NoArgumentUnused], 2779 "Enable all Clang extensions for OpenMP directives and clauses">, 2780 NegFlag<SetFalse, [CC1Option, NoArgumentUnused], 2781 "Disable all Clang extensions for OpenMP directives and clauses">>; 2782def fopenmp_EQ : Joined<["-"], "fopenmp=">, Group<f_Group>; 2783def fopenmp_use_tls : Flag<["-"], "fopenmp-use-tls">, Group<f_Group>, 2784 Flags<[NoArgumentUnused, HelpHidden]>; 2785def fnoopenmp_use_tls : Flag<["-"], "fnoopenmp-use-tls">, Group<f_Group>, 2786 Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2787def fopenmp_targets_EQ : CommaJoined<["-"], "fopenmp-targets=">, Flags<[NoXarchOption, CC1Option]>, 2788 HelpText<"Specify comma-separated list of triples OpenMP offloading targets to be supported">; 2789def fopenmp_relocatable_target : Flag<["-"], "fopenmp-relocatable-target">, 2790 Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2791def fnoopenmp_relocatable_target : Flag<["-"], "fnoopenmp-relocatable-target">, 2792 Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2793def fopenmp_simd : Flag<["-"], "fopenmp-simd">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>, 2794 HelpText<"Emit OpenMP code only for SIMD-based constructs.">; 2795def fopenmp_enable_irbuilder : Flag<["-"], "fopenmp-enable-irbuilder">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>, 2796 HelpText<"Use the experimental OpenMP-IR-Builder codegen path.">; 2797def fno_openmp_simd : Flag<["-"], "fno-openmp-simd">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>; 2798def fopenmp_cuda_mode : Flag<["-"], "fopenmp-cuda-mode">, Group<f_Group>, 2799 Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2800def fno_openmp_cuda_mode : Flag<["-"], "fno-openmp-cuda-mode">, Group<f_Group>, 2801 Flags<[NoArgumentUnused, HelpHidden]>; 2802def fopenmp_cuda_number_of_sm_EQ : Joined<["-"], "fopenmp-cuda-number-of-sm=">, Group<f_Group>, 2803 Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2804def fopenmp_cuda_blocks_per_sm_EQ : Joined<["-"], "fopenmp-cuda-blocks-per-sm=">, Group<f_Group>, 2805 Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2806def fopenmp_cuda_teams_reduction_recs_num_EQ : Joined<["-"], "fopenmp-cuda-teams-reduction-recs-num=">, Group<f_Group>, 2807 Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2808 2809//===----------------------------------------------------------------------===// 2810// Shared cc1 + fc1 OpenMP Target Options 2811//===----------------------------------------------------------------------===// 2812 2813let Flags = [CC1Option, FC1Option, NoArgumentUnused] in { 2814let Group = f_Group in { 2815 2816def fopenmp_target_debug : Flag<["-"], "fopenmp-target-debug">, 2817 HelpText<"Enable debugging in the OpenMP offloading device RTL">; 2818def fno_openmp_target_debug : Flag<["-"], "fno-openmp-target-debug">; 2819 2820} // let Group = f_Group 2821} // let Flags = [CC1Option, FC1Option, NoArgumentUnused] 2822 2823let Flags = [CC1Option, FC1Option, NoArgumentUnused, HelpHidden] in { 2824let Group = f_Group in { 2825 2826def fopenmp_target_debug_EQ : Joined<["-"], "fopenmp-target-debug=">; 2827def fopenmp_assume_teams_oversubscription : Flag<["-"], "fopenmp-assume-teams-oversubscription">; 2828def fopenmp_assume_threads_oversubscription : Flag<["-"], "fopenmp-assume-threads-oversubscription">; 2829def fno_openmp_assume_teams_oversubscription : Flag<["-"], "fno-openmp-assume-teams-oversubscription">; 2830def fno_openmp_assume_threads_oversubscription : Flag<["-"], "fno-openmp-assume-threads-oversubscription">; 2831def fopenmp_assume_no_thread_state : Flag<["-"], "fopenmp-assume-no-thread-state">, 2832 HelpText<"Assert no thread in a parallel region modifies an ICV">, 2833 MarshallingInfoFlag<LangOpts<"OpenMPNoThreadState">>; 2834def fopenmp_assume_no_nested_parallelism : Flag<["-"], "fopenmp-assume-no-nested-parallelism">, 2835 HelpText<"Assert no nested parallel regions in the GPU">, 2836 MarshallingInfoFlag<LangOpts<"OpenMPNoNestedParallelism">>; 2837 2838} // let Group = f_Group 2839} // let Flags = [CC1Option, FC1Option, NoArgumentUnused, HelpHidden] 2840 2841def fopenmp_offload_mandatory : Flag<["-"], "fopenmp-offload-mandatory">, Group<f_Group>, 2842 Flags<[CC1Option, NoArgumentUnused]>, 2843 HelpText<"Do not create a host fallback if offloading to the device fails.">, 2844 MarshallingInfoFlag<LangOpts<"OpenMPOffloadMandatory">>; 2845def fopenmp_target_jit : Flag<["-"], "fopenmp-target-jit">, Group<f_Group>, 2846 Flags<[CoreOption, NoArgumentUnused]>, 2847 HelpText<"Emit code that can be JIT compiled for OpenMP offloading. Implies -foffload-lto=full">; 2848def fno_openmp_target_jit : Flag<["-"], "fno-openmp-target-jit">, Group<f_Group>, 2849 Flags<[CoreOption, NoArgumentUnused, HelpHidden]>; 2850def fopenmp_target_new_runtime : Flag<["-"], "fopenmp-target-new-runtime">, 2851 Group<f_Group>, Flags<[CC1Option, HelpHidden]>; 2852def fno_openmp_target_new_runtime : Flag<["-"], "fno-openmp-target-new-runtime">, 2853 Group<f_Group>, Flags<[CC1Option, HelpHidden]>; 2854defm openmp_optimistic_collapse : BoolFOption<"openmp-optimistic-collapse", 2855 LangOpts<"OpenMPOptimisticCollapse">, DefaultFalse, 2856 PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>, BothFlags<[NoArgumentUnused, HelpHidden]>>; 2857def static_openmp: Flag<["-"], "static-openmp">, 2858 HelpText<"Use the static host OpenMP runtime while linking.">; 2859def offload_new_driver : Flag<["--"], "offload-new-driver">, Flags<[CC1Option]>, Group<f_Group>, 2860 MarshallingInfoFlag<LangOpts<"OffloadingNewDriver">>, HelpText<"Use the new driver for offloading compilation.">; 2861def no_offload_new_driver : Flag<["--"], "no-offload-new-driver">, Flags<[CC1Option]>, Group<f_Group>, 2862 HelpText<"Don't Use the new driver for offloading compilation.">; 2863def offload_device_only : Flag<["--"], "offload-device-only">, Flags<[FlangOption]>, 2864 HelpText<"Only compile for the offloading device.">; 2865def offload_host_only : Flag<["--"], "offload-host-only">, Flags<[FlangOption]>, 2866 HelpText<"Only compile for the offloading host.">; 2867def offload_host_device : Flag<["--"], "offload-host-device">, Flags<[FlangOption]>, 2868 HelpText<"Only compile for the offloading host.">; 2869def cuda_device_only : Flag<["--"], "cuda-device-only">, Alias<offload_device_only>, 2870 HelpText<"Compile CUDA code for device only">; 2871def cuda_host_only : Flag<["--"], "cuda-host-only">, Alias<offload_host_only>, 2872 HelpText<"Compile CUDA code for host only. Has no effect on non-CUDA compilations.">; 2873def cuda_compile_host_device : Flag<["--"], "cuda-compile-host-device">, Alias<offload_host_device>, 2874 HelpText<"Compile CUDA code for both host and device (default). Has no " 2875 "effect on non-CUDA compilations.">; 2876def fopenmp_new_driver : Flag<["-"], "fopenmp-new-driver">, Flags<[HelpHidden]>, 2877 HelpText<"Use the new driver for OpenMP offloading.">; 2878def fno_openmp_new_driver : Flag<["-"], "fno-openmp-new-driver">, Flags<[HelpHidden]>, 2879 HelpText<"Don't use the new driver for OpenMP offloading.">; 2880def fno_optimize_sibling_calls : Flag<["-"], "fno-optimize-sibling-calls">, Group<f_Group>, Flags<[CC1Option]>, 2881 HelpText<"Disable tail call optimization, keeping the call stack accurate">, 2882 MarshallingInfoFlag<CodeGenOpts<"DisableTailCalls">>; 2883def foptimize_sibling_calls : Flag<["-"], "foptimize-sibling-calls">, Group<f_Group>; 2884defm escaping_block_tail_calls : BoolFOption<"escaping-block-tail-calls", 2885 CodeGenOpts<"NoEscapingBlockTailCalls">, DefaultFalse, 2886 NegFlag<SetTrue, [CC1Option]>, PosFlag<SetFalse>>; 2887def force__cpusubtype__ALL : Flag<["-"], "force_cpusubtype_ALL">; 2888def force__flat__namespace : Flag<["-"], "force_flat_namespace">; 2889def force__load : Separate<["-"], "force_load">; 2890def force_addr : Joined<["-"], "fforce-addr">, Group<clang_ignored_f_Group>; 2891def foutput_class_dir_EQ : Joined<["-"], "foutput-class-dir=">, Group<f_Group>; 2892def fpack_struct : Flag<["-"], "fpack-struct">, Group<f_Group>; 2893def fno_pack_struct : Flag<["-"], "fno-pack-struct">, Group<f_Group>; 2894def fpack_struct_EQ : Joined<["-"], "fpack-struct=">, Group<f_Group>, Flags<[CC1Option]>, 2895 HelpText<"Specify the default maximum struct packing alignment">, 2896 MarshallingInfoInt<LangOpts<"PackStruct">>; 2897def fmax_type_align_EQ : Joined<["-"], "fmax-type-align=">, Group<f_Group>, Flags<[CC1Option]>, 2898 HelpText<"Specify the maximum alignment to enforce on pointers lacking an explicit alignment">, 2899 MarshallingInfoInt<LangOpts<"MaxTypeAlign">>; 2900def fno_max_type_align : Flag<["-"], "fno-max-type-align">, Group<f_Group>; 2901defm pascal_strings : BoolFOption<"pascal-strings", 2902 LangOpts<"PascalStrings">, DefaultFalse, 2903 PosFlag<SetTrue, [CC1Option], "Recognize and construct Pascal-style string literals">, 2904 NegFlag<SetFalse>>; 2905// Note: This flag has different semantics in the driver and in -cc1. The driver accepts -fpatchable-function-entry=M,N 2906// and forwards it to -cc1 as -fpatchable-function-entry=M and -fpatchable-function-entry-offset=N. In -cc1, both flags 2907// are treated as a single integer. 2908def fpatchable_function_entry_EQ : Joined<["-"], "fpatchable-function-entry=">, Group<f_Group>, Flags<[CC1Option]>, 2909 MetaVarName<"<N,M>">, HelpText<"Generate M NOPs before function entry and N-M NOPs after function entry">, 2910 MarshallingInfoInt<CodeGenOpts<"PatchableFunctionEntryCount">>; 2911def fms_hotpatch : Flag<["-"], "fms-hotpatch">, Group<f_Group>, Flags<[CC1Option, CoreOption]>, 2912 HelpText<"Ensure that all functions can be hotpatched at runtime">, 2913 MarshallingInfoFlag<CodeGenOpts<"HotPatch">>; 2914def fpcc_struct_return : Flag<["-"], "fpcc-struct-return">, Group<f_Group>, Flags<[CC1Option]>, 2915 HelpText<"Override the default ABI to return all structs on the stack">; 2916def fpch_preprocess : Flag<["-"], "fpch-preprocess">, Group<f_Group>; 2917def fpic : Flag<["-"], "fpic">, Group<f_Group>; 2918def fno_pic : Flag<["-"], "fno-pic">, Group<f_Group>; 2919def fpie : Flag<["-"], "fpie">, Group<f_Group>; 2920def fno_pie : Flag<["-"], "fno-pie">, Group<f_Group>; 2921defm pic_data_is_text_relative : SimpleMFlag<"pic-data-is-text-relative", 2922 "Assume", "Don't assume", " data segments are relative to text segment">; 2923def fdirect_access_external_data : Flag<["-"], "fdirect-access-external-data">, Group<f_Group>, Flags<[CC1Option]>, 2924 HelpText<"Don't use GOT indirection to reference external data symbols">; 2925def fno_direct_access_external_data : Flag<["-"], "fno-direct-access-external-data">, Group<f_Group>, Flags<[CC1Option]>, 2926 HelpText<"Use GOT indirection to reference external data symbols">; 2927defm plt : BoolFOption<"plt", 2928 CodeGenOpts<"NoPLT">, DefaultFalse, 2929 NegFlag<SetTrue, [CC1Option], "Use GOT indirection instead of PLT to make external function calls (x86 only)">, 2930 PosFlag<SetFalse>>; 2931defm ropi : BoolFOption<"ropi", 2932 LangOpts<"ROPI">, DefaultFalse, 2933 PosFlag<SetTrue, [CC1Option], "Generate read-only position independent code (ARM only)">, 2934 NegFlag<SetFalse>>; 2935defm rwpi : BoolFOption<"rwpi", 2936 LangOpts<"RWPI">, DefaultFalse, 2937 PosFlag<SetTrue, [CC1Option], "Generate read-write position independent code (ARM only)">, 2938 NegFlag<SetFalse>>; 2939def fplugin_EQ : Joined<["-"], "fplugin=">, Group<f_Group>, Flags<[NoXarchOption]>, MetaVarName<"<dsopath>">, 2940 HelpText<"Load the named plugin (dynamic shared object)">; 2941def fplugin_arg : Joined<["-"], "fplugin-arg-">, 2942 MetaVarName<"<name>-<arg>">, 2943 HelpText<"Pass <arg> to plugin <name>">; 2944def fpass_plugin_EQ : Joined<["-"], "fpass-plugin=">, 2945 Group<f_Group>, Flags<[CC1Option,FlangOption,FC1Option]>, MetaVarName<"<dsopath>">, 2946 HelpText<"Load pass plugin from a dynamic shared object file (only with new pass manager).">, 2947 MarshallingInfoStringVector<CodeGenOpts<"PassPlugins">>; 2948defm preserve_as_comments : BoolFOption<"preserve-as-comments", 2949 CodeGenOpts<"PreserveAsmComments">, DefaultTrue, 2950 NegFlag<SetFalse, [CC1Option], "Do not preserve comments in inline assembly">, 2951 PosFlag<SetTrue>>; 2952def framework : Separate<["-"], "framework">, Flags<[LinkerInput]>; 2953def frandom_seed_EQ : Joined<["-"], "frandom-seed=">, Group<clang_ignored_f_Group>; 2954def freg_struct_return : Flag<["-"], "freg-struct-return">, Group<f_Group>, Flags<[CC1Option]>, 2955 HelpText<"Override the default ABI to return small structs in registers">; 2956defm rtti : BoolFOption<"rtti", 2957 LangOpts<"RTTI">, Default<cplusplus.KeyPath>, 2958 NegFlag<SetFalse, [CC1Option], "Disable generation of rtti information">, 2959 PosFlag<SetTrue>>, ShouldParseIf<cplusplus.KeyPath>; 2960defm rtti_data : BoolFOption<"rtti-data", 2961 LangOpts<"RTTIData">, Default<frtti.KeyPath>, 2962 NegFlag<SetFalse, [CC1Option], "Disable generation of RTTI data">, 2963 PosFlag<SetTrue>>, ShouldParseIf<frtti.KeyPath>; 2964def : Flag<["-"], "fsched-interblock">, Group<clang_ignored_f_Group>; 2965defm short_enums : BoolFOption<"short-enums", 2966 LangOpts<"ShortEnums">, DefaultFalse, 2967 PosFlag<SetTrue, [CC1Option], "Allocate to an enum type only as many bytes as it" 2968 " needs for the declared range of possible values">, 2969 NegFlag<SetFalse>>; 2970defm char8__t : BoolFOption<"char8_t", 2971 LangOpts<"Char8">, Default<cpp20.KeyPath>, 2972 PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">, 2973 BothFlags<[CC1Option], " C++ builtin type char8_t">>; 2974def fshort_wchar : Flag<["-"], "fshort-wchar">, Group<f_Group>, 2975 HelpText<"Force wchar_t to be a short unsigned int">; 2976def fno_short_wchar : Flag<["-"], "fno-short-wchar">, Group<f_Group>, 2977 HelpText<"Force wchar_t to be an unsigned int">; 2978def fshow_overloads_EQ : Joined<["-"], "fshow-overloads=">, Group<f_Group>, Flags<[CC1Option]>, 2979 HelpText<"Which overload candidates to show when overload resolution fails. Defaults to 'all'">, 2980 Values<"best,all">, 2981 NormalizedValues<["Ovl_Best", "Ovl_All"]>, 2982 MarshallingInfoEnum<DiagnosticOpts<"ShowOverloads">, "Ovl_All">; 2983defm show_column : BoolFOption<"show-column", 2984 DiagnosticOpts<"ShowColumn">, DefaultTrue, 2985 NegFlag<SetFalse, [CC1Option], "Do not include column number on diagnostics">, 2986 PosFlag<SetTrue>>; 2987defm show_source_location : BoolFOption<"show-source-location", 2988 DiagnosticOpts<"ShowLocation">, DefaultTrue, 2989 NegFlag<SetFalse, [CC1Option], "Do not include source location information with diagnostics">, 2990 PosFlag<SetTrue>>; 2991defm spell_checking : BoolFOption<"spell-checking", 2992 LangOpts<"SpellChecking">, DefaultTrue, 2993 NegFlag<SetFalse, [CC1Option], "Disable spell-checking">, PosFlag<SetTrue>>; 2994def fspell_checking_limit_EQ : Joined<["-"], "fspell-checking-limit=">, Group<f_Group>, Flags<[CC1Option]>, 2995 HelpText<"Set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit)">, 2996 MarshallingInfoInt<DiagnosticOpts<"SpellCheckingLimit">, "DiagnosticOptions::DefaultSpellCheckingLimit">; 2997def fsigned_bitfields : Flag<["-"], "fsigned-bitfields">, Group<f_Group>; 2998defm signed_char : BoolFOption<"signed-char", 2999 LangOpts<"CharIsSigned">, DefaultTrue, 3000 NegFlag<SetFalse, [CC1Option], "char is unsigned">, PosFlag<SetTrue, [], "char is signed">>, 3001 ShouldParseIf<!strconcat("!", open_cl.KeyPath)>; 3002defm split_stack : BoolFOption<"split-stack", 3003 CodeGenOpts<"EnableSegmentedStacks">, DefaultFalse, 3004 NegFlag<SetFalse, [], "Wouldn't use segmented stack">, 3005 PosFlag<SetTrue, [CC1Option], "Use segmented stack">>; 3006def fstack_protector_all : Flag<["-"], "fstack-protector-all">, Group<f_Group>, 3007 HelpText<"Enable stack protectors for all functions">; 3008defm stack_clash_protection : BoolFOption<"stack-clash-protection", 3009 CodeGenOpts<"StackClashProtector">, DefaultFalse, 3010 PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">, 3011 BothFlags<[], " stack clash protection">>, 3012 DocBrief<"Instrument stack allocation to prevent stack clash attacks">; 3013def fstack_protector_strong : Flag<["-"], "fstack-protector-strong">, Group<f_Group>, 3014 HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. " 3015 "Compared to -fstack-protector, this uses a stronger heuristic " 3016 "that includes functions containing arrays of any size (and any type), " 3017 "as well as any calls to alloca or the taking of an address from a local variable">; 3018def fstack_protector : Flag<["-"], "fstack-protector">, Group<f_Group>, 3019 HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. " 3020 "This uses a loose heuristic which considers functions vulnerable if they " 3021 "contain a char (or 8bit integer) array or constant sized calls to alloca " 3022 ", which are of greater size than ssp-buffer-size (default: 8 bytes). All " 3023 "variable sized calls to alloca are considered vulnerable. A function with " 3024 "a stack protector has a guard value added to the stack frame that is " 3025 "checked on function exit. The guard value must be positioned in the " 3026 "stack frame such that a buffer overflow from a vulnerable variable will " 3027 "overwrite the guard value before overwriting the function's return " 3028 "address. The reference stack guard value is stored in a global variable.">; 3029def ftrivial_auto_var_init : Joined<["-"], "ftrivial-auto-var-init=">, Group<f_Group>, 3030 Flags<[CC1Option, CoreOption]>, HelpText<"Initialize trivial automatic stack variables. Defaults to 'uninitialized'">, 3031 Values<"uninitialized,zero,pattern">, 3032 NormalizedValuesScope<"LangOptions::TrivialAutoVarInitKind">, 3033 NormalizedValues<["Uninitialized", "Zero", "Pattern"]>, 3034 MarshallingInfoEnum<LangOpts<"TrivialAutoVarInit">, "Uninitialized">; 3035def ftrivial_auto_var_init_stop_after : Joined<["-"], "ftrivial-auto-var-init-stop-after=">, Group<f_Group>, 3036 Flags<[CC1Option, CoreOption]>, HelpText<"Stop initializing trivial automatic stack variables after the specified number of instances">, 3037 MarshallingInfoInt<LangOpts<"TrivialAutoVarInitStopAfter">>; 3038def fstandalone_debug : Flag<["-"], "fstandalone-debug">, Group<f_Group>, Flags<[CoreOption]>, 3039 HelpText<"Emit full debug info for all types used by the program">; 3040def fno_standalone_debug : Flag<["-"], "fno-standalone-debug">, Group<f_Group>, Flags<[CoreOption]>, 3041 HelpText<"Limit debug information produced to reduce size of debug binary">; 3042def flimit_debug_info : Flag<["-"], "flimit-debug-info">, Flags<[CoreOption]>, Alias<fno_standalone_debug>; 3043def fno_limit_debug_info : Flag<["-"], "fno-limit-debug-info">, Flags<[CoreOption]>, Alias<fstandalone_debug>; 3044def fdebug_macro : Flag<["-"], "fdebug-macro">, Group<f_Group>, Flags<[CoreOption]>, 3045 HelpText<"Emit macro debug information">; 3046def fno_debug_macro : Flag<["-"], "fno-debug-macro">, Group<f_Group>, Flags<[CoreOption]>, 3047 HelpText<"Do not emit macro debug information">; 3048def fstrict_aliasing : Flag<["-"], "fstrict-aliasing">, Group<f_Group>, 3049 Flags<[NoXarchOption, CoreOption]>; 3050def fstrict_enums : Flag<["-"], "fstrict-enums">, Group<f_Group>, Flags<[CC1Option]>, 3051 HelpText<"Enable optimizations based on the strict definition of an enum's " 3052 "value range">, 3053 MarshallingInfoFlag<CodeGenOpts<"StrictEnums">>; 3054defm strict_vtable_pointers : BoolFOption<"strict-vtable-pointers", 3055 CodeGenOpts<"StrictVTablePointers">, DefaultFalse, 3056 PosFlag<SetTrue, [CC1Option], "Enable optimizations based on the strict rules for" 3057 " overwriting polymorphic C++ objects">, 3058 NegFlag<SetFalse>>; 3059def fstrict_overflow : Flag<["-"], "fstrict-overflow">, Group<f_Group>; 3060def fdriver_only : Flag<["-"], "fdriver-only">, Flags<[NoXarchOption, CoreOption]>, 3061 Group<Action_Group>, HelpText<"Only run the driver.">; 3062def fsyntax_only : Flag<["-"], "fsyntax-only">, 3063 Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option,FlangOption]>, Group<Action_Group>, 3064 HelpText<"Run the preprocessor, parser and semantic analysis stages">; 3065def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group<f_Group>; 3066def ftemplate_depth_EQ : Joined<["-"], "ftemplate-depth=">, Group<f_Group>, Flags<[CC1Option]>, 3067 HelpText<"Set the maximum depth of recursive template instantiation">, 3068 MarshallingInfoInt<LangOpts<"InstantiationDepth">, "1024">; 3069def : Joined<["-"], "ftemplate-depth-">, Group<f_Group>, Alias<ftemplate_depth_EQ>; 3070def ftemplate_backtrace_limit_EQ : Joined<["-"], "ftemplate-backtrace-limit=">, Group<f_Group>, Flags<[CC1Option]>, 3071 HelpText<"Set the maximum number of entries to print in a template instantiation backtrace (0 = no limit)">, 3072 MarshallingInfoInt<DiagnosticOpts<"TemplateBacktraceLimit">, "DiagnosticOptions::DefaultTemplateBacktraceLimit">; 3073def foperator_arrow_depth_EQ : Joined<["-"], "foperator-arrow-depth=">, Group<f_Group>, Flags<[CC1Option]>, 3074 HelpText<"Maximum number of 'operator->'s to call for a member access">, 3075 MarshallingInfoInt<LangOpts<"ArrowDepth">, "256">; 3076 3077def fsave_optimization_record : Flag<["-"], "fsave-optimization-record">, 3078 Group<f_Group>, HelpText<"Generate a YAML optimization record file">; 3079def fsave_optimization_record_EQ : Joined<["-"], "fsave-optimization-record=">, 3080 Group<f_Group>, HelpText<"Generate an optimization record file in a specific format">, 3081 MetaVarName<"<format>">; 3082def fno_save_optimization_record : Flag<["-"], "fno-save-optimization-record">, 3083 Group<f_Group>, Flags<[NoArgumentUnused]>; 3084def foptimization_record_file_EQ : Joined<["-"], "foptimization-record-file=">, 3085 Group<f_Group>, 3086 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.">, 3087 MetaVarName<"<file>">; 3088def foptimization_record_passes_EQ : Joined<["-"], "foptimization-record-passes=">, 3089 Group<f_Group>, 3090 HelpText<"Only include passes which match a specified regular expression in the generated optimization record (by default, include all passes)">, 3091 MetaVarName<"<regex>">; 3092 3093def fvectorize : Flag<["-"], "fvectorize">, Group<f_Group>, 3094 HelpText<"Enable the loop vectorization passes">; 3095def fno_vectorize : Flag<["-"], "fno-vectorize">, Group<f_Group>; 3096def : Flag<["-"], "ftree-vectorize">, Alias<fvectorize>; 3097def : Flag<["-"], "fno-tree-vectorize">, Alias<fno_vectorize>; 3098def fslp_vectorize : Flag<["-"], "fslp-vectorize">, Group<f_Group>, 3099 HelpText<"Enable the superword-level parallelism vectorization passes">; 3100def fno_slp_vectorize : Flag<["-"], "fno-slp-vectorize">, Group<f_Group>; 3101def : Flag<["-"], "ftree-slp-vectorize">, Alias<fslp_vectorize>; 3102def : Flag<["-"], "fno-tree-slp-vectorize">, Alias<fno_slp_vectorize>; 3103def Wlarge_by_value_copy_def : Flag<["-"], "Wlarge-by-value-copy">, 3104 HelpText<"Warn if a function definition returns or accepts an object larger " 3105 "in bytes than a given value">, Flags<[HelpHidden]>; 3106def Wlarge_by_value_copy_EQ : Joined<["-"], "Wlarge-by-value-copy=">, Flags<[CC1Option]>, 3107 MarshallingInfoInt<LangOpts<"NumLargeByValueCopy">>; 3108 3109// These "special" warning flags are effectively processed as f_Group flags by the driver: 3110// Just silence warnings about -Wlarger-than for now. 3111def Wlarger_than_EQ : Joined<["-"], "Wlarger-than=">, Group<clang_ignored_f_Group>; 3112def Wlarger_than_ : Joined<["-"], "Wlarger-than-">, Alias<Wlarger_than_EQ>; 3113 3114// This is converted to -fwarn-stack-size=N and also passed through by the driver. 3115// FIXME: The driver should strip out the =<value> when passing W_value_Group through. 3116def Wframe_larger_than_EQ : Joined<["-"], "Wframe-larger-than=">, Group<W_value_Group>, 3117 Flags<[NoXarchOption, CC1Option]>; 3118def Wframe_larger_than : Flag<["-"], "Wframe-larger-than">, Alias<Wframe_larger_than_EQ>; 3119 3120def : Flag<["-"], "fterminated-vtables">, Alias<fapple_kext>; 3121defm threadsafe_statics : BoolFOption<"threadsafe-statics", 3122 LangOpts<"ThreadsafeStatics">, DefaultTrue, 3123 NegFlag<SetFalse, [CC1Option], "Do not emit code to make initialization of local statics thread safe">, 3124 PosFlag<SetTrue>>; 3125def ftime_report : Flag<["-"], "ftime-report">, Group<f_Group>, Flags<[CC1Option]>, 3126 MarshallingInfoFlag<CodeGenOpts<"TimePasses">>; 3127def ftime_report_EQ: Joined<["-"], "ftime-report=">, Group<f_Group>, 3128 Flags<[CC1Option]>, Values<"per-pass,per-pass-run">, 3129 MarshallingInfoFlag<CodeGenOpts<"TimePassesPerRun">>, 3130 HelpText<"(For new pass manager) 'per-pass': one report for each pass; " 3131 "'per-pass-run': one report for each pass invocation">; 3132def ftime_trace : Flag<["-"], "ftime-trace">, Group<f_Group>, 3133 HelpText<"Turn on time profiler. Generates JSON file based on output filename.">, 3134 DocBrief<[{ 3135Turn on time profiler. Generates JSON file based on output filename. Results 3136can be analyzed with chrome://tracing or `Speedscope App 3137<https://www.speedscope.app>`_ for flamegraph visualization.}]>, 3138 Flags<[CoreOption]>; 3139def ftime_trace_granularity_EQ : Joined<["-"], "ftime-trace-granularity=">, Group<f_Group>, 3140 HelpText<"Minimum time granularity (in microseconds) traced by time profiler">, 3141 Flags<[CC1Option, CoreOption]>, 3142 MarshallingInfoInt<FrontendOpts<"TimeTraceGranularity">, "500u">; 3143def ftime_trace_EQ : Joined<["-"], "ftime-trace=">, Group<f_Group>, 3144 HelpText<"Similar to -ftime-trace. Specify the JSON file or a directory which will contain the JSON file">, 3145 Flags<[CC1Option, CoreOption]>, 3146 MarshallingInfoString<FrontendOpts<"TimeTracePath">>; 3147def fproc_stat_report : Joined<["-"], "fproc-stat-report">, Group<f_Group>, 3148 HelpText<"Print subprocess statistics">; 3149def fproc_stat_report_EQ : Joined<["-"], "fproc-stat-report=">, Group<f_Group>, 3150 HelpText<"Save subprocess statistics to the given file">; 3151def ftlsmodel_EQ : Joined<["-"], "ftls-model=">, Group<f_Group>, Flags<[CC1Option]>, 3152 Values<"global-dynamic,local-dynamic,initial-exec,local-exec">, 3153 NormalizedValuesScope<"CodeGenOptions">, 3154 NormalizedValues<["GeneralDynamicTLSModel", "LocalDynamicTLSModel", "InitialExecTLSModel", "LocalExecTLSModel"]>, 3155 MarshallingInfoEnum<CodeGenOpts<"DefaultTLSModel">, "GeneralDynamicTLSModel">; 3156def ftrapv : Flag<["-"], "ftrapv">, Group<f_Group>, Flags<[CC1Option]>, 3157 HelpText<"Trap on integer overflow">; 3158def ftrapv_handler_EQ : Joined<["-"], "ftrapv-handler=">, Group<f_Group>, 3159 MetaVarName<"<function name>">, 3160 HelpText<"Specify the function to be called on overflow">; 3161def ftrapv_handler : Separate<["-"], "ftrapv-handler">, Group<f_Group>, Flags<[CC1Option]>; 3162def ftrap_function_EQ : Joined<["-"], "ftrap-function=">, Group<f_Group>, Flags<[CC1Option]>, 3163 HelpText<"Issue call to specified function rather than a trap instruction">, 3164 MarshallingInfoString<CodeGenOpts<"TrapFuncName">>; 3165def funroll_loops : Flag<["-"], "funroll-loops">, Group<f_Group>, 3166 HelpText<"Turn on loop unroller">, Flags<[CC1Option]>; 3167def fno_unroll_loops : Flag<["-"], "fno-unroll-loops">, Group<f_Group>, 3168 HelpText<"Turn off loop unroller">, Flags<[CC1Option]>; 3169defm reroll_loops : BoolFOption<"reroll-loops", 3170 CodeGenOpts<"RerollLoops">, DefaultFalse, 3171 PosFlag<SetTrue, [CC1Option], "Turn on loop reroller">, NegFlag<SetFalse>>; 3172def ffinite_loops: Flag<["-"], "ffinite-loops">, Group<f_Group>, 3173 HelpText<"Assume all loops are finite.">, Flags<[CC1Option]>; 3174def fno_finite_loops: Flag<["-"], "fno-finite-loops">, Group<f_Group>, 3175 HelpText<"Do not assume that any loop is finite.">, Flags<[CC1Option]>; 3176 3177def ftrigraphs : Flag<["-"], "ftrigraphs">, Group<f_Group>, 3178 HelpText<"Process trigraph sequences">, Flags<[CC1Option]>; 3179def fno_trigraphs : Flag<["-"], "fno-trigraphs">, Group<f_Group>, 3180 HelpText<"Do not process trigraph sequences">, Flags<[CC1Option]>; 3181def funsigned_bitfields : Flag<["-"], "funsigned-bitfields">, Group<f_Group>; 3182def funsigned_char : Flag<["-"], "funsigned-char">, Group<f_Group>; 3183def fno_unsigned_char : Flag<["-"], "fno-unsigned-char">; 3184def funwind_tables : Flag<["-"], "funwind-tables">, Group<f_Group>; 3185defm register_global_dtors_with_atexit : BoolFOption<"register-global-dtors-with-atexit", 3186 CodeGenOpts<"RegisterGlobalDtorsWithAtExit">, DefaultFalse, 3187 PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">, 3188 BothFlags<[], " atexit or __cxa_atexit to register global destructors">>; 3189defm use_init_array : BoolFOption<"use-init-array", 3190 CodeGenOpts<"UseInitArray">, DefaultTrue, 3191 NegFlag<SetFalse, [CC1Option], "Use .ctors/.dtors instead of .init_array/.fini_array">, 3192 PosFlag<SetTrue>>; 3193def fno_var_tracking : Flag<["-"], "fno-var-tracking">, Group<clang_ignored_f_Group>; 3194def fverbose_asm : Flag<["-"], "fverbose-asm">, Group<f_Group>, 3195 HelpText<"Generate verbose assembly output">; 3196def dA : Flag<["-"], "dA">, Alias<fverbose_asm>; 3197defm visibility_from_dllstorageclass : BoolFOption<"visibility-from-dllstorageclass", 3198 LangOpts<"VisibilityFromDLLStorageClass">, DefaultFalse, 3199 PosFlag<SetTrue, [CC1Option], "Set the visibility of symbols in the generated code from their DLL storage class">, 3200 NegFlag<SetFalse>>; 3201def fvisibility_dllexport_EQ : Joined<["-"], "fvisibility-dllexport=">, Group<f_Group>, Flags<[CC1Option]>, 3202 HelpText<"The visibility for dllexport definitions [-fvisibility-from-dllstorageclass]">, 3203 MarshallingInfoVisibility<LangOpts<"DLLExportVisibility">, "DefaultVisibility">, 3204 ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>; 3205def fvisibility_nodllstorageclass_EQ : Joined<["-"], "fvisibility-nodllstorageclass=">, Group<f_Group>, Flags<[CC1Option]>, 3206 HelpText<"The visibility for definitions without an explicit DLL export class [-fvisibility-from-dllstorageclass]">, 3207 MarshallingInfoVisibility<LangOpts<"NoDLLStorageClassVisibility">, "HiddenVisibility">, 3208 ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>; 3209def fvisibility_externs_dllimport_EQ : Joined<["-"], "fvisibility-externs-dllimport=">, Group<f_Group>, Flags<[CC1Option]>, 3210 HelpText<"The visibility for dllimport external declarations [-fvisibility-from-dllstorageclass]">, 3211 MarshallingInfoVisibility<LangOpts<"ExternDeclDLLImportVisibility">, "DefaultVisibility">, 3212 ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>; 3213def fvisibility_externs_nodllstorageclass_EQ : Joined<["-"], "fvisibility-externs-nodllstorageclass=">, Group<f_Group>, Flags<[CC1Option]>, 3214 HelpText<"The visibility for external declarations without an explicit DLL dllstorageclass [-fvisibility-from-dllstorageclass]">, 3215 MarshallingInfoVisibility<LangOpts<"ExternDeclNoDLLStorageClassVisibility">, "HiddenVisibility">, 3216 ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>; 3217def fvisibility_EQ : Joined<["-"], "fvisibility=">, Group<f_Group>, Flags<[CC1Option]>, 3218 HelpText<"Set the default symbol visibility for all global definitions">, 3219 MarshallingInfoVisibility<LangOpts<"ValueVisibilityMode">, "DefaultVisibility">; 3220defm visibility_inlines_hidden : BoolFOption<"visibility-inlines-hidden", 3221 LangOpts<"InlineVisibilityHidden">, DefaultFalse, 3222 PosFlag<SetTrue, [CC1Option], "Give inline C++ member functions hidden visibility by default">, 3223 NegFlag<SetFalse>>; 3224defm visibility_inlines_hidden_static_local_var : BoolFOption<"visibility-inlines-hidden-static-local-var", 3225 LangOpts<"VisibilityInlinesHiddenStaticLocalVar">, DefaultFalse, 3226 PosFlag<SetTrue, [CC1Option], "When -fvisibility-inlines-hidden is enabled, static variables in" 3227 " inline C++ member functions will also be given hidden visibility by default">, 3228 NegFlag<SetFalse, [], "Disables -fvisibility-inlines-hidden-static-local-var" 3229 " (this is the default on non-darwin targets)">, BothFlags<[CC1Option]>>; 3230def fvisibility_ms_compat : Flag<["-"], "fvisibility-ms-compat">, Group<f_Group>, 3231 HelpText<"Give global types 'default' visibility and global functions and " 3232 "variables 'hidden' visibility by default">; 3233def fvisibility_global_new_delete_hidden : Flag<["-"], "fvisibility-global-new-delete-hidden">, Group<f_Group>, 3234 HelpText<"Give global C++ operator new and delete declarations hidden visibility">, Flags<[CC1Option]>, 3235 MarshallingInfoFlag<LangOpts<"GlobalAllocationFunctionVisibilityHidden">>; 3236def mdefault_visibility_export_mapping_EQ : Joined<["-"], "mdefault-visibility-export-mapping=">, 3237 Values<"none,explicit,all">, 3238 NormalizedValuesScope<"LangOptions::DefaultVisiblityExportMapping">, 3239 NormalizedValues<["None", "Explicit", "All"]>, 3240 HelpText<"Mapping between default visibility and export">, 3241 Group<m_Group>, Flags<[CC1Option,TargetSpecific]>, 3242 MarshallingInfoEnum<LangOpts<"DefaultVisibilityExportMapping">,"None">; 3243defm new_infallible : BoolFOption<"new-infallible", 3244 LangOpts<"NewInfallible">, DefaultFalse, 3245 PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">, 3246 BothFlags<[CC1Option], " treating throwing global C++ operator new as always returning valid memory " 3247 "(annotates with __attribute__((returns_nonnull)) and throw()). This is detectable in source.">>; 3248defm whole_program_vtables : BoolFOption<"whole-program-vtables", 3249 CodeGenOpts<"WholeProgramVTables">, DefaultFalse, 3250 PosFlag<SetTrue, [CC1Option], "Enables whole-program vtable optimization. Requires -flto">, 3251 NegFlag<SetFalse>, BothFlags<[CoreOption]>>; 3252defm split_lto_unit : BoolFOption<"split-lto-unit", 3253 CodeGenOpts<"EnableSplitLTOUnit">, DefaultFalse, 3254 PosFlag<SetTrue, [CC1Option], "Enables splitting of the LTO unit">, 3255 NegFlag<SetFalse>, BothFlags<[CoreOption]>>; 3256defm force_emit_vtables : BoolFOption<"force-emit-vtables", 3257 CodeGenOpts<"ForceEmitVTables">, DefaultFalse, 3258 PosFlag<SetTrue, [CC1Option], "Emits more virtual tables to improve devirtualization">, 3259 NegFlag<SetFalse>, BothFlags<[CoreOption]>>, 3260 DocBrief<[{In order to improve devirtualization, forces emitting of vtables even in 3261modules where it isn't necessary. It causes more inline virtual functions 3262to be emitted.}]>; 3263defm virtual_function_elimination : BoolFOption<"virtual-function-elimination", 3264 CodeGenOpts<"VirtualFunctionElimination">, DefaultFalse, 3265 PosFlag<SetTrue, [CC1Option], "Enables dead virtual function elimination optimization. Requires -flto=full">, 3266 NegFlag<SetFalse>, BothFlags<[CoreOption]>>; 3267 3268def fwrapv : Flag<["-"], "fwrapv">, Group<f_Group>, Flags<[CC1Option]>, 3269 HelpText<"Treat signed integer overflow as two's complement">; 3270def fwritable_strings : Flag<["-"], "fwritable-strings">, Group<f_Group>, Flags<[CC1Option]>, 3271 HelpText<"Store string literals as writable data">, 3272 MarshallingInfoFlag<LangOpts<"WritableStrings">>; 3273defm zero_initialized_in_bss : BoolFOption<"zero-initialized-in-bss", 3274 CodeGenOpts<"NoZeroInitializedInBSS">, DefaultFalse, 3275 NegFlag<SetTrue, [CC1Option], "Don't place zero initialized data in BSS">, 3276 PosFlag<SetFalse>>; 3277defm function_sections : BoolFOption<"function-sections", 3278 CodeGenOpts<"FunctionSections">, DefaultFalse, 3279 PosFlag<SetTrue, [CC1Option], "Place each function in its own section">, 3280 NegFlag<SetFalse>>; 3281def fbasic_block_sections_EQ : Joined<["-"], "fbasic-block-sections=">, Group<f_Group>, 3282 Flags<[CC1Option, CC1AsOption]>, 3283 HelpText<"Place each function's basic blocks in unique sections (ELF Only)">, 3284 DocBrief<[{Generate labels for each basic block or place each basic block or a subset of basic blocks in its own section.}]>, 3285 Values<"all,labels,none,list=">, 3286 MarshallingInfoString<CodeGenOpts<"BBSections">, [{"none"}]>; 3287defm data_sections : BoolFOption<"data-sections", 3288 CodeGenOpts<"DataSections">, DefaultFalse, 3289 PosFlag<SetTrue, [CC1Option], "Place each data in its own section">, NegFlag<SetFalse>>; 3290defm stack_size_section : BoolFOption<"stack-size-section", 3291 CodeGenOpts<"StackSizeSection">, DefaultFalse, 3292 PosFlag<SetTrue, [CC1Option], "Emit section containing metadata on function stack sizes">, 3293 NegFlag<SetFalse>>; 3294def fstack_usage : Flag<["-"], "fstack-usage">, Group<f_Group>, 3295 HelpText<"Emit .su file containing information on function stack sizes">; 3296def stack_usage_file : Separate<["-"], "stack-usage-file">, 3297 Flags<[CC1Option, NoDriverOption]>, 3298 HelpText<"Filename (or -) to write stack usage output to">, 3299 MarshallingInfoString<CodeGenOpts<"StackUsageOutput">>; 3300 3301defm unique_basic_block_section_names : BoolFOption<"unique-basic-block-section-names", 3302 CodeGenOpts<"UniqueBasicBlockSectionNames">, DefaultFalse, 3303 PosFlag<SetTrue, [CC1Option], "Use unique names for basic block sections (ELF Only)">, 3304 NegFlag<SetFalse>>; 3305defm unique_internal_linkage_names : BoolFOption<"unique-internal-linkage-names", 3306 CodeGenOpts<"UniqueInternalLinkageNames">, DefaultFalse, 3307 PosFlag<SetTrue, [CC1Option], "Uniqueify Internal Linkage Symbol Names by appending" 3308 " the MD5 hash of the module path">, 3309 NegFlag<SetFalse>>; 3310defm unique_section_names : BoolFOption<"unique-section-names", 3311 CodeGenOpts<"UniqueSectionNames">, DefaultTrue, 3312 NegFlag<SetFalse, [CC1Option], "Don't use unique names for text and data sections">, 3313 PosFlag<SetTrue>>; 3314 3315defm split_machine_functions: BoolFOption<"split-machine-functions", 3316 CodeGenOpts<"SplitMachineFunctions">, DefaultFalse, 3317 PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">, 3318 BothFlags<[], " late function splitting using profile information (x86 ELF)">>; 3319 3320defm strict_return : BoolFOption<"strict-return", 3321 CodeGenOpts<"StrictReturn">, DefaultTrue, 3322 NegFlag<SetFalse, [CC1Option], "Don't treat control flow paths that fall off the end" 3323 " of a non-void function as unreachable">, 3324 PosFlag<SetTrue>>; 3325 3326def fenable_matrix : Flag<["-"], "fenable-matrix">, Group<f_Group>, 3327 Flags<[CC1Option]>, 3328 HelpText<"Enable matrix data type and related builtin functions">, 3329 MarshallingInfoFlag<LangOpts<"MatrixTypes">>; 3330 3331def fzero_call_used_regs_EQ 3332 : Joined<["-"], "fzero-call-used-regs=">, Group<f_Group>, Flags<[CC1Option]>, 3333 HelpText<"Clear call-used registers upon function return (AArch64/x86 only)">, 3334 Values<"skip,used-gpr-arg,used-gpr,used-arg,used,all-gpr-arg,all-gpr,all-arg,all">, 3335 NormalizedValues<["Skip", "UsedGPRArg", "UsedGPR", "UsedArg", "Used", 3336 "AllGPRArg", "AllGPR", "AllArg", "All"]>, 3337 NormalizedValuesScope<"llvm::ZeroCallUsedRegs::ZeroCallUsedRegsKind">, 3338 MarshallingInfoEnum<CodeGenOpts<"ZeroCallUsedRegs">, "Skip">; 3339 3340def fdebug_types_section: Flag <["-"], "fdebug-types-section">, Group<f_Group>, 3341 HelpText<"Place debug types in their own section (ELF Only)">; 3342def fno_debug_types_section: Flag<["-"], "fno-debug-types-section">, Group<f_Group>; 3343defm debug_ranges_base_address : BoolFOption<"debug-ranges-base-address", 3344 CodeGenOpts<"DebugRangesBaseAddress">, DefaultFalse, 3345 PosFlag<SetTrue, [CC1Option], "Use DWARF base address selection entries in .debug_ranges">, 3346 NegFlag<SetFalse>>; 3347defm split_dwarf_inlining : BoolFOption<"split-dwarf-inlining", 3348 CodeGenOpts<"SplitDwarfInlining">, DefaultFalse, 3349 NegFlag<SetFalse, []>, 3350 PosFlag<SetTrue, [CC1Option], "Provide minimal debug info in the object/executable" 3351 " to facilitate online symbolication/stack traces in the absence of" 3352 " .dwo/.dwp files when using Split DWARF">>; 3353def fdebug_default_version: Joined<["-"], "fdebug-default-version=">, Group<f_Group>, 3354 HelpText<"Default DWARF version to use, if a -g option caused DWARF debug info to be produced">; 3355def fdebug_prefix_map_EQ 3356 : Joined<["-"], "fdebug-prefix-map=">, Group<f_Group>, 3357 Flags<[CC1Option,CC1AsOption]>, 3358 MetaVarName<"<old>=<new>">, 3359 HelpText<"For paths in debug info, remap directory <old> to <new>. If multiple options match a path, the last option wins">; 3360def fcoverage_prefix_map_EQ 3361 : Joined<["-"], "fcoverage-prefix-map=">, Group<f_Group>, 3362 Flags<[CC1Option]>, 3363 MetaVarName<"<old>=<new>">, 3364 HelpText<"remap file source paths <old> to <new> in coverage mapping. If there are multiple options, prefix replacement is applied in reverse order starting from the last one">; 3365def ffile_prefix_map_EQ 3366 : Joined<["-"], "ffile-prefix-map=">, Group<f_Group>, 3367 HelpText<"remap file source paths in debug info, predefined preprocessor " 3368 "macros and __builtin_FILE(). Implies -ffile-reproducible.">; 3369def fmacro_prefix_map_EQ 3370 : Joined<["-"], "fmacro-prefix-map=">, Group<f_Group>, Flags<[CC1Option]>, 3371 HelpText<"remap file source paths in predefined preprocessor macros and " 3372 "__builtin_FILE(). Implies -ffile-reproducible.">; 3373defm force_dwarf_frame : BoolFOption<"force-dwarf-frame", 3374 CodeGenOpts<"ForceDwarfFrameSection">, DefaultFalse, 3375 PosFlag<SetTrue, [CC1Option], "Always emit a debug frame section">, NegFlag<SetFalse>>; 3376def femit_dwarf_unwind_EQ : Joined<["-"], "femit-dwarf-unwind=">, 3377 Group<f_Group>, Flags<[CC1Option, CC1AsOption]>, 3378 HelpText<"When to emit DWARF unwind (EH frame) info">, 3379 Values<"always,no-compact-unwind,default">, 3380 NormalizedValues<["Always", "NoCompactUnwind", "Default"]>, 3381 NormalizedValuesScope<"llvm::EmitDwarfUnwindType">, 3382 MarshallingInfoEnum<CodeGenOpts<"EmitDwarfUnwind">, "Default">; 3383defm emit_compact_unwind_non_canonical : BoolFOption<"emit-compact-unwind-non-canonical", 3384 CodeGenOpts<"EmitCompactUnwindNonCanonical">, DefaultFalse, 3385 PosFlag<SetTrue, [CC1Option, CC1AsOption], "Try emitting Compact-Unwind for non-canonical entries. Maybe overriden by other constraints">, NegFlag<SetFalse>>; 3386def g_Flag : Flag<["-"], "g">, Group<g_Group>, 3387 Flags<[CoreOption,FlangOption]>, HelpText<"Generate source-level debug information">; 3388def gline_tables_only : Flag<["-"], "gline-tables-only">, Group<gN_Group>, 3389 Flags<[CoreOption,FlangOption]>, HelpText<"Emit debug line number tables only">; 3390def gline_directives_only : Flag<["-"], "gline-directives-only">, Group<gN_Group>, 3391 Flags<[CoreOption]>, HelpText<"Emit debug line info directives only">; 3392def gmlt : Flag<["-"], "gmlt">, Alias<gline_tables_only>; 3393def g0 : Flag<["-"], "g0">, Group<gN_Group>; 3394def g1 : Flag<["-"], "g1">, Group<gN_Group>, Alias<gline_tables_only>; 3395def g2 : Flag<["-"], "g2">, Group<gN_Group>; 3396def g3 : Flag<["-"], "g3">, Group<gN_Group>; 3397def ggdb : Flag<["-"], "ggdb">, Group<gTune_Group>; 3398def ggdb0 : Flag<["-"], "ggdb0">, Group<ggdbN_Group>; 3399def ggdb1 : Flag<["-"], "ggdb1">, Group<ggdbN_Group>; 3400def ggdb2 : Flag<["-"], "ggdb2">, Group<ggdbN_Group>; 3401def ggdb3 : Flag<["-"], "ggdb3">, Group<ggdbN_Group>; 3402def glldb : Flag<["-"], "glldb">, Group<gTune_Group>; 3403def gsce : Flag<["-"], "gsce">, Group<gTune_Group>; 3404def gdbx : Flag<["-"], "gdbx">, Group<gTune_Group>; 3405// Equivalent to our default dwarf version. Forces usual dwarf emission when 3406// CodeView is enabled. 3407def gdwarf : Flag<["-"], "gdwarf">, Group<g_Group>, Flags<[CoreOption]>, 3408 HelpText<"Generate source-level debug information with the default dwarf version">; 3409def gdwarf_2 : Flag<["-"], "gdwarf-2">, Group<g_Group>, 3410 HelpText<"Generate source-level debug information with dwarf version 2">; 3411def gdwarf_3 : Flag<["-"], "gdwarf-3">, Group<g_Group>, 3412 HelpText<"Generate source-level debug information with dwarf version 3">; 3413def gdwarf_4 : Flag<["-"], "gdwarf-4">, Group<g_Group>, 3414 HelpText<"Generate source-level debug information with dwarf version 4">; 3415def gdwarf_5 : Flag<["-"], "gdwarf-5">, Group<g_Group>, 3416 HelpText<"Generate source-level debug information with dwarf version 5">; 3417def gdwarf64 : Flag<["-"], "gdwarf64">, Group<g_Group>, 3418 Flags<[CC1Option, CC1AsOption]>, 3419 HelpText<"Enables DWARF64 format for ELF binaries, if debug information emission is enabled.">, 3420 MarshallingInfoFlag<CodeGenOpts<"Dwarf64">>; 3421def gdwarf32 : Flag<["-"], "gdwarf32">, Group<g_Group>, 3422 Flags<[CC1Option, CC1AsOption]>, 3423 HelpText<"Enables DWARF32 format for ELF binaries, if debug information emission is enabled.">; 3424 3425def gcodeview : Flag<["-"], "gcodeview">, 3426 HelpText<"Generate CodeView debug information">, 3427 Flags<[CC1Option, CC1AsOption, CoreOption]>, 3428 MarshallingInfoFlag<CodeGenOpts<"EmitCodeView">>; 3429defm codeview_ghash : BoolOption<"g", "codeview-ghash", 3430 CodeGenOpts<"CodeViewGHash">, DefaultFalse, 3431 PosFlag<SetTrue, [CC1Option], "Emit type record hashes in a .debug$H section">, 3432 NegFlag<SetFalse>, BothFlags<[CoreOption]>>; 3433defm codeview_command_line : BoolOption<"g", "codeview-command-line", 3434 CodeGenOpts<"CodeViewCommandLine">, DefaultTrue, 3435 PosFlag<SetTrue, [], "Emit compiler path and command line into CodeView debug information">, 3436 NegFlag<SetFalse, [], "Don't emit compiler path and command line into CodeView debug information">, 3437 BothFlags<[CoreOption, CC1Option]>>; 3438defm inline_line_tables : BoolGOption<"inline-line-tables", 3439 CodeGenOpts<"NoInlineLineTables">, DefaultFalse, 3440 NegFlag<SetTrue, [CC1Option], "Don't emit inline line tables.">, 3441 PosFlag<SetFalse>, BothFlags<[CoreOption]>>; 3442 3443def gfull : Flag<["-"], "gfull">, Group<g_Group>; 3444def gused : Flag<["-"], "gused">, Group<g_Group>; 3445def gstabs : Joined<["-"], "gstabs">, Group<g_Group>, Flags<[Unsupported]>; 3446def gcoff : Joined<["-"], "gcoff">, Group<g_Group>, Flags<[Unsupported]>; 3447def gxcoff : Joined<["-"], "gxcoff">, Group<g_Group>, Flags<[Unsupported]>; 3448def gvms : Joined<["-"], "gvms">, Group<g_Group>, Flags<[Unsupported]>; 3449def gtoggle : Flag<["-"], "gtoggle">, Group<g_flags_Group>, Flags<[Unsupported]>; 3450def grecord_command_line : Flag<["-"], "grecord-command-line">, 3451 Group<g_flags_Group>; 3452def gno_record_command_line : Flag<["-"], "gno-record-command-line">, 3453 Group<g_flags_Group>; 3454def : Flag<["-"], "grecord-gcc-switches">, Alias<grecord_command_line>; 3455def : Flag<["-"], "gno-record-gcc-switches">, Alias<gno_record_command_line>; 3456defm strict_dwarf : BoolOption<"g", "strict-dwarf", 3457 CodeGenOpts<"DebugStrictDwarf">, DefaultFalse, 3458 PosFlag<SetTrue, [CC1Option], "Restrict DWARF features to those defined in " 3459 "the specified version, avoiding features from later versions.">, 3460 NegFlag<SetFalse>, BothFlags<[CoreOption]>>, 3461 Group<g_flags_Group>; 3462defm column_info : BoolOption<"g", "column-info", 3463 CodeGenOpts<"DebugColumnInfo">, DefaultTrue, 3464 NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>, BothFlags<[CoreOption]>>, 3465 Group<g_flags_Group>; 3466def gsplit_dwarf : Flag<["-"], "gsplit-dwarf">, Group<g_flags_Group>, 3467 Flags<[CoreOption]>; 3468def gsplit_dwarf_EQ : Joined<["-"], "gsplit-dwarf=">, Group<g_flags_Group>, 3469 Flags<[CoreOption]>, HelpText<"Set DWARF fission mode">, 3470 Values<"split,single">; 3471def gno_split_dwarf : Flag<["-"], "gno-split-dwarf">, Group<g_flags_Group>, 3472 Flags<[CoreOption]>; 3473def gsimple_template_names : Flag<["-"], "gsimple-template-names">, Group<g_flags_Group>; 3474def gsimple_template_names_EQ 3475 : Joined<["-"], "gsimple-template-names=">, 3476 HelpText<"Use simple template names in DWARF, or include the full " 3477 "template name with a modified prefix for validation">, 3478 Values<"simple,mangled">, Flags<[CC1Option, NoDriverOption]>; 3479def gsrc_hash_EQ : Joined<["-"], "gsrc-hash=">, 3480 Group<g_flags_Group>, Flags<[CC1Option, NoDriverOption]>, 3481 Values<"md5,sha1,sha256">, 3482 NormalizedValues<["DSH_MD5", "DSH_SHA1", "DSH_SHA256"]>, 3483 NormalizedValuesScope<"CodeGenOptions">, 3484 MarshallingInfoEnum<CodeGenOpts<"DebugSrcHash">, "DSH_MD5">; 3485def gno_simple_template_names : Flag<["-"], "gno-simple-template-names">, 3486 Group<g_flags_Group>; 3487def ggnu_pubnames : Flag<["-"], "ggnu-pubnames">, Group<g_flags_Group>, Flags<[CC1Option]>; 3488def gno_gnu_pubnames : Flag<["-"], "gno-gnu-pubnames">, Group<g_flags_Group>; 3489def gpubnames : Flag<["-"], "gpubnames">, Group<g_flags_Group>, Flags<[CC1Option]>; 3490def gno_pubnames : Flag<["-"], "gno-pubnames">, Group<g_flags_Group>; 3491def gdwarf_aranges : Flag<["-"], "gdwarf-aranges">, Group<g_flags_Group>; 3492def gmodules : Flag <["-"], "gmodules">, Group<gN_Group>, 3493 HelpText<"Generate debug info with external references to clang modules" 3494 " or precompiled headers">; 3495def gno_modules : Flag <["-"], "gno-modules">, Group<g_flags_Group>; 3496def gz_EQ : Joined<["-"], "gz=">, Group<g_flags_Group>, 3497 HelpText<"DWARF debug sections compression type">; 3498def gz : Flag<["-"], "gz">, Alias<gz_EQ>, AliasArgs<["zlib"]>, Group<g_flags_Group>; 3499def gembed_source : Flag<["-"], "gembed-source">, Group<g_flags_Group>, Flags<[CC1Option]>, 3500 HelpText<"Embed source text in DWARF debug sections">, 3501 MarshallingInfoFlag<CodeGenOpts<"EmbedSource">>; 3502def gno_embed_source : Flag<["-"], "gno-embed-source">, Group<g_flags_Group>, 3503 Flags<[NoXarchOption]>, 3504 HelpText<"Restore the default behavior of not embedding source text in DWARF debug sections">; 3505def headerpad__max__install__names : Joined<["-"], "headerpad_max_install_names">; 3506def help : Flag<["-", "--"], "help">, Flags<[CC1Option,CC1AsOption, FC1Option, 3507 FlangOption]>, HelpText<"Display available options">, 3508 MarshallingInfoFlag<FrontendOpts<"ShowHelp">>; 3509def ibuiltininc : Flag<["-"], "ibuiltininc">, Group<clang_i_Group>, 3510 HelpText<"Enable builtin #include directories even when -nostdinc is used " 3511 "before or after -ibuiltininc. " 3512 "Using -nobuiltininc after the option disables it">; 3513def index_header_map : Flag<["-"], "index-header-map">, Flags<[CC1Option]>, 3514 HelpText<"Make the next included directory (-I or -F) an indexer header map">; 3515def idirafter : JoinedOrSeparate<["-"], "idirafter">, Group<clang_i_Group>, Flags<[CC1Option]>, 3516 HelpText<"Add directory to AFTER include search path">; 3517def iframework : JoinedOrSeparate<["-"], "iframework">, Group<clang_i_Group>, Flags<[CC1Option]>, 3518 HelpText<"Add directory to SYSTEM framework search path">; 3519def iframeworkwithsysroot : JoinedOrSeparate<["-"], "iframeworkwithsysroot">, 3520 Group<clang_i_Group>, 3521 HelpText<"Add directory to SYSTEM framework search path, " 3522 "absolute paths are relative to -isysroot">, 3523 MetaVarName<"<directory>">, Flags<[CC1Option]>; 3524def imacros : JoinedOrSeparate<["-", "--"], "imacros">, Group<clang_i_Group>, Flags<[CC1Option]>, 3525 HelpText<"Include macros from file before parsing">, MetaVarName<"<file>">, 3526 MarshallingInfoStringVector<PreprocessorOpts<"MacroIncludes">>; 3527def image__base : Separate<["-"], "image_base">; 3528def include_ : JoinedOrSeparate<["-", "--"], "include">, Group<clang_i_Group>, EnumName<"include">, 3529 MetaVarName<"<file>">, HelpText<"Include file before parsing">, Flags<[CC1Option]>; 3530def include_pch : Separate<["-"], "include-pch">, Group<clang_i_Group>, Flags<[CC1Option]>, 3531 HelpText<"Include precompiled header file">, MetaVarName<"<file>">, 3532 MarshallingInfoString<PreprocessorOpts<"ImplicitPCHInclude">>; 3533def relocatable_pch : Flag<["-", "--"], "relocatable-pch">, Flags<[CC1Option]>, 3534 HelpText<"Whether to build a relocatable precompiled header">, 3535 MarshallingInfoFlag<FrontendOpts<"RelocatablePCH">>; 3536def verify_pch : Flag<["-"], "verify-pch">, Group<Action_Group>, Flags<[CC1Option]>, 3537 HelpText<"Load and verify that a pre-compiled header file is not stale">; 3538def init : Separate<["-"], "init">; 3539def install__name : Separate<["-"], "install_name">; 3540def iprefix : JoinedOrSeparate<["-"], "iprefix">, Group<clang_i_Group>, Flags<[CC1Option]>, 3541 HelpText<"Set the -iwithprefix/-iwithprefixbefore prefix">, MetaVarName<"<dir>">; 3542def iquote : JoinedOrSeparate<["-"], "iquote">, Group<clang_i_Group>, Flags<[CC1Option]>, 3543 HelpText<"Add directory to QUOTE include search path">, MetaVarName<"<directory>">; 3544def isysroot : JoinedOrSeparate<["-"], "isysroot">, Group<clang_i_Group>, Flags<[CC1Option]>, 3545 HelpText<"Set the system root directory (usually /)">, MetaVarName<"<dir>">, 3546 MarshallingInfoString<HeaderSearchOpts<"Sysroot">, [{"/"}]>; 3547def isystem : JoinedOrSeparate<["-"], "isystem">, Group<clang_i_Group>, 3548 Flags<[CC1Option]>, 3549 HelpText<"Add directory to SYSTEM include search path">, MetaVarName<"<directory>">; 3550def isystem_after : JoinedOrSeparate<["-"], "isystem-after">, 3551 Group<clang_i_Group>, Flags<[NoXarchOption]>, MetaVarName<"<directory>">, 3552 HelpText<"Add directory to end of the SYSTEM include search path">; 3553def iwithprefixbefore : JoinedOrSeparate<["-"], "iwithprefixbefore">, Group<clang_i_Group>, 3554 HelpText<"Set directory to include search path with prefix">, MetaVarName<"<dir>">, 3555 Flags<[CC1Option]>; 3556def iwithprefix : JoinedOrSeparate<["-"], "iwithprefix">, Group<clang_i_Group>, Flags<[CC1Option]>, 3557 HelpText<"Set directory to SYSTEM include search path with prefix">, MetaVarName<"<dir>">; 3558def iwithsysroot : JoinedOrSeparate<["-"], "iwithsysroot">, Group<clang_i_Group>, 3559 HelpText<"Add directory to SYSTEM include search path, " 3560 "absolute paths are relative to -isysroot">, MetaVarName<"<directory>">, 3561 Flags<[CC1Option]>; 3562def ivfsoverlay : JoinedOrSeparate<["-"], "ivfsoverlay">, Group<clang_i_Group>, Flags<[CC1Option]>, 3563 HelpText<"Overlay the virtual filesystem described by file over the real file system">; 3564def vfsoverlay : JoinedOrSeparate<["-", "--"], "vfsoverlay">, Flags<[CC1Option, CoreOption]>, 3565 HelpText<"Overlay the virtual filesystem described by file over the real file system. " 3566 "Additionally, pass this overlay file to the linker if it supports it">; 3567def imultilib : Separate<["-"], "imultilib">, Group<gfortran_Group>; 3568def K : Flag<["-"], "K">, Flags<[LinkerInput]>; 3569def keep__private__externs : Flag<["-"], "keep_private_externs">; 3570def l : JoinedOrSeparate<["-"], "l">, Flags<[LinkerInput, RenderJoined]>, 3571 Group<Link_Group>; 3572def lazy__framework : Separate<["-"], "lazy_framework">, Flags<[LinkerInput]>; 3573def lazy__library : Separate<["-"], "lazy_library">, Flags<[LinkerInput]>; 3574def mlittle_endian : Flag<["-"], "mlittle-endian">, Group<m_Group>, Flags<[NoXarchOption,TargetSpecific]>; 3575def EL : Flag<["-"], "EL">, Alias<mlittle_endian>; 3576def mbig_endian : Flag<["-"], "mbig-endian">, Group<m_Group>, Flags<[NoXarchOption,TargetSpecific]>; 3577def EB : Flag<["-"], "EB">, Alias<mbig_endian>; 3578def m16 : Flag<["-"], "m16">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>; 3579def m32 : Flag<["-"], "m32">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>; 3580def maix32 : Flag<["-"], "maix32">, Group<m_Group>, Flags<[NoXarchOption]>; 3581def mqdsp6_compat : Flag<["-"], "mqdsp6-compat">, Group<m_Group>, Flags<[NoXarchOption,CC1Option]>, 3582 HelpText<"Enable hexagon-qdsp6 backward compatibility">, 3583 MarshallingInfoFlag<LangOpts<"HexagonQdsp6Compat">>; 3584def m64 : Flag<["-"], "m64">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>; 3585def maix64 : Flag<["-"], "maix64">, Group<m_Group>, Flags<[NoXarchOption]>; 3586def mx32 : Flag<["-"], "mx32">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>; 3587def miamcu : Flag<["-"], "miamcu">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>, 3588 HelpText<"Use Intel MCU ABI">; 3589def mno_iamcu : Flag<["-"], "mno-iamcu">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>; 3590def malign_functions_EQ : Joined<["-"], "malign-functions=">, Group<clang_ignored_m_Group>; 3591def malign_loops_EQ : Joined<["-"], "malign-loops=">, Group<clang_ignored_m_Group>; 3592def malign_jumps_EQ : Joined<["-"], "malign-jumps=">, Group<clang_ignored_m_Group>; 3593 3594let Flags = [TargetSpecific] in { 3595def mabi_EQ : Joined<["-"], "mabi=">, Group<m_Group>; 3596def malign_branch_EQ : CommaJoined<["-"], "malign-branch=">, Group<m_Group>, 3597 HelpText<"Specify types of branches to align">; 3598def malign_branch_boundary_EQ : Joined<["-"], "malign-branch-boundary=">, Group<m_Group>, 3599 HelpText<"Specify the boundary's size to align branches">; 3600def mpad_max_prefix_size_EQ : Joined<["-"], "mpad-max-prefix-size=">, Group<m_Group>, 3601 HelpText<"Specify maximum number of prefixes to use for padding">; 3602def mbranches_within_32B_boundaries : Flag<["-"], "mbranches-within-32B-boundaries">, Group<m_Group>, 3603 HelpText<"Align selected branches (fused, jcc, jmp) within 32-byte boundary">; 3604def mfancy_math_387 : Flag<["-"], "mfancy-math-387">, Group<clang_ignored_m_Group>; 3605def mlong_calls : Flag<["-"], "mlong-calls">, Group<m_Group>, 3606 HelpText<"Generate branches with extended addressability, usually via indirect jumps.">; 3607} // let Flags = [TargetSpecific] 3608def mdouble_EQ : Joined<["-"], "mdouble=">, Group<m_Group>, 3609 MetaVarName<"<n">, Values<"32,64">, Flags<[CC1Option]>, 3610 HelpText<"Force double to be <n> bits">, 3611 MarshallingInfoInt<LangOpts<"DoubleSize">, "0">; 3612def mlong_double_64 : Flag<["-"], "mlong-double-64">, Group<LongDouble_Group>, Flags<[CC1Option]>, 3613 HelpText<"Force long double to be 64 bits">; 3614def mlong_double_80 : Flag<["-"], "mlong-double-80">, Group<LongDouble_Group>, Flags<[CC1Option]>, 3615 HelpText<"Force long double to be 80 bits, padded to 128 bits for storage">; 3616def mlong_double_128 : Flag<["-"], "mlong-double-128">, Group<LongDouble_Group>, Flags<[CC1Option]>, 3617 HelpText<"Force long double to be 128 bits">; 3618let Flags = [TargetSpecific] in { 3619def mno_long_calls : Flag<["-"], "mno-long-calls">, Group<m_Group>, 3620 HelpText<"Restore the default behaviour of not generating long calls">; 3621} // let Flags = [TargetSpecific] 3622def mexecute_only : Flag<["-"], "mexecute-only">, Group<m_arm_Features_Group>, 3623 HelpText<"Disallow generation of data access to code sections (ARM only)">; 3624def mno_execute_only : Flag<["-"], "mno-execute-only">, Group<m_arm_Features_Group>, 3625 HelpText<"Allow generation of data access to code sections (ARM only)">; 3626let Flags = [TargetSpecific] in { 3627def mtp_mode_EQ : Joined<["-"], "mtp=">, Group<m_arm_Features_Group>, Values<"soft,cp15,tpidrurw,tpidruro,tpidrprw,el0,el1,el2,el3,tpidr_el0,tpidr_el1,tpidr_el2,tpidr_el3,tpidrro_el0">, 3628 HelpText<"Thread pointer access method. " 3629 "For AArch32: 'soft' uses a function call, or 'tpidrurw', 'tpidruro' or 'tpidrprw' use the three CP15 registers. 'cp15' is an alias for 'tpidruro'. " 3630 "For AArch64: 'tpidr_el0', 'tpidr_el1', 'tpidr_el2', 'tpidr_el3' or 'tpidrro_el0' use the five system registers. 'elN' is an alias for 'tpidr_elN'.">; 3631def mpure_code : Flag<["-"], "mpure-code">, Alias<mexecute_only>; // Alias for GCC compatibility 3632def mno_pure_code : Flag<["-"], "mno-pure-code">, Alias<mno_execute_only>; 3633def mtvos_version_min_EQ : Joined<["-"], "mtvos-version-min=">, Group<m_Group>; 3634def mappletvos_version_min_EQ : Joined<["-"], "mappletvos-version-min=">, Alias<mtvos_version_min_EQ>; 3635def mtvos_simulator_version_min_EQ : Joined<["-"], "mtvos-simulator-version-min=">; 3636def mappletvsimulator_version_min_EQ : Joined<["-"], "mappletvsimulator-version-min=">, Alias<mtvos_simulator_version_min_EQ>; 3637def mwatchos_version_min_EQ : Joined<["-"], "mwatchos-version-min=">, Group<m_Group>; 3638def mwatchos_simulator_version_min_EQ : Joined<["-"], "mwatchos-simulator-version-min=">, Group<m_Group>; 3639def mwatchsimulator_version_min_EQ : Joined<["-"], "mwatchsimulator-version-min=">, Alias<mwatchos_simulator_version_min_EQ>; 3640} // let Flags = [TargetSpecific] 3641def march_EQ : Joined<["-"], "march=">, Group<m_Group>, Flags<[CoreOption,TargetSpecific]>, 3642 HelpText<"For a list of available architectures for the target use '-mcpu=help'">; 3643def masm_EQ : Joined<["-"], "masm=">, Group<m_Group>, Flags<[NoXarchOption]>; 3644def inline_asm_EQ : Joined<["-"], "inline-asm=">, Group<m_Group>, Flags<[CC1Option]>, 3645 Values<"att,intel">, 3646 NormalizedValuesScope<"CodeGenOptions">, NormalizedValues<["IAD_ATT", "IAD_Intel"]>, 3647 MarshallingInfoEnum<CodeGenOpts<"InlineAsmDialect">, "IAD_ATT">; 3648def mcmodel_EQ : Joined<["-"], "mcmodel=">, Group<m_Group>, Flags<[CC1Option]>, 3649 MarshallingInfoString<TargetOpts<"CodeModel">, [{"default"}]>; 3650def mtls_size_EQ : Joined<["-"], "mtls-size=">, Group<m_Group>, Flags<[NoXarchOption, CC1Option]>, 3651 HelpText<"Specify bit size of immediate TLS offsets (AArch64 ELF only): " 3652 "12 (for 4KB) | 24 (for 16MB, default) | 32 (for 4GB) | 48 (for 256TB, needs -mcmodel=large)">, 3653 MarshallingInfoInt<CodeGenOpts<"TLSSize">>; 3654def mimplicit_it_EQ : Joined<["-"], "mimplicit-it=">, Group<m_Group>; 3655def mdefault_build_attributes : Joined<["-"], "mdefault-build-attributes">, Group<m_Group>; 3656def mno_default_build_attributes : Joined<["-"], "mno-default-build-attributes">, Group<m_Group>; 3657let Flags = [TargetSpecific] in { 3658def mconstant_cfstrings : Flag<["-"], "mconstant-cfstrings">, Group<clang_ignored_m_Group>; 3659def mconsole : Joined<["-"], "mconsole">, Group<m_Group>; 3660def mwindows : Joined<["-"], "mwindows">, Group<m_Group>; 3661def mdll : Joined<["-"], "mdll">, Group<m_Group>; 3662def municode : Joined<["-"], "municode">, Group<m_Group>; 3663def mthreads : Joined<["-"], "mthreads">, Group<m_Group>; 3664def mguard_EQ : Joined<["-"], "mguard=">, Group<m_Group>, 3665 HelpText<"Enable or disable Control Flow Guard checks and guard tables emission">, 3666 Values<"none,cf,cf-nochecks">; 3667def mcpu_EQ : Joined<["-"], "mcpu=">, Group<m_Group>, 3668 HelpText<"For a list of available CPUs for the target use '-mcpu=help'">; 3669def mmcu_EQ : Joined<["-"], "mmcu=">, Group<m_Group>; 3670def msim : Flag<["-"], "msim">, Group<m_Group>; 3671def mdynamic_no_pic : Joined<["-"], "mdynamic-no-pic">, Group<m_Group>; 3672def mfix_and_continue : Flag<["-"], "mfix-and-continue">, Group<clang_ignored_m_Group>; 3673def mieee_fp : Flag<["-"], "mieee-fp">, Group<clang_ignored_m_Group>; 3674def minline_all_stringops : Flag<["-"], "minline-all-stringops">, Group<clang_ignored_m_Group>; 3675def mno_inline_all_stringops : Flag<["-"], "mno-inline-all-stringops">, Group<clang_ignored_m_Group>; 3676} // let Flags = [TargetSpecific] 3677def malign_double : Flag<["-"], "malign-double">, Group<m_Group>, Flags<[CC1Option]>, 3678 HelpText<"Align doubles to two words in structs (x86 only)">, 3679 MarshallingInfoFlag<LangOpts<"AlignDouble">>; 3680let Flags = [TargetSpecific] in { 3681def mfloat_abi_EQ : Joined<["-"], "mfloat-abi=">, Group<m_Group>, Values<"soft,softfp,hard">; 3682def mfpmath_EQ : Joined<["-"], "mfpmath=">, Group<m_Group>; 3683def mfpu_EQ : Joined<["-"], "mfpu=">, Group<m_Group>; 3684def mhwdiv_EQ : Joined<["-"], "mhwdiv=">, Group<m_Group>; 3685def mhwmult_EQ : Joined<["-"], "mhwmult=">, Group<m_Group>; 3686} // let Flags = [TargetSpecific] 3687def mglobal_merge : Flag<["-"], "mglobal-merge">, Group<m_Group>, Flags<[CC1Option]>, 3688 HelpText<"Enable merging of globals">; 3689let Flags = [TargetSpecific] in { 3690def mhard_float : Flag<["-"], "mhard-float">, Group<m_Group>; 3691def mios_version_min_EQ : Joined<["-"], "mios-version-min=">, 3692 Group<m_Group>, HelpText<"Set iOS deployment target">; 3693def : Joined<["-"], "miphoneos-version-min=">, 3694 Group<m_Group>, Alias<mios_version_min_EQ>; 3695def mios_simulator_version_min_EQ : Joined<["-"], "mios-simulator-version-min=">, Group<m_Group>; 3696def : Joined<["-"], "miphonesimulator-version-min=">, Alias<mios_simulator_version_min_EQ>; 3697def mkernel : Flag<["-"], "mkernel">, Group<m_Group>; 3698def mlinker_version_EQ : Joined<["-"], "mlinker-version=">, Group<m_Group>, Flags<[NoXarchOption]>; 3699} // let Flags = [TargetSpecific] 3700def mllvm : Separate<["-"], "mllvm">,Flags<[CC1Option,CC1AsOption,CoreOption,FC1Option,FlangOption]>, 3701 HelpText<"Additional arguments to forward to LLVM's option processing">, 3702 MarshallingInfoStringVector<FrontendOpts<"LLVMArgs">>; 3703def : Joined<["-"], "mllvm=">, Flags<[CoreOption,FlangOption]>, Alias<mllvm>, 3704 HelpText<"Alias for -mllvm">, MetaVarName<"<arg>">; 3705def mmlir : Separate<["-"], "mmlir">, Flags<[CoreOption,FC1Option,FlangOption]>, 3706 HelpText<"Additional arguments to forward to MLIR's option processing">; 3707def ffuchsia_api_level_EQ : Joined<["-"], "ffuchsia-api-level=">, 3708 Group<m_Group>, Flags<[CC1Option]>, HelpText<"Set Fuchsia API level">, 3709 MarshallingInfoInt<LangOpts<"FuchsiaAPILevel">>; 3710def mmacos_version_min_EQ : Joined<["-"], "mmacos-version-min=">, 3711 Group<m_Group>, HelpText<"Set macOS deployment target">; 3712def : Joined<["-"], "mmacosx-version-min=">, 3713 Group<m_Group>, Alias<mmacos_version_min_EQ>; 3714def mms_bitfields : Flag<["-"], "mms-bitfields">, Group<m_Group>, Flags<[CC1Option]>, 3715 HelpText<"Set the default structure layout to be compatible with the Microsoft compiler standard">, 3716 MarshallingInfoFlag<LangOpts<"MSBitfields">>; 3717def moutline : Flag<["-"], "moutline">, Group<f_clang_Group>, Flags<[CC1Option]>, 3718 HelpText<"Enable function outlining (AArch64 only)">; 3719def mno_outline : Flag<["-"], "mno-outline">, Group<f_clang_Group>, Flags<[CC1Option]>, 3720 HelpText<"Disable function outlining (AArch64 only)">; 3721def mno_ms_bitfields : Flag<["-"], "mno-ms-bitfields">, Group<m_Group>, 3722 HelpText<"Do not set the default structure layout to be compatible with the Microsoft compiler standard">; 3723def mskip_rax_setup : Flag<["-"], "mskip-rax-setup">, Group<m_Group>, Flags<[CC1Option]>, 3724 HelpText<"Skip setting up RAX register when passing variable arguments (x86 only)">, 3725 MarshallingInfoFlag<CodeGenOpts<"SkipRaxSetup">>; 3726def mno_skip_rax_setup : Flag<["-"], "mno-skip-rax-setup">, Group<m_Group>, Flags<[CC1Option]>; 3727def mstackrealign : Flag<["-"], "mstackrealign">, Group<m_Group>, Flags<[CC1Option]>, 3728 HelpText<"Force realign the stack at entry to every function">, 3729 MarshallingInfoFlag<CodeGenOpts<"StackRealignment">>; 3730def mstack_alignment : Joined<["-"], "mstack-alignment=">, Group<m_Group>, Flags<[CC1Option]>, 3731 HelpText<"Set the stack alignment">, 3732 MarshallingInfoInt<CodeGenOpts<"StackAlignment">>; 3733def mstack_probe_size : Joined<["-"], "mstack-probe-size=">, Group<m_Group>, Flags<[CC1Option]>, 3734 HelpText<"Set the stack probe size">, 3735 MarshallingInfoInt<CodeGenOpts<"StackProbeSize">, "4096">; 3736def mstack_arg_probe : Flag<["-"], "mstack-arg-probe">, Group<m_Group>, 3737 HelpText<"Enable stack probes">; 3738def mzos_sys_include_EQ : Joined<["-"], "mzos-sys-include=">, MetaVarName<"<SysInclude>">, 3739 HelpText<"Path to system headers on z/OS">; 3740def mno_stack_arg_probe : Flag<["-"], "mno-stack-arg-probe">, Group<m_Group>, Flags<[CC1Option]>, 3741 HelpText<"Disable stack probes which are enabled by default">, 3742 MarshallingInfoFlag<CodeGenOpts<"NoStackArgProbe">>; 3743def mthread_model : Separate<["-"], "mthread-model">, Group<m_Group>, Flags<[CC1Option]>, 3744 HelpText<"The thread model to use. Defaults to 'posix')">, Values<"posix,single">, 3745 NormalizedValues<["POSIX", "Single"]>, NormalizedValuesScope<"LangOptions::ThreadModelKind">, 3746 MarshallingInfoEnum<LangOpts<"ThreadModel">, "POSIX">; 3747def meabi : Separate<["-"], "meabi">, Group<m_Group>, Flags<[CC1Option]>, 3748 HelpText<"Set EABI type. Default depends on triple)">, Values<"default,4,5,gnu">, 3749 MarshallingInfoEnum<TargetOpts<"EABIVersion">, "Default">, 3750 NormalizedValuesScope<"llvm::EABI">, 3751 NormalizedValues<["Default", "EABI4", "EABI5", "GNU"]>; 3752def mtargetos_EQ : Joined<["-"], "mtargetos=">, Group<m_Group>, 3753 HelpText<"Set the deployment target to be the specified OS and OS version">; 3754def mzos_hlq_le_EQ : Joined<["-"], "mzos-hlq-le=">, MetaVarName<"<LeHLQ>">, 3755 HelpText<"High level qualifier for z/OS Language Environment datasets">; 3756def mzos_hlq_clang_EQ : Joined<["-"], "mzos-hlq-clang=">, MetaVarName<"<ClangHLQ>">, 3757 HelpText<"High level qualifier for z/OS C++RT side deck datasets">; 3758def mzos_hlq_csslib_EQ : Joined<["-"], "mzos-hlq-csslib=">, MetaVarName<"<CsslibHLQ>">, 3759 HelpText<"High level qualifier for z/OS CSSLIB dataset">; 3760 3761def mno_constant_cfstrings : Flag<["-"], "mno-constant-cfstrings">, Group<m_Group>; 3762def mno_global_merge : Flag<["-"], "mno-global-merge">, Group<m_Group>, Flags<[CC1Option]>, 3763 HelpText<"Disable merging of globals">; 3764def mno_pascal_strings : Flag<["-"], "mno-pascal-strings">, 3765 Alias<fno_pascal_strings>; 3766def mno_red_zone : Flag<["-"], "mno-red-zone">, Group<m_Group>; 3767def mno_tls_direct_seg_refs : Flag<["-"], "mno-tls-direct-seg-refs">, Group<m_Group>, Flags<[CC1Option]>, 3768 HelpText<"Disable direct TLS access through segment registers">, 3769 MarshallingInfoFlag<CodeGenOpts<"IndirectTlsSegRefs">>; 3770def mno_relax_all : Flag<["-"], "mno-relax-all">, Group<m_Group>; 3771let Flags = [TargetSpecific] in { 3772def mno_rtd: Flag<["-"], "mno-rtd">, Group<m_Group>; 3773def mno_soft_float : Flag<["-"], "mno-soft-float">, Group<m_Group>; 3774def mno_stackrealign : Flag<["-"], "mno-stackrealign">, Group<m_Group>; 3775} // let Flags = [TargetSpecific] 3776 3777def mretpoline : Flag<["-"], "mretpoline">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>; 3778def mno_retpoline : Flag<["-"], "mno-retpoline">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>; 3779defm speculative_load_hardening : BoolOption<"m", "speculative-load-hardening", 3780 CodeGenOpts<"SpeculativeLoadHardening">, DefaultFalse, 3781 PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>, BothFlags<[CoreOption]>>, 3782 Group<m_Group>; 3783def mlvi_hardening : Flag<["-"], "mlvi-hardening">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>, 3784 HelpText<"Enable all mitigations for Load Value Injection (LVI)">; 3785def mno_lvi_hardening : Flag<["-"], "mno-lvi-hardening">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>, 3786 HelpText<"Disable mitigations for Load Value Injection (LVI)">; 3787def mlvi_cfi : Flag<["-"], "mlvi-cfi">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>, 3788 HelpText<"Enable only control-flow mitigations for Load Value Injection (LVI)">; 3789def mno_lvi_cfi : Flag<["-"], "mno-lvi-cfi">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>, 3790 HelpText<"Disable control-flow mitigations for Load Value Injection (LVI)">; 3791def m_seses : Flag<["-"], "mseses">, Group<m_Group>, Flags<[CoreOption, NoXarchOption]>, 3792 HelpText<"Enable speculative execution side effect suppression (SESES). " 3793 "Includes LVI control flow integrity mitigations">; 3794def mno_seses : Flag<["-"], "mno-seses">, Group<m_Group>, Flags<[CoreOption, NoXarchOption]>, 3795 HelpText<"Disable speculative execution side effect suppression (SESES)">; 3796 3797def mrelax : Flag<["-"], "mrelax">, Group<m_Group>, 3798 HelpText<"Enable linker relaxation">; 3799def mno_relax : Flag<["-"], "mno-relax">, Group<m_Group>, 3800 HelpText<"Disable linker relaxation">; 3801def msmall_data_limit_EQ : Joined<["-"], "msmall-data-limit=">, Group<m_Group>, 3802 Alias<G>, 3803 HelpText<"Put global and static data smaller than the limit into a special section">; 3804let Flags = [TargetSpecific] in { 3805def msave_restore : Flag<["-"], "msave-restore">, Group<m_riscv_Features_Group>, 3806 HelpText<"Enable using library calls for save and restore">; 3807def mno_save_restore : Flag<["-"], "mno-save-restore">, Group<m_riscv_Features_Group>, 3808 HelpText<"Disable using library calls for save and restore">; 3809} // let Flags = [TargetSpecific] 3810def mcmodel_EQ_medlow : Flag<["-"], "mcmodel=medlow">, Group<m_Group>, 3811 Flags<[CC1Option]>, Alias<mcmodel_EQ>, AliasArgs<["small"]>, 3812 HelpText<"Equivalent to -mcmodel=small, compatible with RISC-V gcc.">; 3813def mcmodel_EQ_medany : Flag<["-"], "mcmodel=medany">, Group<m_Group>, 3814 Flags<[CC1Option]>, Alias<mcmodel_EQ>, AliasArgs<["medium"]>, 3815 HelpText<"Equivalent to -mcmodel=medium, compatible with RISC-V gcc.">; 3816let Flags = [TargetSpecific] in { 3817def menable_experimental_extensions : Flag<["-"], "menable-experimental-extensions">, Group<m_Group>, 3818 HelpText<"Enable use of experimental RISC-V extensions.">; 3819def mrvv_vector_bits_EQ : Joined<["-"], "mrvv-vector-bits=">, Group<m_Group>, 3820 HelpText<"Specify the size in bits of an RVV vector register. Defaults to " 3821 "the vector length agnostic value of \"scalable\". Accepts power of " 3822 "2 values between 64 and 65536. Also accepts \"zvl\" " 3823 "to use the value implied by -march/-mcpu. Value will be reflected " 3824 "in __riscv_v_fixed_vlen preprocessor define (RISC-V only)">; 3825 3826def munaligned_access : Flag<["-"], "munaligned-access">, Group<m_Group>, 3827 HelpText<"Allow memory accesses to be unaligned (AArch32/AArch64/LoongArch only)">; 3828def mno_unaligned_access : Flag<["-"], "mno-unaligned-access">, Group<m_Group>, 3829 HelpText<"Force all memory accesses to be aligned (AArch32/AArch64/LoongArch only)">; 3830} // let Flags = [TargetSpecific] 3831def mstrict_align : Flag<["-"], "mstrict-align">, Alias<mno_unaligned_access>, Flags<[CC1Option,HelpHidden]>, 3832 HelpText<"Force all memory accesses to be aligned (same as mno-unaligned-access)">; 3833def mno_strict_align : Flag<["-"], "mno-strict-align">, Alias<munaligned_access>, Flags<[CC1Option,HelpHidden]>, 3834 HelpText<"Allow memory accesses to be unaligned (same as munaligned-access)">; 3835let Flags = [TargetSpecific] in { 3836def mno_thumb : Flag<["-"], "mno-thumb">, Group<m_arm_Features_Group>; 3837def mrestrict_it: Flag<["-"], "mrestrict-it">, Group<m_arm_Features_Group>, 3838 HelpText<"Disallow generation of complex IT blocks. It is off by default.">; 3839def mno_restrict_it: Flag<["-"], "mno-restrict-it">, Group<m_arm_Features_Group>, 3840 HelpText<"Allow generation of complex IT blocks.">; 3841def marm : Flag<["-"], "marm">, Alias<mno_thumb>; 3842def ffixed_r9 : Flag<["-"], "ffixed-r9">, Group<m_arm_Features_Group>, 3843 HelpText<"Reserve the r9 register (ARM only)">; 3844def mno_movt : Flag<["-"], "mno-movt">, Group<m_arm_Features_Group>, 3845 HelpText<"Disallow use of movt/movw pairs (ARM only)">; 3846def mcrc : Flag<["-"], "mcrc">, Group<m_Group>, 3847 HelpText<"Allow use of CRC instructions (ARM/Mips only)">; 3848def mnocrc : Flag<["-"], "mnocrc">, Group<m_arm_Features_Group>, 3849 HelpText<"Disallow use of CRC instructions (ARM only)">; 3850def mno_neg_immediates: Flag<["-"], "mno-neg-immediates">, Group<m_arm_Features_Group>, 3851 HelpText<"Disallow converting instructions with negative immediates to their negation or inversion.">; 3852} // let Flags = [TargetSpecific] 3853def mcmse : Flag<["-"], "mcmse">, Group<m_arm_Features_Group>, 3854 Flags<[NoXarchOption,CC1Option]>, 3855 HelpText<"Allow use of CMSE (Armv8-M Security Extensions)">, 3856 MarshallingInfoFlag<LangOpts<"Cmse">>; 3857def ForceAAPCSBitfieldLoad : Flag<["-"], "faapcs-bitfield-load">, Group<m_arm_Features_Group>, 3858 Flags<[NoXarchOption,CC1Option]>, 3859 HelpText<"Follows the AAPCS standard that all volatile bit-field write generates at least one load. (ARM only).">, 3860 MarshallingInfoFlag<CodeGenOpts<"ForceAAPCSBitfieldLoad">>; 3861defm aapcs_bitfield_width : BoolOption<"f", "aapcs-bitfield-width", 3862 CodeGenOpts<"AAPCSBitfieldWidth">, DefaultTrue, 3863 NegFlag<SetFalse, [], "Do not follow">, PosFlag<SetTrue, [], "Follow">, 3864 BothFlags<[NoXarchOption, CC1Option], " the AAPCS standard requirement stating that" 3865 " volatile bit-field width is dictated by the field container type. (ARM only).">>, 3866 Group<m_arm_Features_Group>; 3867let Flags = [TargetSpecific] in { 3868def mframe_chain : Joined<["-"], "mframe-chain=">, 3869 Group<m_arm_Features_Group>, Values<"none,aapcs,aapcs+leaf">, 3870 HelpText<"Select the frame chain model used to emit frame records (Arm only).">; 3871def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group<m_Group>, 3872 HelpText<"Generate code which only uses the general purpose registers (AArch64/x86 only)">; 3873def mfix_cmse_cve_2021_35465 : Flag<["-"], "mfix-cmse-cve-2021-35465">, 3874 Group<m_arm_Features_Group>, 3875 HelpText<"Work around VLLDM erratum CVE-2021-35465 (ARM only)">; 3876def mno_fix_cmse_cve_2021_35465 : Flag<["-"], "mno-fix-cmse-cve-2021-35465">, 3877 Group<m_arm_Features_Group>, 3878 HelpText<"Don't work around VLLDM erratum CVE-2021-35465 (ARM only)">; 3879def mfix_cortex_a57_aes_1742098 : Flag<["-"], "mfix-cortex-a57-aes-1742098">, 3880 Group<m_arm_Features_Group>, 3881 HelpText<"Work around Cortex-A57 Erratum 1742098 (ARM only)">; 3882def mno_fix_cortex_a57_aes_1742098 : Flag<["-"], "mno-fix-cortex-a57-aes-1742098">, 3883 Group<m_arm_Features_Group>, 3884 HelpText<"Don't work around Cortex-A57 Erratum 1742098 (ARM only)">; 3885def mfix_cortex_a72_aes_1655431 : Flag<["-"], "mfix-cortex-a72-aes-1655431">, 3886 Group<m_arm_Features_Group>, 3887 HelpText<"Work around Cortex-A72 Erratum 1655431 (ARM only)">, 3888 Alias<mfix_cortex_a57_aes_1742098>; 3889def mno_fix_cortex_a72_aes_1655431 : Flag<["-"], "mno-fix-cortex-a72-aes-1655431">, 3890 Group<m_arm_Features_Group>, 3891 HelpText<"Don't work around Cortex-A72 Erratum 1655431 (ARM only)">, 3892 Alias<mno_fix_cortex_a57_aes_1742098>; 3893def mfix_cortex_a53_835769 : Flag<["-"], "mfix-cortex-a53-835769">, 3894 Group<m_aarch64_Features_Group>, 3895 HelpText<"Workaround Cortex-A53 erratum 835769 (AArch64 only)">; 3896def mno_fix_cortex_a53_835769 : Flag<["-"], "mno-fix-cortex-a53-835769">, 3897 Group<m_aarch64_Features_Group>, 3898 HelpText<"Don't workaround Cortex-A53 erratum 835769 (AArch64 only)">; 3899def mmark_bti_property : Flag<["-"], "mmark-bti-property">, 3900 Group<m_aarch64_Features_Group>, 3901 HelpText<"Add .note.gnu.property with BTI to assembly files (AArch64 only)">; 3902def mno_bti_at_return_twice : Flag<["-"], "mno-bti-at-return-twice">, 3903 Group<m_arm_Features_Group>, 3904 HelpText<"Do not add a BTI instruction after a setjmp or other" 3905 " return-twice construct (Arm/AArch64 only)">; 3906 3907foreach i = {1-31} in 3908 def ffixed_x#i : Flag<["-"], "ffixed-x"#i>, Group<m_Group>, 3909 HelpText<"Reserve the x"#i#" register (AArch64/RISC-V only)">; 3910 3911foreach i = {8-15,18} in 3912 def fcall_saved_x#i : Flag<["-"], "fcall-saved-x"#i>, Group<m_aarch64_Features_Group>, 3913 HelpText<"Make the x"#i#" register call-saved (AArch64 only)">; 3914 3915def msve_vector_bits_EQ : Joined<["-"], "msve-vector-bits=">, Group<m_aarch64_Features_Group>, 3916 HelpText<"Specify the size in bits of an SVE vector register. Defaults to the" 3917 " vector length agnostic value of \"scalable\". (AArch64 only)">; 3918} // let Flags = [TargetSpecific] 3919 3920def mvscale_min_EQ : Joined<["-"], "mvscale-min=">, 3921 Group<m_aarch64_Features_Group>, Flags<[NoXarchOption,CC1Option]>, 3922 HelpText<"Specify the vscale minimum. Defaults to \"1\". (AArch64/RISC-V only)">, 3923 MarshallingInfoInt<LangOpts<"VScaleMin">>; 3924def mvscale_max_EQ : Joined<["-"], "mvscale-max=">, 3925 Group<m_aarch64_Features_Group>, Flags<[NoXarchOption,CC1Option]>, 3926 HelpText<"Specify the vscale maximum. Defaults to the" 3927 " vector length agnostic value of \"0\". (AArch64/RISC-V only)">, 3928 MarshallingInfoInt<LangOpts<"VScaleMax">>; 3929 3930def msign_return_address_EQ : Joined<["-"], "msign-return-address=">, 3931 Flags<[CC1Option]>, Group<m_Group>, Values<"none,all,non-leaf">, 3932 HelpText<"Select return address signing scope">; 3933let Flags = [TargetSpecific] in { 3934def mbranch_protection_EQ : Joined<["-"], "mbranch-protection=">, 3935 Group<m_Group>, 3936 HelpText<"Enforce targets of indirect branches and function returns">; 3937 3938def mharden_sls_EQ : Joined<["-"], "mharden-sls=">, Group<m_Group>, 3939 HelpText<"Select straight-line speculation hardening scope (ARM/AArch64/X86" 3940 " only). <arg> must be: all, none, retbr(ARM/AArch64)," 3941 " blr(ARM/AArch64), comdat(ARM/AArch64), nocomdat(ARM/AArch64)," 3942 " return(X86), indirect-jmp(X86)">; 3943 3944def msimd128 : Flag<["-"], "msimd128">, Group<m_wasm_Features_Group>; 3945def mno_simd128 : Flag<["-"], "mno-simd128">, Group<m_wasm_Features_Group>; 3946def mrelaxed_simd : Flag<["-"], "mrelaxed-simd">, Group<m_wasm_Features_Group>; 3947def mno_relaxed_simd : Flag<["-"], "mno-relaxed-simd">, Group<m_wasm_Features_Group>; 3948def mnontrapping_fptoint : Flag<["-"], "mnontrapping-fptoint">, Group<m_wasm_Features_Group>; 3949def mno_nontrapping_fptoint : Flag<["-"], "mno-nontrapping-fptoint">, Group<m_wasm_Features_Group>; 3950def msign_ext : Flag<["-"], "msign-ext">, Group<m_wasm_Features_Group>; 3951def mno_sign_ext : Flag<["-"], "mno-sign-ext">, Group<m_wasm_Features_Group>; 3952def mexception_handing : Flag<["-"], "mexception-handling">, Group<m_wasm_Features_Group>; 3953def mno_exception_handing : Flag<["-"], "mno-exception-handling">, Group<m_wasm_Features_Group>; 3954def matomics : Flag<["-"], "matomics">, Group<m_wasm_Features_Group>; 3955def mno_atomics : Flag<["-"], "mno-atomics">, Group<m_wasm_Features_Group>; 3956def mbulk_memory : Flag<["-"], "mbulk-memory">, Group<m_wasm_Features_Group>; 3957def mno_bulk_memory : Flag<["-"], "mno-bulk-memory">, Group<m_wasm_Features_Group>; 3958def mmutable_globals : Flag<["-"], "mmutable-globals">, Group<m_wasm_Features_Group>; 3959def mno_mutable_globals : Flag<["-"], "mno-mutable-globals">, Group<m_wasm_Features_Group>; 3960def mmultivalue : Flag<["-"], "mmultivalue">, Group<m_wasm_Features_Group>; 3961def mno_multivalue : Flag<["-"], "mno-multivalue">, Group<m_wasm_Features_Group>; 3962def mtail_call : Flag<["-"], "mtail-call">, Group<m_wasm_Features_Group>; 3963def mno_tail_call : Flag<["-"], "mno-tail-call">, Group<m_wasm_Features_Group>; 3964def mreference_types : Flag<["-"], "mreference-types">, Group<m_wasm_Features_Group>; 3965def mno_reference_types : Flag<["-"], "mno-reference-types">, Group<m_wasm_Features_Group>; 3966def mextended_const : Flag<["-"], "mextended-const">, Group<m_wasm_Features_Group>; 3967def mno_extended_const : Flag<["-"], "mno-extended-const">, Group<m_wasm_Features_Group>; 3968def mexec_model_EQ : Joined<["-"], "mexec-model=">, Group<m_wasm_Features_Driver_Group>, 3969 Values<"command,reactor">, 3970 HelpText<"Execution model (WebAssembly only)">, 3971 DocBrief<"Select between \"command\" and \"reactor\" executable models. " 3972 "Commands have a main-function which scopes the lifetime of the " 3973 "program. Reactors are activated and remain active until " 3974 "explicitly terminated.">; 3975} // let Flags = [TargetSpecific] 3976 3977defm amdgpu_ieee : BoolOption<"m", "amdgpu-ieee", 3978 CodeGenOpts<"EmitIEEENaNCompliantInsts">, DefaultTrue, 3979 PosFlag<SetTrue, [], "Sets the IEEE bit in the expected default floating point " 3980 " mode register. Floating point opcodes that support exception flag " 3981 "gathering quiet and propagate signaling NaN inputs per IEEE 754-2008. " 3982 "This option changes the ABI. (AMDGPU only)">, 3983 NegFlag<SetFalse, [CC1Option]>>, Group<m_Group>; 3984 3985def mcode_object_version_EQ : Joined<["-"], "mcode-object-version=">, Group<m_Group>, 3986 HelpText<"Specify code object ABI version. Defaults to 4. (AMDGPU only)">, 3987 Flags<[CC1Option]>, 3988 Values<"none,2,3,4,5">, 3989 NormalizedValuesScope<"TargetOptions">, 3990 NormalizedValues<["COV_None", "COV_2", "COV_3", "COV_4", "COV_5"]>, 3991 MarshallingInfoEnum<TargetOpts<"CodeObjectVersion">, "COV_4">; 3992 3993defm cumode : SimpleMFlag<"cumode", 3994 "Specify CU wavefront", "Specify WGP wavefront", 3995 " execution mode (AMDGPU only)", m_amdgpu_Features_Group>; 3996defm tgsplit : SimpleMFlag<"tgsplit", "Enable", "Disable", 3997 " threadgroup split execution mode (AMDGPU only)", m_amdgpu_Features_Group>; 3998defm wavefrontsize64 : SimpleMFlag<"wavefrontsize64", 3999 "Specify wavefront size 64", "Specify wavefront size 32", 4000 " mode (AMDGPU only)">; 4001 4002defm unsafe_fp_atomics : BoolOption<"m", "unsafe-fp-atomics", 4003 TargetOpts<"AllowAMDGPUUnsafeFPAtomics">, DefaultFalse, 4004 PosFlag<SetTrue, [CC1Option], "Enable generation of unsafe floating point " 4005 "atomic instructions. May generate more efficient code, but may not " 4006 "respect rounding and denormal modes, and may give incorrect results " 4007 "for certain memory destinations. (AMDGPU only)">, 4008 NegFlag<SetFalse>>, Group<m_Group>; 4009 4010def faltivec : Flag<["-"], "faltivec">, Group<f_Group>, Flags<[NoXarchOption]>; 4011def fno_altivec : Flag<["-"], "fno-altivec">, Group<f_Group>, Flags<[NoXarchOption]>; 4012let Flags = [TargetSpecific] in { 4013def maltivec : Flag<["-"], "maltivec">, Group<m_ppc_Features_Group>, 4014 HelpText<"Enable AltiVec vector initializer syntax">; 4015def mno_altivec : Flag<["-"], "mno-altivec">, Group<m_ppc_Features_Group>; 4016def mpcrel: Flag<["-"], "mpcrel">, Group<m_ppc_Features_Group>; 4017def mno_pcrel: Flag<["-"], "mno-pcrel">, Group<m_ppc_Features_Group>; 4018def mprefixed: Flag<["-"], "mprefixed">, Group<m_ppc_Features_Group>; 4019def mno_prefixed: Flag<["-"], "mno-prefixed">, Group<m_ppc_Features_Group>; 4020def mspe : Flag<["-"], "mspe">, Group<m_ppc_Features_Group>; 4021def mno_spe : Flag<["-"], "mno-spe">, Group<m_ppc_Features_Group>; 4022def mefpu2 : Flag<["-"], "mefpu2">, Group<m_ppc_Features_Group>; 4023} // let Flags = [TargetSpecific] 4024def mabi_EQ_quadword_atomics : Flag<["-"], "mabi=quadword-atomics">, 4025 Group<m_Group>, Flags<[CC1Option]>, 4026 HelpText<"Enable quadword atomics ABI on AIX (AIX PPC64 only). Uses lqarx/stqcx. instructions.">, 4027 MarshallingInfoFlag<LangOpts<"EnableAIXQuadwordAtomicsABI">>; 4028let Flags = [TargetSpecific] in { 4029def mvsx : Flag<["-"], "mvsx">, Group<m_ppc_Features_Group>; 4030def mno_vsx : Flag<["-"], "mno-vsx">, Group<m_ppc_Features_Group>; 4031def msecure_plt : Flag<["-"], "msecure-plt">, Group<m_ppc_Features_Group>; 4032def mpower8_vector : Flag<["-"], "mpower8-vector">, 4033 Group<m_ppc_Features_Group>; 4034def mno_power8_vector : Flag<["-"], "mno-power8-vector">, 4035 Group<m_ppc_Features_Group>; 4036def mpower9_vector : Flag<["-"], "mpower9-vector">, 4037 Group<m_ppc_Features_Group>; 4038def mno_power9_vector : Flag<["-"], "mno-power9-vector">, 4039 Group<m_ppc_Features_Group>; 4040def mpower10_vector : Flag<["-"], "mpower10-vector">, 4041 Group<m_ppc_Features_Group>; 4042def mno_power10_vector : Flag<["-"], "mno-power10-vector">, 4043 Group<m_ppc_Features_Group>; 4044def mpower8_crypto : Flag<["-"], "mcrypto">, 4045 Group<m_ppc_Features_Group>; 4046def mnopower8_crypto : Flag<["-"], "mno-crypto">, 4047 Group<m_ppc_Features_Group>; 4048def mdirect_move : Flag<["-"], "mdirect-move">, 4049 Group<m_ppc_Features_Group>; 4050def mnodirect_move : Flag<["-"], "mno-direct-move">, 4051 Group<m_ppc_Features_Group>; 4052def mpaired_vector_memops: Flag<["-"], "mpaired-vector-memops">, 4053 Group<m_ppc_Features_Group>; 4054def mnopaired_vector_memops: Flag<["-"], "mno-paired-vector-memops">, 4055 Group<m_ppc_Features_Group>; 4056def mhtm : Flag<["-"], "mhtm">, Group<m_ppc_Features_Group>; 4057def mno_htm : Flag<["-"], "mno-htm">, Group<m_ppc_Features_Group>; 4058def mfprnd : Flag<["-"], "mfprnd">, Group<m_ppc_Features_Group>; 4059def mno_fprnd : Flag<["-"], "mno-fprnd">, Group<m_ppc_Features_Group>; 4060def mcmpb : Flag<["-"], "mcmpb">, Group<m_ppc_Features_Group>; 4061def mno_cmpb : Flag<["-"], "mno-cmpb">, Group<m_ppc_Features_Group>; 4062def misel : Flag<["-"], "misel">, Group<m_ppc_Features_Group>; 4063def mno_isel : Flag<["-"], "mno-isel">, Group<m_ppc_Features_Group>; 4064def mmfocrf : Flag<["-"], "mmfocrf">, Group<m_ppc_Features_Group>; 4065def mmfcrf : Flag<["-"], "mmfcrf">, Alias<mmfocrf>; 4066def mno_mfocrf : Flag<["-"], "mno-mfocrf">, Group<m_ppc_Features_Group>; 4067def mno_mfcrf : Flag<["-"], "mno-mfcrf">, Alias<mno_mfocrf>; 4068def mpopcntd : Flag<["-"], "mpopcntd">, Group<m_ppc_Features_Group>; 4069def mno_popcntd : Flag<["-"], "mno-popcntd">, Group<m_ppc_Features_Group>; 4070def mcrbits : Flag<["-"], "mcrbits">, Group<m_ppc_Features_Group>, 4071 HelpText<"Control the CR-bit tracking feature on PowerPC. ``-mcrbits`` " 4072 "(the enablement of CR-bit tracking support) is the default for " 4073 "POWER8 and above, as well as for all other CPUs when " 4074 "optimization is applied (-O2 and above).">; 4075def mno_crbits : Flag<["-"], "mno-crbits">, Group<m_ppc_Features_Group>; 4076def minvariant_function_descriptors : 4077 Flag<["-"], "minvariant-function-descriptors">, Group<m_ppc_Features_Group>; 4078def mno_invariant_function_descriptors : 4079 Flag<["-"], "mno-invariant-function-descriptors">, 4080 Group<m_ppc_Features_Group>; 4081def mfloat128: Flag<["-"], "mfloat128">, 4082 Group<m_ppc_Features_Group>; 4083def mno_float128 : Flag<["-"], "mno-float128">, 4084 Group<m_ppc_Features_Group>; 4085def mlongcall: Flag<["-"], "mlongcall">, 4086 Group<m_ppc_Features_Group>; 4087def mno_longcall : Flag<["-"], "mno-longcall">, 4088 Group<m_ppc_Features_Group>; 4089def mmma: Flag<["-"], "mmma">, Group<m_ppc_Features_Group>; 4090def mno_mma: Flag<["-"], "mno-mma">, Group<m_ppc_Features_Group>; 4091def mrop_protect : Flag<["-"], "mrop-protect">, 4092 Group<m_ppc_Features_Group>; 4093def mprivileged : Flag<["-"], "mprivileged">, 4094 Group<m_ppc_Features_Group>; 4095} // let Flags = [TargetSpecific] 4096def maix_struct_return : Flag<["-"], "maix-struct-return">, 4097 Group<m_Group>, Flags<[CC1Option]>, 4098 HelpText<"Return all structs in memory (PPC32 only)">, 4099 DocBrief<"Override the default ABI for 32-bit targets to return all " 4100 "structs in memory, as in the Power 32-bit ABI for Linux (2011), " 4101 "and on AIX and Darwin.">; 4102def msvr4_struct_return : Flag<["-"], "msvr4-struct-return">, 4103 Group<m_Group>, Flags<[CC1Option]>, 4104 HelpText<"Return small structs in registers (PPC32 only)">, 4105 DocBrief<"Override the default ABI for 32-bit targets to return small " 4106 "structs in registers, as in the System V ABI (1995).">; 4107def mxcoff_roptr : Flag<["-"], "mxcoff-roptr">, Group<m_Group>, Flags<[CC1Option,TargetSpecific]>, 4108 HelpText<"Place constant objects with relocatable address values in the RO data section and add -bforceimprw to the linker flags (AIX only)">; 4109def mno_xcoff_roptr : Flag<["-"], "mno-xcoff-roptr">, Group<m_Group>, TargetSpecific; 4110 4111let Flags = [TargetSpecific] in { 4112def mvx : Flag<["-"], "mvx">, Group<m_Group>; 4113def mno_vx : Flag<["-"], "mno-vx">, Group<m_Group>; 4114} // let Flags = [TargetSpecific] 4115 4116defm zvector : BoolFOption<"zvector", 4117 LangOpts<"ZVector">, DefaultFalse, 4118 PosFlag<SetTrue, [CC1Option], "Enable System z vector language extension">, 4119 NegFlag<SetFalse>>; 4120def mzvector : Flag<["-"], "mzvector">, Alias<fzvector>; 4121def mno_zvector : Flag<["-"], "mno-zvector">, Alias<fno_zvector>; 4122 4123def mxcoff_build_id_EQ : Joined<["-"], "mxcoff-build-id=">, Group<Link_Group>, MetaVarName<"<0xHEXSTRING>">, 4124 HelpText<"On AIX, request creation of a build-id string, \"0xHEXSTRING\", in the string table of the loader section inside the linked binary">; 4125def mignore_xcoff_visibility : Flag<["-"], "mignore-xcoff-visibility">, Group<m_Group>, 4126HelpText<"Not emit the visibility attribute for asm in AIX OS or give all symbols 'unspecified' visibility in XCOFF object file">, 4127 Flags<[CC1Option,TargetSpecific]>; 4128defm backchain : BoolOption<"m", "backchain", 4129 CodeGenOpts<"Backchain">, DefaultFalse, 4130 PosFlag<SetTrue, [], "Link stack frames through backchain on System Z">, 4131 NegFlag<SetFalse>, BothFlags<[NoXarchOption,CC1Option]>>, Group<m_Group>; 4132 4133def mno_warn_nonportable_cfstrings : Flag<["-"], "mno-warn-nonportable-cfstrings">, Group<m_Group>; 4134def mno_omit_leaf_frame_pointer : Flag<["-"], "mno-omit-leaf-frame-pointer">, Group<m_Group>; 4135def momit_leaf_frame_pointer : Flag<["-"], "momit-leaf-frame-pointer">, Group<m_Group>, 4136 HelpText<"Omit frame pointer setup for leaf functions">; 4137def moslib_EQ : Joined<["-"], "moslib=">, Group<m_Group>; 4138def mpascal_strings : Flag<["-"], "mpascal-strings">, Alias<fpascal_strings>; 4139def mred_zone : Flag<["-"], "mred-zone">, Group<m_Group>; 4140def mtls_direct_seg_refs : Flag<["-"], "mtls-direct-seg-refs">, Group<m_Group>, 4141 HelpText<"Enable direct TLS access through segment registers (default)">; 4142def mregparm_EQ : Joined<["-"], "mregparm=">, Group<m_Group>; 4143def mrelax_all : Flag<["-"], "mrelax-all">, Group<m_Group>, Flags<[CC1Option,CC1AsOption]>, 4144 HelpText<"(integrated-as) Relax all machine instructions">, 4145 MarshallingInfoFlag<CodeGenOpts<"RelaxAll">>; 4146def mincremental_linker_compatible : Flag<["-"], "mincremental-linker-compatible">, Group<m_Group>, 4147 Flags<[CC1Option,CC1AsOption]>, 4148 HelpText<"(integrated-as) Emit an object file which can be used with an incremental linker">, 4149 MarshallingInfoFlag<CodeGenOpts<"IncrementalLinkerCompatible">>; 4150def mno_incremental_linker_compatible : Flag<["-"], "mno-incremental-linker-compatible">, Group<m_Group>, 4151 HelpText<"(integrated-as) Emit an object file which cannot be used with an incremental linker">; 4152def mrtd : Flag<["-"], "mrtd">, Group<m_Group>, Flags<[CC1Option]>, 4153 HelpText<"Make StdCall calling convention the default">; 4154def msmall_data_threshold_EQ : Joined <["-"], "msmall-data-threshold=">, 4155 Group<m_Group>, Alias<G>; 4156def msoft_float : Flag<["-"], "msoft-float">, Group<m_Group>, Flags<[CC1Option]>, 4157 HelpText<"Use software floating point">, 4158 MarshallingInfoFlag<CodeGenOpts<"SoftFloat">>; 4159def mno_fmv : Flag<["-"], "mno-fmv">, Group<f_clang_Group>, Flags<[CC1Option]>, 4160 HelpText<"Disable function multiversioning">; 4161def moutline_atomics : Flag<["-"], "moutline-atomics">, Group<f_clang_Group>, Flags<[CC1Option]>, 4162 HelpText<"Generate local calls to out-of-line atomic operations">; 4163def mno_outline_atomics : Flag<["-"], "mno-outline-atomics">, Group<f_clang_Group>, Flags<[CC1Option]>, 4164 HelpText<"Don't generate local calls to out-of-line atomic operations">; 4165def mno_implicit_float : Flag<["-"], "mno-implicit-float">, Group<m_Group>, 4166 HelpText<"Don't generate implicit floating point or vector instructions">; 4167def mimplicit_float : Flag<["-"], "mimplicit-float">, Group<m_Group>; 4168def mrecip : Flag<["-"], "mrecip">, Group<m_Group>, 4169 HelpText<"Equivalent to '-mrecip=all'">; 4170def mrecip_EQ : CommaJoined<["-"], "mrecip=">, Group<m_Group>, Flags<[CC1Option]>, 4171 HelpText<"Control use of approximate reciprocal and reciprocal square root instructions followed by <n> iterations of " 4172 "Newton-Raphson refinement. " 4173 "<value> = ( ['!'] ['vec-'] ('rcp'|'sqrt') [('h'|'s'|'d')] [':'<n>] ) | 'all' | 'default' | 'none'">, 4174 MarshallingInfoStringVector<CodeGenOpts<"Reciprocals">>; 4175def mprefer_vector_width_EQ : Joined<["-"], "mprefer-vector-width=">, Group<m_Group>, Flags<[CC1Option]>, 4176 HelpText<"Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.">, 4177 MarshallingInfoString<CodeGenOpts<"PreferVectorWidth">>; 4178def mstack_protector_guard_EQ : Joined<["-"], "mstack-protector-guard=">, Group<m_Group>, Flags<[CC1Option]>, 4179 HelpText<"Use the given guard (global, tls) for addressing the stack-protector guard">, 4180 MarshallingInfoString<CodeGenOpts<"StackProtectorGuard">>; 4181def mstack_protector_guard_offset_EQ : Joined<["-"], "mstack-protector-guard-offset=">, Group<m_Group>, Flags<[CC1Option]>, 4182 HelpText<"Use the given offset for addressing the stack-protector guard">, 4183 MarshallingInfoInt<CodeGenOpts<"StackProtectorGuardOffset">, "INT_MAX", "int">; 4184def mstack_protector_guard_symbol_EQ : Joined<["-"], "mstack-protector-guard-symbol=">, Group<m_Group>, Flags<[CC1Option]>, 4185 HelpText<"Use the given symbol for addressing the stack-protector guard">, 4186 MarshallingInfoString<CodeGenOpts<"StackProtectorGuardSymbol">>; 4187def mstack_protector_guard_reg_EQ : Joined<["-"], "mstack-protector-guard-reg=">, Group<m_Group>, Flags<[CC1Option]>, 4188 HelpText<"Use the given reg for addressing the stack-protector guard">, 4189 MarshallingInfoString<CodeGenOpts<"StackProtectorGuardReg">>; 4190def mfentry : Flag<["-"], "mfentry">, HelpText<"Insert calls to fentry at function entry (x86/SystemZ only)">, 4191 Flags<[CC1Option]>, Group<m_Group>, 4192 MarshallingInfoFlag<CodeGenOpts<"CallFEntry">>; 4193def mnop_mcount : Flag<["-"], "mnop-mcount">, HelpText<"Generate mcount/__fentry__ calls as nops. To activate they need to be patched in.">, 4194 Flags<[CC1Option]>, Group<m_Group>, 4195 MarshallingInfoFlag<CodeGenOpts<"MNopMCount">>; 4196def mrecord_mcount : Flag<["-"], "mrecord-mcount">, HelpText<"Generate a __mcount_loc section entry for each __fentry__ call.">, 4197 Flags<[CC1Option]>, Group<m_Group>, 4198 MarshallingInfoFlag<CodeGenOpts<"RecordMCount">>; 4199def mpacked_stack : Flag<["-"], "mpacked-stack">, HelpText<"Use packed stack layout (SystemZ only).">, 4200 Flags<[CC1Option]>, Group<m_Group>, 4201 MarshallingInfoFlag<CodeGenOpts<"PackedStack">>; 4202def mno_packed_stack : Flag<["-"], "mno-packed-stack">, Flags<[CC1Option]>, Group<m_Group>; 4203 4204let Flags = [TargetSpecific] in { 4205def mips16 : Flag<["-"], "mips16">, Group<m_mips_Features_Group>; 4206def mno_mips16 : Flag<["-"], "mno-mips16">, Group<m_mips_Features_Group>; 4207def mmicromips : Flag<["-"], "mmicromips">, Group<m_mips_Features_Group>; 4208def mno_micromips : Flag<["-"], "mno-micromips">, Group<m_mips_Features_Group>; 4209def mxgot : Flag<["-"], "mxgot">, Group<m_mips_Features_Group>; 4210def mno_xgot : Flag<["-"], "mno-xgot">, Group<m_mips_Features_Group>; 4211def mldc1_sdc1 : Flag<["-"], "mldc1-sdc1">, Group<m_mips_Features_Group>; 4212def mno_ldc1_sdc1 : Flag<["-"], "mno-ldc1-sdc1">, Group<m_mips_Features_Group>; 4213def mcheck_zero_division : Flag<["-"], "mcheck-zero-division">, 4214 Group<m_mips_Features_Group>; 4215def mno_check_zero_division : Flag<["-"], "mno-check-zero-division">, 4216 Group<m_mips_Features_Group>; 4217def mfix4300 : Flag<["-"], "mfix4300">, Group<m_mips_Features_Group>; 4218def mcompact_branches_EQ : Joined<["-"], "mcompact-branches=">, 4219 Group<m_mips_Features_Group>; 4220} // let Flags = [TargetSpecific] 4221def mbranch_likely : Flag<["-"], "mbranch-likely">, Group<m_Group>, 4222 IgnoredGCCCompat; 4223def mno_branch_likely : Flag<["-"], "mno-branch-likely">, Group<m_Group>, 4224 IgnoredGCCCompat; 4225let Flags = [TargetSpecific] in { 4226def mindirect_jump_EQ : Joined<["-"], "mindirect-jump=">, 4227 Group<m_mips_Features_Group>, 4228 HelpText<"Change indirect jump instructions to inhibit speculation">; 4229def mdsp : Flag<["-"], "mdsp">, Group<m_mips_Features_Group>; 4230def mno_dsp : Flag<["-"], "mno-dsp">, Group<m_mips_Features_Group>; 4231def mdspr2 : Flag<["-"], "mdspr2">, Group<m_mips_Features_Group>; 4232def mno_dspr2 : Flag<["-"], "mno-dspr2">, Group<m_mips_Features_Group>; 4233def msingle_float : Flag<["-"], "msingle-float">, Group<m_Group>; 4234def mdouble_float : Flag<["-"], "mdouble-float">, Group<m_Group>; 4235def mmadd4 : Flag<["-"], "mmadd4">, Group<m_mips_Features_Group>, 4236 HelpText<"Enable the generation of 4-operand madd.s, madd.d and related instructions.">; 4237def mno_madd4 : Flag<["-"], "mno-madd4">, Group<m_mips_Features_Group>, 4238 HelpText<"Disable the generation of 4-operand madd.s, madd.d and related instructions.">; 4239def mmsa : Flag<["-"], "mmsa">, Group<m_mips_Features_Group>, 4240 HelpText<"Enable MSA ASE (MIPS only)">; 4241def mno_msa : Flag<["-"], "mno-msa">, Group<m_mips_Features_Group>, 4242 HelpText<"Disable MSA ASE (MIPS only)">; 4243def mmt : Flag<["-"], "mmt">, Group<m_mips_Features_Group>, 4244 HelpText<"Enable MT ASE (MIPS only)">; 4245def mno_mt : Flag<["-"], "mno-mt">, Group<m_mips_Features_Group>, 4246 HelpText<"Disable MT ASE (MIPS only)">; 4247def mfp64 : Flag<["-"], "mfp64">, Group<m_mips_Features_Group>, 4248 HelpText<"Use 64-bit floating point registers (MIPS only)">; 4249def mfp32 : Flag<["-"], "mfp32">, Group<m_mips_Features_Group>, 4250 HelpText<"Use 32-bit floating point registers (MIPS only)">; 4251def mgpopt : Flag<["-"], "mgpopt">, Group<m_mips_Features_Group>, 4252 HelpText<"Use GP relative accesses for symbols known to be in a small" 4253 " data section (MIPS)">; 4254def mno_gpopt : Flag<["-"], "mno-gpopt">, Group<m_mips_Features_Group>, 4255 HelpText<"Do not use GP relative accesses for symbols known to be in a small" 4256 " data section (MIPS)">; 4257def mlocal_sdata : Flag<["-"], "mlocal-sdata">, 4258 Group<m_mips_Features_Group>, 4259 HelpText<"Extend the -G behaviour to object local data (MIPS)">; 4260def mno_local_sdata : Flag<["-"], "mno-local-sdata">, 4261 Group<m_mips_Features_Group>, 4262 HelpText<"Do not extend the -G behaviour to object local data (MIPS)">; 4263def mextern_sdata : Flag<["-"], "mextern-sdata">, 4264 Group<m_mips_Features_Group>, 4265 HelpText<"Assume that externally defined data is in the small data if it" 4266 " meets the -G <size> threshold (MIPS)">; 4267def mno_extern_sdata : Flag<["-"], "mno-extern-sdata">, 4268 Group<m_mips_Features_Group>, 4269 HelpText<"Do not assume that externally defined data is in the small data if" 4270 " it meets the -G <size> threshold (MIPS)">; 4271def membedded_data : Flag<["-"], "membedded-data">, 4272 Group<m_mips_Features_Group>, 4273 HelpText<"Place constants in the .rodata section instead of the .sdata " 4274 "section even if they meet the -G <size> threshold (MIPS)">; 4275def mno_embedded_data : Flag<["-"], "mno-embedded-data">, 4276 Group<m_mips_Features_Group>, 4277 HelpText<"Do not place constants in the .rodata section instead of the " 4278 ".sdata if they meet the -G <size> threshold (MIPS)">; 4279def mnan_EQ : Joined<["-"], "mnan=">, Group<m_mips_Features_Group>; 4280def mabs_EQ : Joined<["-"], "mabs=">, Group<m_mips_Features_Group>; 4281def mabicalls : Flag<["-"], "mabicalls">, Group<m_mips_Features_Group>, 4282 HelpText<"Enable SVR4-style position-independent code (Mips only)">; 4283def mno_abicalls : Flag<["-"], "mno-abicalls">, Group<m_mips_Features_Group>, 4284 HelpText<"Disable SVR4-style position-independent code (Mips only)">; 4285def mno_crc : Flag<["-"], "mno-crc">, Group<m_mips_Features_Group>, 4286 HelpText<"Disallow use of CRC instructions (Mips only)">; 4287def mvirt : Flag<["-"], "mvirt">, Group<m_mips_Features_Group>; 4288def mno_virt : Flag<["-"], "mno-virt">, Group<m_mips_Features_Group>; 4289def mginv : Flag<["-"], "mginv">, Group<m_mips_Features_Group>; 4290def mno_ginv : Flag<["-"], "mno-ginv">, Group<m_mips_Features_Group>; 4291} // let Flags = [TargetSpecific] 4292def mips1 : Flag<["-"], "mips1">, 4293 Alias<march_EQ>, AliasArgs<["mips1"]>, Group<m_mips_Features_Group>, 4294 HelpText<"Equivalent to -march=mips1">, Flags<[HelpHidden]>; 4295def mips2 : Flag<["-"], "mips2">, 4296 Alias<march_EQ>, AliasArgs<["mips2"]>, Group<m_mips_Features_Group>, 4297 HelpText<"Equivalent to -march=mips2">, Flags<[HelpHidden]>; 4298def mips3 : Flag<["-"], "mips3">, 4299 Alias<march_EQ>, AliasArgs<["mips3"]>, Group<m_mips_Features_Group>, 4300 HelpText<"Equivalent to -march=mips3">, Flags<[HelpHidden]>; 4301def mips4 : Flag<["-"], "mips4">, 4302 Alias<march_EQ>, AliasArgs<["mips4"]>, Group<m_mips_Features_Group>, 4303 HelpText<"Equivalent to -march=mips4">, Flags<[HelpHidden]>; 4304def mips5 : Flag<["-"], "mips5">, 4305 Alias<march_EQ>, AliasArgs<["mips5"]>, Group<m_mips_Features_Group>, 4306 HelpText<"Equivalent to -march=mips5">, Flags<[HelpHidden]>; 4307def mips32 : Flag<["-"], "mips32">, 4308 Alias<march_EQ>, AliasArgs<["mips32"]>, Group<m_mips_Features_Group>, 4309 HelpText<"Equivalent to -march=mips32">, Flags<[HelpHidden]>; 4310def mips32r2 : Flag<["-"], "mips32r2">, 4311 Alias<march_EQ>, AliasArgs<["mips32r2"]>, Group<m_mips_Features_Group>, 4312 HelpText<"Equivalent to -march=mips32r2">, Flags<[HelpHidden]>; 4313def mips32r3 : Flag<["-"], "mips32r3">, 4314 Alias<march_EQ>, AliasArgs<["mips32r3"]>, Group<m_mips_Features_Group>, 4315 HelpText<"Equivalent to -march=mips32r3">, Flags<[HelpHidden]>; 4316def mips32r5 : Flag<["-"], "mips32r5">, 4317 Alias<march_EQ>, AliasArgs<["mips32r5"]>, Group<m_mips_Features_Group>, 4318 HelpText<"Equivalent to -march=mips32r5">, Flags<[HelpHidden]>; 4319def mips32r6 : Flag<["-"], "mips32r6">, 4320 Alias<march_EQ>, AliasArgs<["mips32r6"]>, Group<m_mips_Features_Group>, 4321 HelpText<"Equivalent to -march=mips32r6">, Flags<[HelpHidden]>; 4322def mips64 : Flag<["-"], "mips64">, 4323 Alias<march_EQ>, AliasArgs<["mips64"]>, Group<m_mips_Features_Group>, 4324 HelpText<"Equivalent to -march=mips64">, Flags<[HelpHidden]>; 4325def mips64r2 : Flag<["-"], "mips64r2">, 4326 Alias<march_EQ>, AliasArgs<["mips64r2"]>, Group<m_mips_Features_Group>, 4327 HelpText<"Equivalent to -march=mips64r2">, Flags<[HelpHidden]>; 4328def mips64r3 : Flag<["-"], "mips64r3">, 4329 Alias<march_EQ>, AliasArgs<["mips64r3"]>, Group<m_mips_Features_Group>, 4330 HelpText<"Equivalent to -march=mips64r3">, Flags<[HelpHidden]>; 4331def mips64r5 : Flag<["-"], "mips64r5">, 4332 Alias<march_EQ>, AliasArgs<["mips64r5"]>, Group<m_mips_Features_Group>, 4333 HelpText<"Equivalent to -march=mips64r5">, Flags<[HelpHidden]>; 4334def mips64r6 : Flag<["-"], "mips64r6">, 4335 Alias<march_EQ>, AliasArgs<["mips64r6"]>, Group<m_mips_Features_Group>, 4336 HelpText<"Equivalent to -march=mips64r6">, Flags<[HelpHidden]>; 4337def mfpxx : Flag<["-"], "mfpxx">, Group<m_mips_Features_Group>, 4338 HelpText<"Avoid FPU mode dependent operations when used with the O32 ABI">, 4339 Flags<[HelpHidden]>; 4340def modd_spreg : Flag<["-"], "modd-spreg">, Group<m_mips_Features_Group>, 4341 HelpText<"Enable odd single-precision floating point registers">, 4342 Flags<[HelpHidden]>; 4343def mno_odd_spreg : Flag<["-"], "mno-odd-spreg">, Group<m_mips_Features_Group>, 4344 HelpText<"Disable odd single-precision floating point registers">, 4345 Flags<[HelpHidden]>; 4346def mrelax_pic_calls : Flag<["-"], "mrelax-pic-calls">, 4347 Group<m_mips_Features_Group>, 4348 HelpText<"Produce relaxation hints for linkers to try optimizing PIC " 4349 "call sequences into direct calls (MIPS only)">, Flags<[HelpHidden]>; 4350def mno_relax_pic_calls : Flag<["-"], "mno-relax-pic-calls">, 4351 Group<m_mips_Features_Group>, 4352 HelpText<"Do not produce relaxation hints for linkers to try optimizing PIC " 4353 "call sequences into direct calls (MIPS only)">, Flags<[HelpHidden]>; 4354def mglibc : Flag<["-"], "mglibc">, Group<m_libc_Group>, Flags<[HelpHidden]>; 4355def muclibc : Flag<["-"], "muclibc">, Group<m_libc_Group>, Flags<[HelpHidden]>; 4356def module_file_info : Flag<["-"], "module-file-info">, Flags<[NoXarchOption,CC1Option]>, Group<Action_Group>, 4357 HelpText<"Provide information about a particular module file">; 4358def mthumb : Flag<["-"], "mthumb">, Group<m_Group>; 4359def mtune_EQ : Joined<["-"], "mtune=">, Group<m_Group>, 4360 HelpText<"Only supported on AArch64, PowerPC, RISC-V, SystemZ, and X86">; 4361def multi__module : Flag<["-"], "multi_module">; 4362def multiply__defined__unused : Separate<["-"], "multiply_defined_unused">; 4363def multiply__defined : Separate<["-"], "multiply_defined">; 4364def mwarn_nonportable_cfstrings : Flag<["-"], "mwarn-nonportable-cfstrings">, Group<m_Group>; 4365def canonical_prefixes : Flag<["-"], "canonical-prefixes">, Flags<[HelpHidden, CoreOption]>, 4366 HelpText<"Use absolute paths for invoking subcommands (default)">; 4367def no_canonical_prefixes : Flag<["-"], "no-canonical-prefixes">, Flags<[HelpHidden, CoreOption]>, 4368 HelpText<"Use relative paths for invoking subcommands">; 4369def no_cpp_precomp : Flag<["-"], "no-cpp-precomp">, Group<clang_ignored_f_Group>; 4370def no_integrated_cpp : Flag<["-", "--"], "no-integrated-cpp">, Flags<[NoXarchOption]>; 4371def no_pedantic : Flag<["-", "--"], "no-pedantic">, Group<pedantic_Group>; 4372def no__dead__strip__inits__and__terms : Flag<["-"], "no_dead_strip_inits_and_terms">; 4373def nobuiltininc : Flag<["-"], "nobuiltininc">, Flags<[CC1Option, CoreOption]>, Group<IncludePath_Group>, 4374 HelpText<"Disable builtin #include directories">, 4375 MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseBuiltinIncludes">>; 4376def nogpuinc : Flag<["-"], "nogpuinc">, Group<IncludePath_Group>, 4377 HelpText<"Do not add include paths for CUDA/HIP and" 4378 " do not include the default CUDA/HIP wrapper headers">; 4379def nohipwrapperinc : Flag<["-"], "nohipwrapperinc">, Group<IncludePath_Group>, 4380 HelpText<"Do not include the default HIP wrapper headers and include paths">; 4381def : Flag<["-"], "nocudainc">, Alias<nogpuinc>; 4382def nogpulib : Flag<["-"], "nogpulib">, MarshallingInfoFlag<LangOpts<"NoGPULib">>, 4383 Flags<[CC1Option]>, HelpText<"Do not link device library for CUDA/HIP device compilation">; 4384def : Flag<["-"], "nocudalib">, Alias<nogpulib>; 4385def nodefaultlibs : Flag<["-"], "nodefaultlibs">; 4386def nodriverkitlib : Flag<["-"], "nodriverkitlib">; 4387def nofixprebinding : Flag<["-"], "nofixprebinding">; 4388def nolibc : Flag<["-"], "nolibc">; 4389def nomultidefs : Flag<["-"], "nomultidefs">; 4390def nopie : Flag<["-"], "nopie">; 4391def no_pie : Flag<["-"], "no-pie">, Alias<nopie>; 4392def noprebind : Flag<["-"], "noprebind">; 4393def noprofilelib : Flag<["-"], "noprofilelib">; 4394def noseglinkedit : Flag<["-"], "noseglinkedit">; 4395def nostartfiles : Flag<["-"], "nostartfiles">, Group<Link_Group>; 4396def nostdinc : Flag<["-"], "nostdinc">, Flags<[CoreOption]>, Group<IncludePath_Group>; 4397def nostdlibinc : Flag<["-"], "nostdlibinc">, Group<IncludePath_Group>; 4398def nostdincxx : Flag<["-"], "nostdinc++">, Flags<[CC1Option]>, Group<IncludePath_Group>, 4399 HelpText<"Disable standard #include directories for the C++ standard library">, 4400 MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseStandardCXXIncludes">>; 4401def nostdlib : Flag<["-"], "nostdlib">, Group<Link_Group>; 4402def nostdlibxx : Flag<["-"], "nostdlib++">; 4403def object : Flag<["-"], "object">; 4404def o : JoinedOrSeparate<["-"], "o">, Flags<[NoXarchOption, 4405 CC1Option, CC1AsOption, FC1Option, FlangOption]>, 4406 HelpText<"Write output to <file>">, MetaVarName<"<file>">, 4407 MarshallingInfoString<FrontendOpts<"OutputFile">>; 4408def object_file_name_EQ : Joined<["-"], "object-file-name=">, Flags<[CC1Option, CC1AsOption, CoreOption]>, 4409 HelpText<"Set the output <file> for debug infos">, MetaVarName<"<file>">, 4410 MarshallingInfoString<CodeGenOpts<"ObjectFilenameForDebug">>; 4411def object_file_name : Separate<["-"], "object-file-name">, Flags<[CC1Option, CC1AsOption, CoreOption]>, 4412 Alias<object_file_name_EQ>; 4413def pagezero__size : JoinedOrSeparate<["-"], "pagezero_size">; 4414def pass_exit_codes : Flag<["-", "--"], "pass-exit-codes">, Flags<[Unsupported]>; 4415def pedantic_errors : Flag<["-", "--"], "pedantic-errors">, Group<pedantic_Group>, Flags<[CC1Option]>, 4416 MarshallingInfoFlag<DiagnosticOpts<"PedanticErrors">>; 4417def pedantic : Flag<["-", "--"], "pedantic">, Group<pedantic_Group>, Flags<[CC1Option,FlangOption,FC1Option]>, 4418 HelpText<"Warn on language extensions">, MarshallingInfoFlag<DiagnosticOpts<"Pedantic">>; 4419def p : Flag<["-"], "p">, HelpText<"Enable mcount instrumentation with prof">; 4420def pg : Flag<["-"], "pg">, HelpText<"Enable mcount instrumentation">, Flags<[CC1Option]>, 4421 MarshallingInfoFlag<CodeGenOpts<"InstrumentForProfiling">>; 4422def pipe : Flag<["-", "--"], "pipe">, 4423 HelpText<"Use pipes between commands, when possible">; 4424def prebind__all__twolevel__modules : Flag<["-"], "prebind_all_twolevel_modules">; 4425def prebind : Flag<["-"], "prebind">; 4426def preload : Flag<["-"], "preload">; 4427def print_file_name_EQ : Joined<["-", "--"], "print-file-name=">, 4428 HelpText<"Print the full library path of <file>">, MetaVarName<"<file>">; 4429def print_ivar_layout : Flag<["-"], "print-ivar-layout">, Flags<[CC1Option]>, 4430 HelpText<"Enable Objective-C Ivar layout bitmap print trace">, 4431 MarshallingInfoFlag<LangOpts<"ObjCGCBitmapPrint">>; 4432def print_libgcc_file_name : Flag<["-", "--"], "print-libgcc-file-name">, 4433 HelpText<"Print the library path for the currently used compiler runtime " 4434 "library (\"libgcc.a\" or \"libclang_rt.builtins.*.a\")">; 4435def print_multi_directory : Flag<["-", "--"], "print-multi-directory">; 4436def print_multi_lib : Flag<["-", "--"], "print-multi-lib">; 4437def print_multi_flags : Flag<["-", "--"], "print-multi-flags-experimental">, 4438 HelpText<"Print the flags used for selecting multilibs (experimental)">; 4439def print_multi_os_directory : Flag<["-", "--"], "print-multi-os-directory">, 4440 Flags<[Unsupported]>; 4441def print_target_triple : Flag<["-", "--"], "print-target-triple">, 4442 HelpText<"Print the normalized target triple">, Flags<[FlangOption]>; 4443def print_effective_triple : Flag<["-", "--"], "print-effective-triple">, 4444 HelpText<"Print the effective target triple">, Flags<[FlangOption]>; 4445// GCC --disable-multiarch, GCC --enable-multiarch (upstream and Debian 4446// specific) have different behaviors. We choose not to support the option. 4447def : Flag<["-", "--"], "print-multiarch">, Flags<[Unsupported]>; 4448def print_prog_name_EQ : Joined<["-", "--"], "print-prog-name=">, 4449 HelpText<"Print the full program path of <name>">, MetaVarName<"<name>">; 4450def print_resource_dir : Flag<["-", "--"], "print-resource-dir">, 4451 HelpText<"Print the resource directory pathname">; 4452def print_search_dirs : Flag<["-", "--"], "print-search-dirs">, 4453 HelpText<"Print the paths used for finding libraries and programs">; 4454def print_targets : Flag<["-", "--"], "print-targets">, 4455 HelpText<"Print the registered targets">; 4456def print_rocm_search_dirs : Flag<["-", "--"], "print-rocm-search-dirs">, 4457 HelpText<"Print the paths used for finding ROCm installation">; 4458def print_runtime_dir : Flag<["-", "--"], "print-runtime-dir">, 4459 HelpText<"Print the directory pathname containing clangs runtime libraries">; 4460def print_diagnostic_options : Flag<["-", "--"], "print-diagnostic-options">, 4461 HelpText<"Print all of Clang's warning options">; 4462def private__bundle : Flag<["-"], "private_bundle">; 4463def pthreads : Flag<["-"], "pthreads">; 4464defm pthread : BoolOption<"", "pthread", 4465 LangOpts<"POSIXThreads">, DefaultFalse, 4466 PosFlag<SetTrue, [], "Support POSIX threads in generated code">, 4467 NegFlag<SetFalse>, BothFlags<[CC1Option]>>; 4468def pie : Flag<["-"], "pie">, Group<Link_Group>; 4469def static_pie : Flag<["-"], "static-pie">, Group<Link_Group>; 4470def read__only__relocs : Separate<["-"], "read_only_relocs">; 4471def remap : Flag<["-"], "remap">; 4472def rewrite_objc : Flag<["-"], "rewrite-objc">, Flags<[NoXarchOption,CC1Option]>, 4473 HelpText<"Rewrite Objective-C source to C++">, Group<Action_Group>; 4474def rewrite_legacy_objc : Flag<["-"], "rewrite-legacy-objc">, Flags<[NoXarchOption]>, 4475 HelpText<"Rewrite Legacy Objective-C source to C++">; 4476def rdynamic : Flag<["-"], "rdynamic">, Group<Link_Group>; 4477def resource_dir : Separate<["-"], "resource-dir">, 4478 Flags<[NoXarchOption, CC1Option, CoreOption, HelpHidden]>, 4479 HelpText<"The directory which holds the compiler resource files">, 4480 MarshallingInfoString<HeaderSearchOpts<"ResourceDir">>; 4481def resource_dir_EQ : Joined<["-"], "resource-dir=">, Flags<[NoXarchOption, CoreOption]>, 4482 Alias<resource_dir>; 4483def rpath : Separate<["-"], "rpath">, Flags<[LinkerInput]>, Group<Link_Group>; 4484def rtlib_EQ : Joined<["-", "--"], "rtlib=">, 4485 HelpText<"Compiler runtime library to use">; 4486def frtlib_add_rpath: Flag<["-"], "frtlib-add-rpath">, Flags<[NoArgumentUnused]>, 4487 HelpText<"Add -rpath with architecture-specific resource directory to the linker flags. " 4488 "When --hip-link is specified, also add -rpath with HIP runtime library directory to the linker flags">; 4489def fno_rtlib_add_rpath: Flag<["-"], "fno-rtlib-add-rpath">, Flags<[NoArgumentUnused]>, 4490 HelpText<"Do not add -rpath with architecture-specific resource directory to the linker flags. " 4491 "When --hip-link is specified, do not add -rpath with HIP runtime library directory to the linker flags">; 4492def offload_add_rpath: Flag<["--"], "offload-add-rpath">, Flags<[NoArgumentUnused]>, 4493 Alias<frtlib_add_rpath>; 4494def no_offload_add_rpath: Flag<["--"], "no-offload-add-rpath">, Flags<[NoArgumentUnused]>, 4495 Alias<frtlib_add_rpath>; 4496def r : Flag<["-"], "r">, Flags<[LinkerInput,NoArgumentUnused]>, 4497 Group<Link_Group>; 4498def save_temps_EQ : Joined<["-", "--"], "save-temps=">, Flags<[CC1Option, FlangOption, FC1Option, NoXarchOption]>, 4499 HelpText<"Save intermediate compilation results.">; 4500def save_temps : Flag<["-", "--"], "save-temps">, Flags<[FlangOption, FC1Option, NoXarchOption]>, 4501 Alias<save_temps_EQ>, AliasArgs<["cwd"]>, 4502 HelpText<"Save intermediate compilation results">; 4503def save_stats_EQ : Joined<["-", "--"], "save-stats=">, Flags<[NoXarchOption]>, 4504 HelpText<"Save llvm statistics.">; 4505def save_stats : Flag<["-", "--"], "save-stats">, Flags<[NoXarchOption]>, 4506 Alias<save_stats_EQ>, AliasArgs<["cwd"]>, 4507 HelpText<"Save llvm statistics.">; 4508def via_file_asm : Flag<["-", "--"], "via-file-asm">, InternalDebugOpt, 4509 HelpText<"Write assembly to file for input to assemble jobs">; 4510def sectalign : MultiArg<["-"], "sectalign", 3>; 4511def sectcreate : MultiArg<["-"], "sectcreate", 3>; 4512def sectobjectsymbols : MultiArg<["-"], "sectobjectsymbols", 2>; 4513def sectorder : MultiArg<["-"], "sectorder", 3>; 4514def seg1addr : JoinedOrSeparate<["-"], "seg1addr">; 4515def seg__addr__table__filename : Separate<["-"], "seg_addr_table_filename">; 4516def seg__addr__table : Separate<["-"], "seg_addr_table">; 4517def segaddr : MultiArg<["-"], "segaddr", 2>; 4518def segcreate : MultiArg<["-"], "segcreate", 3>; 4519def seglinkedit : Flag<["-"], "seglinkedit">; 4520def segprot : MultiArg<["-"], "segprot", 3>; 4521def segs__read__only__addr : Separate<["-"], "segs_read_only_addr">; 4522def segs__read__write__addr : Separate<["-"], "segs_read_write_addr">; 4523def segs__read__ : Joined<["-"], "segs_read_">; 4524def shared_libgcc : Flag<["-"], "shared-libgcc">; 4525def shared : Flag<["-", "--"], "shared">, Group<Link_Group>; 4526def single__module : Flag<["-"], "single_module">; 4527def specs_EQ : Joined<["-", "--"], "specs=">, Group<Link_Group>; 4528def specs : Separate<["-", "--"], "specs">, Flags<[Unsupported]>; 4529def start_no_unused_arguments : Flag<["--"], "start-no-unused-arguments">, Flags<[CoreOption]>, 4530 HelpText<"Don't emit warnings about unused arguments for the following arguments">; 4531def static_libgcc : Flag<["-"], "static-libgcc">; 4532def static_libstdcxx : Flag<["-"], "static-libstdc++">; 4533def static : Flag<["-", "--"], "static">, Group<Link_Group>, Flags<[NoArgumentUnused]>; 4534def std_default_EQ : Joined<["-"], "std-default=">; 4535def std_EQ : Joined<["-", "--"], "std=">, Flags<[CC1Option,FlangOption,FC1Option]>, 4536 Group<CompileOnly_Group>, HelpText<"Language standard to compile for">, 4537 ValuesCode<[{ 4538 static constexpr const char VALUES_CODE [] = 4539 #define LANGSTANDARD(id, name, lang, desc, features) name "," 4540 #define LANGSTANDARD_ALIAS(id, alias) alias "," 4541 #include "clang/Basic/LangStandards.def" 4542 ; 4543 }]>; 4544def stdlib_EQ : Joined<["-", "--"], "stdlib=">, Flags<[CC1Option]>, 4545 HelpText<"C++ standard library to use">, Values<"libc++,libstdc++,platform">; 4546def stdlibxx_isystem : JoinedOrSeparate<["-"], "stdlib++-isystem">, 4547 Group<clang_i_Group>, 4548 HelpText<"Use directory as the C++ standard library include path">, 4549 Flags<[NoXarchOption]>, MetaVarName<"<directory>">; 4550def unwindlib_EQ : Joined<["-", "--"], "unwindlib=">, Flags<[CC1Option]>, 4551 HelpText<"Unwind library to use">, Values<"libgcc,unwindlib,platform">; 4552def sub__library : JoinedOrSeparate<["-"], "sub_library">; 4553def sub__umbrella : JoinedOrSeparate<["-"], "sub_umbrella">; 4554def system_header_prefix : Joined<["--"], "system-header-prefix=">, 4555 Group<clang_i_Group>, Flags<[CC1Option]>, MetaVarName<"<prefix>">, 4556 HelpText<"Treat all #include paths starting with <prefix> as including a " 4557 "system header.">; 4558def : Separate<["--"], "system-header-prefix">, Alias<system_header_prefix>; 4559def no_system_header_prefix : Joined<["--"], "no-system-header-prefix=">, 4560 Group<clang_i_Group>, Flags<[CC1Option]>, MetaVarName<"<prefix>">, 4561 HelpText<"Treat all #include paths starting with <prefix> as not including a " 4562 "system header.">; 4563def : Separate<["--"], "no-system-header-prefix">, Alias<no_system_header_prefix>; 4564def s : Flag<["-"], "s">, Group<Link_Group>; 4565def target : Joined<["--"], "target=">, Flags<[NoXarchOption, CoreOption, FlangOption]>, 4566 HelpText<"Generate code for the given target">; 4567def darwin_target_variant : Separate<["-"], "darwin-target-variant">, 4568 Flags<[NoXarchOption, CoreOption]>, 4569 HelpText<"Generate code for an additional runtime variant of the deployment target">; 4570def print_supported_cpus : Flag<["-", "--"], "print-supported-cpus">, 4571 Group<CompileOnly_Group>, Flags<[CC1Option, CoreOption]>, 4572 HelpText<"Print supported cpu models for the given target (if target is not specified," 4573 " it will print the supported cpus for the default target)">, 4574 MarshallingInfoFlag<FrontendOpts<"PrintSupportedCPUs">>; 4575def : Flag<["-"], "mcpu=help">, Alias<print_supported_cpus>; 4576def : Flag<["-"], "mtune=help">, Alias<print_supported_cpus>; 4577def time : Flag<["-"], "time">, 4578 HelpText<"Time individual commands">; 4579def traditional_cpp : Flag<["-", "--"], "traditional-cpp">, Flags<[CC1Option]>, 4580 HelpText<"Enable some traditional CPP emulation">, 4581 MarshallingInfoFlag<LangOpts<"TraditionalCPP">>; 4582def traditional : Flag<["-", "--"], "traditional">; 4583def trigraphs : Flag<["-", "--"], "trigraphs">, Alias<ftrigraphs>, 4584 HelpText<"Process trigraph sequences">; 4585def twolevel__namespace__hints : Flag<["-"], "twolevel_namespace_hints">; 4586def twolevel__namespace : Flag<["-"], "twolevel_namespace">; 4587def t : Flag<["-"], "t">, Group<Link_Group>; 4588def umbrella : Separate<["-"], "umbrella">; 4589def undefined : JoinedOrSeparate<["-"], "undefined">, Group<u_Group>; 4590def undef : Flag<["-"], "undef">, Group<u_Group>, Flags<[CC1Option]>, 4591 HelpText<"undef all system defines">, 4592 MarshallingInfoNegativeFlag<PreprocessorOpts<"UsePredefines">>; 4593def unexported__symbols__list : Separate<["-"], "unexported_symbols_list">; 4594def u : JoinedOrSeparate<["-"], "u">, Group<u_Group>; 4595def v : Flag<["-"], "v">, Flags<[CC1Option, CoreOption]>, 4596 HelpText<"Show commands to run and use verbose output">, 4597 MarshallingInfoFlag<HeaderSearchOpts<"Verbose">>; 4598def altivec_src_compat : Joined<["-"], "faltivec-src-compat=">, 4599 Flags<[CC1Option]>, Group<f_Group>, 4600 HelpText<"Source-level compatibility for Altivec vectors (for PowerPC " 4601 "targets). This includes results of vector comparison (scalar for " 4602 "'xl', vector for 'gcc') as well as behavior when initializing with " 4603 "a scalar (splatting for 'xl', element zero only for 'gcc'). For " 4604 "'mixed', the compatibility is as 'gcc' for 'vector bool/vector " 4605 "pixel' and as 'xl' for other types. Current default is 'mixed'.">, 4606 Values<"mixed,gcc,xl">, 4607 NormalizedValuesScope<"LangOptions::AltivecSrcCompatKind">, 4608 NormalizedValues<["Mixed", "GCC", "XL"]>, 4609 MarshallingInfoEnum<LangOpts<"AltivecSrcCompat">, "Mixed">; 4610def verify_debug_info : Flag<["--"], "verify-debug-info">, Flags<[NoXarchOption]>, 4611 HelpText<"Verify the binary representation of debug output">; 4612def weak_l : Joined<["-"], "weak-l">, Flags<[LinkerInput]>; 4613def weak__framework : Separate<["-"], "weak_framework">, Flags<[LinkerInput]>; 4614def weak__library : Separate<["-"], "weak_library">, Flags<[LinkerInput]>; 4615def weak__reference__mismatches : Separate<["-"], "weak_reference_mismatches">; 4616def whatsloaded : Flag<["-"], "whatsloaded">; 4617def why_load : Flag<["-"], "why_load">; 4618def whyload : Flag<["-"], "whyload">, Alias<why_load>; 4619def w : Flag<["-"], "w">, HelpText<"Suppress all warnings">, Flags<[CC1Option]>, 4620 MarshallingInfoFlag<DiagnosticOpts<"IgnoreWarnings">>; 4621def x : JoinedOrSeparate<["-"], "x">, 4622Flags<[NoXarchOption,CC1Option,FlangOption,FC1Option]>, 4623 HelpText<"Treat subsequent input files as having type <language>">, 4624 MetaVarName<"<language>">; 4625def y : Joined<["-"], "y">; 4626 4627defm integrated_as : BoolFOption<"integrated-as", 4628 CodeGenOpts<"DisableIntegratedAS">, DefaultFalse, 4629 NegFlag<SetTrue, [CC1Option, FlangOption], "Disable">, PosFlag<SetFalse, [], "Enable">, 4630 BothFlags<[], " the integrated assembler">>; 4631 4632def fintegrated_cc1 : Flag<["-"], "fintegrated-cc1">, 4633 Flags<[CoreOption, NoXarchOption]>, Group<f_Group>, 4634 HelpText<"Run cc1 in-process">; 4635def fno_integrated_cc1 : Flag<["-"], "fno-integrated-cc1">, 4636 Flags<[CoreOption, NoXarchOption]>, Group<f_Group>, 4637 HelpText<"Spawn a separate process for each cc1">; 4638 4639def fintegrated_objemitter : Flag<["-"], "fintegrated-objemitter">, 4640 Flags<[CoreOption, NoXarchOption]>, Group<f_Group>, 4641 HelpText<"Use internal machine object code emitter.">; 4642def fno_integrated_objemitter : Flag<["-"], "fno-integrated-objemitter">, 4643 Flags<[CoreOption, NoXarchOption]>, Group<f_Group>, 4644 HelpText<"Use external machine object code emitter.">; 4645 4646def : Flag<["-"], "integrated-as">, Alias<fintegrated_as>, Flags<[NoXarchOption]>; 4647def : Flag<["-"], "no-integrated-as">, Alias<fno_integrated_as>, 4648 Flags<[CC1Option, FlangOption, NoXarchOption]>; 4649 4650def working_directory : Separate<["-"], "working-directory">, Flags<[CC1Option]>, 4651 HelpText<"Resolve file paths relative to the specified directory">, 4652 MarshallingInfoString<FileSystemOpts<"WorkingDir">>; 4653def working_directory_EQ : Joined<["-"], "working-directory=">, Flags<[CC1Option]>, 4654 Alias<working_directory>; 4655 4656// Double dash options, which are usually an alias for one of the previous 4657// options. 4658 4659def _mhwdiv_EQ : Joined<["--"], "mhwdiv=">, Alias<mhwdiv_EQ>; 4660def _mhwdiv : Separate<["--"], "mhwdiv">, Alias<mhwdiv_EQ>; 4661def _CLASSPATH_EQ : Joined<["--"], "CLASSPATH=">, Alias<fclasspath_EQ>; 4662def _CLASSPATH : Separate<["--"], "CLASSPATH">, Alias<fclasspath_EQ>; 4663def _all_warnings : Flag<["--"], "all-warnings">, Alias<Wall>; 4664def _analyzer_no_default_checks : Flag<["--"], "analyzer-no-default-checks">, Flags<[NoXarchOption]>; 4665def _analyzer_output : JoinedOrSeparate<["--"], "analyzer-output">, Flags<[NoXarchOption]>, 4666 HelpText<"Static analyzer report output format (html|plist|plist-multi-file|plist-html|sarif|sarif-html|text).">; 4667def _analyze : Flag<["--"], "analyze">, Flags<[NoXarchOption, CoreOption]>, 4668 HelpText<"Run the static analyzer">; 4669def _assemble : Flag<["--"], "assemble">, Alias<S>; 4670def _assert_EQ : Joined<["--"], "assert=">, Alias<A>; 4671def _assert : Separate<["--"], "assert">, Alias<A>; 4672def _bootclasspath_EQ : Joined<["--"], "bootclasspath=">, Alias<fbootclasspath_EQ>; 4673def _bootclasspath : Separate<["--"], "bootclasspath">, Alias<fbootclasspath_EQ>; 4674def _classpath_EQ : Joined<["--"], "classpath=">, Alias<fclasspath_EQ>; 4675def _classpath : Separate<["--"], "classpath">, Alias<fclasspath_EQ>; 4676def _comments_in_macros : Flag<["--"], "comments-in-macros">, Alias<CC>; 4677def _comments : Flag<["--"], "comments">, Alias<C>; 4678def _compile : Flag<["--"], "compile">, Alias<c>; 4679def _constant_cfstrings : Flag<["--"], "constant-cfstrings">; 4680def _debug_EQ : Joined<["--"], "debug=">, Alias<g_Flag>; 4681def _debug : Flag<["--"], "debug">, Alias<g_Flag>; 4682def _define_macro_EQ : Joined<["--"], "define-macro=">, Alias<D>; 4683def _define_macro : Separate<["--"], "define-macro">, Alias<D>; 4684def _dependencies : Flag<["--"], "dependencies">, Alias<M>; 4685def _dyld_prefix_EQ : Joined<["--"], "dyld-prefix=">; 4686def _dyld_prefix : Separate<["--"], "dyld-prefix">, Alias<_dyld_prefix_EQ>; 4687def _encoding_EQ : Joined<["--"], "encoding=">, Alias<fencoding_EQ>; 4688def _encoding : Separate<["--"], "encoding">, Alias<fencoding_EQ>; 4689def _entry : Flag<["--"], "entry">, Alias<e>; 4690def _extdirs_EQ : Joined<["--"], "extdirs=">, Alias<fextdirs_EQ>; 4691def _extdirs : Separate<["--"], "extdirs">, Alias<fextdirs_EQ>; 4692def _extra_warnings : Flag<["--"], "extra-warnings">, Alias<W_Joined>; 4693def _for_linker_EQ : Joined<["--"], "for-linker=">, Alias<Xlinker>; 4694def _for_linker : Separate<["--"], "for-linker">, Alias<Xlinker>; 4695def _force_link_EQ : Joined<["--"], "force-link=">, Alias<u>; 4696def _force_link : Separate<["--"], "force-link">, Alias<u>; 4697def _help_hidden : Flag<["--"], "help-hidden">, 4698 HelpText<"Display help for hidden options">; 4699def _imacros_EQ : Joined<["--"], "imacros=">, Alias<imacros>; 4700def _include_barrier : Flag<["--"], "include-barrier">, Alias<I_>; 4701def _include_directory_after_EQ : Joined<["--"], "include-directory-after=">, Alias<idirafter>; 4702def _include_directory_after : Separate<["--"], "include-directory-after">, Alias<idirafter>; 4703def _include_directory_EQ : Joined<["--"], "include-directory=">, Alias<I>; 4704def _include_directory : Separate<["--"], "include-directory">, Alias<I>; 4705def _include_prefix_EQ : Joined<["--"], "include-prefix=">, Alias<iprefix>; 4706def _include_prefix : Separate<["--"], "include-prefix">, Alias<iprefix>; 4707def _include_with_prefix_after_EQ : Joined<["--"], "include-with-prefix-after=">, Alias<iwithprefix>; 4708def _include_with_prefix_after : Separate<["--"], "include-with-prefix-after">, Alias<iwithprefix>; 4709def _include_with_prefix_before_EQ : Joined<["--"], "include-with-prefix-before=">, Alias<iwithprefixbefore>; 4710def _include_with_prefix_before : Separate<["--"], "include-with-prefix-before">, Alias<iwithprefixbefore>; 4711def _include_with_prefix_EQ : Joined<["--"], "include-with-prefix=">, Alias<iwithprefix>; 4712def _include_with_prefix : Separate<["--"], "include-with-prefix">, Alias<iwithprefix>; 4713def _include_EQ : Joined<["--"], "include=">, Alias<include_>; 4714def _language_EQ : Joined<["--"], "language=">, Alias<x>; 4715def _language : Separate<["--"], "language">, Alias<x>; 4716def _library_directory_EQ : Joined<["--"], "library-directory=">, Alias<L>; 4717def _library_directory : Separate<["--"], "library-directory">, Alias<L>; 4718def _no_line_commands : Flag<["--"], "no-line-commands">, Alias<P>; 4719def _no_standard_includes : Flag<["--"], "no-standard-includes">, Alias<nostdinc>; 4720def _no_standard_libraries : Flag<["--"], "no-standard-libraries">, Alias<nostdlib>; 4721def _no_undefined : Flag<["--"], "no-undefined">, Flags<[LinkerInput]>; 4722def _no_warnings : Flag<["--"], "no-warnings">, Alias<w>; 4723def _optimize_EQ : Joined<["--"], "optimize=">, Alias<O>; 4724def _optimize : Flag<["--"], "optimize">, Alias<O>; 4725def _output_class_directory_EQ : Joined<["--"], "output-class-directory=">, Alias<foutput_class_dir_EQ>; 4726def _output_class_directory : Separate<["--"], "output-class-directory">, Alias<foutput_class_dir_EQ>; 4727def _output_EQ : Joined<["--"], "output=">, Alias<o>; 4728def _output : Separate<["--"], "output">, Alias<o>; 4729def _param : Separate<["--"], "param">, Group<CompileOnly_Group>; 4730def _param_EQ : Joined<["--"], "param=">, Alias<_param>; 4731def _precompile : Flag<["--"], "precompile">, Flags<[NoXarchOption]>, 4732 Group<Action_Group>, HelpText<"Only precompile the input">; 4733def _prefix_EQ : Joined<["--"], "prefix=">, Alias<B>; 4734def _prefix : Separate<["--"], "prefix">, Alias<B>; 4735def _preprocess : Flag<["--"], "preprocess">, Alias<E>; 4736def _print_diagnostic_categories : Flag<["--"], "print-diagnostic-categories">; 4737def _print_file_name : Separate<["--"], "print-file-name">, Alias<print_file_name_EQ>; 4738def _print_missing_file_dependencies : Flag<["--"], "print-missing-file-dependencies">, Alias<MG>; 4739def _print_prog_name : Separate<["--"], "print-prog-name">, Alias<print_prog_name_EQ>; 4740def _profile : Flag<["--"], "profile">, Alias<p>; 4741def _resource_EQ : Joined<["--"], "resource=">, Alias<fcompile_resource_EQ>; 4742def _resource : Separate<["--"], "resource">, Alias<fcompile_resource_EQ>; 4743def _rtlib : Separate<["--"], "rtlib">, Alias<rtlib_EQ>; 4744def _serialize_diags : Separate<["-", "--"], "serialize-diagnostics">, Flags<[NoXarchOption]>, 4745 HelpText<"Serialize compiler diagnostics to a file">; 4746// We give --version different semantics from -version. 4747def _version : Flag<["--"], "version">, 4748 Flags<[CoreOption, FlangOption]>, 4749 HelpText<"Print version information">; 4750def _signed_char : Flag<["--"], "signed-char">, Alias<fsigned_char>; 4751def _std : Separate<["--"], "std">, Alias<std_EQ>; 4752def _stdlib : Separate<["--"], "stdlib">, Alias<stdlib_EQ>; 4753def _sysroot_EQ : Joined<["--"], "sysroot=">; 4754def _sysroot : Separate<["--"], "sysroot">, Alias<_sysroot_EQ>; 4755def _target_help : Flag<["--"], "target-help">; 4756def _trace_includes : Flag<["--"], "trace-includes">, Alias<H>; 4757def _undefine_macro_EQ : Joined<["--"], "undefine-macro=">, Alias<U>; 4758def _undefine_macro : Separate<["--"], "undefine-macro">, Alias<U>; 4759def _unsigned_char : Flag<["--"], "unsigned-char">, Alias<funsigned_char>; 4760def _user_dependencies : Flag<["--"], "user-dependencies">, Alias<MM>; 4761def _verbose : Flag<["--"], "verbose">, Alias<v>; 4762def _warn__EQ : Joined<["--"], "warn-=">, Alias<W_Joined>; 4763def _warn_ : Joined<["--"], "warn-">, Alias<W_Joined>; 4764def _write_dependencies : Flag<["--"], "write-dependencies">, Alias<MD>; 4765def _write_user_dependencies : Flag<["--"], "write-user-dependencies">, Alias<MMD>; 4766def _ : Joined<["--"], "">, Flags<[Unsupported]>; 4767 4768// Hexagon feature flags. 4769let Flags = [TargetSpecific] in { 4770def mieee_rnd_near : Flag<["-"], "mieee-rnd-near">, 4771 Group<m_hexagon_Features_Group>; 4772def mv5 : Flag<["-"], "mv5">, Group<m_hexagon_Features_Group>, Alias<mcpu_EQ>, 4773 AliasArgs<["hexagonv5"]>; 4774def mv55 : Flag<["-"], "mv55">, Group<m_hexagon_Features_Group>, 4775 Alias<mcpu_EQ>, AliasArgs<["hexagonv55"]>; 4776def mv60 : Flag<["-"], "mv60">, Group<m_hexagon_Features_Group>, 4777 Alias<mcpu_EQ>, AliasArgs<["hexagonv60"]>; 4778def mv62 : Flag<["-"], "mv62">, Group<m_hexagon_Features_Group>, 4779 Alias<mcpu_EQ>, AliasArgs<["hexagonv62"]>; 4780def mv65 : Flag<["-"], "mv65">, Group<m_hexagon_Features_Group>, 4781 Alias<mcpu_EQ>, AliasArgs<["hexagonv65"]>; 4782def mv66 : Flag<["-"], "mv66">, Group<m_hexagon_Features_Group>, 4783 Alias<mcpu_EQ>, AliasArgs<["hexagonv66"]>; 4784def mv67 : Flag<["-"], "mv67">, Group<m_hexagon_Features_Group>, 4785 Alias<mcpu_EQ>, AliasArgs<["hexagonv67"]>; 4786def mv67t : Flag<["-"], "mv67t">, Group<m_hexagon_Features_Group>, 4787 Alias<mcpu_EQ>, AliasArgs<["hexagonv67t"]>; 4788def mv68 : Flag<["-"], "mv68">, Group<m_hexagon_Features_Group>, 4789 Alias<mcpu_EQ>, AliasArgs<["hexagonv68"]>; 4790def mv69 : Flag<["-"], "mv69">, Group<m_hexagon_Features_Group>, 4791 Alias<mcpu_EQ>, AliasArgs<["hexagonv69"]>; 4792def mv71 : Flag<["-"], "mv71">, Group<m_hexagon_Features_Group>, 4793 Alias<mcpu_EQ>, AliasArgs<["hexagonv71"]>; 4794def mv71t : Flag<["-"], "mv71t">, Group<m_hexagon_Features_Group>, 4795 Alias<mcpu_EQ>, AliasArgs<["hexagonv71t"]>; 4796def mv73 : Flag<["-"], "mv73">, Group<m_hexagon_Features_Group>, 4797 Alias<mcpu_EQ>, AliasArgs<["hexagonv73"]>; 4798def mhexagon_hvx : Flag<["-"], "mhvx">, Group<m_hexagon_Features_HVX_Group>, 4799 HelpText<"Enable Hexagon Vector eXtensions">; 4800def mhexagon_hvx_EQ : Joined<["-"], "mhvx=">, 4801 Group<m_hexagon_Features_HVX_Group>, 4802 HelpText<"Enable Hexagon Vector eXtensions">; 4803def mno_hexagon_hvx : Flag<["-"], "mno-hvx">, 4804 Group<m_hexagon_Features_HVX_Group>, 4805 HelpText<"Disable Hexagon Vector eXtensions">; 4806def mhexagon_hvx_length_EQ : Joined<["-"], "mhvx-length=">, 4807 Group<m_hexagon_Features_HVX_Group>, HelpText<"Set Hexagon Vector Length">, 4808 Values<"64B,128B">; 4809def mhexagon_hvx_qfloat : Flag<["-"], "mhvx-qfloat">, 4810 Group<m_hexagon_Features_HVX_Group>, 4811 HelpText<"Enable Hexagon HVX QFloat instructions">; 4812def mno_hexagon_hvx_qfloat : Flag<["-"], "mno-hvx-qfloat">, 4813 Group<m_hexagon_Features_HVX_Group>, 4814 HelpText<"Disable Hexagon HVX QFloat instructions">; 4815def mhexagon_hvx_ieee_fp : Flag<["-"], "mhvx-ieee-fp">, 4816 Group<m_hexagon_Features_Group>, 4817 HelpText<"Enable Hexagon HVX IEEE floating-point">; 4818def mno_hexagon_hvx_ieee_fp : Flag<["-"], "mno-hvx-ieee-fp">, 4819 Group<m_hexagon_Features_Group>, 4820 HelpText<"Disable Hexagon HVX IEEE floating-point">; 4821def ffixed_r19: Flag<["-"], "ffixed-r19">, Group<f_Group>, 4822 HelpText<"Reserve register r19 (Hexagon only)">; 4823} // let Flags = [TargetSpecific] 4824def mmemops : Flag<["-"], "mmemops">, Group<m_hexagon_Features_Group>, 4825 Flags<[CC1Option]>, HelpText<"Enable generation of memop instructions">; 4826def mno_memops : Flag<["-"], "mno-memops">, Group<m_hexagon_Features_Group>, 4827 Flags<[CC1Option]>, HelpText<"Disable generation of memop instructions">; 4828def mpackets : Flag<["-"], "mpackets">, Group<m_hexagon_Features_Group>, 4829 Flags<[CC1Option]>, HelpText<"Enable generation of instruction packets">; 4830def mno_packets : Flag<["-"], "mno-packets">, Group<m_hexagon_Features_Group>, 4831 Flags<[CC1Option]>, HelpText<"Disable generation of instruction packets">; 4832def mnvj : Flag<["-"], "mnvj">, Group<m_hexagon_Features_Group>, 4833 Flags<[CC1Option]>, HelpText<"Enable generation of new-value jumps">; 4834def mno_nvj : Flag<["-"], "mno-nvj">, Group<m_hexagon_Features_Group>, 4835 Flags<[CC1Option]>, HelpText<"Disable generation of new-value jumps">; 4836def mnvs : Flag<["-"], "mnvs">, Group<m_hexagon_Features_Group>, 4837 Flags<[CC1Option]>, HelpText<"Enable generation of new-value stores">; 4838def mno_nvs : Flag<["-"], "mno-nvs">, Group<m_hexagon_Features_Group>, 4839 Flags<[CC1Option]>, HelpText<"Disable generation of new-value stores">; 4840def mcabac: Flag<["-"], "mcabac">, Group<m_hexagon_Features_Group>, 4841 HelpText<"Enable CABAC instructions">; 4842 4843// SPARC feature flags 4844let Flags = [TargetSpecific] in { 4845def mfpu : Flag<["-"], "mfpu">, Group<m_sparc_Features_Group>; 4846def mno_fpu : Flag<["-"], "mno-fpu">, Group<m_sparc_Features_Group>; 4847def mfsmuld : Flag<["-"], "mfsmuld">, Group<m_sparc_Features_Group>; 4848def mno_fsmuld : Flag<["-"], "mno-fsmuld">, Group<m_sparc_Features_Group>; 4849def mpopc : Flag<["-"], "mpopc">, Group<m_sparc_Features_Group>; 4850def mno_popc : Flag<["-"], "mno-popc">, Group<m_sparc_Features_Group>; 4851def mvis : Flag<["-"], "mvis">, Group<m_sparc_Features_Group>; 4852def mno_vis : Flag<["-"], "mno-vis">, Group<m_sparc_Features_Group>; 4853def mvis2 : Flag<["-"], "mvis2">, Group<m_sparc_Features_Group>; 4854def mno_vis2 : Flag<["-"], "mno-vis2">, Group<m_sparc_Features_Group>; 4855def mvis3 : Flag<["-"], "mvis3">, Group<m_sparc_Features_Group>; 4856def mno_vis3 : Flag<["-"], "mno-vis3">, Group<m_sparc_Features_Group>; 4857def mhard_quad_float : Flag<["-"], "mhard-quad-float">, Group<m_sparc_Features_Group>; 4858def msoft_quad_float : Flag<["-"], "msoft-quad-float">, Group<m_sparc_Features_Group>; 4859} // let Flags = [TargetSpecific] 4860 4861// M68k features flags 4862let Flags = [TargetSpecific] in { 4863def m68000 : Flag<["-"], "m68000">, Group<m_m68k_Features_Group>; 4864def m68010 : Flag<["-"], "m68010">, Group<m_m68k_Features_Group>; 4865def m68020 : Flag<["-"], "m68020">, Group<m_m68k_Features_Group>; 4866def m68030 : Flag<["-"], "m68030">, Group<m_m68k_Features_Group>; 4867def m68040 : Flag<["-"], "m68040">, Group<m_m68k_Features_Group>; 4868def m68060 : Flag<["-"], "m68060">, Group<m_m68k_Features_Group>; 4869 4870def m68881 : Flag<["-"], "m68881">, Group<m_m68k_Features_Group>; 4871 4872foreach i = {0-6} in 4873 def ffixed_a#i : Flag<["-"], "ffixed-a"#i>, Group<m_m68k_Features_Group>, 4874 HelpText<"Reserve the a"#i#" register (M68k only)">; 4875foreach i = {0-7} in 4876 def ffixed_d#i : Flag<["-"], "ffixed-d"#i>, Group<m_m68k_Features_Group>, 4877 HelpText<"Reserve the d"#i#" register (M68k only)">; 4878} // let Flags = [TargetSpecific] 4879 4880// X86 feature flags 4881def mx87 : Flag<["-"], "mx87">, Group<m_x86_Features_Group>; 4882def mno_x87 : Flag<["-"], "mno-x87">, Group<m_x86_Features_Group>; 4883def m80387 : Flag<["-"], "m80387">, Alias<mx87>; 4884def mno_80387 : Flag<["-"], "mno-80387">, Alias<mno_x87>; 4885def mno_fp_ret_in_387 : Flag<["-"], "mno-fp-ret-in-387">, Alias<mno_x87>; 4886def mmmx : Flag<["-"], "mmmx">, Group<m_x86_Features_Group>; 4887def mno_mmx : Flag<["-"], "mno-mmx">, Group<m_x86_Features_Group>; 4888def m3dnow : Flag<["-"], "m3dnow">, Group<m_x86_Features_Group>; 4889def mno_3dnow : Flag<["-"], "mno-3dnow">, Group<m_x86_Features_Group>; 4890def m3dnowa : Flag<["-"], "m3dnowa">, Group<m_x86_Features_Group>; 4891def mno_3dnowa : Flag<["-"], "mno-3dnowa">, Group<m_x86_Features_Group>; 4892def mamx_bf16 : Flag<["-"], "mamx-bf16">, Group<m_x86_Features_Group>; 4893def mno_amx_bf16 : Flag<["-"], "mno-amx-bf16">, Group<m_x86_Features_Group>; 4894def mamx_complex : Flag<["-"], "mamx-complex">, Group<m_x86_Features_Group>; 4895def mno_amx_complex : Flag<["-"], "mno-amx-complex">, Group<m_x86_Features_Group>; 4896def mamx_fp16 : Flag<["-"], "mamx-fp16">, Group<m_x86_Features_Group>; 4897def mno_amx_fp16 : Flag<["-"], "mno-amx-fp16">, Group<m_x86_Features_Group>; 4898def mamx_int8 : Flag<["-"], "mamx-int8">, Group<m_x86_Features_Group>; 4899def mno_amx_int8 : Flag<["-"], "mno-amx-int8">, Group<m_x86_Features_Group>; 4900def mamx_tile : Flag<["-"], "mamx-tile">, Group<m_x86_Features_Group>; 4901def mno_amx_tile : Flag<["-"], "mno-amx-tile">, Group<m_x86_Features_Group>; 4902def mcmpccxadd : Flag<["-"], "mcmpccxadd">, Group<m_x86_Features_Group>; 4903def mno_cmpccxadd : Flag<["-"], "mno-cmpccxadd">, Group<m_x86_Features_Group>; 4904def msse : Flag<["-"], "msse">, Group<m_x86_Features_Group>; 4905def mno_sse : Flag<["-"], "mno-sse">, Group<m_x86_Features_Group>; 4906def msse2 : Flag<["-"], "msse2">, Group<m_x86_Features_Group>; 4907def mno_sse2 : Flag<["-"], "mno-sse2">, Group<m_x86_Features_Group>; 4908def msse3 : Flag<["-"], "msse3">, Group<m_x86_Features_Group>; 4909def mno_sse3 : Flag<["-"], "mno-sse3">, Group<m_x86_Features_Group>; 4910def mssse3 : Flag<["-"], "mssse3">, Group<m_x86_Features_Group>; 4911def mno_ssse3 : Flag<["-"], "mno-ssse3">, Group<m_x86_Features_Group>; 4912def msse4_1 : Flag<["-"], "msse4.1">, Group<m_x86_Features_Group>; 4913def mno_sse4_1 : Flag<["-"], "mno-sse4.1">, Group<m_x86_Features_Group>; 4914def msse4_2 : Flag<["-"], "msse4.2">, Group<m_x86_Features_Group>; 4915def mno_sse4_2 : Flag<["-"], "mno-sse4.2">, Group<m_x86_Features_Group>; 4916def msse4 : Flag<["-"], "msse4">, Alias<msse4_2>; 4917// -mno-sse4 turns off sse4.1 which has the effect of turning off everything 4918// later than 4.1. -msse4 turns on 4.2 which has the effect of turning on 4919// everything earlier than 4.2. 4920def mno_sse4 : Flag<["-"], "mno-sse4">, Alias<mno_sse4_1>; 4921def msse4a : Flag<["-"], "msse4a">, Group<m_x86_Features_Group>; 4922def mno_sse4a : Flag<["-"], "mno-sse4a">, Group<m_x86_Features_Group>; 4923def mavx : Flag<["-"], "mavx">, Group<m_x86_Features_Group>; 4924def mno_avx : Flag<["-"], "mno-avx">, Group<m_x86_Features_Group>; 4925def mavx2 : Flag<["-"], "mavx2">, Group<m_x86_Features_Group>; 4926def mno_avx2 : Flag<["-"], "mno-avx2">, Group<m_x86_Features_Group>; 4927def mavx512f : Flag<["-"], "mavx512f">, Group<m_x86_Features_Group>; 4928def mno_avx512f : Flag<["-"], "mno-avx512f">, Group<m_x86_Features_Group>; 4929def mavx512bf16 : Flag<["-"], "mavx512bf16">, Group<m_x86_Features_Group>; 4930def mno_avx512bf16 : Flag<["-"], "mno-avx512bf16">, Group<m_x86_Features_Group>; 4931def mavx512bitalg : Flag<["-"], "mavx512bitalg">, Group<m_x86_Features_Group>; 4932def mno_avx512bitalg : Flag<["-"], "mno-avx512bitalg">, Group<m_x86_Features_Group>; 4933def mavx512bw : Flag<["-"], "mavx512bw">, Group<m_x86_Features_Group>; 4934def mno_avx512bw : Flag<["-"], "mno-avx512bw">, Group<m_x86_Features_Group>; 4935def mavx512cd : Flag<["-"], "mavx512cd">, Group<m_x86_Features_Group>; 4936def mno_avx512cd : Flag<["-"], "mno-avx512cd">, Group<m_x86_Features_Group>; 4937def mavx512dq : Flag<["-"], "mavx512dq">, Group<m_x86_Features_Group>; 4938def mno_avx512dq : Flag<["-"], "mno-avx512dq">, Group<m_x86_Features_Group>; 4939def mavx512er : Flag<["-"], "mavx512er">, Group<m_x86_Features_Group>; 4940def mno_avx512er : Flag<["-"], "mno-avx512er">, Group<m_x86_Features_Group>; 4941def mavx512fp16 : Flag<["-"], "mavx512fp16">, Group<m_x86_Features_Group>; 4942def mno_avx512fp16 : Flag<["-"], "mno-avx512fp16">, Group<m_x86_Features_Group>; 4943def mavx512ifma : Flag<["-"], "mavx512ifma">, Group<m_x86_Features_Group>; 4944def mno_avx512ifma : Flag<["-"], "mno-avx512ifma">, Group<m_x86_Features_Group>; 4945def mavx512pf : Flag<["-"], "mavx512pf">, Group<m_x86_Features_Group>; 4946def mno_avx512pf : Flag<["-"], "mno-avx512pf">, Group<m_x86_Features_Group>; 4947def mavx512vbmi : Flag<["-"], "mavx512vbmi">, Group<m_x86_Features_Group>; 4948def mno_avx512vbmi : Flag<["-"], "mno-avx512vbmi">, Group<m_x86_Features_Group>; 4949def mavx512vbmi2 : Flag<["-"], "mavx512vbmi2">, Group<m_x86_Features_Group>; 4950def mno_avx512vbmi2 : Flag<["-"], "mno-avx512vbmi2">, Group<m_x86_Features_Group>; 4951def mavx512vl : Flag<["-"], "mavx512vl">, Group<m_x86_Features_Group>; 4952def mno_avx512vl : Flag<["-"], "mno-avx512vl">, Group<m_x86_Features_Group>; 4953def mavx512vnni : Flag<["-"], "mavx512vnni">, Group<m_x86_Features_Group>; 4954def mno_avx512vnni : Flag<["-"], "mno-avx512vnni">, Group<m_x86_Features_Group>; 4955def mavx512vpopcntdq : Flag<["-"], "mavx512vpopcntdq">, Group<m_x86_Features_Group>; 4956def mno_avx512vpopcntdq : Flag<["-"], "mno-avx512vpopcntdq">, Group<m_x86_Features_Group>; 4957def mavx512vp2intersect : Flag<["-"], "mavx512vp2intersect">, Group<m_x86_Features_Group>; 4958def mno_avx512vp2intersect : Flag<["-"], "mno-avx512vp2intersect">, Group<m_x86_Features_Group>; 4959def mavxifma : Flag<["-"], "mavxifma">, Group<m_x86_Features_Group>; 4960def mno_avxifma : Flag<["-"], "mno-avxifma">, Group<m_x86_Features_Group>; 4961def mavxneconvert : Flag<["-"], "mavxneconvert">, Group<m_x86_Features_Group>; 4962def mno_avxneconvert : Flag<["-"], "mno-avxneconvert">, Group<m_x86_Features_Group>; 4963def mavxvnniint16 : Flag<["-"], "mavxvnniint16">, Group<m_x86_Features_Group>; 4964def mno_avxvnniint16 : Flag<["-"], "mno-avxvnniint16">, Group<m_x86_Features_Group>; 4965def mavxvnniint8 : Flag<["-"], "mavxvnniint8">, Group<m_x86_Features_Group>; 4966def mno_avxvnniint8 : Flag<["-"], "mno-avxvnniint8">, Group<m_x86_Features_Group>; 4967def mavxvnni : Flag<["-"], "mavxvnni">, Group<m_x86_Features_Group>; 4968def mno_avxvnni : Flag<["-"], "mno-avxvnni">, Group<m_x86_Features_Group>; 4969def madx : Flag<["-"], "madx">, Group<m_x86_Features_Group>; 4970def mno_adx : Flag<["-"], "mno-adx">, Group<m_x86_Features_Group>; 4971def maes : Flag<["-"], "maes">, Group<m_x86_Features_Group>; 4972def mno_aes : Flag<["-"], "mno-aes">, Group<m_x86_Features_Group>; 4973def mbmi : Flag<["-"], "mbmi">, Group<m_x86_Features_Group>; 4974def mno_bmi : Flag<["-"], "mno-bmi">, Group<m_x86_Features_Group>; 4975def mbmi2 : Flag<["-"], "mbmi2">, Group<m_x86_Features_Group>; 4976def mno_bmi2 : Flag<["-"], "mno-bmi2">, Group<m_x86_Features_Group>; 4977def mcldemote : Flag<["-"], "mcldemote">, Group<m_x86_Features_Group>; 4978def mno_cldemote : Flag<["-"], "mno-cldemote">, Group<m_x86_Features_Group>; 4979def mclflushopt : Flag<["-"], "mclflushopt">, Group<m_x86_Features_Group>; 4980def mno_clflushopt : Flag<["-"], "mno-clflushopt">, Group<m_x86_Features_Group>; 4981def mclwb : Flag<["-"], "mclwb">, Group<m_x86_Features_Group>; 4982def mno_clwb : Flag<["-"], "mno-clwb">, Group<m_x86_Features_Group>; 4983def mwbnoinvd : Flag<["-"], "mwbnoinvd">, Group<m_x86_Features_Group>; 4984def mno_wbnoinvd : Flag<["-"], "mno-wbnoinvd">, Group<m_x86_Features_Group>; 4985def mclzero : Flag<["-"], "mclzero">, Group<m_x86_Features_Group>; 4986def mno_clzero : Flag<["-"], "mno-clzero">, Group<m_x86_Features_Group>; 4987def mcrc32 : Flag<["-"], "mcrc32">, Group<m_x86_Features_Group>; 4988def mno_crc32 : Flag<["-"], "mno-crc32">, Group<m_x86_Features_Group>; 4989def mcx16 : Flag<["-"], "mcx16">, Group<m_x86_Features_Group>; 4990def mno_cx16 : Flag<["-"], "mno-cx16">, Group<m_x86_Features_Group>; 4991def menqcmd : Flag<["-"], "menqcmd">, Group<m_x86_Features_Group>; 4992def mno_enqcmd : Flag<["-"], "mno-enqcmd">, Group<m_x86_Features_Group>; 4993def mf16c : Flag<["-"], "mf16c">, Group<m_x86_Features_Group>; 4994def mno_f16c : Flag<["-"], "mno-f16c">, Group<m_x86_Features_Group>; 4995def mfma : Flag<["-"], "mfma">, Group<m_x86_Features_Group>; 4996def mno_fma : Flag<["-"], "mno-fma">, Group<m_x86_Features_Group>; 4997def mfma4 : Flag<["-"], "mfma4">, Group<m_x86_Features_Group>; 4998def mno_fma4 : Flag<["-"], "mno-fma4">, Group<m_x86_Features_Group>; 4999def mfsgsbase : Flag<["-"], "mfsgsbase">, Group<m_x86_Features_Group>; 5000def mno_fsgsbase : Flag<["-"], "mno-fsgsbase">, Group<m_x86_Features_Group>; 5001def mfxsr : Flag<["-"], "mfxsr">, Group<m_x86_Features_Group>; 5002def mno_fxsr : Flag<["-"], "mno-fxsr">, Group<m_x86_Features_Group>; 5003def minvpcid : Flag<["-"], "minvpcid">, Group<m_x86_Features_Group>; 5004def mno_invpcid : Flag<["-"], "mno-invpcid">, Group<m_x86_Features_Group>; 5005def mgfni : Flag<["-"], "mgfni">, Group<m_x86_Features_Group>; 5006def mno_gfni : Flag<["-"], "mno-gfni">, Group<m_x86_Features_Group>; 5007def mhreset : Flag<["-"], "mhreset">, Group<m_x86_Features_Group>; 5008def mno_hreset : Flag<["-"], "mno-hreset">, Group<m_x86_Features_Group>; 5009def mkl : Flag<["-"], "mkl">, Group<m_x86_Features_Group>; 5010def mno_kl : Flag<["-"], "mno-kl">, Group<m_x86_Features_Group>; 5011def mwidekl : Flag<["-"], "mwidekl">, Group<m_x86_Features_Group>; 5012def mno_widekl : Flag<["-"], "mno-widekl">, Group<m_x86_Features_Group>; 5013def mlwp : Flag<["-"], "mlwp">, Group<m_x86_Features_Group>; 5014def mno_lwp : Flag<["-"], "mno-lwp">, Group<m_x86_Features_Group>; 5015def mlzcnt : Flag<["-"], "mlzcnt">, Group<m_x86_Features_Group>; 5016def mno_lzcnt : Flag<["-"], "mno-lzcnt">, Group<m_x86_Features_Group>; 5017def mmovbe : Flag<["-"], "mmovbe">, Group<m_x86_Features_Group>; 5018def mno_movbe : Flag<["-"], "mno-movbe">, Group<m_x86_Features_Group>; 5019def mmovdiri : Flag<["-"], "mmovdiri">, Group<m_x86_Features_Group>; 5020def mno_movdiri : Flag<["-"], "mno-movdiri">, Group<m_x86_Features_Group>; 5021def mmovdir64b : Flag<["-"], "mmovdir64b">, Group<m_x86_Features_Group>; 5022def mno_movdir64b : Flag<["-"], "mno-movdir64b">, Group<m_x86_Features_Group>; 5023def mmwaitx : Flag<["-"], "mmwaitx">, Group<m_x86_Features_Group>; 5024def mno_mwaitx : Flag<["-"], "mno-mwaitx">, Group<m_x86_Features_Group>; 5025def mpku : Flag<["-"], "mpku">, Group<m_x86_Features_Group>; 5026def mno_pku : Flag<["-"], "mno-pku">, Group<m_x86_Features_Group>; 5027def mpclmul : Flag<["-"], "mpclmul">, Group<m_x86_Features_Group>; 5028def mno_pclmul : Flag<["-"], "mno-pclmul">, Group<m_x86_Features_Group>; 5029def mpconfig : Flag<["-"], "mpconfig">, Group<m_x86_Features_Group>; 5030def mno_pconfig : Flag<["-"], "mno-pconfig">, Group<m_x86_Features_Group>; 5031def mpopcnt : Flag<["-"], "mpopcnt">, Group<m_x86_Features_Group>; 5032def mno_popcnt : Flag<["-"], "mno-popcnt">, Group<m_x86_Features_Group>; 5033def mprefetchi : Flag<["-"], "mprefetchi">, Group<m_x86_Features_Group>; 5034def mno_prefetchi : Flag<["-"], "mno-prefetchi">, Group<m_x86_Features_Group>; 5035def mprefetchwt1 : Flag<["-"], "mprefetchwt1">, Group<m_x86_Features_Group>; 5036def mno_prefetchwt1 : Flag<["-"], "mno-prefetchwt1">, Group<m_x86_Features_Group>; 5037def mprfchw : Flag<["-"], "mprfchw">, Group<m_x86_Features_Group>; 5038def mno_prfchw : Flag<["-"], "mno-prfchw">, Group<m_x86_Features_Group>; 5039def mptwrite : Flag<["-"], "mptwrite">, Group<m_x86_Features_Group>; 5040def mno_ptwrite : Flag<["-"], "mno-ptwrite">, Group<m_x86_Features_Group>; 5041def mraoint : Flag<["-"], "mraoint">, Group<m_x86_Features_Group>; 5042def mno_raoint : Flag<["-"], "mno-raoint">, Group<m_x86_Features_Group>; 5043def mrdpid : Flag<["-"], "mrdpid">, Group<m_x86_Features_Group>; 5044def mno_rdpid : Flag<["-"], "mno-rdpid">, Group<m_x86_Features_Group>; 5045def mrdpru : Flag<["-"], "mrdpru">, Group<m_x86_Features_Group>; 5046def mno_rdpru : Flag<["-"], "mno-rdpru">, Group<m_x86_Features_Group>; 5047def mrdrnd : Flag<["-"], "mrdrnd">, Group<m_x86_Features_Group>; 5048def mno_rdrnd : Flag<["-"], "mno-rdrnd">, Group<m_x86_Features_Group>; 5049def mrtm : Flag<["-"], "mrtm">, Group<m_x86_Features_Group>; 5050def mno_rtm : Flag<["-"], "mno-rtm">, Group<m_x86_Features_Group>; 5051def mrdseed : Flag<["-"], "mrdseed">, Group<m_x86_Features_Group>; 5052def mno_rdseed : Flag<["-"], "mno-rdseed">, Group<m_x86_Features_Group>; 5053def msahf : Flag<["-"], "msahf">, Group<m_x86_Features_Group>; 5054def mno_sahf : Flag<["-"], "mno-sahf">, Group<m_x86_Features_Group>; 5055def mserialize : Flag<["-"], "mserialize">, Group<m_x86_Features_Group>; 5056def mno_serialize : Flag<["-"], "mno-serialize">, Group<m_x86_Features_Group>; 5057def msgx : Flag<["-"], "msgx">, Group<m_x86_Features_Group>; 5058def mno_sgx : Flag<["-"], "mno-sgx">, Group<m_x86_Features_Group>; 5059def msha : Flag<["-"], "msha">, Group<m_x86_Features_Group>; 5060def mno_sha : Flag<["-"], "mno-sha">, Group<m_x86_Features_Group>; 5061def msha512 : Flag<["-"], "msha512">, Group<m_x86_Features_Group>; 5062def mno_sha512 : Flag<["-"], "mno-sha512">, Group<m_x86_Features_Group>; 5063def msm3 : Flag<["-"], "msm3">, Group<m_x86_Features_Group>; 5064def mno_sm3 : Flag<["-"], "mno-sm3">, Group<m_x86_Features_Group>; 5065def msm4 : Flag<["-"], "msm4">, Group<m_x86_Features_Group>; 5066def mno_sm4 : Flag<["-"], "mno-sm4">, Group<m_x86_Features_Group>; 5067def mtbm : Flag<["-"], "mtbm">, Group<m_x86_Features_Group>; 5068def mno_tbm : Flag<["-"], "mno-tbm">, Group<m_x86_Features_Group>; 5069def mtsxldtrk : Flag<["-"], "mtsxldtrk">, Group<m_x86_Features_Group>; 5070def mno_tsxldtrk : Flag<["-"], "mno-tsxldtrk">, Group<m_x86_Features_Group>; 5071def muintr : Flag<["-"], "muintr">, Group<m_x86_Features_Group>; 5072def mno_uintr : Flag<["-"], "mno-uintr">, Group<m_x86_Features_Group>; 5073def mvaes : Flag<["-"], "mvaes">, Group<m_x86_Features_Group>; 5074def mno_vaes : Flag<["-"], "mno-vaes">, Group<m_x86_Features_Group>; 5075def mvpclmulqdq : Flag<["-"], "mvpclmulqdq">, Group<m_x86_Features_Group>; 5076def mno_vpclmulqdq : Flag<["-"], "mno-vpclmulqdq">, Group<m_x86_Features_Group>; 5077def mwaitpkg : Flag<["-"], "mwaitpkg">, Group<m_x86_Features_Group>; 5078def mno_waitpkg : Flag<["-"], "mno-waitpkg">, Group<m_x86_Features_Group>; 5079def mxop : Flag<["-"], "mxop">, Group<m_x86_Features_Group>; 5080def mno_xop : Flag<["-"], "mno-xop">, Group<m_x86_Features_Group>; 5081def mxsave : Flag<["-"], "mxsave">, Group<m_x86_Features_Group>; 5082def mno_xsave : Flag<["-"], "mno-xsave">, Group<m_x86_Features_Group>; 5083def mxsavec : Flag<["-"], "mxsavec">, Group<m_x86_Features_Group>; 5084def mno_xsavec : Flag<["-"], "mno-xsavec">, Group<m_x86_Features_Group>; 5085def mxsaveopt : Flag<["-"], "mxsaveopt">, Group<m_x86_Features_Group>; 5086def mno_xsaveopt : Flag<["-"], "mno-xsaveopt">, Group<m_x86_Features_Group>; 5087def mxsaves : Flag<["-"], "mxsaves">, Group<m_x86_Features_Group>; 5088def mno_xsaves : Flag<["-"], "mno-xsaves">, Group<m_x86_Features_Group>; 5089def mshstk : Flag<["-"], "mshstk">, Group<m_x86_Features_Group>; 5090def mno_shstk : Flag<["-"], "mno-shstk">, Group<m_x86_Features_Group>; 5091def mretpoline_external_thunk : Flag<["-"], "mretpoline-external-thunk">, Group<m_x86_Features_Group>; 5092def mno_retpoline_external_thunk : Flag<["-"], "mno-retpoline-external-thunk">, Group<m_x86_Features_Group>; 5093def mvzeroupper : Flag<["-"], "mvzeroupper">, Group<m_x86_Features_Group>; 5094def mno_vzeroupper : Flag<["-"], "mno-vzeroupper">, Group<m_x86_Features_Group>; 5095def mno_gather : Flag<["-"], "mno-gather">, Group<m_x86_Features_Group>, 5096 HelpText<"Disable generation of gather instructions in auto-vectorization(x86 only)">; 5097def mno_scatter : Flag<["-"], "mno-scatter">, Group<m_x86_Features_Group>, 5098 HelpText<"Disable generation of scatter instructions in auto-vectorization(x86 only)">; 5099 5100// These are legacy user-facing driver-level option spellings. They are always 5101// aliases for options that are spelled using the more common Unix / GNU flag 5102// style of double-dash and equals-joined flags. 5103def target_legacy_spelling : Separate<["-"], "target">, 5104 Alias<target>, 5105 Flags<[CoreOption]>; 5106 5107// Special internal option to handle -Xlinker --no-demangle. 5108def Z_Xlinker__no_demangle : Flag<["-"], "Z-Xlinker-no-demangle">, 5109 Flags<[Unsupported, NoArgumentUnused]>; 5110 5111// Special internal option to allow forwarding arbitrary arguments to linker. 5112def Zlinker_input : Separate<["-"], "Zlinker-input">, 5113 Flags<[Unsupported, NoArgumentUnused]>; 5114 5115// Reserved library options. 5116def Z_reserved_lib_stdcxx : Flag<["-"], "Z-reserved-lib-stdc++">, 5117 Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, Group<reserved_lib_Group>; 5118def Z_reserved_lib_cckext : Flag<["-"], "Z-reserved-lib-cckext">, 5119 Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, Group<reserved_lib_Group>; 5120 5121// Ignored options 5122multiclass BooleanFFlag<string name> { 5123 def f#NAME : Flag<["-"], "f"#name>; 5124 def fno_#NAME : Flag<["-"], "fno-"#name>; 5125} 5126 5127multiclass FlangIgnoredDiagOpt<string name> { 5128 def unsupported_warning_w#NAME : Flag<["-", "--"], "W"#name>, Group<flang_ignored_w_Group>; 5129} 5130 5131defm : BooleanFFlag<"keep-inline-functions">, Group<clang_ignored_gcc_optimization_f_Group>; 5132 5133def fprofile_dir : Joined<["-"], "fprofile-dir=">, Group<f_Group>; 5134 5135// The default value matches BinutilsVersion in MCAsmInfo.h. 5136def fbinutils_version_EQ : Joined<["-"], "fbinutils-version=">, 5137 MetaVarName<"<major.minor>">, Group<f_Group>, Flags<[CC1Option]>, 5138 HelpText<"Produced object files can use all ELF features supported by this " 5139 "binutils version and newer. If -fno-integrated-as is specified, the " 5140 "generated assembly will consider GNU as support. 'none' means that all ELF " 5141 "features can be used, regardless of binutils support. Defaults to 2.26.">; 5142def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group<f_Group>, Flags<[CoreOption, LinkOption]>; 5143def ld_path_EQ : Joined<["--"], "ld-path=">, Group<Link_Group>; 5144 5145defm align_labels : BooleanFFlag<"align-labels">, Group<clang_ignored_gcc_optimization_f_Group>; 5146def falign_labels_EQ : Joined<["-"], "falign-labels=">, Group<clang_ignored_gcc_optimization_f_Group>; 5147defm align_loops : BooleanFFlag<"align-loops">, Group<clang_ignored_gcc_optimization_f_Group>; 5148defm align_jumps : BooleanFFlag<"align-jumps">, Group<clang_ignored_gcc_optimization_f_Group>; 5149def falign_jumps_EQ : Joined<["-"], "falign-jumps=">, Group<clang_ignored_gcc_optimization_f_Group>; 5150 5151// FIXME: This option should be supported and wired up to our diognostics, but 5152// ignore it for now to avoid breaking builds that use it. 5153def fdiagnostics_show_location_EQ : Joined<["-"], "fdiagnostics-show-location=">, Group<clang_ignored_f_Group>; 5154 5155defm check_new : BoolOption<"f", "check-new", 5156 LangOpts<"CheckNew">, DefaultFalse, 5157 PosFlag<SetTrue, [], "Do not assume C++ operator new may not return NULL">, 5158 NegFlag<SetFalse>, BothFlags<[CC1Option]>>; 5159 5160defm caller_saves : BooleanFFlag<"caller-saves">, Group<clang_ignored_gcc_optimization_f_Group>; 5161defm reorder_blocks : BooleanFFlag<"reorder-blocks">, Group<clang_ignored_gcc_optimization_f_Group>; 5162defm branch_count_reg : BooleanFFlag<"branch-count-reg">, Group<clang_ignored_gcc_optimization_f_Group>; 5163defm default_inline : BooleanFFlag<"default-inline">, Group<clang_ignored_gcc_optimization_f_Group>; 5164defm fat_lto_objects : BooleanFFlag<"fat-lto-objects">, Group<clang_ignored_gcc_optimization_f_Group>; 5165defm float_store : BooleanFFlag<"float-store">, Group<clang_ignored_gcc_optimization_f_Group>; 5166defm friend_injection : BooleanFFlag<"friend-injection">, Group<clang_ignored_f_Group>; 5167defm function_attribute_list : BooleanFFlag<"function-attribute-list">, Group<clang_ignored_f_Group>; 5168defm gcse : BooleanFFlag<"gcse">, Group<clang_ignored_gcc_optimization_f_Group>; 5169defm gcse_after_reload: BooleanFFlag<"gcse-after-reload">, Group<clang_ignored_gcc_optimization_f_Group>; 5170defm gcse_las: BooleanFFlag<"gcse-las">, Group<clang_ignored_gcc_optimization_f_Group>; 5171defm gcse_sm: BooleanFFlag<"gcse-sm">, Group<clang_ignored_gcc_optimization_f_Group>; 5172defm gnu : BooleanFFlag<"gnu">, Group<clang_ignored_f_Group>; 5173defm implicit_templates : BooleanFFlag<"implicit-templates">, Group<clang_ignored_f_Group>; 5174defm implement_inlines : BooleanFFlag<"implement-inlines">, Group<clang_ignored_f_Group>; 5175defm merge_constants : BooleanFFlag<"merge-constants">, Group<clang_ignored_gcc_optimization_f_Group>; 5176defm modulo_sched : BooleanFFlag<"modulo-sched">, Group<clang_ignored_gcc_optimization_f_Group>; 5177defm modulo_sched_allow_regmoves : BooleanFFlag<"modulo-sched-allow-regmoves">, 5178 Group<clang_ignored_gcc_optimization_f_Group>; 5179defm inline_functions_called_once : BooleanFFlag<"inline-functions-called-once">, 5180 Group<clang_ignored_gcc_optimization_f_Group>; 5181def finline_limit_EQ : Joined<["-"], "finline-limit=">, Group<clang_ignored_gcc_optimization_f_Group>; 5182defm finline_limit : BooleanFFlag<"inline-limit">, Group<clang_ignored_gcc_optimization_f_Group>; 5183defm inline_small_functions : BooleanFFlag<"inline-small-functions">, 5184 Group<clang_ignored_gcc_optimization_f_Group>; 5185defm ipa_cp : BooleanFFlag<"ipa-cp">, 5186 Group<clang_ignored_gcc_optimization_f_Group>; 5187defm ivopts : BooleanFFlag<"ivopts">, Group<clang_ignored_gcc_optimization_f_Group>; 5188defm semantic_interposition : BoolFOption<"semantic-interposition", 5189 LangOpts<"SemanticInterposition">, DefaultFalse, 5190 PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>, 5191 DocBrief<[{Enable semantic interposition. Semantic interposition allows for the 5192interposition of a symbol by another at runtime, thus preventing a range of 5193inter-procedural optimisation.}]>; 5194defm non_call_exceptions : BooleanFFlag<"non-call-exceptions">, Group<clang_ignored_f_Group>; 5195defm peel_loops : BooleanFFlag<"peel-loops">, Group<clang_ignored_gcc_optimization_f_Group>; 5196defm permissive : BooleanFFlag<"permissive">, Group<clang_ignored_f_Group>; 5197defm prefetch_loop_arrays : BooleanFFlag<"prefetch-loop-arrays">, Group<clang_ignored_gcc_optimization_f_Group>; 5198defm printf : BooleanFFlag<"printf">, Group<clang_ignored_f_Group>; 5199defm profile : BooleanFFlag<"profile">, Group<clang_ignored_f_Group>; 5200defm profile_correction : BooleanFFlag<"profile-correction">, Group<clang_ignored_gcc_optimization_f_Group>; 5201defm profile_generate_sampling : BooleanFFlag<"profile-generate-sampling">, Group<clang_ignored_f_Group>; 5202defm profile_reusedist : BooleanFFlag<"profile-reusedist">, Group<clang_ignored_f_Group>; 5203defm profile_values : BooleanFFlag<"profile-values">, Group<clang_ignored_gcc_optimization_f_Group>; 5204defm regs_graph : BooleanFFlag<"regs-graph">, Group<clang_ignored_f_Group>; 5205defm rename_registers : BooleanFFlag<"rename-registers">, Group<clang_ignored_gcc_optimization_f_Group>; 5206defm ripa : BooleanFFlag<"ripa">, Group<clang_ignored_f_Group>; 5207defm schedule_insns : BooleanFFlag<"schedule-insns">, Group<clang_ignored_gcc_optimization_f_Group>; 5208defm schedule_insns2 : BooleanFFlag<"schedule-insns2">, Group<clang_ignored_gcc_optimization_f_Group>; 5209defm see : BooleanFFlag<"see">, Group<clang_ignored_f_Group>; 5210defm signaling_nans : BooleanFFlag<"signaling-nans">, Group<clang_ignored_gcc_optimization_f_Group>; 5211defm single_precision_constant : BooleanFFlag<"single-precision-constant">, 5212 Group<clang_ignored_gcc_optimization_f_Group>; 5213defm spec_constr_count : BooleanFFlag<"spec-constr-count">, Group<clang_ignored_f_Group>; 5214defm stack_check : BooleanFFlag<"stack-check">, Group<clang_ignored_f_Group>; 5215defm strength_reduce : 5216 BooleanFFlag<"strength-reduce">, Group<clang_ignored_gcc_optimization_f_Group>; 5217defm tls_model : BooleanFFlag<"tls-model">, Group<clang_ignored_f_Group>; 5218defm tracer : BooleanFFlag<"tracer">, Group<clang_ignored_gcc_optimization_f_Group>; 5219defm tree_dce : BooleanFFlag<"tree-dce">, Group<clang_ignored_gcc_optimization_f_Group>; 5220defm tree_salias : BooleanFFlag<"tree-salias">, Group<clang_ignored_f_Group>; 5221defm tree_ter : BooleanFFlag<"tree-ter">, Group<clang_ignored_gcc_optimization_f_Group>; 5222defm tree_vectorizer_verbose : BooleanFFlag<"tree-vectorizer-verbose">, Group<clang_ignored_f_Group>; 5223defm tree_vrp : BooleanFFlag<"tree-vrp">, Group<clang_ignored_gcc_optimization_f_Group>; 5224defm : BooleanFFlag<"unit-at-a-time">, Group<clang_ignored_gcc_optimization_f_Group>; 5225defm unroll_all_loops : BooleanFFlag<"unroll-all-loops">, Group<clang_ignored_gcc_optimization_f_Group>; 5226defm unsafe_loop_optimizations : BooleanFFlag<"unsafe-loop-optimizations">, 5227 Group<clang_ignored_gcc_optimization_f_Group>; 5228defm unswitch_loops : BooleanFFlag<"unswitch-loops">, Group<clang_ignored_gcc_optimization_f_Group>; 5229defm use_linker_plugin : BooleanFFlag<"use-linker-plugin">, Group<clang_ignored_gcc_optimization_f_Group>; 5230defm vect_cost_model : BooleanFFlag<"vect-cost-model">, Group<clang_ignored_gcc_optimization_f_Group>; 5231defm variable_expansion_in_unroller : BooleanFFlag<"variable-expansion-in-unroller">, 5232 Group<clang_ignored_gcc_optimization_f_Group>; 5233defm web : BooleanFFlag<"web">, Group<clang_ignored_gcc_optimization_f_Group>; 5234defm whole_program : BooleanFFlag<"whole-program">, Group<clang_ignored_gcc_optimization_f_Group>; 5235defm devirtualize : BooleanFFlag<"devirtualize">, Group<clang_ignored_gcc_optimization_f_Group>; 5236defm devirtualize_speculatively : BooleanFFlag<"devirtualize-speculatively">, 5237 Group<clang_ignored_gcc_optimization_f_Group>; 5238 5239// Generic gfortran options. 5240def A_DASH : Joined<["-"], "A-">, Group<gfortran_Group>; 5241def static_libgfortran : Flag<["-"], "static-libgfortran">, Group<gfortran_Group>; 5242 5243// "f" options with values for gfortran. 5244def fblas_matmul_limit_EQ : Joined<["-"], "fblas-matmul-limit=">, Group<gfortran_Group>; 5245def fcheck_EQ : Joined<["-"], "fcheck=">, Group<gfortran_Group>; 5246def fcoarray_EQ : Joined<["-"], "fcoarray=">, Group<gfortran_Group>; 5247def ffpe_trap_EQ : Joined<["-"], "ffpe-trap=">, Group<gfortran_Group>; 5248def ffree_line_length_VALUE : Joined<["-"], "ffree-line-length-">, Group<gfortran_Group>; 5249def finit_character_EQ : Joined<["-"], "finit-character=">, Group<gfortran_Group>; 5250def finit_integer_EQ : Joined<["-"], "finit-integer=">, Group<gfortran_Group>; 5251def finit_logical_EQ : Joined<["-"], "finit-logical=">, Group<gfortran_Group>; 5252def finit_real_EQ : Joined<["-"], "finit-real=">, Group<gfortran_Group>; 5253def fmax_array_constructor_EQ : Joined<["-"], "fmax-array-constructor=">, Group<gfortran_Group>; 5254def fmax_errors_EQ : Joined<["-"], "fmax-errors=">, Group<gfortran_Group>; 5255def fmax_stack_var_size_EQ : Joined<["-"], "fmax-stack-var-size=">, Group<gfortran_Group>; 5256def fmax_subrecord_length_EQ : Joined<["-"], "fmax-subrecord-length=">, Group<gfortran_Group>; 5257def frecord_marker_EQ : Joined<["-"], "frecord-marker=">, Group<gfortran_Group>; 5258 5259// "f" flags for gfortran. 5260defm aggressive_function_elimination : BooleanFFlag<"aggressive-function-elimination">, Group<gfortran_Group>; 5261defm align_commons : BooleanFFlag<"align-commons">, Group<gfortran_Group>; 5262defm all_intrinsics : BooleanFFlag<"all-intrinsics">, Group<gfortran_Group>; 5263def fautomatic : Flag<["-"], "fautomatic">; // -fno-automatic is significant 5264defm backtrace : BooleanFFlag<"backtrace">, Group<gfortran_Group>; 5265defm bounds_check : BooleanFFlag<"bounds-check">, Group<gfortran_Group>; 5266defm check_array_temporaries : BooleanFFlag<"check-array-temporaries">, Group<gfortran_Group>; 5267defm cray_pointer : BooleanFFlag<"cray-pointer">, Group<gfortran_Group>; 5268defm d_lines_as_code : BooleanFFlag<"d-lines-as-code">, Group<gfortran_Group>; 5269defm d_lines_as_comments : BooleanFFlag<"d-lines-as-comments">, Group<gfortran_Group>; 5270defm dollar_ok : BooleanFFlag<"dollar-ok">, Group<gfortran_Group>; 5271defm dump_fortran_optimized : BooleanFFlag<"dump-fortran-optimized">, Group<gfortran_Group>; 5272defm dump_fortran_original : BooleanFFlag<"dump-fortran-original">, Group<gfortran_Group>; 5273defm dump_parse_tree : BooleanFFlag<"dump-parse-tree">, Group<gfortran_Group>; 5274defm external_blas : BooleanFFlag<"external-blas">, Group<gfortran_Group>; 5275defm f2c : BooleanFFlag<"f2c">, Group<gfortran_Group>; 5276defm frontend_optimize : BooleanFFlag<"frontend-optimize">, Group<gfortran_Group>; 5277defm init_local_zero : BooleanFFlag<"init-local-zero">, Group<gfortran_Group>; 5278defm integer_4_integer_8 : BooleanFFlag<"integer-4-integer-8">, Group<gfortran_Group>; 5279defm max_identifier_length : BooleanFFlag<"max-identifier-length">, Group<gfortran_Group>; 5280defm module_private : BooleanFFlag<"module-private">, Group<gfortran_Group>; 5281defm pack_derived : BooleanFFlag<"pack-derived">, Group<gfortran_Group>; 5282//defm protect_parens : BooleanFFlag<"protect-parens">, Group<gfortran_Group>; 5283defm range_check : BooleanFFlag<"range-check">, Group<gfortran_Group>; 5284defm real_4_real_10 : BooleanFFlag<"real-4-real-10">, Group<gfortran_Group>; 5285defm real_4_real_16 : BooleanFFlag<"real-4-real-16">, Group<gfortran_Group>; 5286defm real_4_real_8 : BooleanFFlag<"real-4-real-8">, Group<gfortran_Group>; 5287defm real_8_real_10 : BooleanFFlag<"real-8-real-10">, Group<gfortran_Group>; 5288defm real_8_real_16 : BooleanFFlag<"real-8-real-16">, Group<gfortran_Group>; 5289defm real_8_real_4 : BooleanFFlag<"real-8-real-4">, Group<gfortran_Group>; 5290defm realloc_lhs : BooleanFFlag<"realloc-lhs">, Group<gfortran_Group>; 5291defm recursive : BooleanFFlag<"recursive">, Group<gfortran_Group>; 5292defm repack_arrays : BooleanFFlag<"repack-arrays">, Group<gfortran_Group>; 5293defm second_underscore : BooleanFFlag<"second-underscore">, Group<gfortran_Group>; 5294defm sign_zero : BooleanFFlag<"sign-zero">, Group<gfortran_Group>; 5295defm whole_file : BooleanFFlag<"whole-file">, Group<gfortran_Group>; 5296 5297// -W <arg> options unsupported by the flang compiler 5298// If any of these options are passed into flang's compiler driver, 5299// a warning will be raised and the argument will be claimed 5300defm : FlangIgnoredDiagOpt<"extra">; 5301defm : FlangIgnoredDiagOpt<"aliasing">; 5302defm : FlangIgnoredDiagOpt<"ampersand">; 5303defm : FlangIgnoredDiagOpt<"array-bounds">; 5304defm : FlangIgnoredDiagOpt<"c-binding-type">; 5305defm : FlangIgnoredDiagOpt<"character-truncation">; 5306defm : FlangIgnoredDiagOpt<"conversion">; 5307defm : FlangIgnoredDiagOpt<"do-subscript">; 5308defm : FlangIgnoredDiagOpt<"function-elimination">; 5309defm : FlangIgnoredDiagOpt<"implicit-interface">; 5310defm : FlangIgnoredDiagOpt<"implicit-procedure">; 5311defm : FlangIgnoredDiagOpt<"intrinsic-shadow">; 5312defm : FlangIgnoredDiagOpt<"use-without-only">; 5313defm : FlangIgnoredDiagOpt<"intrinsics-std">; 5314defm : FlangIgnoredDiagOpt<"line-truncation">; 5315defm : FlangIgnoredDiagOpt<"no-align-commons">; 5316defm : FlangIgnoredDiagOpt<"no-overwrite-recursive">; 5317defm : FlangIgnoredDiagOpt<"no-tabs">; 5318defm : FlangIgnoredDiagOpt<"real-q-constant">; 5319defm : FlangIgnoredDiagOpt<"surprising">; 5320defm : FlangIgnoredDiagOpt<"underflow">; 5321defm : FlangIgnoredDiagOpt<"unused-parameter">; 5322defm : FlangIgnoredDiagOpt<"realloc-lhs">; 5323defm : FlangIgnoredDiagOpt<"realloc-lhs-all">; 5324defm : FlangIgnoredDiagOpt<"frontend-loop-interchange">; 5325defm : FlangIgnoredDiagOpt<"target-lifetime">; 5326 5327// C++ SYCL options 5328def fsycl : Flag<["-"], "fsycl">, Flags<[NoXarchOption, CoreOption]>, 5329 Group<sycl_Group>, HelpText<"Enables SYCL kernels compilation for device">; 5330def fno_sycl : Flag<["-"], "fno-sycl">, Flags<[NoXarchOption, CoreOption]>, 5331 Group<sycl_Group>, HelpText<"Disables SYCL kernels compilation for device">; 5332 5333//===----------------------------------------------------------------------===// 5334// FLangOption + NoXarchOption 5335//===----------------------------------------------------------------------===// 5336 5337def flang_experimental_hlfir : Flag<["-"], "flang-experimental-hlfir">, 5338 Flags<[FlangOption, FC1Option, FlangOnlyOption, NoXarchOption, HelpHidden]>, 5339 HelpText<"Use HLFIR lowering (experimental)">; 5340 5341def flang_experimental_polymorphism : Flag<["-"], "flang-experimental-polymorphism">, 5342 Flags<[FlangOption, FC1Option, FlangOnlyOption, NoXarchOption, HelpHidden]>, 5343 HelpText<"Enable Fortran 2003 polymorphism (experimental)">; 5344 5345 5346//===----------------------------------------------------------------------===// 5347// FLangOption + CoreOption + NoXarchOption 5348//===----------------------------------------------------------------------===// 5349 5350def Xflang : Separate<["-"], "Xflang">, 5351 HelpText<"Pass <arg> to the flang compiler">, MetaVarName<"<arg>">, 5352 Flags<[FlangOption, FlangOnlyOption, NoXarchOption, CoreOption]>, 5353 Group<CompileOnly_Group>; 5354 5355//===----------------------------------------------------------------------===// 5356// FlangOption and FC1 Options 5357//===----------------------------------------------------------------------===// 5358 5359let Flags = [FC1Option, FlangOption, FlangOnlyOption] in { 5360 5361def cpp : Flag<["-"], "cpp">, Group<f_Group>, 5362 HelpText<"Enable predefined and command line preprocessor macros">; 5363def nocpp : Flag<["-"], "nocpp">, Group<f_Group>, 5364 HelpText<"Disable predefined and command line preprocessor macros">; 5365def module_dir : JoinedOrSeparate<["-"], "module-dir">, MetaVarName<"<dir>">, 5366 HelpText<"Put MODULE files in <dir>">, 5367 DocBrief<[{This option specifies where to put .mod files for compiled modules. 5368It is also added to the list of directories to be searched by an USE statement. 5369The default is the current directory.}]>; 5370 5371def ffixed_form : Flag<["-"], "ffixed-form">, Group<f_Group>, 5372 HelpText<"Process source files in fixed form">; 5373def ffree_form : Flag<["-"], "ffree-form">, Group<f_Group>, 5374 HelpText<"Process source files in free form">; 5375def ffixed_line_length_EQ : Joined<["-"], "ffixed-line-length=">, Group<f_Group>, 5376 HelpText<"Use <value> as character line width in fixed mode">, 5377 DocBrief<[{Set column after which characters are ignored in typical fixed-form lines in the source 5378file}]>; 5379def ffixed_line_length_VALUE : Joined<["-"], "ffixed-line-length-">, Group<f_Group>, Alias<ffixed_line_length_EQ>; 5380def fconvert_EQ : Joined<["-"], "fconvert=">, Group<f_Group>, 5381 HelpText<"Set endian conversion of data for unformatted files">; 5382def fopenacc : Flag<["-"], "fopenacc">, Group<f_Group>, 5383 HelpText<"Enable OpenACC">; 5384def fdefault_double_8 : Flag<["-"],"fdefault-double-8">, Group<f_Group>, 5385 HelpText<"Set the default double precision kind to an 8 byte wide type">; 5386def fdefault_integer_8 : Flag<["-"],"fdefault-integer-8">, Group<f_Group>, 5387 HelpText<"Set the default integer and logical kind to an 8 byte wide type">; 5388def fdefault_real_8 : Flag<["-"],"fdefault-real-8">, Group<f_Group>, 5389 HelpText<"Set the default real kind to an 8 byte wide type">; 5390def flarge_sizes : Flag<["-"],"flarge-sizes">, Group<f_Group>, 5391 HelpText<"Use INTEGER(KIND=8) for the result type in size-related intrinsics">; 5392 5393def falternative_parameter_statement : Flag<["-"], "falternative-parameter-statement">, Group<f_Group>, 5394 HelpText<"Enable the old style PARAMETER statement">; 5395def fintrinsic_modules_path : Separate<["-"], "fintrinsic-modules-path">, Group<f_Group>, MetaVarName<"<dir>">, 5396 HelpText<"Specify where to find the compiled intrinsic modules">, 5397 DocBrief<[{This option specifies the location of pre-compiled intrinsic modules, 5398 if they are not in the default location expected by the compiler.}]>; 5399 5400defm backslash : OptInFC1FFlag<"backslash", "Specify that backslash in string introduces an escape character">; 5401defm xor_operator : OptInFC1FFlag<"xor-operator", "Enable .XOR. as a synonym of .NEQV.">; 5402defm logical_abbreviations : OptInFC1FFlag<"logical-abbreviations", "Enable logical abbreviations">; 5403defm implicit_none : OptInFC1FFlag<"implicit-none", "No implicit typing allowed unless overridden by IMPLICIT statements">; 5404defm underscoring : OptInFC1FFlag<"underscoring", "Appends one trailing underscore to external names">; 5405 5406def fno_automatic : Flag<["-"], "fno-automatic">, Group<f_Group>, 5407 HelpText<"Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE">; 5408 5409defm stack_arrays : BoolOptionWithoutMarshalling<"f", "stack-arrays", 5410 PosFlag<SetTrue, [], "Attempt to allocate array temporaries on the stack, no matter their size">, 5411 NegFlag<SetFalse, [], "Allocate array temporaries on the heap (default)">>; 5412defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stride", 5413 PosFlag<SetTrue, [], "Create unit-strided versions of loops">, 5414 NegFlag<SetFalse, [], "Do not create unit-strided loops (default)">>; 5415} // let Flags = [FC1Option, FlangOption, FlangOnlyOption] 5416 5417def J : JoinedOrSeparate<["-"], "J">, 5418 Flags<[RenderJoined, FlangOption, FC1Option, FlangOnlyOption]>, 5419 Group<gfortran_Group>, 5420 Alias<module_dir>; 5421 5422//===----------------------------------------------------------------------===// 5423// FC1 Options 5424//===----------------------------------------------------------------------===// 5425 5426let Flags = [FC1Option, FlangOnlyOption] in { 5427 5428def fget_definition : MultiArg<["-"], "fget-definition", 3>, 5429 HelpText<"Get the symbol definition from <line> <start-column> <end-column>">, 5430 Group<Action_Group>; 5431def test_io : Flag<["-"], "test-io">, Group<Action_Group>, 5432 HelpText<"Run the InputOuputTest action. Use for development and testing only.">; 5433def fdebug_unparse_no_sema : Flag<["-"], "fdebug-unparse-no-sema">, Group<Action_Group>, 5434 HelpText<"Unparse and stop (skips the semantic checks)">, 5435 DocBrief<[{Only run the parser, then unparse the parse-tree and output the 5436generated Fortran source file. Semantic checks are disabled.}]>; 5437def fdebug_unparse : Flag<["-"], "fdebug-unparse">, Group<Action_Group>, 5438 HelpText<"Unparse and stop.">, 5439 DocBrief<[{Run the parser and the semantic checks. Then unparse the 5440parse-tree and output the generated Fortran source file.}]>; 5441def fdebug_unparse_with_symbols : Flag<["-"], "fdebug-unparse-with-symbols">, Group<Action_Group>, 5442 HelpText<"Unparse and stop.">; 5443def fdebug_dump_symbols : Flag<["-"], "fdebug-dump-symbols">, Group<Action_Group>, 5444 HelpText<"Dump symbols after the semantic analysis">; 5445def fdebug_dump_parse_tree : Flag<["-"], "fdebug-dump-parse-tree">, Group<Action_Group>, 5446 HelpText<"Dump the parse tree">, 5447 DocBrief<[{Run the Parser and the semantic checks, and then output the 5448parse tree.}]>; 5449def fdebug_dump_pft : Flag<["-"], "fdebug-dump-pft">, Group<Action_Group>, 5450 HelpText<"Dump the pre-fir parse tree">; 5451def fdebug_dump_parse_tree_no_sema : Flag<["-"], "fdebug-dump-parse-tree-no-sema">, Group<Action_Group>, 5452 HelpText<"Dump the parse tree (skips the semantic checks)">, 5453 DocBrief<[{Run the Parser and then output the parse tree. Semantic 5454checks are disabled.}]>; 5455def fdebug_dump_all : Flag<["-"], "fdebug-dump-all">, Group<Action_Group>, 5456 HelpText<"Dump symbols and the parse tree after the semantic checks">; 5457def fdebug_dump_provenance : Flag<["-"], "fdebug-dump-provenance">, Group<Action_Group>, 5458 HelpText<"Dump provenance">; 5459def fdebug_dump_parsing_log : Flag<["-"], "fdebug-dump-parsing-log">, Group<Action_Group>, 5460 HelpText<"Run instrumented parse and dump the parsing log">; 5461def fdebug_measure_parse_tree : Flag<["-"], "fdebug-measure-parse-tree">, Group<Action_Group>, 5462 HelpText<"Measure the parse tree">; 5463def fdebug_pre_fir_tree : Flag<["-"], "fdebug-pre-fir-tree">, Group<Action_Group>, 5464 HelpText<"Dump the pre-FIR tree">; 5465def fdebug_module_writer : Flag<["-"],"fdebug-module-writer">, 5466 HelpText<"Enable debug messages while writing module files">; 5467def fget_symbols_sources : Flag<["-"], "fget-symbols-sources">, Group<Action_Group>, 5468 HelpText<"Dump symbols and their source code locations">; 5469 5470def module_suffix : Separate<["-"], "module-suffix">, Group<f_Group>, MetaVarName<"<suffix>">, 5471 HelpText<"Use <suffix> as the suffix for module files (the default value is `.mod`)">; 5472def fno_reformat : Flag<["-"], "fno-reformat">, Group<Preprocessor_Group>, 5473 HelpText<"Dump the cooked character stream in -E mode">; 5474defm analyzed_objects_for_unparse : OptOutFC1FFlag<"analyzed-objects-for-unparse", "", "Do not use the analyzed objects when unparsing">; 5475 5476def emit_fir : Flag<["-"], "emit-fir">, Group<Action_Group>, 5477 HelpText<"Build the parse tree, then lower it to FIR">; 5478def emit_mlir : Flag<["-"], "emit-mlir">, Alias<emit_fir>; 5479 5480def emit_hlfir : Flag<["-"], "emit-hlfir">, Group<Action_Group>, 5481 HelpText<"Build the parse tree, then lower it to HLFIR">; 5482 5483} // let Flags = [FC1Option, FlangOnlyOption] 5484 5485//===----------------------------------------------------------------------===// 5486// Target Options (cc1 + cc1as) 5487//===----------------------------------------------------------------------===// 5488 5489let Flags = [CC1Option, CC1AsOption, NoDriverOption] in { 5490 5491def tune_cpu : Separate<["-"], "tune-cpu">, 5492 HelpText<"Tune for a specific cpu type">, 5493 MarshallingInfoString<TargetOpts<"TuneCPU">>; 5494def target_abi : Separate<["-"], "target-abi">, 5495 HelpText<"Target a particular ABI type">, 5496 MarshallingInfoString<TargetOpts<"ABI">>; 5497def target_sdk_version_EQ : Joined<["-"], "target-sdk-version=">, 5498 HelpText<"The version of target SDK used for compilation">; 5499def darwin_target_variant_sdk_version_EQ : Joined<["-"], 5500 "darwin-target-variant-sdk-version=">, 5501 HelpText<"The version of darwin target variant SDK used for compilation">; 5502 5503} // let Flags = [CC1Option, CC1AsOption, NoDriverOption] 5504 5505let Flags = [CC1Option, CC1AsOption] in { 5506 5507def darwin_target_variant_triple : Separate<["-"], "darwin-target-variant-triple">, 5508 HelpText<"Specify the darwin target variant triple">, 5509 MarshallingInfoString<TargetOpts<"DarwinTargetVariantTriple">>, 5510 Normalizer<"normalizeTriple">; 5511 5512} // let Flags = [CC1Option, CC1AsOption] 5513 5514//===----------------------------------------------------------------------===// 5515// Target Options (cc1 + cc1as + fc1) 5516//===----------------------------------------------------------------------===// 5517 5518let Flags = [CC1Option, CC1AsOption, FC1Option, NoDriverOption] in { 5519 5520def target_cpu : Separate<["-"], "target-cpu">, 5521 HelpText<"Target a specific cpu type">, 5522 MarshallingInfoString<TargetOpts<"CPU">>; 5523def target_feature : Separate<["-"], "target-feature">, 5524 HelpText<"Target specific attributes">, 5525 MarshallingInfoStringVector<TargetOpts<"FeaturesAsWritten">>; 5526def triple : Separate<["-"], "triple">, 5527 HelpText<"Specify target triple (e.g. i686-apple-darwin9)">, 5528 MarshallingInfoString<TargetOpts<"Triple">, "llvm::Triple::normalize(llvm::sys::getDefaultTargetTriple())">, 5529 AlwaysEmit, Normalizer<"normalizeTriple">; 5530 5531} // let Flags = [CC1Option, CC1ASOption, FC1Option, NoDriverOption] 5532 5533//===----------------------------------------------------------------------===// 5534// Target Options (other) 5535//===----------------------------------------------------------------------===// 5536 5537let Flags = [CC1Option, NoDriverOption] in { 5538 5539def target_linker_version : Separate<["-"], "target-linker-version">, 5540 HelpText<"Target linker version">, 5541 MarshallingInfoString<TargetOpts<"LinkerVersion">>; 5542def triple_EQ : Joined<["-"], "triple=">, Alias<triple>; 5543def mfpmath : Separate<["-"], "mfpmath">, 5544 HelpText<"Which unit to use for fp math">, 5545 MarshallingInfoString<TargetOpts<"FPMath">>; 5546 5547defm padding_on_unsigned_fixed_point : BoolOption<"f", "padding-on-unsigned-fixed-point", 5548 LangOpts<"PaddingOnUnsignedFixedPoint">, DefaultFalse, 5549 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">, 5550 NegFlag<SetFalse>>, 5551 ShouldParseIf<ffixed_point.KeyPath>; 5552 5553} // let Flags = [CC1Option, NoDriverOption] 5554 5555//===----------------------------------------------------------------------===// 5556// Analyzer Options 5557//===----------------------------------------------------------------------===// 5558 5559let Flags = [CC1Option, NoDriverOption] in { 5560 5561def analysis_UnoptimizedCFG : Flag<["-"], "unoptimized-cfg">, 5562 HelpText<"Generate unoptimized CFGs for all analyses">, 5563 MarshallingInfoFlag<AnalyzerOpts<"UnoptimizedCFG">>; 5564def analysis_CFGAddImplicitDtors : Flag<["-"], "cfg-add-implicit-dtors">, 5565 HelpText<"Add C++ implicit destructors to CFGs for all analyses">; 5566 5567def analyzer_constraints : Separate<["-"], "analyzer-constraints">, 5568 HelpText<"Source Code Analysis - Symbolic Constraint Engines">; 5569def analyzer_constraints_EQ : Joined<["-"], "analyzer-constraints=">, 5570 Alias<analyzer_constraints>; 5571 5572def analyzer_output : Separate<["-"], "analyzer-output">, 5573 HelpText<"Source Code Analysis - Output Options">; 5574def analyzer_output_EQ : Joined<["-"], "analyzer-output=">, 5575 Alias<analyzer_output>; 5576 5577def analyzer_purge : Separate<["-"], "analyzer-purge">, 5578 HelpText<"Source Code Analysis - Dead Symbol Removal Frequency">; 5579def analyzer_purge_EQ : Joined<["-"], "analyzer-purge=">, Alias<analyzer_purge>; 5580 5581def analyzer_opt_analyze_headers : Flag<["-"], "analyzer-opt-analyze-headers">, 5582 HelpText<"Force the static analyzer to analyze functions defined in header files">, 5583 MarshallingInfoFlag<AnalyzerOpts<"AnalyzeAll">>; 5584def analyzer_display_progress : Flag<["-"], "analyzer-display-progress">, 5585 HelpText<"Emit verbose output about the analyzer's progress">, 5586 MarshallingInfoFlag<AnalyzerOpts<"AnalyzerDisplayProgress">>; 5587def analyze_function : Separate<["-"], "analyze-function">, 5588 HelpText<"Run analysis on specific function (for C++ include parameters in name)">, 5589 MarshallingInfoString<AnalyzerOpts<"AnalyzeSpecificFunction">>; 5590def analyze_function_EQ : Joined<["-"], "analyze-function=">, Alias<analyze_function>; 5591def trim_egraph : Flag<["-"], "trim-egraph">, 5592 HelpText<"Only show error-related paths in the analysis graph">, 5593 MarshallingInfoFlag<AnalyzerOpts<"TrimGraph">>; 5594def analyzer_viz_egraph_graphviz : Flag<["-"], "analyzer-viz-egraph-graphviz">, 5595 HelpText<"Display exploded graph using GraphViz">, 5596 MarshallingInfoFlag<AnalyzerOpts<"visualizeExplodedGraphWithGraphViz">>; 5597def analyzer_dump_egraph : Separate<["-"], "analyzer-dump-egraph">, 5598 HelpText<"Dump exploded graph to the specified file">, 5599 MarshallingInfoString<AnalyzerOpts<"DumpExplodedGraphTo">>; 5600def analyzer_dump_egraph_EQ : Joined<["-"], "analyzer-dump-egraph=">, Alias<analyzer_dump_egraph>; 5601 5602def analyzer_inline_max_stack_depth : Separate<["-"], "analyzer-inline-max-stack-depth">, 5603 HelpText<"Bound on stack depth while inlining (4 by default)">, 5604 // Cap the stack depth at 4 calls (5 stack frames, base + 4 calls). 5605 MarshallingInfoInt<AnalyzerOpts<"InlineMaxStackDepth">, "5">; 5606def analyzer_inline_max_stack_depth_EQ : Joined<["-"], "analyzer-inline-max-stack-depth=">, 5607 Alias<analyzer_inline_max_stack_depth>; 5608 5609def analyzer_inlining_mode : Separate<["-"], "analyzer-inlining-mode">, 5610 HelpText<"Specify the function selection heuristic used during inlining">; 5611def analyzer_inlining_mode_EQ : Joined<["-"], "analyzer-inlining-mode=">, Alias<analyzer_inlining_mode>; 5612 5613def analyzer_disable_retry_exhausted : Flag<["-"], "analyzer-disable-retry-exhausted">, 5614 HelpText<"Do not re-analyze paths leading to exhausted nodes with a different strategy (may decrease code coverage)">, 5615 MarshallingInfoFlag<AnalyzerOpts<"NoRetryExhausted">>; 5616 5617def analyzer_max_loop : Separate<["-"], "analyzer-max-loop">, 5618 HelpText<"The maximum number of times the analyzer will go through a loop">, 5619 MarshallingInfoInt<AnalyzerOpts<"maxBlockVisitOnPath">, "4">; 5620def analyzer_stats : Flag<["-"], "analyzer-stats">, 5621 HelpText<"Print internal analyzer statistics.">, 5622 MarshallingInfoFlag<AnalyzerOpts<"PrintStats">>; 5623 5624def analyzer_checker : Separate<["-"], "analyzer-checker">, 5625 HelpText<"Choose analyzer checkers to enable">, 5626 ValuesCode<[{ 5627 static constexpr const char VALUES_CODE [] = 5628 #define GET_CHECKERS 5629 #define CHECKER(FULLNAME, CLASS, HT, DOC_URI, IS_HIDDEN) FULLNAME "," 5630 #include "clang/StaticAnalyzer/Checkers/Checkers.inc" 5631 #undef GET_CHECKERS 5632 #define GET_PACKAGES 5633 #define PACKAGE(FULLNAME) FULLNAME "," 5634 #include "clang/StaticAnalyzer/Checkers/Checkers.inc" 5635 #undef GET_PACKAGES 5636 ; 5637 }]>; 5638def analyzer_checker_EQ : Joined<["-"], "analyzer-checker=">, 5639 Alias<analyzer_checker>; 5640 5641def analyzer_disable_checker : Separate<["-"], "analyzer-disable-checker">, 5642 HelpText<"Choose analyzer checkers to disable">; 5643def analyzer_disable_checker_EQ : Joined<["-"], "analyzer-disable-checker=">, 5644 Alias<analyzer_disable_checker>; 5645 5646def analyzer_disable_all_checks : Flag<["-"], "analyzer-disable-all-checks">, 5647 HelpText<"Disable all static analyzer checks">, 5648 MarshallingInfoFlag<AnalyzerOpts<"DisableAllCheckers">>; 5649 5650def analyzer_checker_help : Flag<["-"], "analyzer-checker-help">, 5651 HelpText<"Display the list of analyzer checkers that are available">, 5652 MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerHelp">>; 5653 5654def analyzer_checker_help_alpha : Flag<["-"], "analyzer-checker-help-alpha">, 5655 HelpText<"Display the list of in development analyzer checkers. These " 5656 "are NOT considered safe, they are unstable and will emit incorrect " 5657 "reports. Enable ONLY FOR DEVELOPMENT purposes">, 5658 MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerHelpAlpha">>; 5659 5660def analyzer_checker_help_developer : Flag<["-"], "analyzer-checker-help-developer">, 5661 HelpText<"Display the list of developer-only checkers such as modeling " 5662 "and debug checkers">, 5663 MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerHelpDeveloper">>; 5664 5665def analyzer_config_help : Flag<["-"], "analyzer-config-help">, 5666 HelpText<"Display the list of -analyzer-config options. These are meant for " 5667 "development purposes only!">, 5668 MarshallingInfoFlag<AnalyzerOpts<"ShowConfigOptionsList">>; 5669 5670def analyzer_list_enabled_checkers : Flag<["-"], "analyzer-list-enabled-checkers">, 5671 HelpText<"Display the list of enabled analyzer checkers">, 5672 MarshallingInfoFlag<AnalyzerOpts<"ShowEnabledCheckerList">>; 5673 5674def analyzer_config : Separate<["-"], "analyzer-config">, 5675 HelpText<"Choose analyzer options to enable">; 5676 5677def analyzer_checker_option_help : Flag<["-"], "analyzer-checker-option-help">, 5678 HelpText<"Display the list of checker and package options">, 5679 MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionList">>; 5680 5681def analyzer_checker_option_help_alpha : Flag<["-"], "analyzer-checker-option-help-alpha">, 5682 HelpText<"Display the list of in development checker and package options. " 5683 "These are NOT considered safe, they are unstable and will emit " 5684 "incorrect reports. Enable ONLY FOR DEVELOPMENT purposes">, 5685 MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionAlphaList">>; 5686 5687def analyzer_checker_option_help_developer : Flag<["-"], "analyzer-checker-option-help-developer">, 5688 HelpText<"Display the list of checker and package options meant for " 5689 "development purposes only">, 5690 MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionDeveloperList">>; 5691 5692def analyzer_config_compatibility_mode : Separate<["-"], "analyzer-config-compatibility-mode">, 5693 HelpText<"Don't emit errors on invalid analyzer-config inputs">, 5694 Values<"true,false">, NormalizedValues<[[{false}], [{true}]]>, 5695 MarshallingInfoEnum<AnalyzerOpts<"ShouldEmitErrorsOnInvalidConfigValue">, [{true}]>; 5696 5697def analyzer_config_compatibility_mode_EQ : Joined<["-"], "analyzer-config-compatibility-mode=">, 5698 Alias<analyzer_config_compatibility_mode>; 5699 5700def analyzer_werror : Flag<["-"], "analyzer-werror">, 5701 HelpText<"Emit analyzer results as errors rather than warnings">, 5702 MarshallingInfoFlag<AnalyzerOpts<"AnalyzerWerror">>; 5703 5704} // let Flags = [CC1Option, NoDriverOption] 5705 5706//===----------------------------------------------------------------------===// 5707// Migrator Options 5708//===----------------------------------------------------------------------===// 5709 5710def migrator_no_nsalloc_error : Flag<["-"], "no-ns-alloc-error">, 5711 HelpText<"Do not error on use of NSAllocateCollectable/NSReallocateCollectable">, 5712 Flags<[CC1Option, NoDriverOption]>, 5713 MarshallingInfoFlag<MigratorOpts<"NoNSAllocReallocError">>; 5714 5715def migrator_no_finalize_removal : Flag<["-"], "no-finalize-removal">, 5716 HelpText<"Do not remove finalize method in gc mode">, 5717 Flags<[CC1Option, NoDriverOption]>, 5718 MarshallingInfoFlag<MigratorOpts<"NoFinalizeRemoval">>; 5719 5720//===----------------------------------------------------------------------===// 5721// CodeGen Options 5722//===----------------------------------------------------------------------===// 5723 5724let Flags = [CC1Option, CC1AsOption, FC1Option, NoDriverOption] in { 5725 5726def mrelocation_model : Separate<["-"], "mrelocation-model">, 5727 HelpText<"The relocation model to use">, Values<"static,pic,ropi,rwpi,ropi-rwpi,dynamic-no-pic">, 5728 NormalizedValuesScope<"llvm::Reloc">, 5729 NormalizedValues<["Static", "PIC_", "ROPI", "RWPI", "ROPI_RWPI", "DynamicNoPIC"]>, 5730 MarshallingInfoEnum<CodeGenOpts<"RelocationModel">, "PIC_">; 5731def debug_info_kind_EQ : Joined<["-"], "debug-info-kind=">; 5732 5733} // let Flags = [CC1Option, CC1AsOption, FC1Option, NoDriverOption] 5734 5735let Flags = [CC1Option, CC1AsOption, NoDriverOption] in { 5736 5737def debug_info_macro : Flag<["-"], "debug-info-macro">, 5738 HelpText<"Emit macro debug information">, 5739 MarshallingInfoFlag<CodeGenOpts<"MacroDebugInfo">>; 5740def default_function_attr : Separate<["-"], "default-function-attr">, 5741 HelpText<"Apply given attribute to all functions">, 5742 MarshallingInfoStringVector<CodeGenOpts<"DefaultFunctionAttrs">>; 5743def dwarf_version_EQ : Joined<["-"], "dwarf-version=">, 5744 MarshallingInfoInt<CodeGenOpts<"DwarfVersion">>; 5745def debugger_tuning_EQ : Joined<["-"], "debugger-tuning=">, 5746 Values<"gdb,lldb,sce,dbx">, 5747 NormalizedValuesScope<"llvm::DebuggerKind">, NormalizedValues<["GDB", "LLDB", "SCE", "DBX"]>, 5748 MarshallingInfoEnum<CodeGenOpts<"DebuggerTuning">, "Default">; 5749def dwarf_debug_flags : Separate<["-"], "dwarf-debug-flags">, 5750 HelpText<"The string to embed in the Dwarf debug flags record.">, 5751 MarshallingInfoString<CodeGenOpts<"DwarfDebugFlags">>; 5752def record_command_line : Separate<["-"], "record-command-line">, 5753 HelpText<"The string to embed in the .LLVM.command.line section.">, 5754 MarshallingInfoString<CodeGenOpts<"RecordCommandLine">>; 5755def compress_debug_sections_EQ : Joined<["-", "--"], "compress-debug-sections=">, 5756 HelpText<"DWARF debug sections compression type">, Values<"none,zlib,zstd">, 5757 NormalizedValuesScope<"llvm::DebugCompressionType">, NormalizedValues<["None", "Zlib", "Zstd"]>, 5758 MarshallingInfoEnum<CodeGenOpts<"CompressDebugSections">, "None">; 5759def compress_debug_sections : Flag<["-", "--"], "compress-debug-sections">, 5760 Alias<compress_debug_sections_EQ>, AliasArgs<["zlib"]>; 5761def mno_exec_stack : Flag<["-"], "mnoexecstack">, 5762 HelpText<"Mark the file as not needing an executable stack">, 5763 MarshallingInfoFlag<CodeGenOpts<"NoExecStack">>; 5764def massembler_no_warn : Flag<["-"], "massembler-no-warn">, 5765 HelpText<"Make assembler not emit warnings">, 5766 MarshallingInfoFlag<CodeGenOpts<"NoWarn">>; 5767def massembler_fatal_warnings : Flag<["-"], "massembler-fatal-warnings">, 5768 HelpText<"Make assembler warnings fatal">, 5769 MarshallingInfoFlag<CodeGenOpts<"FatalWarnings">>; 5770def mrelax_relocations_no : Flag<["-"], "mrelax-relocations=no">, 5771 HelpText<"Disable x86 relax relocations">, 5772 MarshallingInfoNegativeFlag<CodeGenOpts<"RelaxELFRelocations">>; 5773def msave_temp_labels : Flag<["-"], "msave-temp-labels">, 5774 HelpText<"Save temporary labels in the symbol table. " 5775 "Note this may change .s semantics and shouldn't generally be used " 5776 "on compiler-generated code.">, 5777 MarshallingInfoFlag<CodeGenOpts<"SaveTempLabels">>; 5778def mno_type_check : Flag<["-"], "mno-type-check">, 5779 HelpText<"Don't perform type checking of the assembly code (wasm only)">, 5780 MarshallingInfoFlag<CodeGenOpts<"NoTypeCheck">>; 5781def fno_math_builtin : Flag<["-"], "fno-math-builtin">, 5782 HelpText<"Disable implicit builtin knowledge of math functions">, 5783 MarshallingInfoFlag<LangOpts<"NoMathBuiltin">>; 5784def fno_use_ctor_homing: Flag<["-"], "fno-use-ctor-homing">, 5785 HelpText<"Don't use constructor homing for debug info">; 5786def fuse_ctor_homing: Flag<["-"], "fuse-ctor-homing">, 5787 HelpText<"Use constructor homing if we are using limited debug info already">; 5788def as_secure_log_file : Separate<["-"], "as-secure-log-file">, 5789 HelpText<"Emit .secure_log_unique directives to this filename.">, 5790 MarshallingInfoString<CodeGenOpts<"AsSecureLogFile">>; 5791 5792} // let Flags = [CC1Option, CC1AsOption, NoDriverOption] 5793 5794let Flags = [CC1Option, NoDriverOption] in { 5795 5796def llvm_verify_each : Flag<["-"], "llvm-verify-each">, 5797 HelpText<"Run the LLVM verifier after every LLVM pass">, 5798 MarshallingInfoFlag<CodeGenOpts<"VerifyEach">>; 5799def disable_llvm_verifier : Flag<["-"], "disable-llvm-verifier">, 5800 HelpText<"Don't run the LLVM IR verifier pass">, 5801 MarshallingInfoNegativeFlag<CodeGenOpts<"VerifyModule">>; 5802def disable_llvm_passes : Flag<["-"], "disable-llvm-passes">, 5803 HelpText<"Use together with -emit-llvm to get pristine LLVM IR from the " 5804 "frontend by not running any LLVM passes at all">, 5805 MarshallingInfoFlag<CodeGenOpts<"DisableLLVMPasses">>; 5806def disable_llvm_optzns : Flag<["-"], "disable-llvm-optzns">, 5807 Alias<disable_llvm_passes>; 5808def disable_lifetimemarkers : Flag<["-"], "disable-lifetime-markers">, 5809 HelpText<"Disable lifetime-markers emission even when optimizations are " 5810 "enabled">, 5811 MarshallingInfoFlag<CodeGenOpts<"DisableLifetimeMarkers">>; 5812def disable_O0_optnone : Flag<["-"], "disable-O0-optnone">, 5813 HelpText<"Disable adding the optnone attribute to functions at O0">, 5814 MarshallingInfoFlag<CodeGenOpts<"DisableO0ImplyOptNone">>; 5815def disable_red_zone : Flag<["-"], "disable-red-zone">, 5816 HelpText<"Do not emit code that uses the red zone.">, 5817 MarshallingInfoFlag<CodeGenOpts<"DisableRedZone">>; 5818def dwarf_ext_refs : Flag<["-"], "dwarf-ext-refs">, 5819 HelpText<"Generate debug info with external references to clang modules" 5820 " or precompiled headers">, 5821 MarshallingInfoFlag<CodeGenOpts<"DebugTypeExtRefs">>; 5822def dwarf_explicit_import : Flag<["-"], "dwarf-explicit-import">, 5823 HelpText<"Generate explicit import from anonymous namespace to containing" 5824 " scope">, 5825 MarshallingInfoFlag<CodeGenOpts<"DebugExplicitImport">>; 5826def debug_forward_template_params : Flag<["-"], "debug-forward-template-params">, 5827 HelpText<"Emit complete descriptions of template parameters in forward" 5828 " declarations">, 5829 MarshallingInfoFlag<CodeGenOpts<"DebugFwdTemplateParams">>; 5830def fforbid_guard_variables : Flag<["-"], "fforbid-guard-variables">, 5831 HelpText<"Emit an error if a C++ static local initializer would need a guard variable">, 5832 MarshallingInfoFlag<CodeGenOpts<"ForbidGuardVariables">>; 5833def no_implicit_float : Flag<["-"], "no-implicit-float">, 5834 HelpText<"Don't generate implicit floating point or vector instructions">, 5835 MarshallingInfoFlag<CodeGenOpts<"NoImplicitFloat">>; 5836def fdump_vtable_layouts : Flag<["-"], "fdump-vtable-layouts">, 5837 HelpText<"Dump the layouts of all vtables that will be emitted in a translation unit">, 5838 MarshallingInfoFlag<LangOpts<"DumpVTableLayouts">>; 5839def fmerge_functions : Flag<["-"], "fmerge-functions">, 5840 HelpText<"Permit merging of identical functions when optimizing.">, 5841 MarshallingInfoFlag<CodeGenOpts<"MergeFunctions">>; 5842def coverage_data_file : Separate<["-"], "coverage-data-file">, 5843 HelpText<"Emit coverage data to this filename.">, 5844 MarshallingInfoString<CodeGenOpts<"CoverageDataFile">>; 5845def coverage_data_file_EQ : Joined<["-"], "coverage-data-file=">, 5846 Alias<coverage_data_file>; 5847def coverage_notes_file : Separate<["-"], "coverage-notes-file">, 5848 HelpText<"Emit coverage notes to this filename.">, 5849 MarshallingInfoString<CodeGenOpts<"CoverageNotesFile">>; 5850def coverage_notes_file_EQ : Joined<["-"], "coverage-notes-file=">, 5851 Alias<coverage_notes_file>; 5852def coverage_version_EQ : Joined<["-"], "coverage-version=">, 5853 HelpText<"Four-byte version string for gcov files.">; 5854def dump_coverage_mapping : Flag<["-"], "dump-coverage-mapping">, 5855 HelpText<"Dump the coverage mapping records, for testing">, 5856 MarshallingInfoFlag<CodeGenOpts<"DumpCoverageMapping">>; 5857def fuse_register_sized_bitfield_access: Flag<["-"], "fuse-register-sized-bitfield-access">, 5858 HelpText<"Use register sized accesses to bit-fields, when possible.">, 5859 MarshallingInfoFlag<CodeGenOpts<"UseRegisterSizedBitfieldAccess">>; 5860def relaxed_aliasing : Flag<["-"], "relaxed-aliasing">, 5861 HelpText<"Turn off Type Based Alias Analysis">, 5862 MarshallingInfoFlag<CodeGenOpts<"RelaxedAliasing">>; 5863def no_struct_path_tbaa : Flag<["-"], "no-struct-path-tbaa">, 5864 HelpText<"Turn off struct-path aware Type Based Alias Analysis">, 5865 MarshallingInfoNegativeFlag<CodeGenOpts<"StructPathTBAA">>; 5866def new_struct_path_tbaa : Flag<["-"], "new-struct-path-tbaa">, 5867 HelpText<"Enable enhanced struct-path aware Type Based Alias Analysis">; 5868def mdebug_pass : Separate<["-"], "mdebug-pass">, 5869 HelpText<"Enable additional debug output">, 5870 MarshallingInfoString<CodeGenOpts<"DebugPass">>; 5871def mframe_pointer_EQ : Joined<["-"], "mframe-pointer=">, 5872 HelpText<"Specify which frame pointers to retain.">, Values<"all,non-leaf,none">, 5873 NormalizedValuesScope<"CodeGenOptions::FramePointerKind">, NormalizedValues<["All", "NonLeaf", "None"]>, 5874 MarshallingInfoEnum<CodeGenOpts<"FramePointer">, "None">; 5875def mabi_EQ_ieeelongdouble : Flag<["-"], "mabi=ieeelongdouble">, 5876 HelpText<"Use IEEE 754 quadruple-precision for long double">, 5877 MarshallingInfoFlag<LangOpts<"PPCIEEELongDouble">>; 5878def mabi_EQ_vec_extabi : Flag<["-"], "mabi=vec-extabi">, 5879 HelpText<"Enable the extended Altivec ABI on AIX. Use volatile and nonvolatile vector registers">, 5880 MarshallingInfoFlag<LangOpts<"EnableAIXExtendedAltivecABI">>; 5881def mfloat_abi : Separate<["-"], "mfloat-abi">, 5882 HelpText<"The float ABI to use">, 5883 MarshallingInfoString<CodeGenOpts<"FloatABI">>; 5884def mtp : Separate<["-"], "mtp">, 5885 HelpText<"Mode for reading thread pointer">; 5886def mlimit_float_precision : Separate<["-"], "mlimit-float-precision">, 5887 HelpText<"Limit float precision to the given value">, 5888 MarshallingInfoString<CodeGenOpts<"LimitFloatPrecision">>; 5889def mregparm : Separate<["-"], "mregparm">, 5890 HelpText<"Limit the number of registers available for integer arguments">, 5891 MarshallingInfoInt<CodeGenOpts<"NumRegisterParameters">>; 5892def msmall_data_limit : Separate<["-"], "msmall-data-limit">, 5893 HelpText<"Put global and static data smaller than the limit into a special section">, 5894 MarshallingInfoInt<CodeGenOpts<"SmallDataLimit">>; 5895def funwind_tables_EQ : Joined<["-"], "funwind-tables=">, 5896 HelpText<"Generate unwinding tables for all functions">, 5897 MarshallingInfoInt<CodeGenOpts<"UnwindTables">>; 5898defm constructor_aliases : BoolOption<"m", "constructor-aliases", 5899 CodeGenOpts<"CXXCtorDtorAliases">, DefaultFalse, 5900 PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">, 5901 BothFlags<[CC1Option], " emitting complete constructors and destructors as aliases when possible">>; 5902def mlink_bitcode_file : Separate<["-"], "mlink-bitcode-file">, 5903 HelpText<"Link the given bitcode file before performing optimizations.">; 5904def mlink_builtin_bitcode : Separate<["-"], "mlink-builtin-bitcode">, 5905 HelpText<"Link and internalize needed symbols from the given bitcode file " 5906 "before performing optimizations.">; 5907def vectorize_loops : Flag<["-"], "vectorize-loops">, 5908 HelpText<"Run the Loop vectorization passes">, 5909 MarshallingInfoFlag<CodeGenOpts<"VectorizeLoop">>; 5910def vectorize_slp : Flag<["-"], "vectorize-slp">, 5911 HelpText<"Run the SLP vectorization passes">, 5912 MarshallingInfoFlag<CodeGenOpts<"VectorizeSLP">>; 5913def dependent_lib : Joined<["--"], "dependent-lib=">, 5914 HelpText<"Add dependent library">, 5915 MarshallingInfoStringVector<CodeGenOpts<"DependentLibraries">>; 5916def linker_option : Joined<["--"], "linker-option=">, 5917 HelpText<"Add linker option">, 5918 MarshallingInfoStringVector<CodeGenOpts<"LinkerOptions">>; 5919def fsanitize_coverage_type : Joined<["-"], "fsanitize-coverage-type=">, 5920 HelpText<"Sanitizer coverage type">, 5921 MarshallingInfoInt<CodeGenOpts<"SanitizeCoverageType">>; 5922def fsanitize_coverage_indirect_calls 5923 : Flag<["-"], "fsanitize-coverage-indirect-calls">, 5924 HelpText<"Enable sanitizer coverage for indirect calls">, 5925 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageIndirectCalls">>; 5926def fsanitize_coverage_trace_bb 5927 : Flag<["-"], "fsanitize-coverage-trace-bb">, 5928 HelpText<"Enable basic block tracing in sanitizer coverage">, 5929 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceBB">>; 5930def fsanitize_coverage_trace_cmp 5931 : Flag<["-"], "fsanitize-coverage-trace-cmp">, 5932 HelpText<"Enable cmp instruction tracing in sanitizer coverage">, 5933 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceCmp">>; 5934def fsanitize_coverage_trace_div 5935 : Flag<["-"], "fsanitize-coverage-trace-div">, 5936 HelpText<"Enable div instruction tracing in sanitizer coverage">, 5937 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceDiv">>; 5938def fsanitize_coverage_trace_gep 5939 : Flag<["-"], "fsanitize-coverage-trace-gep">, 5940 HelpText<"Enable gep instruction tracing in sanitizer coverage">, 5941 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceGep">>; 5942def fsanitize_coverage_8bit_counters 5943 : Flag<["-"], "fsanitize-coverage-8bit-counters">, 5944 HelpText<"Enable frequency counters in sanitizer coverage">, 5945 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverage8bitCounters">>; 5946def fsanitize_coverage_inline_8bit_counters 5947 : Flag<["-"], "fsanitize-coverage-inline-8bit-counters">, 5948 HelpText<"Enable inline 8-bit counters in sanitizer coverage">, 5949 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageInline8bitCounters">>; 5950def fsanitize_coverage_inline_bool_flag 5951 : Flag<["-"], "fsanitize-coverage-inline-bool-flag">, 5952 HelpText<"Enable inline bool flag in sanitizer coverage">, 5953 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageInlineBoolFlag">>; 5954def fsanitize_coverage_pc_table 5955 : Flag<["-"], "fsanitize-coverage-pc-table">, 5956 HelpText<"Create a table of coverage-instrumented PCs">, 5957 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoveragePCTable">>; 5958def fsanitize_coverage_control_flow 5959 : Flag<["-"], "fsanitize-coverage-control-flow">, 5960 HelpText<"Collect control flow of function">, 5961 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageControlFlow">>; 5962def fsanitize_coverage_trace_pc 5963 : Flag<["-"], "fsanitize-coverage-trace-pc">, 5964 HelpText<"Enable PC tracing in sanitizer coverage">, 5965 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTracePC">>; 5966def fsanitize_coverage_trace_pc_guard 5967 : Flag<["-"], "fsanitize-coverage-trace-pc-guard">, 5968 HelpText<"Enable PC tracing with guard in sanitizer coverage">, 5969 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTracePCGuard">>; 5970def fsanitize_coverage_no_prune 5971 : Flag<["-"], "fsanitize-coverage-no-prune">, 5972 HelpText<"Disable coverage pruning (i.e. instrument all blocks/edges)">, 5973 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageNoPrune">>; 5974def fsanitize_coverage_stack_depth 5975 : Flag<["-"], "fsanitize-coverage-stack-depth">, 5976 HelpText<"Enable max stack depth tracing">, 5977 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageStackDepth">>; 5978def fsanitize_coverage_trace_loads 5979 : Flag<["-"], "fsanitize-coverage-trace-loads">, 5980 HelpText<"Enable tracing of loads">, 5981 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceLoads">>; 5982def fsanitize_coverage_trace_stores 5983 : Flag<["-"], "fsanitize-coverage-trace-stores">, 5984 HelpText<"Enable tracing of stores">, 5985 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceStores">>; 5986def fexperimental_sanitize_metadata_EQ_covered 5987 : Flag<["-"], "fexperimental-sanitize-metadata=covered">, 5988 HelpText<"Emit PCs for code covered with binary analysis sanitizers">, 5989 MarshallingInfoFlag<CodeGenOpts<"SanitizeBinaryMetadataCovered">>; 5990def fexperimental_sanitize_metadata_EQ_atomics 5991 : Flag<["-"], "fexperimental-sanitize-metadata=atomics">, 5992 HelpText<"Emit PCs for atomic operations used by binary analysis sanitizers">, 5993 MarshallingInfoFlag<CodeGenOpts<"SanitizeBinaryMetadataAtomics">>; 5994def fexperimental_sanitize_metadata_EQ_uar 5995 : Flag<["-"], "fexperimental-sanitize-metadata=uar">, 5996 HelpText<"Emit PCs for start of functions that are subject for use-after-return checking.">, 5997 MarshallingInfoFlag<CodeGenOpts<"SanitizeBinaryMetadataUAR">>; 5998def fpatchable_function_entry_offset_EQ 5999 : Joined<["-"], "fpatchable-function-entry-offset=">, MetaVarName<"<M>">, 6000 HelpText<"Generate M NOPs before function entry">, 6001 MarshallingInfoInt<CodeGenOpts<"PatchableFunctionEntryOffset">>; 6002def fprofile_instrument_EQ : Joined<["-"], "fprofile-instrument=">, 6003 HelpText<"Enable PGO instrumentation">, Values<"none,clang,llvm,csllvm">, 6004 NormalizedValuesScope<"CodeGenOptions">, 6005 NormalizedValues<["ProfileNone", "ProfileClangInstr", "ProfileIRInstr", "ProfileCSIRInstr"]>, 6006 MarshallingInfoEnum<CodeGenOpts<"ProfileInstr">, "ProfileNone">; 6007def fprofile_instrument_path_EQ : Joined<["-"], "fprofile-instrument-path=">, 6008 HelpText<"Generate instrumented code to collect execution counts into " 6009 "<file> (overridden by LLVM_PROFILE_FILE env var)">, 6010 MarshallingInfoString<CodeGenOpts<"InstrProfileOutput">>; 6011def fprofile_instrument_use_path_EQ : 6012 Joined<["-"], "fprofile-instrument-use-path=">, 6013 HelpText<"Specify the profile path in PGO use compilation">, 6014 MarshallingInfoString<CodeGenOpts<"ProfileInstrumentUsePath">>; 6015def flto_visibility_public_std: 6016 Flag<["-"], "flto-visibility-public-std">, 6017 HelpText<"Use public LTO visibility for classes in std and stdext namespaces">, 6018 MarshallingInfoFlag<CodeGenOpts<"LTOVisibilityPublicStd">>; 6019defm lto_unit : BoolOption<"f", "lto-unit", 6020 CodeGenOpts<"LTOUnit">, DefaultFalse, 6021 PosFlag<SetTrue, [CC1Option], "Emit IR to support LTO unit features (CFI, whole program vtable opt)">, 6022 NegFlag<SetFalse>>; 6023def fverify_debuginfo_preserve 6024 : Flag<["-"], "fverify-debuginfo-preserve">, 6025 HelpText<"Enable Debug Info Metadata preservation testing in " 6026 "optimizations.">, 6027 MarshallingInfoFlag<CodeGenOpts<"EnableDIPreservationVerify">>; 6028def fverify_debuginfo_preserve_export 6029 : Joined<["-"], "fverify-debuginfo-preserve-export=">, 6030 MetaVarName<"<file>">, 6031 HelpText<"Export debug info (by testing original Debug Info) failures " 6032 "into specified (JSON) file (should be abs path as we use " 6033 "append mode to insert new JSON objects).">, 6034 MarshallingInfoString<CodeGenOpts<"DIBugsReportFilePath">>; 6035def fwarn_stack_size_EQ 6036 : Joined<["-"], "fwarn-stack-size=">, 6037 MarshallingInfoInt<CodeGenOpts<"WarnStackSize">, "UINT_MAX">; 6038// The driver option takes the key as a parameter to the -msign-return-address= 6039// and -mbranch-protection= options, but CC1 has a separate option so we 6040// don't have to parse the parameter twice. 6041def msign_return_address_key_EQ : Joined<["-"], "msign-return-address-key=">, 6042 Values<"a_key,b_key">; 6043def mbranch_target_enforce : Flag<["-"], "mbranch-target-enforce">, 6044 MarshallingInfoFlag<LangOpts<"BranchTargetEnforcement">>; 6045def fno_dllexport_inlines : Flag<["-"], "fno-dllexport-inlines">, 6046 MarshallingInfoNegativeFlag<LangOpts<"DllExportInlines">>; 6047def cfguard_no_checks : Flag<["-"], "cfguard-no-checks">, 6048 HelpText<"Emit Windows Control Flow Guard tables only (no checks)">, 6049 MarshallingInfoFlag<CodeGenOpts<"ControlFlowGuardNoChecks">>; 6050def cfguard : Flag<["-"], "cfguard">, 6051 HelpText<"Emit Windows Control Flow Guard tables and checks">, 6052 MarshallingInfoFlag<CodeGenOpts<"ControlFlowGuard">>; 6053def ehcontguard : Flag<["-"], "ehcontguard">, 6054 HelpText<"Emit Windows EH Continuation Guard tables">, 6055 MarshallingInfoFlag<CodeGenOpts<"EHContGuard">>; 6056 6057def fdenormal_fp_math_f32_EQ : Joined<["-"], "fdenormal-fp-math-f32=">, 6058 Group<f_Group>; 6059 6060def fctor_dtor_return_this : Flag<["-"], "fctor-dtor-return-this">, 6061 HelpText<"Change the C++ ABI to returning `this` pointer from constructors " 6062 "and non-deleting destructors. (No effect on Microsoft ABI)">, 6063 MarshallingInfoFlag<CodeGenOpts<"CtorDtorReturnThis">>; 6064 6065def fexperimental_assignment_tracking_EQ : Joined<["-"], "fexperimental-assignment-tracking=">, 6066 Group<f_Group>, CodeGenOpts<"EnableAssignmentTracking">, 6067 NormalizedValuesScope<"CodeGenOptions::AssignmentTrackingOpts">, 6068 Values<"disabled,enabled,forced">, NormalizedValues<["Disabled","Enabled","Forced"]>, 6069 MarshallingInfoEnum<CodeGenOpts<"AssignmentTrackingMode">, "Enabled">; 6070 6071} // let Flags = [CC1Option, NoDriverOption] 6072 6073//===----------------------------------------------------------------------===// 6074// Dependency Output Options 6075//===----------------------------------------------------------------------===// 6076 6077let Flags = [CC1Option, NoDriverOption] in { 6078 6079def sys_header_deps : Flag<["-"], "sys-header-deps">, 6080 HelpText<"Include system headers in dependency output">, 6081 MarshallingInfoFlag<DependencyOutputOpts<"IncludeSystemHeaders">>; 6082def module_file_deps : Flag<["-"], "module-file-deps">, 6083 HelpText<"Include module files in dependency output">, 6084 MarshallingInfoFlag<DependencyOutputOpts<"IncludeModuleFiles">>; 6085def header_include_file : Separate<["-"], "header-include-file">, 6086 HelpText<"Filename (or -) to write header include output to">, 6087 MarshallingInfoString<DependencyOutputOpts<"HeaderIncludeOutputFile">>; 6088def header_include_format_EQ : Joined<["-"], "header-include-format=">, 6089 HelpText<"set format in which header info is emitted">, 6090 Values<"textual,json">, NormalizedValues<["HIFMT_Textual", "HIFMT_JSON"]>, 6091 MarshallingInfoEnum<DependencyOutputOpts<"HeaderIncludeFormat">, "HIFMT_Textual">; 6092def header_include_filtering_EQ : Joined<["-"], "header-include-filtering=">, 6093 HelpText<"set the flag that enables filtering header information">, 6094 Values<"none,only-direct-system">, NormalizedValues<["HIFIL_None", "HIFIL_Only_Direct_System"]>, 6095 MarshallingInfoEnum<DependencyOutputOpts<"HeaderIncludeFiltering">, "HIFIL_None">; 6096def show_includes : Flag<["--"], "show-includes">, 6097 HelpText<"Print cl.exe style /showIncludes to stdout">; 6098 6099} // let Flags = [CC1Option, NoDriverOption] 6100 6101//===----------------------------------------------------------------------===// 6102// Diagnostic Options 6103//===----------------------------------------------------------------------===// 6104 6105let Flags = [CC1Option, NoDriverOption] in { 6106 6107def diagnostic_log_file : Separate<["-"], "diagnostic-log-file">, 6108 HelpText<"Filename (or -) to log diagnostics to">, 6109 MarshallingInfoString<DiagnosticOpts<"DiagnosticLogFile">>; 6110def diagnostic_serialized_file : Separate<["-"], "serialize-diagnostic-file">, 6111 MetaVarName<"<filename>">, 6112 HelpText<"File for serializing diagnostics in a binary format">; 6113 6114def fdiagnostics_format : Separate<["-"], "fdiagnostics-format">, 6115 HelpText<"Change diagnostic formatting to match IDE and command line tools">, 6116 Values<"clang,msvc,vi,sarif,SARIF">, 6117 NormalizedValuesScope<"DiagnosticOptions">, NormalizedValues<["Clang", "MSVC", "Vi", "SARIF", "SARIF"]>, 6118 MarshallingInfoEnum<DiagnosticOpts<"Format">, "Clang">; 6119def fdiagnostics_show_category : Separate<["-"], "fdiagnostics-show-category">, 6120 HelpText<"Print diagnostic category">, 6121 Values<"none,id,name">, 6122 NormalizedValues<["0", "1", "2"]>, 6123 MarshallingInfoEnum<DiagnosticOpts<"ShowCategories">, "0">; 6124def fno_diagnostics_use_presumed_location : Flag<["-"], "fno-diagnostics-use-presumed-location">, 6125 HelpText<"Ignore #line directives when displaying diagnostic locations">, 6126 MarshallingInfoNegativeFlag<DiagnosticOpts<"ShowPresumedLoc">>; 6127def ftabstop : Separate<["-"], "ftabstop">, MetaVarName<"<N>">, 6128 HelpText<"Set the tab stop distance.">, 6129 MarshallingInfoInt<DiagnosticOpts<"TabStop">, "DiagnosticOptions::DefaultTabStop">; 6130def ferror_limit : Separate<["-"], "ferror-limit">, MetaVarName<"<N>">, 6131 HelpText<"Set the maximum number of errors to emit before stopping (0 = no limit).">, 6132 MarshallingInfoInt<DiagnosticOpts<"ErrorLimit">>; 6133def verify_EQ : CommaJoined<["-"], "verify=">, 6134 MetaVarName<"<prefixes>">, 6135 HelpText<"Verify diagnostic output using comment directives that start with" 6136 " prefixes in the comma-separated sequence <prefixes>">; 6137def verify : Flag<["-"], "verify">, 6138 HelpText<"Equivalent to -verify=expected">; 6139def verify_ignore_unexpected : Flag<["-"], "verify-ignore-unexpected">, 6140 HelpText<"Ignore unexpected diagnostic messages">; 6141def verify_ignore_unexpected_EQ : CommaJoined<["-"], "verify-ignore-unexpected=">, 6142 HelpText<"Ignore unexpected diagnostic messages">; 6143def Wno_rewrite_macros : Flag<["-"], "Wno-rewrite-macros">, 6144 HelpText<"Silence ObjC rewriting warnings">, 6145 MarshallingInfoFlag<DiagnosticOpts<"NoRewriteMacros">>; 6146 6147} // let Flags = [CC1Option, NoDriverOption] 6148 6149//===----------------------------------------------------------------------===// 6150// Frontend Options 6151//===----------------------------------------------------------------------===// 6152 6153let Flags = [CC1Option, NoDriverOption] in { 6154 6155// This isn't normally used, it is just here so we can parse a 6156// CompilerInvocation out of a driver-derived argument vector. 6157def cc1 : Flag<["-"], "cc1">; 6158def cc1as : Flag<["-"], "cc1as">; 6159 6160def ast_merge : Separate<["-"], "ast-merge">, 6161 MetaVarName<"<ast file>">, 6162 HelpText<"Merge the given AST file into the translation unit being compiled.">, 6163 MarshallingInfoStringVector<FrontendOpts<"ASTMergeFiles">>; 6164def aux_target_cpu : Separate<["-"], "aux-target-cpu">, 6165 HelpText<"Target a specific auxiliary cpu type">; 6166def aux_target_feature : Separate<["-"], "aux-target-feature">, 6167 HelpText<"Target specific auxiliary attributes">; 6168def aux_triple : Separate<["-"], "aux-triple">, 6169 HelpText<"Auxiliary target triple.">, 6170 MarshallingInfoString<FrontendOpts<"AuxTriple">>; 6171def code_completion_at : Separate<["-"], "code-completion-at">, 6172 MetaVarName<"<file>:<line>:<column>">, 6173 HelpText<"Dump code-completion information at a location">; 6174def remap_file : Separate<["-"], "remap-file">, 6175 MetaVarName<"<from>;<to>">, 6176 HelpText<"Replace the contents of the <from> file with the contents of the <to> file">; 6177def code_completion_at_EQ : Joined<["-"], "code-completion-at=">, 6178 Alias<code_completion_at>; 6179def code_completion_macros : Flag<["-"], "code-completion-macros">, 6180 HelpText<"Include macros in code-completion results">, 6181 MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeMacros">>; 6182def code_completion_patterns : Flag<["-"], "code-completion-patterns">, 6183 HelpText<"Include code patterns in code-completion results">, 6184 MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeCodePatterns">>; 6185def no_code_completion_globals : Flag<["-"], "no-code-completion-globals">, 6186 HelpText<"Do not include global declarations in code-completion results.">, 6187 MarshallingInfoNegativeFlag<FrontendOpts<"CodeCompleteOpts.IncludeGlobals">>; 6188def no_code_completion_ns_level_decls : Flag<["-"], "no-code-completion-ns-level-decls">, 6189 HelpText<"Do not include declarations inside namespaces (incl. global namespace) in the code-completion results.">, 6190 MarshallingInfoNegativeFlag<FrontendOpts<"CodeCompleteOpts.IncludeNamespaceLevelDecls">>; 6191def code_completion_brief_comments : Flag<["-"], "code-completion-brief-comments">, 6192 HelpText<"Include brief documentation comments in code-completion results.">, 6193 MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeBriefComments">>; 6194def code_completion_with_fixits : Flag<["-"], "code-completion-with-fixits">, 6195 HelpText<"Include code completion results which require small fix-its.">, 6196 MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeFixIts">>; 6197def disable_free : Flag<["-"], "disable-free">, 6198 HelpText<"Disable freeing of memory on exit">, 6199 MarshallingInfoFlag<FrontendOpts<"DisableFree">>; 6200defm clear_ast_before_backend : BoolOption<"", 6201 "clear-ast-before-backend", 6202 CodeGenOpts<"ClearASTBeforeBackend">, 6203 DefaultFalse, 6204 PosFlag<SetTrue, [], "Clear">, 6205 NegFlag<SetFalse, [], "Don't clear">, 6206 BothFlags<[], " the Clang AST before running backend code generation">>; 6207defm enable_noundef_analysis : BoolOption<"", 6208 "enable-noundef-analysis", 6209 CodeGenOpts<"EnableNoundefAttrs">, 6210 DefaultTrue, 6211 PosFlag<SetTrue, [], "Enable">, 6212 NegFlag<SetFalse, [], "Disable">, 6213 BothFlags<[], " analyzing function argument and return types for mandatory definedness">>; 6214def discard_value_names : Flag<["-"], "discard-value-names">, 6215 HelpText<"Discard value names in LLVM IR">, 6216 MarshallingInfoFlag<CodeGenOpts<"DiscardValueNames">>; 6217def plugin_arg : JoinedAndSeparate<["-"], "plugin-arg-">, 6218 MetaVarName<"<name> <arg>">, 6219 HelpText<"Pass <arg> to plugin <name>">; 6220def add_plugin : Separate<["-"], "add-plugin">, MetaVarName<"<name>">, 6221 HelpText<"Use the named plugin action in addition to the default action">, 6222 MarshallingInfoStringVector<FrontendOpts<"AddPluginActions">>; 6223def ast_dump_filter : Separate<["-"], "ast-dump-filter">, 6224 MetaVarName<"<dump_filter>">, 6225 HelpText<"Use with -ast-dump or -ast-print to dump/print only AST declaration" 6226 " nodes having a certain substring in a qualified name. Use" 6227 " -ast-list to list all filterable declaration node names.">, 6228 MarshallingInfoString<FrontendOpts<"ASTDumpFilter">>; 6229def ast_dump_filter_EQ : Joined<["-"], "ast-dump-filter=">, 6230 Alias<ast_dump_filter>; 6231def fno_modules_global_index : Flag<["-"], "fno-modules-global-index">, 6232 HelpText<"Do not automatically generate or update the global module index">, 6233 MarshallingInfoNegativeFlag<FrontendOpts<"UseGlobalModuleIndex">>; 6234def fno_modules_error_recovery : Flag<["-"], "fno-modules-error-recovery">, 6235 HelpText<"Do not automatically import modules for error recovery">, 6236 MarshallingInfoNegativeFlag<LangOpts<"ModulesErrorRecovery">>; 6237def fmodule_map_file_home_is_cwd : Flag<["-"], "fmodule-map-file-home-is-cwd">, 6238 HelpText<"Use the current working directory as the home directory of " 6239 "module maps specified by -fmodule-map-file=<FILE>">, 6240 MarshallingInfoFlag<HeaderSearchOpts<"ModuleMapFileHomeIsCwd">>; 6241def fmodule_file_home_is_cwd : Flag<["-"], "fmodule-file-home-is-cwd">, 6242 HelpText<"Use the current working directory as the base directory of " 6243 "compiled module files.">, 6244 MarshallingInfoFlag<HeaderSearchOpts<"ModuleFileHomeIsCwd">>; 6245def fmodule_feature : Separate<["-"], "fmodule-feature">, 6246 MetaVarName<"<feature>">, 6247 HelpText<"Enable <feature> in module map requires declarations">, 6248 MarshallingInfoStringVector<LangOpts<"ModuleFeatures">>; 6249def fmodules_embed_file_EQ : Joined<["-"], "fmodules-embed-file=">, 6250 MetaVarName<"<file>">, 6251 HelpText<"Embed the contents of the specified file into the module file " 6252 "being compiled.">, 6253 MarshallingInfoStringVector<FrontendOpts<"ModulesEmbedFiles">>; 6254def fmodules_embed_all_files : Joined<["-"], "fmodules-embed-all-files">, 6255 HelpText<"Embed the contents of all files read by this compilation into " 6256 "the produced module file.">, 6257 MarshallingInfoFlag<FrontendOpts<"ModulesEmbedAllFiles">>; 6258defm fimplicit_modules_use_lock : BoolOption<"f", "implicit-modules-use-lock", 6259 FrontendOpts<"BuildingImplicitModuleUsesLock">, DefaultTrue, 6260 NegFlag<SetFalse>, 6261 PosFlag<SetTrue, [], 6262 "Use filesystem locks for implicit modules builds to avoid " 6263 "duplicating work in competing clang invocations.">>; 6264// FIXME: We only need this in C++ modules if we might textually 6265// enter a different module (eg, when building a header unit). 6266def fmodules_local_submodule_visibility : 6267 Flag<["-"], "fmodules-local-submodule-visibility">, 6268 HelpText<"Enforce name visibility rules across submodules of the same " 6269 "top-level module.">, 6270 MarshallingInfoFlag<LangOpts<"ModulesLocalVisibility">>, 6271 ImpliedByAnyOf<[fcxx_modules.KeyPath]>; 6272def fmodules_codegen : 6273 Flag<["-"], "fmodules-codegen">, 6274 HelpText<"Generate code for uses of this module that assumes an explicit " 6275 "object file will be built for the module">, 6276 MarshallingInfoFlag<LangOpts<"ModulesCodegen">>; 6277def fmodules_debuginfo : 6278 Flag<["-"], "fmodules-debuginfo">, 6279 HelpText<"Generate debug info for types in an object file built from this " 6280 "module and do not generate them elsewhere">, 6281 MarshallingInfoFlag<LangOpts<"ModulesDebugInfo">>; 6282def fmodule_format_EQ : Joined<["-"], "fmodule-format=">, 6283 HelpText<"Select the container format for clang modules and PCH. " 6284 "Supported options are 'raw' and 'obj'.">, 6285 MarshallingInfoString<HeaderSearchOpts<"ModuleFormat">, [{"raw"}]>; 6286def ftest_module_file_extension_EQ : 6287 Joined<["-"], "ftest-module-file-extension=">, 6288 HelpText<"introduce a module file extension for testing purposes. " 6289 "The argument is parsed as blockname:major:minor:hashed:user info">; 6290 6291defm recovery_ast : BoolOption<"f", "recovery-ast", 6292 LangOpts<"RecoveryAST">, DefaultTrue, 6293 NegFlag<SetFalse>, PosFlag<SetTrue, [], "Preserve expressions in AST rather " 6294 "than dropping them when encountering semantic errors">>; 6295defm recovery_ast_type : BoolOption<"f", "recovery-ast-type", 6296 LangOpts<"RecoveryASTType">, DefaultTrue, 6297 NegFlag<SetFalse>, PosFlag<SetTrue, [], "Preserve the type for recovery " 6298 "expressions when possible">>; 6299 6300let Group = Action_Group in { 6301 6302def Eonly : Flag<["-"], "Eonly">, 6303 HelpText<"Just run preprocessor, no output (for timings)">; 6304def dump_raw_tokens : Flag<["-"], "dump-raw-tokens">, 6305 HelpText<"Lex file in raw mode and dump raw tokens">; 6306def analyze : Flag<["-"], "analyze">, 6307 HelpText<"Run static analysis engine">; 6308def dump_tokens : Flag<["-"], "dump-tokens">, 6309 HelpText<"Run preprocessor, dump internal rep of tokens">; 6310def fixit : Flag<["-"], "fixit">, 6311 HelpText<"Apply fix-it advice to the input source">; 6312def fixit_EQ : Joined<["-"], "fixit=">, 6313 HelpText<"Apply fix-it advice creating a file with the given suffix">; 6314def print_preamble : Flag<["-"], "print-preamble">, 6315 HelpText<"Print the \"preamble\" of a file, which is a candidate for implicit" 6316 " precompiled headers.">; 6317def emit_html : Flag<["-"], "emit-html">, 6318 HelpText<"Output input source as HTML">; 6319def ast_print : Flag<["-"], "ast-print">, 6320 HelpText<"Build ASTs and then pretty-print them">; 6321def ast_list : Flag<["-"], "ast-list">, 6322 HelpText<"Build ASTs and print the list of declaration node qualified names">; 6323def ast_dump : Flag<["-"], "ast-dump">, 6324 HelpText<"Build ASTs and then debug dump them">; 6325def ast_dump_EQ : Joined<["-"], "ast-dump=">, 6326 HelpText<"Build ASTs and then debug dump them in the specified format. " 6327 "Supported formats include: default, json">; 6328def ast_dump_all : Flag<["-"], "ast-dump-all">, 6329 HelpText<"Build ASTs and then debug dump them, forcing deserialization">; 6330def ast_dump_all_EQ : Joined<["-"], "ast-dump-all=">, 6331 HelpText<"Build ASTs and then debug dump them in the specified format, " 6332 "forcing deserialization. Supported formats include: default, json">; 6333def ast_dump_decl_types : Flag<["-"], "ast-dump-decl-types">, 6334 HelpText<"Include declaration types in AST dumps">, 6335 MarshallingInfoFlag<FrontendOpts<"ASTDumpDeclTypes">>; 6336def templight_dump : Flag<["-"], "templight-dump">, 6337 HelpText<"Dump templight information to stdout">; 6338def ast_dump_lookups : Flag<["-"], "ast-dump-lookups">, 6339 HelpText<"Build ASTs and then debug dump their name lookup tables">, 6340 MarshallingInfoFlag<FrontendOpts<"ASTDumpLookups">>; 6341def ast_view : Flag<["-"], "ast-view">, 6342 HelpText<"Build ASTs and view them with GraphViz">; 6343def emit_module : Flag<["-"], "emit-module">, 6344 HelpText<"Generate pre-compiled module file from a module map">; 6345def emit_module_interface : Flag<["-"], "emit-module-interface">, 6346 HelpText<"Generate pre-compiled module file from a C++ module interface">; 6347def emit_header_unit : Flag<["-"], "emit-header-unit">, 6348 HelpText<"Generate C++20 header units from header files">; 6349def emit_pch : Flag<["-"], "emit-pch">, 6350 HelpText<"Generate pre-compiled header file">; 6351def emit_llvm_only : Flag<["-"], "emit-llvm-only">, 6352 HelpText<"Build ASTs and convert to LLVM, discarding output">; 6353def emit_codegen_only : Flag<["-"], "emit-codegen-only">, 6354 HelpText<"Generate machine code, but discard output">; 6355def rewrite_test : Flag<["-"], "rewrite-test">, 6356 HelpText<"Rewriter playground">; 6357def rewrite_macros : Flag<["-"], "rewrite-macros">, 6358 HelpText<"Expand macros without full preprocessing">; 6359def migrate : Flag<["-"], "migrate">, 6360 HelpText<"Migrate source code">; 6361def compiler_options_dump : Flag<["-"], "compiler-options-dump">, 6362 HelpText<"Dump the compiler configuration options">; 6363def print_dependency_directives_minimized_source : Flag<["-"], 6364 "print-dependency-directives-minimized-source">, 6365 HelpText<"Print the output of the dependency directives source minimizer">; 6366} 6367 6368defm emit_llvm_uselists : BoolOption<"", "emit-llvm-uselists", 6369 CodeGenOpts<"EmitLLVMUseLists">, DefaultFalse, 6370 PosFlag<SetTrue, [], "Preserve">, 6371 NegFlag<SetFalse, [], "Don't preserve">, 6372 BothFlags<[], " order of LLVM use-lists when serializing">>; 6373 6374def mt_migrate_directory : Separate<["-"], "mt-migrate-directory">, 6375 HelpText<"Directory for temporary files produced during ARC or ObjC migration">, 6376 MarshallingInfoString<FrontendOpts<"MTMigrateDir">>; 6377 6378def arcmt_action_EQ : Joined<["-"], "arcmt-action=">, Flags<[CC1Option, NoDriverOption]>, 6379 HelpText<"The ARC migration action to take">, 6380 Values<"check,modify,migrate">, 6381 NormalizedValuesScope<"FrontendOptions">, 6382 NormalizedValues<["ARCMT_Check", "ARCMT_Modify", "ARCMT_Migrate"]>, 6383 MarshallingInfoEnum<FrontendOpts<"ARCMTAction">, "ARCMT_None">; 6384 6385def opt_record_file : Separate<["-"], "opt-record-file">, 6386 HelpText<"File name to use for YAML optimization record output">, 6387 MarshallingInfoString<CodeGenOpts<"OptRecordFile">>; 6388def opt_record_passes : Separate<["-"], "opt-record-passes">, 6389 HelpText<"Only record remark information for passes whose names match the given regular expression">; 6390def opt_record_format : Separate<["-"], "opt-record-format">, 6391 HelpText<"The format used for serializing remarks (default: YAML)">; 6392 6393def print_stats : Flag<["-"], "print-stats">, 6394 HelpText<"Print performance metrics and statistics">, 6395 MarshallingInfoFlag<FrontendOpts<"ShowStats">>; 6396def stats_file : Joined<["-"], "stats-file=">, 6397 HelpText<"Filename to write statistics to">, 6398 MarshallingInfoString<FrontendOpts<"StatsFile">>; 6399def stats_file_append : Flag<["-"], "stats-file-append">, 6400 HelpText<"If stats should be appended to stats-file instead of overwriting it">, 6401 MarshallingInfoFlag<FrontendOpts<"AppendStats">>; 6402def fdump_record_layouts_simple : Flag<["-"], "fdump-record-layouts-simple">, 6403 HelpText<"Dump record layout information in a simple form used for testing">, 6404 MarshallingInfoFlag<LangOpts<"DumpRecordLayoutsSimple">>; 6405def fdump_record_layouts_canonical : Flag<["-"], "fdump-record-layouts-canonical">, 6406 HelpText<"Dump record layout information with canonical field types">, 6407 MarshallingInfoFlag<LangOpts<"DumpRecordLayoutsCanonical">>; 6408def fdump_record_layouts_complete : Flag<["-"], "fdump-record-layouts-complete">, 6409 HelpText<"Dump record layout information for all complete types">, 6410 MarshallingInfoFlag<LangOpts<"DumpRecordLayoutsComplete">>; 6411def fdump_record_layouts : Flag<["-"], "fdump-record-layouts">, 6412 HelpText<"Dump record layout information">, 6413 MarshallingInfoFlag<LangOpts<"DumpRecordLayouts">>, 6414 ImpliedByAnyOf<[fdump_record_layouts_simple.KeyPath, fdump_record_layouts_complete.KeyPath, fdump_record_layouts_canonical.KeyPath]>; 6415def fix_what_you_can : Flag<["-"], "fix-what-you-can">, 6416 HelpText<"Apply fix-it advice even in the presence of unfixable errors">, 6417 MarshallingInfoFlag<FrontendOpts<"FixWhatYouCan">>; 6418def fix_only_warnings : Flag<["-"], "fix-only-warnings">, 6419 HelpText<"Apply fix-it advice only for warnings, not errors">, 6420 MarshallingInfoFlag<FrontendOpts<"FixOnlyWarnings">>; 6421def fixit_recompile : Flag<["-"], "fixit-recompile">, 6422 HelpText<"Apply fix-it changes and recompile">, 6423 MarshallingInfoFlag<FrontendOpts<"FixAndRecompile">>; 6424def fixit_to_temp : Flag<["-"], "fixit-to-temporary">, 6425 HelpText<"Apply fix-it changes to temporary files">, 6426 MarshallingInfoFlag<FrontendOpts<"FixToTemporaries">>; 6427 6428def foverride_record_layout_EQ : Joined<["-"], "foverride-record-layout=">, 6429 HelpText<"Override record layouts with those in the given file">, 6430 MarshallingInfoString<FrontendOpts<"OverrideRecordLayoutsFile">>; 6431def pch_through_header_EQ : Joined<["-"], "pch-through-header=">, 6432 HelpText<"Stop PCH generation after including this file. When using a PCH, " 6433 "skip tokens until after this file is included.">, 6434 MarshallingInfoString<PreprocessorOpts<"PCHThroughHeader">>; 6435def pch_through_hdrstop_create : Flag<["-"], "pch-through-hdrstop-create">, 6436 HelpText<"When creating a PCH, stop PCH generation after #pragma hdrstop.">, 6437 MarshallingInfoFlag<PreprocessorOpts<"PCHWithHdrStopCreate">>; 6438def pch_through_hdrstop_use : Flag<["-"], "pch-through-hdrstop-use">, 6439 HelpText<"When using a PCH, skip tokens until after a #pragma hdrstop.">; 6440def fno_pch_timestamp : Flag<["-"], "fno-pch-timestamp">, 6441 HelpText<"Disable inclusion of timestamp in precompiled headers">, 6442 MarshallingInfoNegativeFlag<FrontendOpts<"IncludeTimestamps">>; 6443def building_pch_with_obj : Flag<["-"], "building-pch-with-obj">, 6444 HelpText<"This compilation is part of building a PCH with corresponding object file.">, 6445 MarshallingInfoFlag<LangOpts<"BuildingPCHWithObjectFile">>; 6446 6447def aligned_alloc_unavailable : Flag<["-"], "faligned-alloc-unavailable">, 6448 HelpText<"Aligned allocation/deallocation functions are unavailable">, 6449 MarshallingInfoFlag<LangOpts<"AlignedAllocationUnavailable">>, 6450 ShouldParseIf<faligned_allocation.KeyPath>; 6451 6452} // let Flags = [CC1Option, NoDriverOption] 6453 6454//===----------------------------------------------------------------------===// 6455// Language Options 6456//===----------------------------------------------------------------------===// 6457 6458def version : Flag<["-"], "version">, 6459 HelpText<"Print the compiler version">, 6460 Flags<[CC1Option, CC1AsOption, FC1Option, NoDriverOption]>, 6461 MarshallingInfoFlag<FrontendOpts<"ShowVersion">>; 6462 6463def main_file_name : Separate<["-"], "main-file-name">, 6464 HelpText<"Main file name to use for debug info and source if missing">, 6465 Flags<[CC1Option, CC1AsOption, NoDriverOption]>, 6466 MarshallingInfoString<CodeGenOpts<"MainFileName">>; 6467def split_dwarf_output : Separate<["-"], "split-dwarf-output">, 6468 HelpText<"File name to use for split dwarf debug info output">, 6469 Flags<[CC1Option, CC1AsOption, NoDriverOption]>, 6470 MarshallingInfoString<CodeGenOpts<"SplitDwarfOutput">>; 6471 6472let Flags = [CC1Option, FC1Option, NoDriverOption] in { 6473 6474def mreassociate : Flag<["-"], "mreassociate">, 6475 HelpText<"Allow reassociation transformations for floating-point instructions">, 6476 MarshallingInfoFlag<LangOpts<"AllowFPReassoc">>, ImpliedByAnyOf<[funsafe_math_optimizations.KeyPath]>; 6477def menable_no_nans : Flag<["-"], "menable-no-nans">, 6478 HelpText<"Allow optimization to assume there are no NaNs.">, 6479 MarshallingInfoFlag<LangOpts<"NoHonorNaNs">>, ImpliedByAnyOf<[ffinite_math_only.KeyPath]>; 6480def menable_no_infinities : Flag<["-"], "menable-no-infs">, 6481 HelpText<"Allow optimization to assume there are no infinities.">, 6482 MarshallingInfoFlag<LangOpts<"NoHonorInfs">>, ImpliedByAnyOf<[ffinite_math_only.KeyPath]>; 6483 6484def pic_level : Separate<["-"], "pic-level">, 6485 HelpText<"Value for __PIC__">, 6486 MarshallingInfoInt<LangOpts<"PICLevel">>; 6487def pic_is_pie : Flag<["-"], "pic-is-pie">, 6488 HelpText<"File is for a position independent executable">, 6489 MarshallingInfoFlag<LangOpts<"PIE">>; 6490 6491} // let Flags = [CC1Option, FC1Option, NoDriverOption] 6492 6493let Flags = [CC1Option, NoDriverOption] in { 6494 6495def fblocks_runtime_optional : Flag<["-"], "fblocks-runtime-optional">, 6496 HelpText<"Weakly link in the blocks runtime">, 6497 MarshallingInfoFlag<LangOpts<"BlocksRuntimeOptional">>; 6498def fexternc_nounwind : Flag<["-"], "fexternc-nounwind">, 6499 HelpText<"Assume all functions with C linkage do not unwind">, 6500 MarshallingInfoFlag<LangOpts<"ExternCNoUnwind">>; 6501def split_dwarf_file : Separate<["-"], "split-dwarf-file">, 6502 HelpText<"Name of the split dwarf debug info file to encode in the object file">, 6503 MarshallingInfoString<CodeGenOpts<"SplitDwarfFile">>; 6504def fno_wchar : Flag<["-"], "fno-wchar">, 6505 HelpText<"Disable C++ builtin type wchar_t">, 6506 MarshallingInfoNegativeFlag<LangOpts<"WChar">, cplusplus.KeyPath>, 6507 ShouldParseIf<cplusplus.KeyPath>; 6508def fconstant_string_class : Separate<["-"], "fconstant-string-class">, 6509 MetaVarName<"<class name>">, 6510 HelpText<"Specify the class to use for constant Objective-C string objects.">, 6511 MarshallingInfoString<LangOpts<"ObjCConstantStringClass">>; 6512def fobjc_arc_cxxlib_EQ : Joined<["-"], "fobjc-arc-cxxlib=">, 6513 HelpText<"Objective-C++ Automatic Reference Counting standard library kind">, 6514 Values<"libc++,libstdc++,none">, 6515 NormalizedValues<["ARCXX_libcxx", "ARCXX_libstdcxx", "ARCXX_nolib"]>, 6516 MarshallingInfoEnum<PreprocessorOpts<"ObjCXXARCStandardLibrary">, "ARCXX_nolib">; 6517def fobjc_runtime_has_weak : Flag<["-"], "fobjc-runtime-has-weak">, 6518 HelpText<"The target Objective-C runtime supports ARC weak operations">; 6519def fobjc_dispatch_method_EQ : Joined<["-"], "fobjc-dispatch-method=">, 6520 HelpText<"Objective-C dispatch method to use">, 6521 Values<"legacy,non-legacy,mixed">, 6522 NormalizedValuesScope<"CodeGenOptions">, NormalizedValues<["Legacy", "NonLegacy", "Mixed"]>, 6523 MarshallingInfoEnum<CodeGenOpts<"ObjCDispatchMethod">, "Legacy">; 6524def disable_objc_default_synthesize_properties : Flag<["-"], "disable-objc-default-synthesize-properties">, 6525 HelpText<"disable the default synthesis of Objective-C properties">, 6526 MarshallingInfoNegativeFlag<LangOpts<"ObjCDefaultSynthProperties">>; 6527def fencode_extended_block_signature : Flag<["-"], "fencode-extended-block-signature">, 6528 HelpText<"enable extended encoding of block type signature">, 6529 MarshallingInfoFlag<LangOpts<"EncodeExtendedBlockSig">>; 6530def function_alignment : Separate<["-"], "function-alignment">, 6531 HelpText<"default alignment for functions">, 6532 MarshallingInfoInt<LangOpts<"FunctionAlignment">>; 6533def fhalf_no_semantic_interposition : Flag<["-"], "fhalf-no-semantic-interposition">, 6534 HelpText<"Like -fno-semantic-interposition but don't use local aliases">, 6535 MarshallingInfoFlag<LangOpts<"HalfNoSemanticInterposition">>; 6536def fno_validate_pch : Flag<["-"], "fno-validate-pch">, 6537 HelpText<"Disable validation of precompiled headers">, 6538 MarshallingInfoFlag<PreprocessorOpts<"DisablePCHOrModuleValidation">, "DisableValidationForModuleKind::None">, 6539 Normalizer<"makeFlagToValueNormalizer(DisableValidationForModuleKind::All)">; 6540def fallow_pcm_with_errors : Flag<["-"], "fallow-pcm-with-compiler-errors">, 6541 HelpText<"Accept a PCM file that was created with compiler errors">, 6542 MarshallingInfoFlag<FrontendOpts<"AllowPCMWithCompilerErrors">>; 6543def fallow_pch_with_errors : Flag<["-"], "fallow-pch-with-compiler-errors">, 6544 HelpText<"Accept a PCH file that was created with compiler errors">, 6545 MarshallingInfoFlag<PreprocessorOpts<"AllowPCHWithCompilerErrors">>, 6546 ImpliedByAnyOf<[fallow_pcm_with_errors.KeyPath]>; 6547def fallow_pch_with_different_modules_cache_path : 6548 Flag<["-"], "fallow-pch-with-different-modules-cache-path">, 6549 HelpText<"Accept a PCH file that was created with a different modules cache path">, 6550 MarshallingInfoFlag<PreprocessorOpts<"AllowPCHWithDifferentModulesCachePath">>; 6551def fno_modules_share_filemanager : Flag<["-"], "fno-modules-share-filemanager">, 6552 HelpText<"Disable sharing the FileManager when building a module implicitly">, 6553 MarshallingInfoNegativeFlag<FrontendOpts<"ModulesShareFileManager">>; 6554def dump_deserialized_pch_decls : Flag<["-"], "dump-deserialized-decls">, 6555 HelpText<"Dump declarations that are deserialized from PCH, for testing">, 6556 MarshallingInfoFlag<PreprocessorOpts<"DumpDeserializedPCHDecls">>; 6557def error_on_deserialized_pch_decl : Separate<["-"], "error-on-deserialized-decl">, 6558 HelpText<"Emit error if a specific declaration is deserialized from PCH, for testing">; 6559def error_on_deserialized_pch_decl_EQ : Joined<["-"], "error-on-deserialized-decl=">, 6560 Alias<error_on_deserialized_pch_decl>; 6561def static_define : Flag<["-"], "static-define">, 6562 HelpText<"Should __STATIC__ be defined">, 6563 MarshallingInfoFlag<LangOpts<"Static">>; 6564def stack_protector : Separate<["-"], "stack-protector">, 6565 HelpText<"Enable stack protectors">, 6566 Values<"0,1,2,3">, 6567 NormalizedValuesScope<"LangOptions">, 6568 NormalizedValues<["SSPOff", "SSPOn", "SSPStrong", "SSPReq"]>, 6569 MarshallingInfoEnum<LangOpts<"StackProtector">, "SSPOff">; 6570def stack_protector_buffer_size : Separate<["-"], "stack-protector-buffer-size">, 6571 HelpText<"Lower bound for a buffer to be considered for stack protection">, 6572 MarshallingInfoInt<CodeGenOpts<"SSPBufferSize">, "8">; 6573def ftype_visibility : Joined<["-"], "ftype-visibility=">, 6574 HelpText<"Default type visibility">, 6575 MarshallingInfoVisibility<LangOpts<"TypeVisibilityMode">, fvisibility_EQ.KeyPath>; 6576def fapply_global_visibility_to_externs : Flag<["-"], "fapply-global-visibility-to-externs">, 6577 HelpText<"Apply global symbol visibility to external declarations without an explicit visibility">, 6578 MarshallingInfoFlag<LangOpts<"SetVisibilityForExternDecls">>; 6579def fbracket_depth : Separate<["-"], "fbracket-depth">, 6580 HelpText<"Maximum nesting level for parentheses, brackets, and braces">, 6581 MarshallingInfoInt<LangOpts<"BracketDepth">, "256">; 6582defm const_strings : BoolOption<"f", "const-strings", 6583 LangOpts<"ConstStrings">, DefaultFalse, 6584 PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">, 6585 BothFlags<[], " a const qualified type for string literals in C and ObjC">>; 6586def fno_bitfield_type_align : Flag<["-"], "fno-bitfield-type-align">, 6587 HelpText<"Ignore bit-field types when aligning structures">, 6588 MarshallingInfoFlag<LangOpts<"NoBitFieldTypeAlign">>; 6589def ffake_address_space_map : Flag<["-"], "ffake-address-space-map">, 6590 HelpText<"Use a fake address space map; OpenCL testing purposes only">, 6591 MarshallingInfoFlag<LangOpts<"FakeAddressSpaceMap">>; 6592def faddress_space_map_mangling_EQ : Joined<["-"], "faddress-space-map-mangling=">, 6593 HelpText<"Set the mode for address space map based mangling; OpenCL testing purposes only">, 6594 Values<"target,no,yes">, 6595 NormalizedValuesScope<"LangOptions">, 6596 NormalizedValues<["ASMM_Target", "ASMM_Off", "ASMM_On"]>, 6597 MarshallingInfoEnum<LangOpts<"AddressSpaceMapMangling">, "ASMM_Target">; 6598def funknown_anytype : Flag<["-"], "funknown-anytype">, 6599 HelpText<"Enable parser support for the __unknown_anytype type; for testing purposes only">, 6600 MarshallingInfoFlag<LangOpts<"ParseUnknownAnytype">>; 6601def fdebugger_support : Flag<["-"], "fdebugger-support">, 6602 HelpText<"Enable special debugger support behavior">, 6603 MarshallingInfoFlag<LangOpts<"DebuggerSupport">>; 6604def fdebugger_cast_result_to_id : Flag<["-"], "fdebugger-cast-result-to-id">, 6605 HelpText<"Enable casting unknown expression results to id">, 6606 MarshallingInfoFlag<LangOpts<"DebuggerCastResultToId">>; 6607def fdebugger_objc_literal : Flag<["-"], "fdebugger-objc-literal">, 6608 HelpText<"Enable special debugger support for Objective-C subscripting and literals">, 6609 MarshallingInfoFlag<LangOpts<"DebuggerObjCLiteral">>; 6610defm deprecated_macro : BoolOption<"f", "deprecated-macro", 6611 LangOpts<"Deprecated">, DefaultFalse, 6612 PosFlag<SetTrue, [], "Defines">, NegFlag<SetFalse, [], "Undefines">, 6613 BothFlags<[], " the __DEPRECATED macro">>; 6614def fobjc_subscripting_legacy_runtime : Flag<["-"], "fobjc-subscripting-legacy-runtime">, 6615 HelpText<"Allow Objective-C array and dictionary subscripting in legacy runtime">; 6616// TODO: Enforce values valid for MSVtorDispMode. 6617def vtordisp_mode_EQ : Joined<["-"], "vtordisp-mode=">, 6618 HelpText<"Control vtordisp placement on win32 targets">, 6619 MarshallingInfoInt<LangOpts<"VtorDispMode">, "1">; 6620def fnative_half_type: Flag<["-"], "fnative-half-type">, 6621 HelpText<"Use the native half type for __fp16 instead of promoting to float">, 6622 MarshallingInfoFlag<LangOpts<"NativeHalfType">>, 6623 ImpliedByAnyOf<[open_cl.KeyPath, render_script.KeyPath]>; 6624def fnative_half_arguments_and_returns : Flag<["-"], "fnative-half-arguments-and-returns">, 6625 HelpText<"Use the native __fp16 type for arguments and returns (and skip ABI-specific lowering)">, 6626 MarshallingInfoFlag<LangOpts<"NativeHalfArgsAndReturns">>, 6627 ImpliedByAnyOf<[open_cl.KeyPath, render_script.KeyPath, hlsl.KeyPath]>; 6628def fdefault_calling_conv_EQ : Joined<["-"], "fdefault-calling-conv=">, 6629 HelpText<"Set default calling convention">, 6630 Values<"cdecl,fastcall,stdcall,vectorcall,regcall">, 6631 NormalizedValuesScope<"LangOptions">, 6632 NormalizedValues<["DCC_CDecl", "DCC_FastCall", "DCC_StdCall", "DCC_VectorCall", "DCC_RegCall"]>, 6633 MarshallingInfoEnum<LangOpts<"DefaultCallingConv">, "DCC_None">; 6634 6635// These options cannot be marshalled, because they are used to set up the LangOptions defaults. 6636def finclude_default_header : Flag<["-"], "finclude-default-header">, 6637 HelpText<"Include default header file for OpenCL and HLSL">; 6638def fdeclare_opencl_builtins : Flag<["-"], "fdeclare-opencl-builtins">, 6639 HelpText<"Add OpenCL builtin function declarations (experimental)">; 6640 6641def fpreserve_vec3_type : Flag<["-"], "fpreserve-vec3-type">, 6642 HelpText<"Preserve 3-component vector type">, 6643 MarshallingInfoFlag<CodeGenOpts<"PreserveVec3Type">>, 6644 ImpliedByAnyOf<[hlsl.KeyPath]>; 6645def fwchar_type_EQ : Joined<["-"], "fwchar-type=">, 6646 HelpText<"Select underlying type for wchar_t">, 6647 Values<"char,short,int">, 6648 NormalizedValues<["1", "2", "4"]>, 6649 MarshallingInfoEnum<LangOpts<"WCharSize">, "0">; 6650defm signed_wchar : BoolOption<"f", "signed-wchar", 6651 LangOpts<"WCharIsSigned">, DefaultTrue, 6652 NegFlag<SetFalse, [CC1Option], "Use an unsigned">, PosFlag<SetTrue, [], "Use a signed">, 6653 BothFlags<[], " type for wchar_t">>; 6654def fcompatibility_qualified_id_block_param_type_checking : Flag<["-"], "fcompatibility-qualified-id-block-type-checking">, 6655 HelpText<"Allow using blocks with parameters of more specific type than " 6656 "the type system guarantees when a parameter is qualified id">, 6657 MarshallingInfoFlag<LangOpts<"CompatibilityQualifiedIdBlockParamTypeChecking">>; 6658def fpass_by_value_is_noalias: Flag<["-"], "fpass-by-value-is-noalias">, 6659 HelpText<"Allows assuming by-value parameters do not alias any other value. " 6660 "Has no effect on non-trivially-copyable classes in C++.">, Group<f_Group>, 6661 MarshallingInfoFlag<CodeGenOpts<"PassByValueIsNoAlias">>; 6662 6663// FIXME: Remove these entirely once functionality/tests have been excised. 6664def fobjc_gc_only : Flag<["-"], "fobjc-gc-only">, Group<f_Group>, 6665 HelpText<"Use GC exclusively for Objective-C related memory management">; 6666def fobjc_gc : Flag<["-"], "fobjc-gc">, Group<f_Group>, 6667 HelpText<"Enable Objective-C garbage collection">; 6668 6669def fexperimental_max_bitint_width_EQ: 6670 Joined<["-"], "fexperimental-max-bitint-width=">, Group<f_Group>, 6671 MetaVarName<"<N>">, 6672 HelpText<"Set the maximum bitwidth for _BitInt (this option is expected to be removed in the future)">, 6673 MarshallingInfoInt<LangOpts<"MaxBitIntWidth">>; 6674 6675} // let Flags = [CC1Option, NoDriverOption] 6676 6677//===----------------------------------------------------------------------===// 6678// Header Search Options 6679//===----------------------------------------------------------------------===// 6680 6681let Flags = [CC1Option, NoDriverOption] in { 6682 6683def nostdsysteminc : Flag<["-"], "nostdsysteminc">, 6684 HelpText<"Disable standard system #include directories">, 6685 MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseStandardSystemIncludes">>; 6686def fdisable_module_hash : Flag<["-"], "fdisable-module-hash">, 6687 HelpText<"Disable the module hash">, 6688 MarshallingInfoFlag<HeaderSearchOpts<"DisableModuleHash">>; 6689def fmodules_hash_content : Flag<["-"], "fmodules-hash-content">, 6690 HelpText<"Enable hashing the content of a module file">, 6691 MarshallingInfoFlag<HeaderSearchOpts<"ModulesHashContent">>; 6692def fmodules_strict_context_hash : Flag<["-"], "fmodules-strict-context-hash">, 6693 HelpText<"Enable hashing of all compiler options that could impact the " 6694 "semantics of a module in an implicit build">, 6695 MarshallingInfoFlag<HeaderSearchOpts<"ModulesStrictContextHash">>; 6696def c_isystem : Separate<["-"], "c-isystem">, MetaVarName<"<directory>">, 6697 HelpText<"Add directory to the C SYSTEM include search path">; 6698def objc_isystem : Separate<["-"], "objc-isystem">, 6699 MetaVarName<"<directory>">, 6700 HelpText<"Add directory to the ObjC SYSTEM include search path">; 6701def objcxx_isystem : Separate<["-"], "objcxx-isystem">, 6702 MetaVarName<"<directory>">, 6703 HelpText<"Add directory to the ObjC++ SYSTEM include search path">; 6704def internal_isystem : Separate<["-"], "internal-isystem">, 6705 MetaVarName<"<directory>">, 6706 HelpText<"Add directory to the internal system include search path; these " 6707 "are assumed to not be user-provided and are used to model system " 6708 "and standard headers' paths.">; 6709def internal_externc_isystem : Separate<["-"], "internal-externc-isystem">, 6710 MetaVarName<"<directory>">, 6711 HelpText<"Add directory to the internal system include search path with " 6712 "implicit extern \"C\" semantics; these are assumed to not be " 6713 "user-provided and are used to model system and standard headers' " 6714 "paths.">; 6715 6716} // let Flags = [CC1Option, NoDriverOption] 6717 6718//===----------------------------------------------------------------------===// 6719// Preprocessor Options 6720//===----------------------------------------------------------------------===// 6721 6722let Flags = [CC1Option, NoDriverOption] in { 6723 6724def chain_include : Separate<["-"], "chain-include">, MetaVarName<"<file>">, 6725 HelpText<"Include and chain a header file after turning it into PCH">; 6726def preamble_bytes_EQ : Joined<["-"], "preamble-bytes=">, 6727 HelpText<"Assume that the precompiled header is a precompiled preamble " 6728 "covering the first N bytes of the main file">; 6729def detailed_preprocessing_record : Flag<["-"], "detailed-preprocessing-record">, 6730 HelpText<"include a detailed record of preprocessing actions">, 6731 MarshallingInfoFlag<PreprocessorOpts<"DetailedRecord">>; 6732def setup_static_analyzer : Flag<["-"], "setup-static-analyzer">, 6733 HelpText<"Set up preprocessor for static analyzer (done automatically when static analyzer is run).">, 6734 MarshallingInfoFlag<PreprocessorOpts<"SetUpStaticAnalyzer">>; 6735def disable_pragma_debug_crash : Flag<["-"], "disable-pragma-debug-crash">, 6736 HelpText<"Disable any #pragma clang __debug that can lead to crashing behavior. This is meant for testing.">, 6737 MarshallingInfoFlag<PreprocessorOpts<"DisablePragmaDebugCrash">>; 6738def source_date_epoch : Separate<["-"], "source-date-epoch">, 6739 MetaVarName<"<time since Epoch in seconds>">, 6740 HelpText<"Time to be used in __DATE__, __TIME__, and __TIMESTAMP__ macros">; 6741 6742} // let Flags = [CC1Option, NoDriverOption] 6743 6744//===----------------------------------------------------------------------===// 6745// CUDA Options 6746//===----------------------------------------------------------------------===// 6747 6748let Flags = [CC1Option, NoDriverOption] in { 6749 6750def fcuda_is_device : Flag<["-"], "fcuda-is-device">, 6751 HelpText<"Generate code for CUDA device">, 6752 MarshallingInfoFlag<LangOpts<"CUDAIsDevice">>; 6753def fcuda_include_gpubinary : Separate<["-"], "fcuda-include-gpubinary">, 6754 HelpText<"Incorporate CUDA device-side binary into host object file.">, 6755 MarshallingInfoString<CodeGenOpts<"CudaGpuBinaryFileName">>; 6756def fcuda_allow_variadic_functions : Flag<["-"], "fcuda-allow-variadic-functions">, 6757 HelpText<"Allow variadic functions in CUDA device code.">, 6758 MarshallingInfoFlag<LangOpts<"CUDAAllowVariadicFunctions">>; 6759def fno_cuda_host_device_constexpr : Flag<["-"], "fno-cuda-host-device-constexpr">, 6760 HelpText<"Don't treat unattributed constexpr functions as __host__ __device__.">, 6761 MarshallingInfoNegativeFlag<LangOpts<"CUDAHostDeviceConstexpr">>; 6762 6763} // let Flags = [CC1Option, NoDriverOption] 6764 6765//===----------------------------------------------------------------------===// 6766// OpenMP Options 6767//===----------------------------------------------------------------------===// 6768 6769let Flags = [CC1Option, FC1Option, NoDriverOption] in { 6770 6771def fopenmp_is_target_device : Flag<["-"], "fopenmp-is-target-device">, 6772 HelpText<"Generate code only for an OpenMP target device.">; 6773def : Flag<["-"], "fopenmp-is-device">, Alias<fopenmp_is_target_device>; 6774def fopenmp_host_ir_file_path : Separate<["-"], "fopenmp-host-ir-file-path">, 6775 HelpText<"Path to the IR file produced by the frontend for the host.">; 6776 6777} // let Flags = [CC1Option, FC1Option, NoDriverOption] 6778 6779//===----------------------------------------------------------------------===// 6780// SYCL Options 6781//===----------------------------------------------------------------------===// 6782 6783def fsycl_is_device : Flag<["-"], "fsycl-is-device">, 6784 HelpText<"Generate code for SYCL device.">, 6785 Flags<[CC1Option, NoDriverOption]>, 6786 MarshallingInfoFlag<LangOpts<"SYCLIsDevice">>; 6787def fsycl_is_host : Flag<["-"], "fsycl-is-host">, 6788 HelpText<"SYCL host compilation">, 6789 Flags<[CC1Option, NoDriverOption]>, 6790 MarshallingInfoFlag<LangOpts<"SYCLIsHost">>; 6791 6792def sycl_std_EQ : Joined<["-"], "sycl-std=">, Group<sycl_Group>, 6793 Flags<[CC1Option, NoArgumentUnused, CoreOption]>, 6794 HelpText<"SYCL language standard to compile for.">, 6795 Values<"2020,2017,121,1.2.1,sycl-1.2.1">, 6796 NormalizedValues<["SYCL_2020", "SYCL_2017", "SYCL_2017", "SYCL_2017", "SYCL_2017"]>, 6797 NormalizedValuesScope<"LangOptions">, 6798 MarshallingInfoEnum<LangOpts<"SYCLVersion">, "SYCL_None">, 6799 ShouldParseIf<!strconcat(fsycl_is_device.KeyPath, "||", fsycl_is_host.KeyPath)>; 6800 6801defm cuda_approx_transcendentals : BoolFOption<"cuda-approx-transcendentals", 6802 LangOpts<"CUDADeviceApproxTranscendentals">, DefaultFalse, 6803 PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">, 6804 BothFlags<[], " approximate transcendental functions">>, 6805 ShouldParseIf<fcuda_is_device.KeyPath>; 6806 6807//===----------------------------------------------------------------------===// 6808// Frontend Options - cc1 + fc1 6809//===----------------------------------------------------------------------===// 6810 6811let Flags = [CC1Option, FC1Option, NoDriverOption] in { 6812let Group = Action_Group in { 6813 6814def emit_obj : Flag<["-"], "emit-obj">, 6815 HelpText<"Emit native object files">; 6816def init_only : Flag<["-"], "init-only">, 6817 HelpText<"Only execute frontend initialization">; 6818def emit_llvm_bc : Flag<["-"], "emit-llvm-bc">, 6819 HelpText<"Build ASTs then convert to LLVM, emit .bc file">; 6820 6821} // let Group = Action_Group 6822 6823def load : Separate<["-"], "load">, MetaVarName<"<dsopath>">, 6824 HelpText<"Load the named plugin (dynamic shared object)">; 6825def plugin : Separate<["-"], "plugin">, MetaVarName<"<name>">, 6826 HelpText<"Use the named plugin action instead of the default action (use \"help\" to list available options)">; 6827defm debug_pass_manager : BoolOption<"f", "debug-pass-manager", 6828 CodeGenOpts<"DebugPassManager">, DefaultFalse, 6829 PosFlag<SetTrue, [], "Prints debug information for the new pass manager">, 6830 NegFlag<SetFalse, [], "Disables debug printing for the new pass manager">>; 6831 6832} // let Flags = [CC1Option, FC1Option, NoDriverOption] 6833 6834//===----------------------------------------------------------------------===// 6835// cc1as-only Options 6836//===----------------------------------------------------------------------===// 6837 6838let Flags = [CC1AsOption, NoDriverOption] in { 6839 6840// Language Options 6841def n : Flag<["-"], "n">, 6842 HelpText<"Don't automatically start assembly file with a text section">; 6843 6844// Frontend Options 6845def filetype : Separate<["-"], "filetype">, 6846 HelpText<"Specify the output file type ('asm', 'null', or 'obj')">; 6847 6848// Transliterate Options 6849def output_asm_variant : Separate<["-"], "output-asm-variant">, 6850 HelpText<"Select the asm variant index to use for output">; 6851def show_encoding : Flag<["-"], "show-encoding">, 6852 HelpText<"Show instruction encoding information in transliterate mode">; 6853def show_inst : Flag<["-"], "show-inst">, 6854 HelpText<"Show internal instruction representation in transliterate mode">; 6855 6856// Assemble Options 6857def dwarf_debug_producer : Separate<["-"], "dwarf-debug-producer">, 6858 HelpText<"The string to embed in the Dwarf debug AT_producer record.">; 6859 6860def defsym : Separate<["-"], "defsym">, 6861 HelpText<"Define a value for a symbol">; 6862 6863} // let Flags = [CC1AsOption] 6864 6865//===----------------------------------------------------------------------===// 6866// clang-cl Options 6867//===----------------------------------------------------------------------===// 6868 6869def cl_Group : OptionGroup<"<clang-cl options>">, Flags<[CLDXCOption]>, 6870 HelpText<"CL.EXE COMPATIBILITY OPTIONS">; 6871 6872def cl_compile_Group : OptionGroup<"<clang-cl compile-only options>">, 6873 Group<cl_Group>; 6874 6875def cl_ignored_Group : OptionGroup<"<clang-cl ignored options>">, 6876 Group<cl_Group>; 6877 6878class CLFlag<string name> : Option<["/", "-"], name, KIND_FLAG>, 6879 Group<cl_Group>, Flags<[CLOption, NoXarchOption]>; 6880 6881class CLDXCFlag<string name> : Option<["/", "-"], name, KIND_FLAG>, 6882 Group<cl_Group>, Flags<[CLDXCOption, NoXarchOption]>; 6883 6884class CLCompileFlag<string name> : Option<["/", "-"], name, KIND_FLAG>, 6885 Group<cl_compile_Group>, Flags<[CLOption, NoXarchOption]>; 6886 6887class CLIgnoredFlag<string name> : Option<["/", "-"], name, KIND_FLAG>, 6888 Group<cl_ignored_Group>, Flags<[CLOption, NoXarchOption]>; 6889 6890class CLJoined<string name> : Option<["/", "-"], name, KIND_JOINED>, 6891 Group<cl_Group>, Flags<[CLOption, NoXarchOption]>; 6892 6893class CLDXCJoined<string name> : Option<["/", "-"], name, KIND_JOINED>, 6894 Group<cl_Group>, Flags<[CLDXCOption, NoXarchOption]>; 6895 6896class CLCompileJoined<string name> : Option<["/", "-"], name, KIND_JOINED>, 6897 Group<cl_compile_Group>, Flags<[CLOption, NoXarchOption]>; 6898 6899class CLIgnoredJoined<string name> : Option<["/", "-"], name, KIND_JOINED>, 6900 Group<cl_ignored_Group>, Flags<[CLOption, NoXarchOption, HelpHidden]>; 6901 6902class CLJoinedOrSeparate<string name> : Option<["/", "-"], name, 6903 KIND_JOINED_OR_SEPARATE>, Group<cl_Group>, Flags<[CLOption, NoXarchOption]>; 6904 6905class CLDXCJoinedOrSeparate<string name> : Option<["/", "-"], name, 6906 KIND_JOINED_OR_SEPARATE>, Group<cl_Group>, Flags<[CLDXCOption, NoXarchOption]>; 6907 6908class CLCompileJoinedOrSeparate<string name> : Option<["/", "-"], name, 6909 KIND_JOINED_OR_SEPARATE>, Group<cl_compile_Group>, 6910 Flags<[CLOption, NoXarchOption]>; 6911 6912class CLRemainingArgsJoined<string name> : Option<["/", "-"], name, 6913 KIND_REMAINING_ARGS_JOINED>, Group<cl_Group>, Flags<[CLOption, NoXarchOption]>; 6914 6915// Aliases: 6916// (We don't put any of these in cl_compile_Group as the options they alias are 6917// already in the right group.) 6918 6919def _SLASH_Brepro : CLFlag<"Brepro">, 6920 HelpText<"Do not write current time into COFF output (breaks link.exe /incremental)">, 6921 Alias<mno_incremental_linker_compatible>; 6922def _SLASH_Brepro_ : CLFlag<"Brepro-">, 6923 HelpText<"Write current time into COFF output (default)">, 6924 Alias<mincremental_linker_compatible>; 6925def _SLASH_C : CLFlag<"C">, 6926 HelpText<"Do not discard comments when preprocessing">, Alias<C>; 6927def _SLASH_c : CLFlag<"c">, HelpText<"Compile only">, Alias<c>; 6928def _SLASH_d1PP : CLFlag<"d1PP">, 6929 HelpText<"Retain macro definitions in /E mode">, Alias<dD>; 6930def _SLASH_d1reportAllClassLayout : CLFlag<"d1reportAllClassLayout">, 6931 HelpText<"Dump record layout information">, 6932 Alias<Xclang>, AliasArgs<["-fdump-record-layouts"]>; 6933def _SLASH_diagnostics_caret : CLFlag<"diagnostics:caret">, 6934 HelpText<"Enable caret and column diagnostics (default)">; 6935def _SLASH_diagnostics_column : CLFlag<"diagnostics:column">, 6936 HelpText<"Disable caret diagnostics but keep column info">; 6937def _SLASH_diagnostics_classic : CLFlag<"diagnostics:classic">, 6938 HelpText<"Disable column and caret diagnostics">; 6939def _SLASH_D : CLJoinedOrSeparate<"D">, HelpText<"Define macro">, 6940 MetaVarName<"<macro[=value]>">, Alias<D>; 6941def _SLASH_E : CLFlag<"E">, HelpText<"Preprocess to stdout">, Alias<E>; 6942def _SLASH_external_COLON_I : CLJoinedOrSeparate<"external:I">, Alias<isystem>, 6943 HelpText<"Add directory to include search path with warnings suppressed">, 6944 MetaVarName<"<dir>">; 6945def _SLASH_fp_contract : CLFlag<"fp:contract">, HelpText<"">, Alias<ffp_contract>, AliasArgs<["on"]>; 6946def _SLASH_fp_except : CLFlag<"fp:except">, HelpText<"">, Alias<ffp_exception_behavior_EQ>, AliasArgs<["strict"]>; 6947def _SLASH_fp_except_ : CLFlag<"fp:except-">, HelpText<"">, Alias<ffp_exception_behavior_EQ>, AliasArgs<["ignore"]>; 6948def _SLASH_fp_fast : CLFlag<"fp:fast">, HelpText<"">, Alias<ffast_math>; 6949def _SLASH_fp_precise : CLFlag<"fp:precise">, HelpText<"">, Alias<ffp_model_EQ>, AliasArgs<["precise"]>; 6950def _SLASH_fp_strict : CLFlag<"fp:strict">, HelpText<"">, Alias<ffp_model_EQ>, AliasArgs<["strict"]>; 6951def _SLASH_fsanitize_EQ_address : CLFlag<"fsanitize=address">, 6952 HelpText<"Enable AddressSanitizer">, 6953 Alias<fsanitize_EQ>, AliasArgs<["address"]>; 6954def _SLASH_GA : CLFlag<"GA">, Alias<ftlsmodel_EQ>, AliasArgs<["local-exec"]>, 6955 HelpText<"Assume thread-local variables are defined in the executable">; 6956def _SLASH_GR : CLFlag<"GR">, HelpText<"Emit RTTI data (default)">; 6957def _SLASH_GR_ : CLFlag<"GR-">, HelpText<"Do not emit RTTI data">; 6958def _SLASH_GF : CLIgnoredFlag<"GF">, 6959 HelpText<"Enable string pooling (default)">; 6960def _SLASH_GF_ : CLFlag<"GF-">, HelpText<"Disable string pooling">, 6961 Alias<fwritable_strings>; 6962def _SLASH_GS : CLFlag<"GS">, 6963 HelpText<"Enable buffer security check (default)">; 6964def _SLASH_GS_ : CLFlag<"GS-">, HelpText<"Disable buffer security check">; 6965def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">, 6966 Alias<mstack_probe_size>, AliasArgs<["4096"]>; 6967def _SLASH_Gs : CLJoined<"Gs">, 6968 HelpText<"Set stack probe size (default 4096)">, Alias<mstack_probe_size>; 6969def _SLASH_Gy : CLFlag<"Gy">, HelpText<"Put each function in its own section">, 6970 Alias<ffunction_sections>; 6971def _SLASH_Gy_ : CLFlag<"Gy-">, 6972 HelpText<"Do not put each function in its own section (default)">, 6973 Alias<fno_function_sections>; 6974def _SLASH_Gw : CLFlag<"Gw">, HelpText<"Put each data item in its own section">, 6975 Alias<fdata_sections>; 6976def _SLASH_Gw_ : CLFlag<"Gw-">, 6977 HelpText<"Do not put each data item in its own section (default)">, 6978 Alias<fno_data_sections>; 6979def _SLASH_help : CLFlag<"help">, Alias<help>, 6980 HelpText<"Display available options">; 6981def _SLASH_HELP : CLFlag<"HELP">, Alias<help>; 6982def _SLASH_hotpatch : CLFlag<"hotpatch">, Alias<fms_hotpatch>, 6983 HelpText<"Create hotpatchable image">; 6984def _SLASH_I : CLDXCJoinedOrSeparate<"I">, 6985 HelpText<"Add directory to include search path">, MetaVarName<"<dir>">, 6986 Alias<I>; 6987def _SLASH_J : CLFlag<"J">, HelpText<"Make char type unsigned">, 6988 Alias<funsigned_char>; 6989 6990// The _SLASH_O option handles all the /O flags, but we also provide separate 6991// aliased options to provide separate help messages. 6992def _SLASH_O : CLDXCJoined<"O">, 6993 HelpText<"Set multiple /O flags at once; e.g. '/O2y-' for '/O2 /Oy-'">, 6994 MetaVarName<"<flags>">; 6995def : CLFlag<"O1">, Alias<_SLASH_O>, AliasArgs<["1"]>, 6996 HelpText<"Optimize for size (like /Og /Os /Oy /Ob2 /GF /Gy)">; 6997def : CLFlag<"O2">, Alias<_SLASH_O>, AliasArgs<["2"]>, 6998 HelpText<"Optimize for speed (like /Og /Oi /Ot /Oy /Ob2 /GF /Gy)">; 6999def : CLFlag<"Ob0">, Alias<_SLASH_O>, AliasArgs<["b0"]>, 7000 HelpText<"Disable function inlining">; 7001def : CLFlag<"Ob1">, Alias<_SLASH_O>, AliasArgs<["b1"]>, 7002 HelpText<"Only inline functions explicitly or implicitly marked inline">; 7003def : CLFlag<"Ob2">, Alias<_SLASH_O>, AliasArgs<["b2"]>, 7004 HelpText<"Inline functions as deemed beneficial by the compiler">; 7005def : CLDXCFlag<"Od">, Alias<_SLASH_O>, AliasArgs<["d"]>, 7006 HelpText<"Disable optimization">; 7007def : CLFlag<"Og">, Alias<_SLASH_O>, AliasArgs<["g"]>, 7008 HelpText<"No effect">; 7009def : CLFlag<"Oi">, Alias<_SLASH_O>, AliasArgs<["i"]>, 7010 HelpText<"Enable use of builtin functions">; 7011def : CLFlag<"Oi-">, Alias<_SLASH_O>, AliasArgs<["i-"]>, 7012 HelpText<"Disable use of builtin functions">; 7013def : CLFlag<"Os">, Alias<_SLASH_O>, AliasArgs<["s"]>, 7014 HelpText<"Optimize for size">; 7015def : CLFlag<"Ot">, Alias<_SLASH_O>, AliasArgs<["t"]>, 7016 HelpText<"Optimize for speed">; 7017def : CLFlag<"Ox">, Alias<_SLASH_O>, AliasArgs<["x"]>, 7018 HelpText<"Deprecated (like /Og /Oi /Ot /Oy /Ob2); use /O2">; 7019def : CLFlag<"Oy">, Alias<_SLASH_O>, AliasArgs<["y"]>, 7020 HelpText<"Enable frame pointer omission (x86 only)">; 7021def : CLFlag<"Oy-">, Alias<_SLASH_O>, AliasArgs<["y-"]>, 7022 HelpText<"Disable frame pointer omission (x86 only, default)">; 7023 7024def _SLASH_QUESTION : CLFlag<"?">, Alias<help>, 7025 HelpText<"Display available options">; 7026def _SLASH_Qvec : CLFlag<"Qvec">, 7027 HelpText<"Enable the loop vectorization passes">, Alias<fvectorize>; 7028def _SLASH_Qvec_ : CLFlag<"Qvec-">, 7029 HelpText<"Disable the loop vectorization passes">, Alias<fno_vectorize>; 7030def _SLASH_showIncludes : CLFlag<"showIncludes">, 7031 HelpText<"Print info about included files to stderr">; 7032def _SLASH_showIncludes_user : CLFlag<"showIncludes:user">, 7033 HelpText<"Like /showIncludes but omit system headers">; 7034def _SLASH_showFilenames : CLFlag<"showFilenames">, 7035 HelpText<"Print the name of each compiled file">; 7036def _SLASH_showFilenames_ : CLFlag<"showFilenames-">, 7037 HelpText<"Do not print the name of each compiled file (default)">; 7038def _SLASH_source_charset : CLCompileJoined<"source-charset:">, 7039 HelpText<"Set source encoding, supports only UTF-8">, 7040 Alias<finput_charset_EQ>; 7041def _SLASH_execution_charset : CLCompileJoined<"execution-charset:">, 7042 HelpText<"Set runtime encoding, supports only UTF-8">, 7043 Alias<fexec_charset_EQ>; 7044def _SLASH_std : CLCompileJoined<"std:">, 7045 HelpText<"Set language version (c++14,c++17,c++20,c++latest,c11,c17)">; 7046def _SLASH_U : CLJoinedOrSeparate<"U">, HelpText<"Undefine macro">, 7047 MetaVarName<"<macro>">, Alias<U>; 7048def _SLASH_validate_charset : CLFlag<"validate-charset">, 7049 Alias<W_Joined>, AliasArgs<["invalid-source-encoding"]>; 7050def _SLASH_validate_charset_ : CLFlag<"validate-charset-">, 7051 Alias<W_Joined>, AliasArgs<["no-invalid-source-encoding"]>; 7052def _SLASH_external_W0 : CLFlag<"external:W0">, HelpText<"Ignore warnings from system headers (default)">, Alias<Wno_system_headers>; 7053def _SLASH_external_W1 : CLFlag<"external:W1">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>; 7054def _SLASH_external_W2 : CLFlag<"external:W2">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>; 7055def _SLASH_external_W3 : CLFlag<"external:W3">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>; 7056def _SLASH_external_W4 : CLFlag<"external:W4">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>; 7057def _SLASH_W0 : CLFlag<"W0">, HelpText<"Disable all warnings">, Alias<w>; 7058def _SLASH_W1 : CLFlag<"W1">, HelpText<"Enable -Wall">, Alias<Wall>; 7059def _SLASH_W2 : CLFlag<"W2">, HelpText<"Enable -Wall">, Alias<Wall>; 7060def _SLASH_W3 : CLFlag<"W3">, HelpText<"Enable -Wall">, Alias<Wall>; 7061def _SLASH_W4 : CLFlag<"W4">, HelpText<"Enable -Wall and -Wextra">, Alias<WCL4>; 7062def _SLASH_Wall : CLFlag<"Wall">, HelpText<"Enable -Weverything">, 7063 Alias<W_Joined>, AliasArgs<["everything"]>; 7064def _SLASH_WX : CLFlag<"WX">, HelpText<"Treat warnings as errors">, 7065 Alias<W_Joined>, AliasArgs<["error"]>; 7066def _SLASH_WX_ : CLFlag<"WX-">, 7067 HelpText<"Do not treat warnings as errors (default)">, 7068 Alias<W_Joined>, AliasArgs<["no-error"]>; 7069def _SLASH_w_flag : CLFlag<"w">, HelpText<"Disable all warnings">, Alias<w>; 7070def _SLASH_wd : CLCompileJoined<"wd">; 7071def _SLASH_vd : CLJoined<"vd">, HelpText<"Control vtordisp placement">, 7072 Alias<vtordisp_mode_EQ>; 7073def _SLASH_X : CLFlag<"X">, 7074 HelpText<"Do not add %INCLUDE% to include search path">, Alias<nostdlibinc>; 7075def _SLASH_Zc_sizedDealloc : CLFlag<"Zc:sizedDealloc">, 7076 HelpText<"Enable C++14 sized global deallocation functions">, 7077 Alias<fsized_deallocation>; 7078def _SLASH_Zc_sizedDealloc_ : CLFlag<"Zc:sizedDealloc-">, 7079 HelpText<"Disable C++14 sized global deallocation functions">, 7080 Alias<fno_sized_deallocation>; 7081def _SLASH_Zc_alignedNew : CLFlag<"Zc:alignedNew">, 7082 HelpText<"Enable C++17 aligned allocation functions">, 7083 Alias<faligned_allocation>; 7084def _SLASH_Zc_alignedNew_ : CLFlag<"Zc:alignedNew-">, 7085 HelpText<"Disable C++17 aligned allocation functions">, 7086 Alias<fno_aligned_allocation>; 7087def _SLASH_Zc_char8_t : CLFlag<"Zc:char8_t">, 7088 HelpText<"Enable char8_t from C++2a">, 7089 Alias<fchar8__t>; 7090def _SLASH_Zc_char8_t_ : CLFlag<"Zc:char8_t-">, 7091 HelpText<"Disable char8_t from c++2a">, 7092 Alias<fno_char8__t>; 7093def _SLASH_Zc_strictStrings : CLFlag<"Zc:strictStrings">, 7094 HelpText<"Treat string literals as const">, Alias<W_Joined>, 7095 AliasArgs<["error=c++11-compat-deprecated-writable-strings"]>; 7096def _SLASH_Zc_threadSafeInit : CLFlag<"Zc:threadSafeInit">, 7097 HelpText<"Enable thread-safe initialization of static variables">, 7098 Alias<fthreadsafe_statics>; 7099def _SLASH_Zc_threadSafeInit_ : CLFlag<"Zc:threadSafeInit-">, 7100 HelpText<"Disable thread-safe initialization of static variables">, 7101 Alias<fno_threadsafe_statics>; 7102def _SLASH_Zc_trigraphs : CLFlag<"Zc:trigraphs">, 7103 HelpText<"Enable trigraphs">, Alias<ftrigraphs>; 7104def _SLASH_Zc_trigraphs_off : CLFlag<"Zc:trigraphs-">, 7105 HelpText<"Disable trigraphs (default)">, Alias<fno_trigraphs>; 7106def _SLASH_Zc_twoPhase : CLFlag<"Zc:twoPhase">, 7107 HelpText<"Enable two-phase name lookup in templates">, 7108 Alias<fno_delayed_template_parsing>; 7109def _SLASH_Zc_twoPhase_ : CLFlag<"Zc:twoPhase-">, 7110 HelpText<"Disable two-phase name lookup in templates (default)">, 7111 Alias<fdelayed_template_parsing>; 7112def _SLASH_Zc_wchar_t : CLFlag<"Zc:wchar_t">, 7113 HelpText<"Enable C++ builtin type wchar_t (default)">; 7114def _SLASH_Zc_wchar_t_ : CLFlag<"Zc:wchar_t-">, 7115 HelpText<"Disable C++ builtin type wchar_t">; 7116def _SLASH_Z7 : CLFlag<"Z7">, 7117 HelpText<"Enable CodeView debug information in object files">; 7118def _SLASH_ZH_MD5 : CLFlag<"ZH:MD5">, 7119 HelpText<"Use MD5 for file checksums in debug info (default)">, 7120 Alias<gsrc_hash_EQ>, AliasArgs<["md5"]>; 7121def _SLASH_ZH_SHA1 : CLFlag<"ZH:SHA1">, 7122 HelpText<"Use SHA1 for file checksums in debug info">, 7123 Alias<gsrc_hash_EQ>, AliasArgs<["sha1"]>; 7124def _SLASH_ZH_SHA_256 : CLFlag<"ZH:SHA_256">, 7125 HelpText<"Use SHA256 for file checksums in debug info">, 7126 Alias<gsrc_hash_EQ>, AliasArgs<["sha256"]>; 7127def _SLASH_Zi : CLFlag<"Zi">, Alias<_SLASH_Z7>, 7128 HelpText<"Like /Z7">; 7129def _SLASH_Zp : CLJoined<"Zp">, 7130 HelpText<"Set default maximum struct packing alignment">, 7131 Alias<fpack_struct_EQ>; 7132def _SLASH_Zp_flag : CLFlag<"Zp">, 7133 HelpText<"Set default maximum struct packing alignment to 1">, 7134 Alias<fpack_struct_EQ>, AliasArgs<["1"]>; 7135def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Run the preprocessor, parser and semantic analysis stages">, 7136 Alias<fsyntax_only>; 7137def _SLASH_openmp_ : CLFlag<"openmp-">, 7138 HelpText<"Disable OpenMP support">, Alias<fno_openmp>; 7139def _SLASH_openmp : CLFlag<"openmp">, HelpText<"Enable OpenMP support">, 7140 Alias<fopenmp>; 7141def _SLASH_openmp_experimental : CLFlag<"openmp:experimental">, 7142 HelpText<"Enable OpenMP support with experimental SIMD support">, 7143 Alias<fopenmp>; 7144def _SLASH_tune : CLCompileJoined<"tune:">, 7145 HelpText<"Set CPU for optimization without affecting instruction set">, 7146 Alias<mtune_EQ>; 7147def _SLASH_QIntel_jcc_erratum : CLFlag<"QIntel-jcc-erratum">, 7148 HelpText<"Align branches within 32-byte boundaries to mitigate the performance impact of the Intel JCC erratum.">, 7149 Alias<mbranches_within_32B_boundaries>; 7150def _SLASH_arm64EC : CLFlag<"arm64EC">, 7151 HelpText<"Set build target to arm64ec">; 7152def : CLFlag<"Qgather-">, Alias<mno_gather>, 7153 HelpText<"Disable generation of gather instructions in auto-vectorization(x86 only)">; 7154def : CLFlag<"Qscatter-">, Alias<mno_scatter>, 7155 HelpText<"Disable generation of scatter instructions in auto-vectorization(x86 only)">; 7156 7157// Non-aliases: 7158 7159def _SLASH_arch : CLCompileJoined<"arch:">, 7160 HelpText<"Set architecture for code generation">; 7161 7162def _SLASH_M_Group : OptionGroup<"</M group>">, Group<cl_compile_Group>; 7163def _SLASH_volatile_Group : OptionGroup<"</volatile group>">, 7164 Group<cl_compile_Group>; 7165 7166def _SLASH_EH : CLJoined<"EH">, HelpText<"Set exception handling model">; 7167def _SLASH_EP : CLFlag<"EP">, 7168 HelpText<"Disable linemarker output and preprocess to stdout">; 7169def _SLASH_external_env : CLJoined<"external:env:">, 7170 HelpText<"Add dirs in env var <var> to include search path with warnings suppressed">, 7171 MetaVarName<"<var>">; 7172def _SLASH_FA : CLJoined<"FA">, 7173 HelpText<"Output assembly code file during compilation">; 7174def _SLASH_Fa : CLJoined<"Fa">, 7175 HelpText<"Set assembly output file name (with /FA)">, 7176 MetaVarName<"<file or dir/>">; 7177def _SLASH_FI : CLJoinedOrSeparate<"FI">, 7178 HelpText<"Include file before parsing">, Alias<include_>; 7179def _SLASH_Fe : CLJoined<"Fe">, 7180 HelpText<"Set output executable file name">, 7181 MetaVarName<"<file or dir/>">; 7182def _SLASH_Fe_COLON : CLJoined<"Fe:">, Alias<_SLASH_Fe>; 7183def _SLASH_Fi : CLCompileJoined<"Fi">, 7184 HelpText<"Set preprocess output file name (with /P)">, 7185 MetaVarName<"<file>">; 7186def _SLASH_Fo : CLCompileJoined<"Fo">, 7187 HelpText<"Set output object file (with /c)">, 7188 MetaVarName<"<file or dir/>">; 7189def _SLASH_guard : CLJoined<"guard:">, 7190 HelpText<"Enable Control Flow Guard with /guard:cf, or only the table with /guard:cf,nochecks. " 7191 "Enable EH Continuation Guard with /guard:ehcont">; 7192def _SLASH_GX : CLFlag<"GX">, 7193 HelpText<"Deprecated; use /EHsc">; 7194def _SLASH_GX_ : CLFlag<"GX-">, 7195 HelpText<"Deprecated (like not passing /EH)">; 7196def _SLASH_imsvc : CLJoinedOrSeparate<"imsvc">, 7197 HelpText<"Add <dir> to system include search path, as if in %INCLUDE%">, 7198 MetaVarName<"<dir>">; 7199def _SLASH_JMC : CLFlag<"JMC">, 7200 HelpText<"Enable just-my-code debugging">; 7201def _SLASH_JMC_ : CLFlag<"JMC-">, 7202 HelpText<"Disable just-my-code debugging (default)">; 7203def _SLASH_LD : CLFlag<"LD">, HelpText<"Create DLL">; 7204def _SLASH_LDd : CLFlag<"LDd">, HelpText<"Create debug DLL">; 7205def _SLASH_link : CLRemainingArgsJoined<"link">, 7206 HelpText<"Forward options to the linker">, MetaVarName<"<options>">; 7207def _SLASH_MD : Option<["/", "-"], "MD", KIND_FLAG>, Group<_SLASH_M_Group>, 7208 Flags<[CLOption, NoXarchOption]>, HelpText<"Use DLL run-time">; 7209def _SLASH_MDd : Option<["/", "-"], "MDd", KIND_FLAG>, Group<_SLASH_M_Group>, 7210 Flags<[CLOption, NoXarchOption]>, HelpText<"Use DLL debug run-time">; 7211def _SLASH_MT : Option<["/", "-"], "MT", KIND_FLAG>, Group<_SLASH_M_Group>, 7212 Flags<[CLOption, NoXarchOption]>, HelpText<"Use static run-time">; 7213def _SLASH_MTd : Option<["/", "-"], "MTd", KIND_FLAG>, Group<_SLASH_M_Group>, 7214 Flags<[CLOption, NoXarchOption]>, HelpText<"Use static debug run-time">; 7215def _SLASH_o : CLJoinedOrSeparate<"o">, 7216 HelpText<"Deprecated (set output file name); use /Fe or /Fe">, 7217 MetaVarName<"<file or dir/>">; 7218def _SLASH_P : CLFlag<"P">, HelpText<"Preprocess to file">; 7219def _SLASH_permissive : CLFlag<"permissive">, 7220 HelpText<"Enable some non conforming code to compile">; 7221def _SLASH_permissive_ : CLFlag<"permissive-">, 7222 HelpText<"Disable non conforming code from compiling (default)">; 7223def _SLASH_Tc : CLCompileJoinedOrSeparate<"Tc">, 7224 HelpText<"Treat <file> as C source file">, MetaVarName<"<file>">; 7225def _SLASH_TC : CLCompileFlag<"TC">, HelpText<"Treat all source files as C">; 7226def _SLASH_Tp : CLCompileJoinedOrSeparate<"Tp">, 7227 HelpText<"Treat <file> as C++ source file">, MetaVarName<"<file>">; 7228def _SLASH_TP : CLCompileFlag<"TP">, HelpText<"Treat all source files as C++">; 7229def _SLASH_diasdkdir : CLJoinedOrSeparate<"diasdkdir">, 7230 HelpText<"Path to the DIA SDK">, MetaVarName<"<dir>">; 7231def _SLASH_vctoolsdir : CLJoinedOrSeparate<"vctoolsdir">, 7232 HelpText<"Path to the VCToolChain">, MetaVarName<"<dir>">; 7233def _SLASH_vctoolsversion : CLJoinedOrSeparate<"vctoolsversion">, 7234 HelpText<"For use with /winsysroot, defaults to newest found">; 7235def _SLASH_winsdkdir : CLJoinedOrSeparate<"winsdkdir">, 7236 HelpText<"Path to the Windows SDK">, MetaVarName<"<dir>">; 7237def _SLASH_winsdkversion : CLJoinedOrSeparate<"winsdkversion">, 7238 HelpText<"Full version of the Windows SDK, defaults to newest found">; 7239def _SLASH_winsysroot : CLJoinedOrSeparate<"winsysroot">, 7240 HelpText<"Same as \"/diasdkdir <dir>/DIA SDK\" /vctoolsdir <dir>/VC/Tools/MSVC/<vctoolsversion> \"/winsdkdir <dir>/Windows Kits/10\"">, 7241 MetaVarName<"<dir>">; 7242def _SLASH_volatile_iso : Option<["/", "-"], "volatile:iso", KIND_FLAG>, 7243 Group<_SLASH_volatile_Group>, Flags<[CLOption, NoXarchOption]>, 7244 HelpText<"Volatile loads and stores have standard semantics">; 7245def _SLASH_vmb : CLFlag<"vmb">, 7246 HelpText<"Use a best-case representation method for member pointers">; 7247def _SLASH_vmg : CLFlag<"vmg">, 7248 HelpText<"Use a most-general representation for member pointers">; 7249def _SLASH_vms : CLFlag<"vms">, 7250 HelpText<"Set the default most-general representation to single inheritance">; 7251def _SLASH_vmm : CLFlag<"vmm">, 7252 HelpText<"Set the default most-general representation to " 7253 "multiple inheritance">; 7254def _SLASH_vmv : CLFlag<"vmv">, 7255 HelpText<"Set the default most-general representation to " 7256 "virtual inheritance">; 7257def _SLASH_volatile_ms : Option<["/", "-"], "volatile:ms", KIND_FLAG>, 7258 Group<_SLASH_volatile_Group>, Flags<[CLOption, NoXarchOption]>, 7259 HelpText<"Volatile loads and stores have acquire and release semantics">; 7260def _SLASH_clang : CLJoined<"clang:">, 7261 HelpText<"Pass <arg> to the clang driver">, MetaVarName<"<arg>">; 7262def _SLASH_Zl : CLFlag<"Zl">, Alias<fms_omit_default_lib>, 7263 HelpText<"Do not let object file auto-link default libraries">; 7264 7265def _SLASH_Yc : CLJoined<"Yc">, 7266 HelpText<"Generate a pch file for all code up to and including <filename>">, 7267 MetaVarName<"<filename>">; 7268def _SLASH_Yu : CLJoined<"Yu">, 7269 HelpText<"Load a pch file and use it instead of all code up to " 7270 "and including <filename>">, 7271 MetaVarName<"<filename>">; 7272def _SLASH_Y_ : CLFlag<"Y-">, 7273 HelpText<"Disable precompiled headers, overrides /Yc and /Yu">; 7274def _SLASH_Zc_dllexportInlines : CLFlag<"Zc:dllexportInlines">, 7275 HelpText<"dllexport/dllimport inline member functions of dllexport/import classes (default)">; 7276def _SLASH_Zc_dllexportInlines_ : CLFlag<"Zc:dllexportInlines-">, 7277 HelpText<"Do not dllexport/dllimport inline member functions of dllexport/import classes">; 7278def _SLASH_Fp : CLJoined<"Fp">, 7279 HelpText<"Set pch file name (with /Yc and /Yu)">, MetaVarName<"<file>">; 7280 7281def _SLASH_Gd : CLFlag<"Gd">, 7282 HelpText<"Set __cdecl as a default calling convention">; 7283def _SLASH_Gr : CLFlag<"Gr">, 7284 HelpText<"Set __fastcall as a default calling convention">; 7285def _SLASH_Gz : CLFlag<"Gz">, 7286 HelpText<"Set __stdcall as a default calling convention">; 7287def _SLASH_Gv : CLFlag<"Gv">, 7288 HelpText<"Set __vectorcall as a default calling convention">; 7289def _SLASH_Gregcall : CLFlag<"Gregcall">, 7290 HelpText<"Set __regcall as a default calling convention">; 7291 7292// GNU Driver aliases 7293 7294def : Separate<["-"], "Xmicrosoft-visualc-tools-root">, Alias<_SLASH_vctoolsdir>; 7295def : Separate<["-"], "Xmicrosoft-visualc-tools-version">, 7296 Alias<_SLASH_vctoolsversion>; 7297def : Separate<["-"], "Xmicrosoft-windows-sdk-root">, 7298 Alias<_SLASH_winsdkdir>; 7299def : Separate<["-"], "Xmicrosoft-windows-sdk-version">, 7300 Alias<_SLASH_winsdkversion>; 7301 7302// Ignored: 7303 7304def _SLASH_analyze_ : CLIgnoredFlag<"analyze-">; 7305def _SLASH_bigobj : CLIgnoredFlag<"bigobj">; 7306def _SLASH_cgthreads : CLIgnoredJoined<"cgthreads">; 7307def _SLASH_d2FastFail : CLIgnoredFlag<"d2FastFail">; 7308def _SLASH_d2Zi_PLUS : CLIgnoredFlag<"d2Zi+">; 7309def _SLASH_errorReport : CLIgnoredJoined<"errorReport">; 7310def _SLASH_FC : CLIgnoredFlag<"FC">; 7311def _SLASH_Fd : CLIgnoredJoined<"Fd">; 7312def _SLASH_FS : CLIgnoredFlag<"FS">; 7313def _SLASH_kernel_ : CLIgnoredFlag<"kernel-">; 7314def _SLASH_nologo : CLIgnoredFlag<"nologo">; 7315def _SLASH_RTC : CLIgnoredJoined<"RTC">; 7316def _SLASH_sdl : CLIgnoredFlag<"sdl">; 7317def _SLASH_sdl_ : CLIgnoredFlag<"sdl-">; 7318def _SLASH_utf8 : CLIgnoredFlag<"utf-8">, 7319 HelpText<"Set source and runtime encoding to UTF-8 (default)">; 7320def _SLASH_w : CLIgnoredJoined<"w">; 7321def _SLASH_Wv_ : CLIgnoredJoined<"Wv">; 7322def _SLASH_Zc___cplusplus : CLIgnoredFlag<"Zc:__cplusplus">; 7323def _SLASH_Zc_auto : CLIgnoredFlag<"Zc:auto">; 7324def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">; 7325def _SLASH_Zc_inline : CLIgnoredFlag<"Zc:inline">; 7326def _SLASH_Zc_rvalueCast : CLIgnoredFlag<"Zc:rvalueCast">; 7327def _SLASH_Zc_ternary : CLIgnoredFlag<"Zc:ternary">; 7328def _SLASH_Zm : CLIgnoredJoined<"Zm">; 7329def _SLASH_Zo : CLIgnoredFlag<"Zo">; 7330def _SLASH_Zo_ : CLIgnoredFlag<"Zo-">; 7331 7332 7333// Unsupported: 7334 7335def _SLASH_await : CLFlag<"await">; 7336def _SLASH_await_COLON : CLJoined<"await:">; 7337def _SLASH_constexpr : CLJoined<"constexpr:">; 7338def _SLASH_AI : CLJoinedOrSeparate<"AI">; 7339def _SLASH_Bt : CLFlag<"Bt">; 7340def _SLASH_Bt_plus : CLFlag<"Bt+">; 7341def _SLASH_clr : CLJoined<"clr">; 7342def _SLASH_d1 : CLJoined<"d1">; 7343def _SLASH_d2 : CLJoined<"d2">; 7344def _SLASH_doc : CLJoined<"doc">; 7345def _SLASH_experimental : CLJoined<"experimental:">; 7346def _SLASH_exportHeader : CLFlag<"exportHeader">; 7347def _SLASH_external : CLJoined<"external:">; 7348def _SLASH_favor : CLJoined<"favor">; 7349def _SLASH_fsanitize_address_use_after_return : CLJoined<"fsanitize-address-use-after-return">; 7350def _SLASH_fno_sanitize_address_vcasan_lib : CLJoined<"fno-sanitize-address-vcasan-lib">; 7351def _SLASH_F : CLJoinedOrSeparate<"F">; 7352def _SLASH_Fm : CLJoined<"Fm">; 7353def _SLASH_Fr : CLJoined<"Fr">; 7354def _SLASH_FR : CLJoined<"FR">; 7355def _SLASH_FU : CLJoinedOrSeparate<"FU">; 7356def _SLASH_Fx : CLFlag<"Fx">; 7357def _SLASH_G1 : CLFlag<"G1">; 7358def _SLASH_G2 : CLFlag<"G2">; 7359def _SLASH_Ge : CLFlag<"Ge">; 7360def _SLASH_Gh : CLFlag<"Gh">; 7361def _SLASH_GH : CLFlag<"GH">; 7362def _SLASH_GL : CLFlag<"GL">; 7363def _SLASH_GL_ : CLFlag<"GL-">; 7364def _SLASH_Gm : CLFlag<"Gm">; 7365def _SLASH_Gm_ : CLFlag<"Gm-">; 7366def _SLASH_GT : CLFlag<"GT">; 7367def _SLASH_GZ : CLFlag<"GZ">; 7368def _SLASH_H : CLFlag<"H">; 7369def _SLASH_headername : CLJoined<"headerName:">; 7370def _SLASH_headerUnit : CLJoinedOrSeparate<"headerUnit">; 7371def _SLASH_headerUnitAngle : CLJoinedOrSeparate<"headerUnit:angle">; 7372def _SLASH_headerUnitQuote : CLJoinedOrSeparate<"headerUnit:quote">; 7373def _SLASH_homeparams : CLFlag<"homeparams">; 7374def _SLASH_kernel : CLFlag<"kernel">; 7375def _SLASH_LN : CLFlag<"LN">; 7376def _SLASH_MP : CLJoined<"MP">; 7377def _SLASH_Qfast_transcendentals : CLFlag<"Qfast_transcendentals">; 7378def _SLASH_QIfist : CLFlag<"QIfist">; 7379def _SLASH_Qimprecise_fwaits : CLFlag<"Qimprecise_fwaits">; 7380def _SLASH_Qpar : CLFlag<"Qpar">; 7381def _SLASH_Qpar_report : CLJoined<"Qpar-report">; 7382def _SLASH_Qsafe_fp_loads : CLFlag<"Qsafe_fp_loads">; 7383def _SLASH_Qspectre : CLFlag<"Qspectre">; 7384def _SLASH_Qspectre_load : CLFlag<"Qspectre-load">; 7385def _SLASH_Qspectre_load_cf : CLFlag<"Qspectre-load-cf">; 7386def _SLASH_Qvec_report : CLJoined<"Qvec-report">; 7387def _SLASH_reference : CLJoinedOrSeparate<"reference">; 7388def _SLASH_sourceDependencies : CLJoinedOrSeparate<"sourceDependencies">; 7389def _SLASH_sourceDependenciesDirectives : CLJoinedOrSeparate<"sourceDependencies:directives">; 7390def _SLASH_translateInclude : CLFlag<"translateInclude">; 7391def _SLASH_u : CLFlag<"u">; 7392def _SLASH_V : CLFlag<"V">; 7393def _SLASH_WL : CLFlag<"WL">; 7394def _SLASH_Wp64 : CLFlag<"Wp64">; 7395def _SLASH_Yd : CLFlag<"Yd">; 7396def _SLASH_Yl : CLJoined<"Yl">; 7397def _SLASH_Za : CLFlag<"Za">; 7398def _SLASH_Zc : CLJoined<"Zc:">; 7399def _SLASH_Ze : CLFlag<"Ze">; 7400def _SLASH_Zg : CLFlag<"Zg">; 7401def _SLASH_ZI : CLFlag<"ZI">; 7402def _SLASH_ZW : CLJoined<"ZW">; 7403 7404//===----------------------------------------------------------------------===// 7405// clang-dxc Options 7406//===----------------------------------------------------------------------===// 7407 7408def dxc_Group : OptionGroup<"<clang-dxc options>">, Flags<[DXCOption]>, 7409 HelpText<"dxc compatibility options">; 7410class DXCFlag<string name> : Option<["/", "-"], name, KIND_FLAG>, 7411 Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>; 7412class DXCJoinedOrSeparate<string name> : Option<["/", "-"], name, 7413 KIND_JOINED_OR_SEPARATE>, Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>; 7414 7415def dxc_help : Option<["/", "-", "--"], "help", KIND_JOINED>, 7416 Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>, Alias<help>, 7417 HelpText<"Display available options">; 7418def dxc_no_stdinc : DXCFlag<"hlsl-no-stdinc">, 7419 HelpText<"HLSL only. Disables all standard includes containing non-native compiler types and functions.">; 7420def Fo : DXCJoinedOrSeparate<"Fo">, Alias<o>, 7421 HelpText<"Output object file">; 7422def dxil_validator_version : Option<["/", "-"], "validator-version", KIND_SEPARATE>, 7423 Group<dxc_Group>, Flags<[DXCOption, NoXarchOption, CC1Option, HelpHidden]>, 7424 HelpText<"Override validator version for module. Format: <major.minor>;" 7425 "Default: DXIL.dll version or current internal version">, 7426 MarshallingInfoString<TargetOpts<"DxilValidatorVersion">>; 7427def target_profile : DXCJoinedOrSeparate<"T">, MetaVarName<"<profile>">, 7428 HelpText<"Set target profile">, 7429 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," 7430 "vs_6_0, vs_6_1, vs_6_2, vs_6_3, vs_6_4, vs_6_5, vs_6_6, vs_6_7," 7431 "gs_6_0, gs_6_1, gs_6_2, gs_6_3, gs_6_4, gs_6_5, gs_6_6, gs_6_7," 7432 "hs_6_0, hs_6_1, hs_6_2, hs_6_3, hs_6_4, hs_6_5, hs_6_6, hs_6_7," 7433 "ds_6_0, ds_6_1, ds_6_2, ds_6_3, ds_6_4, ds_6_5, ds_6_6, ds_6_7," 7434 "cs_6_0, cs_6_1, cs_6_2, cs_6_3, cs_6_4, cs_6_5, cs_6_6, cs_6_7," 7435 "lib_6_3, lib_6_4, lib_6_5, lib_6_6, lib_6_7, lib_6_x," 7436 "ms_6_5, ms_6_6, ms_6_7," 7437 "as_6_5, as_6_6, as_6_7">; 7438def dxc_D : Option<["--", "/", "-"], "D", KIND_JOINED_OR_SEPARATE>, 7439 Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>, Alias<D>; 7440def emit_pristine_llvm : DXCFlag<"emit-pristine-llvm">, 7441 HelpText<"Emit pristine LLVM IR from the frontend by not running any LLVM passes at all." 7442 "Same as -S + -emit-llvm + -disable-llvm-passes.">; 7443def fcgl : DXCFlag<"fcgl">, Alias<emit_pristine_llvm>; 7444def enable_16bit_types : DXCFlag<"enable-16bit-types">, Alias<fnative_half_type>, 7445 HelpText<"Enable 16-bit types and disable min precision types." 7446 "Available in HLSL 2018 and shader model 6.2.">; 7447def hlsl_entrypoint : Option<["-"], "hlsl-entry", KIND_SEPARATE>, 7448 Group<dxc_Group>, 7449 Flags<[CC1Option]>, 7450 MarshallingInfoString<TargetOpts<"HLSLEntry">, "\"main\"">, 7451 HelpText<"Entry point name for hlsl">; 7452def dxc_entrypoint : Option<["--", "/", "-"], "E", KIND_JOINED_OR_SEPARATE>, 7453 Group<dxc_Group>, 7454 Flags<[DXCOption, NoXarchOption]>, 7455 HelpText<"Entry point name">; 7456def dxc_validator_path_EQ : Joined<["--"], "dxv-path=">, Group<dxc_Group>, 7457 HelpText<"DXIL validator installation path">; 7458def dxc_disable_validation : DXCFlag<"Vd">, 7459 HelpText<"Disable validation">; 7460