1//===--- Options.td - Options for clang -----------------------------------===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8// 9// This file defines the options accepted by clang. 10// 11//===----------------------------------------------------------------------===// 12 13// Include the common option parsing interfaces. 14include "llvm/Option/OptParser.td" 15 16///////// 17// Flags 18 19// The option is a "driver"-only option, and should not be forwarded to other 20// tools via `-Xarch` options. 21def NoXarchOption : OptionFlag; 22 23// LinkerInput - The option is a linker input. 24def LinkerInput : OptionFlag; 25 26// NoArgumentUnused - Don't report argument unused warnings for this option; this 27// is useful for options like -static or -dynamic which a user may always end up 28// passing, even if the platform defaults to (or only supports) that option. 29def NoArgumentUnused : OptionFlag; 30 31// Unsupported - The option is unsupported, and the driver will reject command 32// lines that use it. 33def Unsupported : OptionFlag; 34 35// Ignored - The option is unsupported, and the driver will silently ignore it. 36def Ignored : OptionFlag; 37 38// CoreOption - This is considered a "core" Clang option, available in both 39// clang and clang-cl modes. 40def CoreOption : OptionFlag; 41 42// CLOption - This is a cl.exe compatibility option. Options with this flag 43// are made available when the driver is running in CL compatibility mode. 44def CLOption : OptionFlag; 45 46// CC1Option - This option should be accepted by clang -cc1. 47def CC1Option : OptionFlag; 48 49// CC1AsOption - This option should be accepted by clang -cc1as. 50def CC1AsOption : OptionFlag; 51 52// DXCOption - This is a dxc.exe compatibility option. Options with this flag 53// are made available when the driver is running in DXC compatibility mode. 54def DXCOption : OptionFlag; 55 56// CLDXCOption - This is a cl.exe/dxc.exe compatibility option. Options with this flag 57// are made available when the driver is running in CL/DXC compatibility mode. 58def CLDXCOption : OptionFlag; 59 60// NoDriverOption - This option should not be accepted by the driver. 61def NoDriverOption : OptionFlag; 62 63// If an option affects linking, but has a primary group (so Link_Group cannot 64// be used), add this flag. 65def LinkOption : OptionFlag; 66 67// FlangOption - This is considered a "core" Flang option, available in 68// flang mode. 69def FlangOption : OptionFlag; 70 71// FlangOnlyOption - This option should only be used by Flang (i.e. it is not 72// available for Clang) 73def FlangOnlyOption : OptionFlag; 74 75// FC1Option - This option should be accepted by flang -fc1. 76def FC1Option : OptionFlag; 77 78// A short name to show in documentation. The name will be interpreted as rST. 79class DocName<string name> { string DocName = name; } 80 81// A brief description to show in documentation, interpreted as rST. 82class DocBrief<code descr> { code DocBrief = descr; } 83 84// Indicates that this group should be flattened into its parent when generating 85// documentation. 86class DocFlatten { bit DocFlatten = 1; } 87 88// Indicates that this warning is ignored, but accepted with a warning for 89// GCC compatibility. 90class IgnoredGCCCompat : Flags<[HelpHidden]> {} 91 92///////// 93// Groups 94 95def Action_Group : OptionGroup<"<action group>">, DocName<"Actions">, 96 DocBrief<[{The action to perform on the input.}]>; 97 98// Meta-group for options which are only used for compilation, 99// and not linking etc. 100def CompileOnly_Group : OptionGroup<"<CompileOnly group>">, 101 DocName<"Compilation flags">, DocBrief<[{ 102Flags controlling the behavior of Clang during compilation. These flags have 103no effect during actions that do not perform compilation.}]>; 104 105def Preprocessor_Group : OptionGroup<"<Preprocessor group>">, 106 Group<CompileOnly_Group>, 107 DocName<"Preprocessor flags">, DocBrief<[{ 108Flags controlling the behavior of the Clang preprocessor.}]>; 109 110def IncludePath_Group : OptionGroup<"<I/i group>">, Group<Preprocessor_Group>, 111 DocName<"Include path management">, 112 DocBrief<[{ 113Flags controlling how ``#include``\s are resolved to files.}]>; 114 115def I_Group : OptionGroup<"<I group>">, Group<IncludePath_Group>, DocFlatten; 116def i_Group : OptionGroup<"<i group>">, Group<IncludePath_Group>, DocFlatten; 117def clang_i_Group : OptionGroup<"<clang i group>">, Group<i_Group>, DocFlatten; 118 119def M_Group : OptionGroup<"<M group>">, Group<Preprocessor_Group>, 120 DocName<"Dependency file generation">, DocBrief<[{ 121Flags controlling generation of a dependency file for ``make``-like build 122systems.}]>; 123 124def d_Group : OptionGroup<"<d group>">, Group<Preprocessor_Group>, 125 DocName<"Dumping preprocessor state">, DocBrief<[{ 126Flags allowing the state of the preprocessor to be dumped in various ways.}]>; 127 128def Diag_Group : OptionGroup<"<W/R group>">, Group<CompileOnly_Group>, 129 DocName<"Diagnostic flags">, DocBrief<[{ 130Flags controlling which warnings, errors, and remarks Clang will generate. 131See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.}]>; 132 133def R_Group : OptionGroup<"<R group>">, Group<Diag_Group>, DocFlatten; 134def R_value_Group : OptionGroup<"<R (with value) group>">, Group<R_Group>, 135 DocFlatten; 136def W_Group : OptionGroup<"<W group>">, Group<Diag_Group>, DocFlatten; 137def W_value_Group : OptionGroup<"<W (with value) group>">, Group<W_Group>, 138 DocFlatten; 139 140def f_Group : OptionGroup<"<f group>">, Group<CompileOnly_Group>, 141 DocName<"Target-independent compilation options">; 142 143def f_clang_Group : OptionGroup<"<f (clang-only) group>">, 144 Group<CompileOnly_Group>, DocFlatten; 145def pedantic_Group : OptionGroup<"<pedantic group>">, Group<f_Group>, 146 DocFlatten; 147def opencl_Group : OptionGroup<"<opencl group>">, Group<f_Group>, 148 DocName<"OpenCL flags">; 149 150def sycl_Group : OptionGroup<"<SYCL group>">, Group<f_Group>, 151 DocName<"SYCL flags">; 152 153def m_Group : OptionGroup<"<m group>">, Group<CompileOnly_Group>, 154 DocName<"Target-dependent compilation options">; 155 156// Feature groups - these take command line options that correspond directly to 157// target specific features and can be translated directly from command line 158// options. 159def m_aarch64_Features_Group : OptionGroup<"<aarch64 features group>">, 160 Group<m_Group>, DocName<"AARCH64">; 161def m_amdgpu_Features_Group : OptionGroup<"<amdgpu features group>">, 162 Group<m_Group>, DocName<"AMDGPU">; 163def m_arm_Features_Group : OptionGroup<"<arm features group>">, 164 Group<m_Group>, DocName<"ARM">; 165def m_hexagon_Features_Group : OptionGroup<"<hexagon features group>">, 166 Group<m_Group>, DocName<"Hexagon">; 167def m_sparc_Features_Group : OptionGroup<"<sparc features group>">, 168 Group<m_Group>, DocName<"SPARC">; 169// The features added by this group will not be added to target features. 170// These are explicitly handled. 171def m_hexagon_Features_HVX_Group : OptionGroup<"<hexagon features group>">, 172 Group<m_Group>, DocName<"Hexagon">; 173def m_m68k_Features_Group: OptionGroup<"<m68k features group>">, 174 Group<m_Group>, DocName<"M68k">; 175def m_mips_Features_Group : OptionGroup<"<mips features group>">, 176 Group<m_Group>, DocName<"MIPS">; 177def m_ppc_Features_Group : OptionGroup<"<ppc features group>">, 178 Group<m_Group>, DocName<"PowerPC">; 179def m_wasm_Features_Group : OptionGroup<"<wasm features group>">, 180 Group<m_Group>, DocName<"WebAssembly">; 181// The features added by this group will not be added to target features. 182// These are explicitly handled. 183def m_wasm_Features_Driver_Group : OptionGroup<"<wasm driver features group>">, 184 Group<m_Group>, DocName<"WebAssembly Driver">; 185def m_x86_Features_Group : OptionGroup<"<x86 features group>">, 186 Group<m_Group>, Flags<[CoreOption]>, DocName<"X86">; 187def m_riscv_Features_Group : OptionGroup<"<riscv features group>">, 188 Group<m_Group>, DocName<"RISCV">; 189 190def m_libc_Group : OptionGroup<"<m libc group>">, Group<m_mips_Features_Group>, 191 Flags<[HelpHidden]>; 192 193def O_Group : OptionGroup<"<O group>">, Group<CompileOnly_Group>, 194 DocName<"Optimization level">, DocBrief<[{ 195Flags controlling how much optimization should be performed.}]>; 196 197def DebugInfo_Group : OptionGroup<"<g group>">, Group<CompileOnly_Group>, 198 DocName<"Debug information generation">, DocBrief<[{ 199Flags controlling how much and what kind of debug information should be 200generated.}]>; 201 202def g_Group : OptionGroup<"<g group>">, Group<DebugInfo_Group>, 203 DocName<"Kind and level of debug information">; 204def gN_Group : OptionGroup<"<gN group>">, Group<g_Group>, 205 DocName<"Debug level">; 206def ggdbN_Group : OptionGroup<"<ggdbN group>">, Group<gN_Group>, DocFlatten; 207def gTune_Group : OptionGroup<"<gTune group>">, Group<g_Group>, 208 DocName<"Debugger to tune debug information for">; 209def g_flags_Group : OptionGroup<"<g flags group>">, Group<DebugInfo_Group>, 210 DocName<"Debug information flags">; 211 212def StaticAnalyzer_Group : OptionGroup<"<Static analyzer group>">, 213 DocName<"Static analyzer flags">, DocBrief<[{ 214Flags controlling the behavior of the Clang Static Analyzer.}]>; 215 216// gfortran options that we recognize in the driver and pass along when 217// invoking GCC to compile Fortran code. 218def gfortran_Group : OptionGroup<"<gfortran group>">, 219 DocName<"Fortran compilation flags">, DocBrief<[{ 220Flags that will be passed onto the ``gfortran`` compiler when Clang is given 221a Fortran input.}]>; 222 223def Link_Group : OptionGroup<"<T/e/s/t/u group>">, DocName<"Linker flags">, 224 DocBrief<[{Flags that are passed on to the linker}]>; 225def T_Group : OptionGroup<"<T group>">, Group<Link_Group>, DocFlatten; 226def u_Group : OptionGroup<"<u group>">, Group<Link_Group>, DocFlatten; 227 228def reserved_lib_Group : OptionGroup<"<reserved libs group>">, 229 Flags<[Unsupported]>; 230 231// Temporary groups for clang options which we know we don't support, 232// but don't want to verbosely warn the user about. 233def clang_ignored_f_Group : OptionGroup<"<clang ignored f group>">, 234 Group<f_Group>, Flags<[Ignored]>; 235def clang_ignored_m_Group : OptionGroup<"<clang ignored m group>">, 236 Group<m_Group>, Flags<[Ignored]>; 237 238// Group for clang options in the process of deprecation. 239// Please include the version that deprecated the flag as comment to allow 240// easier garbage collection. 241def clang_ignored_legacy_options_Group : OptionGroup<"<clang legacy flags>">, 242 Group<f_Group>, Flags<[Ignored]>; 243 244// Retired with clang-5.0 245def : Flag<["-"], "fslp-vectorize-aggressive">, Group<clang_ignored_legacy_options_Group>; 246def : Flag<["-"], "fno-slp-vectorize-aggressive">, Group<clang_ignored_legacy_options_Group>; 247 248// Retired with clang-10.0. Previously controlled X86 MPX ISA. 249def mmpx : Flag<["-"], "mmpx">, Group<clang_ignored_legacy_options_Group>; 250def mno_mpx : Flag<["-"], "mno-mpx">, Group<clang_ignored_legacy_options_Group>; 251 252// Retired with clang-16.0, to provide a deprecation period; it should 253// be removed in Clang 18 or later. 254def enable_trivial_var_init_zero : Flag<["-"], "enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang">, 255 Flags<[CC1Option, CoreOption, NoArgumentUnused]>, 256 Group<clang_ignored_legacy_options_Group>; 257 258// Group that ignores all gcc optimizations that won't be implemented 259def clang_ignored_gcc_optimization_f_Group : OptionGroup< 260 "<clang_ignored_gcc_optimization_f_Group>">, Group<f_Group>, Flags<[Ignored]>; 261 262class DiagnosticOpts<string base> 263 : KeyPathAndMacro<"DiagnosticOpts->", base, "DIAG_"> {} 264class LangOpts<string base> 265 : KeyPathAndMacro<"LangOpts->", base, "LANG_"> {} 266class TargetOpts<string base> 267 : KeyPathAndMacro<"TargetOpts->", base, "TARGET_"> {} 268class FrontendOpts<string base> 269 : KeyPathAndMacro<"FrontendOpts.", base, "FRONTEND_"> {} 270class PreprocessorOutputOpts<string base> 271 : KeyPathAndMacro<"PreprocessorOutputOpts.", base, "PREPROCESSOR_OUTPUT_"> {} 272class DependencyOutputOpts<string base> 273 : KeyPathAndMacro<"DependencyOutputOpts.", base, "DEPENDENCY_OUTPUT_"> {} 274class CodeGenOpts<string base> 275 : KeyPathAndMacro<"CodeGenOpts.", base, "CODEGEN_"> {} 276class HeaderSearchOpts<string base> 277 : KeyPathAndMacro<"HeaderSearchOpts->", base, "HEADER_SEARCH_"> {} 278class PreprocessorOpts<string base> 279 : KeyPathAndMacro<"PreprocessorOpts->", base, "PREPROCESSOR_"> {} 280class FileSystemOpts<string base> 281 : KeyPathAndMacro<"FileSystemOpts.", base, "FILE_SYSTEM_"> {} 282class AnalyzerOpts<string base> 283 : KeyPathAndMacro<"AnalyzerOpts->", base, "ANALYZER_"> {} 284class MigratorOpts<string base> 285 : KeyPathAndMacro<"MigratorOpts.", base, "MIGRATOR_"> {} 286 287// A boolean option which is opt-in in CC1. The positive option exists in CC1 and 288// Args.hasArg(OPT_ffoo) can be used to check that the flag is enabled. 289// This is useful if the option is usually disabled. 290// Use this only when the option cannot be declared via BoolFOption. 291multiclass OptInCC1FFlag<string name, string pos_prefix, string neg_prefix="", 292 string help="", list<OptionFlag> flags=[]> { 293 def f#NAME : Flag<["-"], "f"#name>, Flags<[CC1Option] # flags>, 294 Group<f_Group>, HelpText<pos_prefix # help>; 295 def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<flags>, 296 Group<f_Group>, HelpText<neg_prefix # help>; 297} 298 299// A boolean option which is opt-out in CC1. The negative option exists in CC1 and 300// Args.hasArg(OPT_fno_foo) can be used to check that the flag is disabled. 301// Use this only when the option cannot be declared via BoolFOption. 302multiclass OptOutCC1FFlag<string name, string pos_prefix, string neg_prefix, 303 string help="", list<OptionFlag> flags=[]> { 304 def f#NAME : Flag<["-"], "f"#name>, Flags<flags>, 305 Group<f_Group>, HelpText<pos_prefix # help>; 306 def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<[CC1Option] # flags>, 307 Group<f_Group>, HelpText<neg_prefix # help>; 308} 309 310// A boolean option which is opt-in in FC1. The positive option exists in FC1 and 311// Args.hasArg(OPT_ffoo) can be used to check that the flag is enabled. 312// This is useful if the option is usually disabled. 313multiclass OptInFC1FFlag<string name, string pos_prefix, string neg_prefix="", 314 string help="", list<OptionFlag> flags=[]> { 315 def f#NAME : Flag<["-"], "f"#name>, Flags<[FC1Option] # flags>, 316 Group<f_Group>, HelpText<pos_prefix # help>; 317 def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<flags>, 318 Group<f_Group>, HelpText<neg_prefix # help>; 319} 320 321// A boolean option which is opt-out in FC1. The negative option exists in FC1 and 322// Args.hasArg(OPT_fno_foo) can be used to check that the flag is disabled. 323multiclass OptOutFC1FFlag<string name, string pos_prefix, string neg_prefix, 324 string help="", list<OptionFlag> flags=[]> { 325 def f#NAME : Flag<["-"], "f"#name>, Flags<flags>, 326 Group<f_Group>, HelpText<pos_prefix # help>; 327 def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<[FC1Option] # flags>, 328 Group<f_Group>, HelpText<neg_prefix # help>; 329} 330 331// Creates a positive and negative flags where both of them are prefixed with 332// "m", have help text specified for positive and negative option, and a Group 333// optionally specified by the opt_group argument, otherwise Group<m_Group>. 334multiclass SimpleMFlag<string name, string pos_prefix, string neg_prefix, 335 string help, OptionGroup opt_group = m_Group> { 336 def m#NAME : Flag<["-"], "m"#name>, Group<opt_group>, 337 HelpText<pos_prefix # help>; 338 def mno_#NAME : Flag<["-"], "mno-"#name>, Group<opt_group>, 339 HelpText<neg_prefix # help>; 340} 341 342//===----------------------------------------------------------------------===// 343// BoolOption 344//===----------------------------------------------------------------------===// 345 346// The default value of a marshalled key path. 347class Default<code value> { code Value = value; } 348 349// Convenience variables for boolean defaults. 350def DefaultTrue : Default<"true"> {} 351def DefaultFalse : Default<"false"> {} 352 353// The value set to the key path when the flag is present on the command line. 354class Set<bit value> { bit Value = value; } 355def SetTrue : Set<true> {} 356def SetFalse : Set<false> {} 357 358// Definition of single command line flag. This is an implementation detail, use 359// SetTrueBy or SetFalseBy instead. 360class FlagDef<bit polarity, bit value, list<OptionFlag> option_flags, 361 string help, list<code> implied_by_expressions = []> { 362 // The polarity. Besides spelling, this also decides whether the TableGen 363 // record will be prefixed with "no_". 364 bit Polarity = polarity; 365 366 // The value assigned to key path when the flag is present on command line. 367 bit Value = value; 368 369 // OptionFlags that control visibility of the flag in different tools. 370 list<OptionFlag> OptionFlags = option_flags; 371 372 // The help text associated with the flag. 373 string Help = help; 374 375 // List of expressions that, when true, imply this flag. 376 list<code> ImpliedBy = implied_by_expressions; 377} 378 379// Additional information to be appended to both positive and negative flag. 380class BothFlags<list<OptionFlag> option_flags, string help = ""> { 381 list<OptionFlag> OptionFlags = option_flags; 382 string Help = help; 383} 384 385// Functor that appends the suffix to the base flag definition. 386class ApplySuffix<FlagDef flag, BothFlags suffix> { 387 FlagDef Result 388 = FlagDef<flag.Polarity, flag.Value, 389 flag.OptionFlags # suffix.OptionFlags, 390 flag.Help # suffix.Help, flag.ImpliedBy>; 391} 392 393// Definition of the command line flag with positive spelling, e.g. "-ffoo". 394class PosFlag<Set value, list<OptionFlag> flags = [], string help = "", 395 list<code> implied_by_expressions = []> 396 : FlagDef<true, value.Value, flags, help, implied_by_expressions> {} 397 398// Definition of the command line flag with negative spelling, e.g. "-fno-foo". 399class NegFlag<Set value, list<OptionFlag> flags = [], string help = "", 400 list<code> implied_by_expressions = []> 401 : FlagDef<false, value.Value, flags, help, implied_by_expressions> {} 402 403// Expanded FlagDef that's convenient for creation of TableGen records. 404class FlagDefExpanded<FlagDef flag, string prefix, string name, string spelling> 405 : FlagDef<flag.Polarity, flag.Value, flag.OptionFlags, flag.Help, 406 flag.ImpliedBy> { 407 // Name of the TableGen record. 408 string RecordName = prefix # !if(flag.Polarity, "", "no_") # name; 409 410 // Spelling of the flag. 411 string Spelling = prefix # !if(flag.Polarity, "", "no-") # spelling; 412 413 // Can the flag be implied by another flag? 414 bit CanBeImplied = !not(!empty(flag.ImpliedBy)); 415 416 // C++ code that will be assigned to the keypath when the flag is present. 417 code ValueAsCode = !if(flag.Value, "true", "false"); 418} 419 420// TableGen record for a single marshalled flag. 421class MarshalledFlagRec<FlagDefExpanded flag, FlagDefExpanded other, 422 FlagDefExpanded implied, KeyPathAndMacro kpm, 423 Default default> 424 : Flag<["-"], flag.Spelling>, Flags<flag.OptionFlags>, HelpText<flag.Help>, 425 MarshallingInfoBooleanFlag<kpm, default.Value, flag.ValueAsCode, 426 other.ValueAsCode, other.RecordName>, 427 ImpliedByAnyOf<implied.ImpliedBy, implied.ValueAsCode> {} 428 429// Generates TableGen records for two command line flags that control the same 430// key path via the marshalling infrastructure. 431// Names of the records consist of the specified prefix, "no_" for the negative 432// flag, and NAME. 433// Used for -cc1 frontend options. Driver-only options do not map to 434// CompilerInvocation. 435multiclass BoolOption<string prefix = "", string spelling_base, 436 KeyPathAndMacro kpm, Default default, 437 FlagDef flag1_base, FlagDef flag2_base, 438 BothFlags suffix = BothFlags<[], "">> { 439 defvar flag1 = FlagDefExpanded<ApplySuffix<flag1_base, suffix>.Result, prefix, 440 NAME, spelling_base>; 441 442 defvar flag2 = FlagDefExpanded<ApplySuffix<flag2_base, suffix>.Result, prefix, 443 NAME, spelling_base>; 444 445 // The flags must have different polarity, different values, and only 446 // one can be implied. 447 assert !xor(flag1.Polarity, flag2.Polarity), 448 "the flags must have different polarity: flag1: " # 449 flag1.Polarity # ", flag2: " # flag2.Polarity; 450 assert !ne(flag1.Value, flag2.Value), 451 "the flags must have different values: flag1: " # 452 flag1.Value # ", flag2: " # flag2.Value; 453 assert !not(!and(flag1.CanBeImplied, flag2.CanBeImplied)), 454 "only one of the flags can be implied: flag1: " # 455 flag1.CanBeImplied # ", flag2: " # flag2.CanBeImplied; 456 457 defvar implied = !if(flag1.CanBeImplied, flag1, flag2); 458 459 def flag1.RecordName : MarshalledFlagRec<flag1, flag2, implied, kpm, default>; 460 def flag2.RecordName : MarshalledFlagRec<flag2, flag1, implied, kpm, default>; 461} 462 463/// Creates a BoolOption where both of the flags are prefixed with "f", are in 464/// the Group<f_Group>. 465/// Used for -cc1 frontend options. Driver-only options do not map to 466/// CompilerInvocation. 467multiclass BoolFOption<string flag_base, KeyPathAndMacro kpm, 468 Default default, FlagDef flag1, FlagDef flag2, 469 BothFlags both = BothFlags<[], "">> { 470 defm NAME : BoolOption<"f", flag_base, kpm, default, flag1, flag2, both>, 471 Group<f_Group>; 472} 473 474// Creates a BoolOption where both of the flags are prefixed with "g" and have 475// the Group<g_Group>. 476// Used for -cc1 frontend options. Driver-only options do not map to 477// CompilerInvocation. 478multiclass BoolGOption<string flag_base, KeyPathAndMacro kpm, 479 Default default, FlagDef flag1, FlagDef flag2, 480 BothFlags both = BothFlags<[], "">> { 481 defm NAME : BoolOption<"g", flag_base, kpm, default, flag1, flag2, both>, 482 Group<g_Group>; 483} 484 485// FIXME: Diagnose if target does not support protected visibility. 486class MarshallingInfoVisibility<KeyPathAndMacro kpm, code default> 487 : MarshallingInfoEnum<kpm, default>, 488 Values<"default,hidden,internal,protected">, 489 NormalizedValues<["DefaultVisibility", "HiddenVisibility", 490 "HiddenVisibility", "ProtectedVisibility"]> {} 491 492// Key paths that are constant during parsing of options with the same key path prefix. 493defvar cplusplus = LangOpts<"CPlusPlus">; 494defvar cpp11 = LangOpts<"CPlusPlus11">; 495defvar cpp17 = LangOpts<"CPlusPlus17">; 496defvar cpp20 = LangOpts<"CPlusPlus20">; 497defvar c99 = LangOpts<"C99">; 498defvar c2x = LangOpts<"C2x">; 499defvar lang_std = LangOpts<"LangStd">; 500defvar open_cl = LangOpts<"OpenCL">; 501defvar cuda = LangOpts<"CUDA">; 502defvar render_script = LangOpts<"RenderScript">; 503defvar hip = LangOpts<"HIP">; 504defvar gnu_mode = LangOpts<"GNUMode">; 505defvar asm_preprocessor = LangOpts<"AsmPreprocessor">; 506defvar hlsl = LangOpts<"HLSL">; 507 508defvar std = !strconcat("LangStandard::getLangStandardForKind(", lang_std.KeyPath, ")"); 509 510///////// 511// Options 512 513// The internal option ID must be a valid C++ identifier and results in a 514// clang::driver::options::OPT_XX enum constant for XX. 515// 516// We want to unambiguously be able to refer to options from the driver source 517// code, for this reason the option name is mangled into an ID. This mangling 518// isn't guaranteed to have an inverse, but for practical purposes it does. 519// 520// The mangling scheme is to ignore the leading '-', and perform the following 521// substitutions: 522// _ => __ 523// - => _ 524// / => _SLASH 525// # => _HASH 526// ? => _QUESTION 527// , => _COMMA 528// = => _EQ 529// C++ => CXX 530// . => _ 531 532// Developer Driver Options 533 534def internal_Group : OptionGroup<"<clang internal options>">, Flags<[HelpHidden]>; 535def internal_driver_Group : OptionGroup<"<clang driver internal options>">, 536 Group<internal_Group>, HelpText<"DRIVER OPTIONS">; 537def internal_debug_Group : 538 OptionGroup<"<clang debug/development internal options>">, 539 Group<internal_Group>, HelpText<"DEBUG/DEVELOPMENT OPTIONS">; 540 541class InternalDriverOpt : Group<internal_driver_Group>, 542 Flags<[NoXarchOption, HelpHidden]>; 543def driver_mode : Joined<["--"], "driver-mode=">, Group<internal_driver_Group>, 544 Flags<[CoreOption, NoXarchOption, HelpHidden]>, 545 HelpText<"Set the driver mode to either 'gcc', 'g++', 'cpp', or 'cl'">; 546def rsp_quoting : Joined<["--"], "rsp-quoting=">, Group<internal_driver_Group>, 547 Flags<[CoreOption, NoXarchOption, HelpHidden]>, 548 HelpText<"Set the rsp quoting to either 'posix', or 'windows'">; 549def ccc_gcc_name : Separate<["-"], "ccc-gcc-name">, InternalDriverOpt, 550 HelpText<"Name for native GCC compiler">, 551 MetaVarName<"<gcc-path>">; 552 553class InternalDebugOpt : Group<internal_debug_Group>, 554 Flags<[NoXarchOption, HelpHidden, CoreOption]>; 555def ccc_install_dir : Separate<["-"], "ccc-install-dir">, InternalDebugOpt, 556 HelpText<"Simulate installation in the given directory">; 557def ccc_print_phases : Flag<["-"], "ccc-print-phases">, InternalDebugOpt, 558 HelpText<"Dump list of actions to perform">; 559def ccc_print_bindings : Flag<["-"], "ccc-print-bindings">, InternalDebugOpt, 560 HelpText<"Show bindings of tools to actions">; 561 562def ccc_arcmt_check : Flag<["-"], "ccc-arcmt-check">, InternalDriverOpt, 563 HelpText<"Check for ARC migration issues that need manual handling">; 564def ccc_arcmt_modify : Flag<["-"], "ccc-arcmt-modify">, InternalDriverOpt, 565 HelpText<"Apply modifications to files to conform to ARC">; 566def ccc_arcmt_migrate : Separate<["-"], "ccc-arcmt-migrate">, InternalDriverOpt, 567 HelpText<"Apply modifications and produces temporary files that conform to ARC">; 568def arcmt_migrate_report_output : Separate<["-"], "arcmt-migrate-report-output">, 569 HelpText<"Output path for the plist report">, Flags<[CC1Option]>, 570 MarshallingInfoString<FrontendOpts<"ARCMTMigrateReportOut">>; 571def arcmt_migrate_emit_arc_errors : Flag<["-"], "arcmt-migrate-emit-errors">, 572 HelpText<"Emit ARC errors even if the migrator can fix them">, Flags<[CC1Option]>, 573 MarshallingInfoFlag<FrontendOpts<"ARCMTMigrateEmitARCErrors">>; 574def gen_reproducer_eq: Joined<["-"], "gen-reproducer=">, Flags<[NoArgumentUnused, CoreOption]>, 575 HelpText<"Emit reproducer on (option: off, crash (default), error, always)">; 576def gen_reproducer: Flag<["-"], "gen-reproducer">, InternalDebugOpt, 577 Alias<gen_reproducer_eq>, AliasArgs<["always"]>, 578 HelpText<"Auto-generates preprocessed source files and a reproduction script">; 579def gen_cdb_fragment_path: Separate<["-"], "gen-cdb-fragment-path">, InternalDebugOpt, 580 HelpText<"Emit a compilation database fragment to the specified directory">; 581 582def round_trip_args : Flag<["-"], "round-trip-args">, Flags<[CC1Option, NoDriverOption]>, 583 HelpText<"Enable command line arguments round-trip.">; 584def no_round_trip_args : Flag<["-"], "no-round-trip-args">, Flags<[CC1Option, NoDriverOption]>, 585 HelpText<"Disable command line arguments round-trip.">; 586 587def _migrate : Flag<["--"], "migrate">, Flags<[NoXarchOption]>, 588 HelpText<"Run the migrator">; 589def ccc_objcmt_migrate : Separate<["-"], "ccc-objcmt-migrate">, 590 InternalDriverOpt, 591 HelpText<"Apply modifications and produces temporary files to migrate to " 592 "modern ObjC syntax">; 593 594def objcmt_migrate_literals : Flag<["-"], "objcmt-migrate-literals">, Flags<[CC1Option]>, 595 HelpText<"Enable migration to modern ObjC literals">, 596 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Literals">; 597def objcmt_migrate_subscripting : Flag<["-"], "objcmt-migrate-subscripting">, Flags<[CC1Option]>, 598 HelpText<"Enable migration to modern ObjC subscripting">, 599 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Subscripting">; 600def objcmt_migrate_property : Flag<["-"], "objcmt-migrate-property">, Flags<[CC1Option]>, 601 HelpText<"Enable migration to modern ObjC property">, 602 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Property">; 603def objcmt_migrate_all : Flag<["-"], "objcmt-migrate-all">, Flags<[CC1Option]>, 604 HelpText<"Enable migration to modern ObjC">, 605 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_MigrateDecls">; 606def objcmt_migrate_readonly_property : Flag<["-"], "objcmt-migrate-readonly-property">, Flags<[CC1Option]>, 607 HelpText<"Enable migration to modern ObjC readonly property">, 608 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ReadonlyProperty">; 609def objcmt_migrate_readwrite_property : Flag<["-"], "objcmt-migrate-readwrite-property">, Flags<[CC1Option]>, 610 HelpText<"Enable migration to modern ObjC readwrite property">, 611 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ReadwriteProperty">; 612def objcmt_migrate_property_dot_syntax : Flag<["-"], "objcmt-migrate-property-dot-syntax">, Flags<[CC1Option]>, 613 HelpText<"Enable migration of setter/getter messages to property-dot syntax">, 614 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_PropertyDotSyntax">; 615def objcmt_migrate_annotation : Flag<["-"], "objcmt-migrate-annotation">, Flags<[CC1Option]>, 616 HelpText<"Enable migration to property and method annotations">, 617 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Annotation">; 618def objcmt_migrate_instancetype : Flag<["-"], "objcmt-migrate-instancetype">, Flags<[CC1Option]>, 619 HelpText<"Enable migration to infer instancetype for method result type">, 620 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Instancetype">; 621def objcmt_migrate_nsmacros : Flag<["-"], "objcmt-migrate-ns-macros">, Flags<[CC1Option]>, 622 HelpText<"Enable migration to NS_ENUM/NS_OPTIONS macros">, 623 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_NsMacros">; 624def objcmt_migrate_protocol_conformance : Flag<["-"], "objcmt-migrate-protocol-conformance">, Flags<[CC1Option]>, 625 HelpText<"Enable migration to add protocol conformance on classes">, 626 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ProtocolConformance">; 627def objcmt_atomic_property : Flag<["-"], "objcmt-atomic-property">, Flags<[CC1Option]>, 628 HelpText<"Make migration to 'atomic' properties">, 629 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_AtomicProperty">; 630def objcmt_returns_innerpointer_property : Flag<["-"], "objcmt-returns-innerpointer-property">, Flags<[CC1Option]>, 631 HelpText<"Enable migration to annotate property with NS_RETURNS_INNER_POINTER">, 632 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ReturnsInnerPointerProperty">; 633def objcmt_ns_nonatomic_iosonly: Flag<["-"], "objcmt-ns-nonatomic-iosonly">, Flags<[CC1Option]>, 634 HelpText<"Enable migration to use NS_NONATOMIC_IOSONLY macro for setting property's 'atomic' attribute">, 635 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_NsAtomicIOSOnlyProperty">; 636def objcmt_migrate_designated_init : Flag<["-"], "objcmt-migrate-designated-init">, Flags<[CC1Option]>, 637 HelpText<"Enable migration to infer NS_DESIGNATED_INITIALIZER for initializer methods">, 638 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_DesignatedInitializer">; 639 640def objcmt_allowlist_dir_path: Joined<["-"], "objcmt-allowlist-dir-path=">, Flags<[CC1Option]>, 641 HelpText<"Only modify files with a filename contained in the provided directory path">, 642 MarshallingInfoString<FrontendOpts<"ObjCMTAllowListPath">>; 643def : Joined<["-"], "objcmt-whitelist-dir-path=">, Flags<[CC1Option]>, 644 HelpText<"Alias for -objcmt-allowlist-dir-path">, 645 Alias<objcmt_allowlist_dir_path>; 646// The misspelt "white-list" [sic] alias is due for removal. 647def : Joined<["-"], "objcmt-white-list-dir-path=">, Flags<[CC1Option]>, 648 Alias<objcmt_allowlist_dir_path>; 649 650// Make sure all other -ccc- options are rejected. 651def ccc_ : Joined<["-"], "ccc-">, Group<internal_Group>, Flags<[Unsupported]>; 652 653// Standard Options 654 655def _HASH_HASH_HASH : Flag<["-"], "###">, Flags<[NoXarchOption, CoreOption, FlangOption]>, 656 HelpText<"Print (but do not run) the commands to run for this compilation">; 657def _DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>, 658 Flags<[NoXarchOption, CoreOption]>; 659def A : JoinedOrSeparate<["-"], "A">, Flags<[RenderJoined]>, Group<gfortran_Group>; 660def B : JoinedOrSeparate<["-"], "B">, MetaVarName<"<prefix>">, 661 HelpText<"Search $prefix$file for executables, libraries, and data files. " 662 "If $prefix is a directory, search $prefix/$file">; 663def gcc_install_dir_EQ : Joined<["--"], "gcc-install-dir=">, 664 HelpText<"Use GCC installation in the specified directory. The directory ends with path components like 'lib{,32,64}/gcc{,-cross}/$triple/$version'. " 665 "Note: executables (e.g. ld) used by the compiler are not overridden by the selected GCC installation">; 666def gcc_toolchain : Joined<["--"], "gcc-toolchain=">, Flags<[NoXarchOption]>, 667 HelpText<"Specify a directory where Clang can find 'include' and 'lib{,32,64}/gcc{,-cross}/$triple/$version'. " 668 "Clang will use the GCC installation with the largest version">; 669def CC : Flag<["-"], "CC">, Flags<[CC1Option]>, Group<Preprocessor_Group>, 670 HelpText<"Include comments from within macros in preprocessed output">, 671 MarshallingInfoFlag<PreprocessorOutputOpts<"ShowMacroComments">>; 672def C : Flag<["-"], "C">, Flags<[CC1Option]>, Group<Preprocessor_Group>, 673 HelpText<"Include comments in preprocessed output">, 674 MarshallingInfoFlag<PreprocessorOutputOpts<"ShowComments">>; 675def D : JoinedOrSeparate<["-"], "D">, Group<Preprocessor_Group>, 676 Flags<[CC1Option, FlangOption, FC1Option]>, MetaVarName<"<macro>=<value>">, 677 HelpText<"Define <macro> to <value> (or 1 if <value> omitted)">; 678def E : Flag<["-"], "E">, Flags<[NoXarchOption,CC1Option, FlangOption, FC1Option]>, Group<Action_Group>, 679 HelpText<"Only run the preprocessor">; 680def F : JoinedOrSeparate<["-"], "F">, Flags<[RenderJoined,CC1Option]>, 681 HelpText<"Add directory to framework include search path">; 682def G : JoinedOrSeparate<["-"], "G">, Flags<[NoXarchOption]>, Group<m_Group>, 683 MetaVarName<"<size>">, HelpText<"Put objects of at most <size> bytes " 684 "into small data section (MIPS / Hexagon)">; 685def G_EQ : Joined<["-"], "G=">, Flags<[NoXarchOption]>, Group<m_Group>, Alias<G>; 686def H : Flag<["-"], "H">, Flags<[CC1Option]>, Group<Preprocessor_Group>, 687 HelpText<"Show header includes and nesting depth">, 688 MarshallingInfoFlag<DependencyOutputOpts<"ShowHeaderIncludes">>; 689def fshow_skipped_includes : Flag<["-"], "fshow-skipped-includes">, 690 Flags<[CC1Option]>, HelpText<"Show skipped includes in -H output.">, 691 DocBrief<[{#include files may be "skipped" due to include guard optimization 692 or #pragma once. This flag makes -H show also such includes.}]>, 693 MarshallingInfoFlag<DependencyOutputOpts<"ShowSkippedHeaderIncludes">>; 694 695def I_ : Flag<["-"], "I-">, Group<I_Group>, 696 HelpText<"Restrict all prior -I flags to double-quoted inclusion and " 697 "remove current directory from include path">; 698def I : JoinedOrSeparate<["-"], "I">, Group<I_Group>, 699 Flags<[CC1Option,CC1AsOption,FlangOption,FC1Option]>, MetaVarName<"<dir>">, 700 HelpText<"Add directory to the end of the list of include search paths">, 701 DocBrief<[{Add directory to include search path. For C++ inputs, if 702there are multiple -I options, these directories are searched 703in the order they are given before the standard system directories 704are searched. If the same directory is in the SYSTEM include search 705paths, for example if also specified with -isystem, the -I option 706will be ignored}]>; 707def L : JoinedOrSeparate<["-"], "L">, Flags<[RenderJoined]>, Group<Link_Group>, 708 MetaVarName<"<dir>">, HelpText<"Add directory to library search path">; 709def MD : Flag<["-"], "MD">, Group<M_Group>, 710 HelpText<"Write a depfile containing user and system headers">; 711def MMD : Flag<["-"], "MMD">, Group<M_Group>, 712 HelpText<"Write a depfile containing user headers">; 713def M : Flag<["-"], "M">, Group<M_Group>, 714 HelpText<"Like -MD, but also implies -E and writes to stdout by default">; 715def MM : Flag<["-"], "MM">, Group<M_Group>, 716 HelpText<"Like -MMD, but also implies -E and writes to stdout by default">; 717def MF : JoinedOrSeparate<["-"], "MF">, Group<M_Group>, 718 HelpText<"Write depfile output from -MMD, -MD, -MM, or -M to <file>">, 719 MetaVarName<"<file>">; 720def MG : Flag<["-"], "MG">, Group<M_Group>, Flags<[CC1Option]>, 721 HelpText<"Add missing headers to depfile">, 722 MarshallingInfoFlag<DependencyOutputOpts<"AddMissingHeaderDeps">>; 723def MJ : JoinedOrSeparate<["-"], "MJ">, Group<M_Group>, 724 HelpText<"Write a compilation database entry per input">; 725def MP : Flag<["-"], "MP">, Group<M_Group>, Flags<[CC1Option]>, 726 HelpText<"Create phony target for each dependency (other than main file)">, 727 MarshallingInfoFlag<DependencyOutputOpts<"UsePhonyTargets">>; 728def MQ : JoinedOrSeparate<["-"], "MQ">, Group<M_Group>, Flags<[CC1Option]>, 729 HelpText<"Specify name of main file output to quote in depfile">; 730def MT : JoinedOrSeparate<["-"], "MT">, Group<M_Group>, Flags<[CC1Option]>, 731 HelpText<"Specify name of main file output in depfile">, 732 MarshallingInfoStringVector<DependencyOutputOpts<"Targets">>; 733def MV : Flag<["-"], "MV">, Group<M_Group>, Flags<[CC1Option]>, 734 HelpText<"Use NMake/Jom format for the depfile">, 735 MarshallingInfoFlag<DependencyOutputOpts<"OutputFormat">, "DependencyOutputFormat::Make">, 736 Normalizer<"makeFlagToValueNormalizer(DependencyOutputFormat::NMake)">; 737def Mach : Flag<["-"], "Mach">, Group<Link_Group>; 738def O0 : Flag<["-"], "O0">, Group<O_Group>, Flags<[CC1Option, FC1Option, HelpHidden]>; 739def O4 : Flag<["-"], "O4">, Group<O_Group>, Flags<[CC1Option, FC1Option, HelpHidden]>; 740def ObjCXX : Flag<["-"], "ObjC++">, Flags<[NoXarchOption]>, 741 HelpText<"Treat source input files as Objective-C++ inputs">; 742def ObjC : Flag<["-"], "ObjC">, Flags<[NoXarchOption]>, 743 HelpText<"Treat source input files as Objective-C inputs">; 744def O : Joined<["-"], "O">, Group<O_Group>, Flags<[CC1Option,FC1Option]>; 745def O_flag : Flag<["-"], "O">, Flags<[CC1Option,FC1Option]>, Alias<O>, AliasArgs<["1"]>; 746def Ofast : Joined<["-"], "Ofast">, Group<O_Group>, Flags<[CC1Option, FlangOption]>; 747def P : Flag<["-"], "P">, Flags<[CC1Option,FlangOption,FC1Option]>, Group<Preprocessor_Group>, 748 HelpText<"Disable linemarker output in -E mode">, 749 MarshallingInfoNegativeFlag<PreprocessorOutputOpts<"ShowLineMarkers">>; 750def Qy : Flag<["-"], "Qy">, Flags<[CC1Option]>, 751 HelpText<"Emit metadata containing compiler name and version">; 752def Qn : Flag<["-"], "Qn">, Flags<[CC1Option]>, 753 HelpText<"Do not emit metadata containing compiler name and version">; 754def : Flag<["-"], "fident">, Group<f_Group>, Alias<Qy>, 755 Flags<[CoreOption, CC1Option]>; 756def : Flag<["-"], "fno-ident">, Group<f_Group>, Alias<Qn>, 757 Flags<[CoreOption, CC1Option]>; 758def Qunused_arguments : Flag<["-"], "Qunused-arguments">, Flags<[NoXarchOption, CoreOption]>, 759 HelpText<"Don't emit warning for unused driver arguments">; 760def Q : Flag<["-"], "Q">, IgnoredGCCCompat; 761def Rpass_EQ : Joined<["-"], "Rpass=">, Group<R_value_Group>, Flags<[CC1Option]>, 762 HelpText<"Report transformations performed by optimization passes whose " 763 "name matches the given POSIX regular expression">; 764def Rpass_missed_EQ : Joined<["-"], "Rpass-missed=">, Group<R_value_Group>, 765 Flags<[CC1Option]>, 766 HelpText<"Report missed transformations by optimization passes whose " 767 "name matches the given POSIX regular expression">; 768def Rpass_analysis_EQ : Joined<["-"], "Rpass-analysis=">, Group<R_value_Group>, 769 Flags<[CC1Option]>, 770 HelpText<"Report transformation analysis from optimization passes whose " 771 "name matches the given POSIX regular expression">; 772def R_Joined : Joined<["-"], "R">, Group<R_Group>, Flags<[CC1Option, CoreOption]>, 773 MetaVarName<"<remark>">, HelpText<"Enable the specified remark">; 774def S : Flag<["-"], "S">, Flags<[NoXarchOption,CC1Option,FlangOption,FC1Option]>, Group<Action_Group>, 775 HelpText<"Only run preprocess and compilation steps">; 776def T : JoinedOrSeparate<["-"], "T">, Group<T_Group>, 777 MetaVarName<"<script>">, HelpText<"Specify <script> as linker script">; 778def U : JoinedOrSeparate<["-"], "U">, Group<Preprocessor_Group>, 779 Flags<[CC1Option, FlangOption, FC1Option]>, MetaVarName<"<macro>">, HelpText<"Undefine macro <macro>">; 780def V : JoinedOrSeparate<["-"], "V">, Flags<[NoXarchOption, Unsupported]>; 781def Wa_COMMA : CommaJoined<["-"], "Wa,">, 782 HelpText<"Pass the comma separated arguments in <arg> to the assembler">, 783 MetaVarName<"<arg>">; 784def Wall : Flag<["-"], "Wall">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>; 785def WCL4 : Flag<["-"], "WCL4">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>; 786def Wsystem_headers : Flag<["-"], "Wsystem-headers">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>; 787def Wno_system_headers : Flag<["-"], "Wno-system-headers">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>; 788def Wdeprecated : Flag<["-"], "Wdeprecated">, Group<W_Group>, Flags<[CC1Option]>, 789 HelpText<"Enable warnings for deprecated constructs and define __DEPRECATED">; 790def Wno_deprecated : Flag<["-"], "Wno-deprecated">, Group<W_Group>, Flags<[CC1Option]>; 791def Wl_COMMA : CommaJoined<["-"], "Wl,">, Flags<[LinkerInput, RenderAsInput]>, 792 HelpText<"Pass the comma separated arguments in <arg> to the linker">, 793 MetaVarName<"<arg>">, Group<Link_Group>; 794// FIXME: This is broken; these should not be Joined arguments. 795def Wno_nonportable_cfstrings : Joined<["-"], "Wno-nonportable-cfstrings">, Group<W_Group>, 796 Flags<[CC1Option]>; 797def Wnonportable_cfstrings : Joined<["-"], "Wnonportable-cfstrings">, Group<W_Group>, 798 Flags<[CC1Option]>; 799def Wp_COMMA : CommaJoined<["-"], "Wp,">, 800 HelpText<"Pass the comma separated arguments in <arg> to the preprocessor">, 801 MetaVarName<"<arg>">, Group<Preprocessor_Group>; 802def Wundef_prefix_EQ : CommaJoined<["-"], "Wundef-prefix=">, Group<W_value_Group>, 803 Flags<[CC1Option, CoreOption, HelpHidden]>, MetaVarName<"<arg>">, 804 HelpText<"Enable warnings for undefined macros with a prefix in the comma separated list <arg>">, 805 MarshallingInfoStringVector<DiagnosticOpts<"UndefPrefixes">>; 806def Wwrite_strings : Flag<["-"], "Wwrite-strings">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>; 807def Wno_write_strings : Flag<["-"], "Wno-write-strings">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>; 808def W_Joined : Joined<["-"], "W">, Group<W_Group>, Flags<[CC1Option, CoreOption, FC1Option, FlangOption]>, 809 MetaVarName<"<warning>">, HelpText<"Enable the specified warning">; 810def Xanalyzer : Separate<["-"], "Xanalyzer">, 811 HelpText<"Pass <arg> to the static analyzer">, MetaVarName<"<arg>">, 812 Group<StaticAnalyzer_Group>; 813def Xarch__ : JoinedAndSeparate<["-"], "Xarch_">, Flags<[NoXarchOption]>; 814def Xarch_host : Separate<["-"], "Xarch_host">, Flags<[NoXarchOption]>, 815 HelpText<"Pass <arg> to the CUDA/HIP host compilation">, MetaVarName<"<arg>">; 816def Xarch_device : Separate<["-"], "Xarch_device">, Flags<[NoXarchOption]>, 817 HelpText<"Pass <arg> to the CUDA/HIP device compilation">, MetaVarName<"<arg>">; 818def Xassembler : Separate<["-"], "Xassembler">, 819 HelpText<"Pass <arg> to the assembler">, MetaVarName<"<arg>">, 820 Group<CompileOnly_Group>; 821def Xclang : Separate<["-"], "Xclang">, 822 HelpText<"Pass <arg> to clang -cc1">, MetaVarName<"<arg>">, 823 Flags<[NoXarchOption, CoreOption]>, Group<CompileOnly_Group>; 824def : Joined<["-"], "Xclang=">, Group<CompileOnly_Group>, Flags<[NoXarchOption, CoreOption]>, Alias<Xclang>, 825 HelpText<"Alias for -Xclang">, MetaVarName<"<arg>">; 826def Xcuda_fatbinary : Separate<["-"], "Xcuda-fatbinary">, 827 HelpText<"Pass <arg> to fatbinary invocation">, MetaVarName<"<arg>">; 828def Xcuda_ptxas : Separate<["-"], "Xcuda-ptxas">, 829 HelpText<"Pass <arg> to the ptxas assembler">, MetaVarName<"<arg>">; 830def Xopenmp_target : Separate<["-"], "Xopenmp-target">, Group<CompileOnly_Group>, 831 HelpText<"Pass <arg> to the target offloading toolchain.">, MetaVarName<"<arg>">; 832def Xopenmp_target_EQ : JoinedAndSeparate<["-"], "Xopenmp-target=">, Group<CompileOnly_Group>, 833 HelpText<"Pass <arg> to the target offloading toolchain identified by <triple>.">, 834 MetaVarName<"<triple> <arg>">; 835def z : Separate<["-"], "z">, Flags<[LinkerInput]>, 836 HelpText<"Pass -z <arg> to the linker">, MetaVarName<"<arg>">, 837 Group<Link_Group>; 838def offload_link : Flag<["--"], "offload-link">, Group<Link_Group>, 839 HelpText<"Use the new offloading linker to perform the link job.">; 840def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, RenderAsInput]>, 841 HelpText<"Pass <arg> to the linker">, MetaVarName<"<arg>">, 842 Group<Link_Group>; 843def Xoffload_linker : JoinedAndSeparate<["-"], "Xoffload-linker">, 844 HelpText<"Pass <arg> to the offload linkers or the ones idenfied by -<triple>">, 845 MetaVarName<"<triple> <arg>">, Group<Link_Group>; 846def Xpreprocessor : Separate<["-"], "Xpreprocessor">, Group<Preprocessor_Group>, 847 HelpText<"Pass <arg> to the preprocessor">, MetaVarName<"<arg>">; 848def X_Flag : Flag<["-"], "X">, Group<Link_Group>; 849// Used by some macOS projects. IgnoredGCCCompat is a misnomer since GCC doesn't allow it. 850def : Flag<["-"], "Xparser">, IgnoredGCCCompat; 851// FIXME -Xcompiler is misused by some ChromeOS packages. Remove it after a while. 852def : Flag<["-"], "Xcompiler">, IgnoredGCCCompat; 853def Z_Flag : Flag<["-"], "Z">, Group<Link_Group>; 854def all__load : Flag<["-"], "all_load">; 855def allowable__client : Separate<["-"], "allowable_client">; 856def ansi : Flag<["-", "--"], "ansi">, Group<CompileOnly_Group>; 857def arch__errors__fatal : Flag<["-"], "arch_errors_fatal">; 858def arch : Separate<["-"], "arch">, Flags<[NoXarchOption]>; 859def arch__only : Separate<["-"], "arch_only">; 860def autocomplete : Joined<["--"], "autocomplete=">; 861def bind__at__load : Flag<["-"], "bind_at_load">; 862def bundle__loader : Separate<["-"], "bundle_loader">; 863def bundle : Flag<["-"], "bundle">; 864def b : JoinedOrSeparate<["-"], "b">, Flags<[LinkerInput]>, 865 HelpText<"Pass -b <arg> to the linker on AIX">, MetaVarName<"<arg>">, 866 Group<Link_Group>; 867// OpenCL-only Options 868def cl_opt_disable : Flag<["-"], "cl-opt-disable">, Group<opencl_Group>, Flags<[CC1Option]>, 869 HelpText<"OpenCL only. This option disables all optimizations. By default optimizations are enabled.">; 870def cl_strict_aliasing : Flag<["-"], "cl-strict-aliasing">, Group<opencl_Group>, Flags<[CC1Option]>, 871 HelpText<"OpenCL only. This option is added for compatibility with OpenCL 1.0.">; 872def cl_single_precision_constant : Flag<["-"], "cl-single-precision-constant">, Group<opencl_Group>, Flags<[CC1Option]>, 873 HelpText<"OpenCL only. Treat double precision floating-point constant as single precision constant.">, 874 MarshallingInfoFlag<LangOpts<"SinglePrecisionConstants">>; 875def cl_finite_math_only : Flag<["-"], "cl-finite-math-only">, Group<opencl_Group>, Flags<[CC1Option]>, 876 HelpText<"OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.">, 877 MarshallingInfoFlag<LangOpts<"CLFiniteMathOnly">>; 878def cl_kernel_arg_info : Flag<["-"], "cl-kernel-arg-info">, Group<opencl_Group>, Flags<[CC1Option]>, 879 HelpText<"OpenCL only. Generate kernel argument metadata.">, 880 MarshallingInfoFlag<CodeGenOpts<"EmitOpenCLArgMetadata">>; 881def cl_unsafe_math_optimizations : Flag<["-"], "cl-unsafe-math-optimizations">, Group<opencl_Group>, Flags<[CC1Option]>, 882 HelpText<"OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable.">, 883 MarshallingInfoFlag<LangOpts<"CLUnsafeMath">>; 884def cl_fast_relaxed_math : Flag<["-"], "cl-fast-relaxed-math">, Group<opencl_Group>, Flags<[CC1Option]>, 885 HelpText<"OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines __FAST_RELAXED_MATH__.">, 886 MarshallingInfoFlag<LangOpts<"FastRelaxedMath">>; 887def cl_mad_enable : Flag<["-"], "cl-mad-enable">, Group<opencl_Group>, Flags<[CC1Option]>, 888 HelpText<"OpenCL only. Allow use of less precise MAD computations in the generated binary.">, 889 MarshallingInfoFlag<CodeGenOpts<"LessPreciseFPMAD">>, 890 ImpliedByAnyOf<[cl_unsafe_math_optimizations.KeyPath, cl_fast_relaxed_math.KeyPath]>; 891def cl_no_signed_zeros : Flag<["-"], "cl-no-signed-zeros">, Group<opencl_Group>, Flags<[CC1Option]>, 892 HelpText<"OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.">, 893 MarshallingInfoFlag<LangOpts<"CLNoSignedZero">>; 894def cl_std_EQ : Joined<["-"], "cl-std=">, Group<opencl_Group>, Flags<[CC1Option]>, 895 HelpText<"OpenCL language standard to compile for.">, 896 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">; 897def cl_denorms_are_zero : Flag<["-"], "cl-denorms-are-zero">, Group<opencl_Group>, 898 HelpText<"OpenCL only. Allow denormals to be flushed to zero.">; 899def cl_fp32_correctly_rounded_divide_sqrt : Flag<["-"], "cl-fp32-correctly-rounded-divide-sqrt">, Group<opencl_Group>, Flags<[CC1Option]>, 900 HelpText<"OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.">, 901 MarshallingInfoFlag<CodeGenOpts<"OpenCLCorrectlyRoundedDivSqrt">>; 902def cl_uniform_work_group_size : Flag<["-"], "cl-uniform-work-group-size">, Group<opencl_Group>, Flags<[CC1Option]>, 903 HelpText<"OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel">, 904 MarshallingInfoFlag<CodeGenOpts<"UniformWGSize">>; 905def cl_no_stdinc : Flag<["-"], "cl-no-stdinc">, Group<opencl_Group>, 906 HelpText<"OpenCL only. Disables all standard includes containing non-native compiler types and functions.">; 907def cl_ext_EQ : CommaJoined<["-"], "cl-ext=">, Group<opencl_Group>, Flags<[CC1Option]>, 908 HelpText<"OpenCL only. Enable or disable OpenCL extensions/optional features. The argument is a comma-separated " 909 "sequence of one or more extension names, each prefixed by '+' or '-'.">, 910 MarshallingInfoStringVector<TargetOpts<"OpenCLExtensionsAsWritten">>; 911 912def client__name : JoinedOrSeparate<["-"], "client_name">; 913def combine : Flag<["-", "--"], "combine">, Flags<[NoXarchOption, Unsupported]>; 914def compatibility__version : JoinedOrSeparate<["-"], "compatibility_version">; 915def config : Joined<["--"], "config=">, Flags<[NoXarchOption, CoreOption]>, MetaVarName<"<file>">, 916 HelpText<"Specify configuration file">; 917def : Separate<["--"], "config">, Alias<config>; 918def no_default_config : Flag<["--"], "no-default-config">, Flags<[NoXarchOption, CoreOption]>, 919 HelpText<"Disable loading default configuration files">; 920def config_system_dir_EQ : Joined<["--"], "config-system-dir=">, Flags<[NoXarchOption, CoreOption, HelpHidden]>, 921 HelpText<"System directory for configuration files">; 922def config_user_dir_EQ : Joined<["--"], "config-user-dir=">, Flags<[NoXarchOption, CoreOption, HelpHidden]>, 923 HelpText<"User directory for configuration files">; 924def coverage : Flag<["-", "--"], "coverage">, Group<Link_Group>, Flags<[CoreOption]>; 925def cpp_precomp : Flag<["-"], "cpp-precomp">, Group<clang_ignored_f_Group>; 926def current__version : JoinedOrSeparate<["-"], "current_version">; 927def cxx_isystem : JoinedOrSeparate<["-"], "cxx-isystem">, Group<clang_i_Group>, 928 HelpText<"Add directory to the C++ SYSTEM include search path">, Flags<[CC1Option]>, 929 MetaVarName<"<directory>">; 930def c : Flag<["-"], "c">, Flags<[NoXarchOption, FlangOption]>, Group<Action_Group>, 931 HelpText<"Only run preprocess, compile, and assemble steps">; 932def fconvergent_functions : Flag<["-"], "fconvergent-functions">, Group<f_Group>, Flags<[CC1Option]>, 933 HelpText<"Assume functions may be convergent">; 934 935def gpu_use_aux_triple_only : Flag<["--"], "gpu-use-aux-triple-only">, 936 InternalDriverOpt, HelpText<"Prepare '-aux-triple' only without populating " 937 "'-aux-target-cpu' and '-aux-target-feature'.">; 938def cuda_include_ptx_EQ : Joined<["--"], "cuda-include-ptx=">, Flags<[NoXarchOption]>, 939 HelpText<"Include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">; 940def no_cuda_include_ptx_EQ : Joined<["--"], "no-cuda-include-ptx=">, Flags<[NoXarchOption]>, 941 HelpText<"Do not include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">; 942def offload_arch_EQ : Joined<["--"], "offload-arch=">, Flags<[NoXarchOption]>, 943 HelpText<"Specify an offloading device architecture for CUDA, HIP, or OpenMP. (e.g. sm_35). " 944 "If 'native' is used the compiler will detect locally installed architectures. " 945 "For HIP offloading, the device architecture can be followed by target ID features " 946 "delimited by a colon (e.g. gfx908:xnack+:sramecc-). May be specified more than once.">; 947def cuda_gpu_arch_EQ : Joined<["--"], "cuda-gpu-arch=">, Flags<[NoXarchOption]>, 948 Alias<offload_arch_EQ>; 949def cuda_feature_EQ : Joined<["--"], "cuda-feature=">, HelpText<"Manually specify the CUDA feature to use">; 950def hip_link : Flag<["--"], "hip-link">, 951 HelpText<"Link clang-offload-bundler bundles for HIP">; 952def no_hip_rt: Flag<["-"], "no-hip-rt">, 953 HelpText<"Do not link against HIP runtime libraries">; 954def no_offload_arch_EQ : Joined<["--"], "no-offload-arch=">, Flags<[NoXarchOption]>, 955 HelpText<"Remove CUDA/HIP offloading device architecture (e.g. sm_35, gfx906) from the list of devices to compile for. " 956 "'all' resets the list to its default value.">; 957def emit_static_lib : Flag<["--"], "emit-static-lib">, 958 HelpText<"Enable linker job to emit a static library.">; 959def no_cuda_gpu_arch_EQ : Joined<["--"], "no-cuda-gpu-arch=">, Flags<[NoXarchOption]>, 960 Alias<no_offload_arch_EQ>; 961def cuda_noopt_device_debug : Flag<["--"], "cuda-noopt-device-debug">, 962 HelpText<"Enable device-side debug info generation. Disables ptxas optimizations.">; 963def no_cuda_version_check : Flag<["--"], "no-cuda-version-check">, 964 HelpText<"Don't error out if the detected version of the CUDA install is " 965 "too low for the requested CUDA gpu architecture.">; 966def no_cuda_noopt_device_debug : Flag<["--"], "no-cuda-noopt-device-debug">; 967def cuda_path_EQ : Joined<["--"], "cuda-path=">, Group<i_Group>, 968 HelpText<"CUDA installation path">; 969def cuda_path_ignore_env : Flag<["--"], "cuda-path-ignore-env">, Group<i_Group>, 970 HelpText<"Ignore environment variables to detect CUDA installation">; 971def ptxas_path_EQ : Joined<["--"], "ptxas-path=">, Group<i_Group>, 972 HelpText<"Path to ptxas (used for compiling CUDA code)">; 973def fgpu_flush_denormals_to_zero : Flag<["-"], "fgpu-flush-denormals-to-zero">, 974 HelpText<"Flush denormal floating point values to zero in CUDA/HIP device mode.">; 975def fno_gpu_flush_denormals_to_zero : Flag<["-"], "fno-gpu-flush-denormals-to-zero">; 976def fcuda_flush_denormals_to_zero : Flag<["-"], "fcuda-flush-denormals-to-zero">, 977 Alias<fgpu_flush_denormals_to_zero>; 978def fno_cuda_flush_denormals_to_zero : Flag<["-"], "fno-cuda-flush-denormals-to-zero">, 979 Alias<fno_gpu_flush_denormals_to_zero>; 980defm gpu_rdc : BoolFOption<"gpu-rdc", 981 LangOpts<"GPURelocatableDeviceCode">, DefaultFalse, 982 PosFlag<SetTrue, [CC1Option], "Generate relocatable device code, also known as separate compilation mode">, 983 NegFlag<SetFalse>>; 984def : Flag<["-"], "fcuda-rdc">, Alias<fgpu_rdc>; 985def : Flag<["-"], "fno-cuda-rdc">, Alias<fno_gpu_rdc>; 986defm cuda_short_ptr : BoolFOption<"cuda-short-ptr", 987 TargetOpts<"NVPTXUseShortPointers">, DefaultFalse, 988 PosFlag<SetTrue, [CC1Option], "Use 32-bit pointers for accessing const/local/shared address spaces">, 989 NegFlag<SetFalse>>; 990def fgpu_default_stream_EQ : Joined<["-"], "fgpu-default-stream=">, 991 HelpText<"Specify default stream. The default value is 'legacy'. (HIP only)">, 992 Flags<[CC1Option]>, 993 Values<"legacy,per-thread">, 994 NormalizedValuesScope<"LangOptions::GPUDefaultStreamKind">, 995 NormalizedValues<["Legacy", "PerThread"]>, 996 MarshallingInfoEnum<LangOpts<"GPUDefaultStream">, "Legacy">; 997def rocm_path_EQ : Joined<["--"], "rocm-path=">, Group<i_Group>, 998 HelpText<"ROCm installation path, used for finding and automatically linking required bitcode libraries.">; 999def hip_path_EQ : Joined<["--"], "hip-path=">, Group<i_Group>, 1000 HelpText<"HIP runtime installation path, used for finding HIP version and adding HIP include path.">; 1001def amdgpu_arch_tool_EQ : Joined<["--"], "amdgpu-arch-tool=">, Group<i_Group>, 1002 HelpText<"Tool used for detecting AMD GPU arch in the system.">; 1003def nvptx_arch_tool_EQ : Joined<["--"], "nvptx-arch-tool=">, Group<i_Group>, 1004 HelpText<"Tool used for detecting NVIDIA GPU arch in the system.">; 1005def rocm_device_lib_path_EQ : Joined<["--"], "rocm-device-lib-path=">, Group<Link_Group>, 1006 HelpText<"ROCm device library path. Alternative to rocm-path.">; 1007def : Joined<["--"], "hip-device-lib-path=">, Alias<rocm_device_lib_path_EQ>; 1008def hip_device_lib_EQ : Joined<["--"], "hip-device-lib=">, Group<Link_Group>, 1009 HelpText<"HIP device library">; 1010def hip_version_EQ : Joined<["--"], "hip-version=">, 1011 HelpText<"HIP version in the format of major.minor.patch">; 1012def fhip_dump_offload_linker_script : Flag<["-"], "fhip-dump-offload-linker-script">, 1013 Group<f_Group>, Flags<[NoArgumentUnused, HelpHidden]>; 1014defm hip_new_launch_api : BoolFOption<"hip-new-launch-api", 1015 LangOpts<"HIPUseNewLaunchAPI">, DefaultFalse, 1016 PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">, 1017 BothFlags<[], " new kernel launching API for HIP">>; 1018defm hip_fp32_correctly_rounded_divide_sqrt : BoolFOption<"hip-fp32-correctly-rounded-divide-sqrt", 1019 CodeGenOpts<"HIPCorrectlyRoundedDivSqrt">, DefaultTrue, 1020 PosFlag<SetTrue, [], "Specify">, 1021 NegFlag<SetFalse, [CC1Option], "Don't specify">, 1022 BothFlags<[], " that single precision floating-point divide and sqrt used in " 1023 "the program source are correctly rounded (HIP device compilation only)">>, 1024 ShouldParseIf<hip.KeyPath>; 1025defm hip_kernel_arg_name : BoolFOption<"hip-kernel-arg-name", 1026 CodeGenOpts<"HIPSaveKernelArgName">, DefaultFalse, 1027 PosFlag<SetTrue, [CC1Option], "Specify">, 1028 NegFlag<SetFalse, [], "Don't specify">, 1029 BothFlags<[], " that kernel argument names are preserved (HIP only)">>, 1030 ShouldParseIf<hip.KeyPath>; 1031def hipspv_pass_plugin_EQ : Joined<["--"], "hipspv-pass-plugin=">, 1032 Group<Link_Group>, MetaVarName<"<dsopath>">, 1033 HelpText<"path to a pass plugin for HIP to SPIR-V passes.">; 1034defm gpu_allow_device_init : BoolFOption<"gpu-allow-device-init", 1035 LangOpts<"GPUAllowDeviceInit">, DefaultFalse, 1036 PosFlag<SetTrue, [CC1Option], "Allow">, NegFlag<SetFalse, [], "Don't allow">, 1037 BothFlags<[], " device side init function in HIP (experimental)">>, 1038 ShouldParseIf<hip.KeyPath>; 1039defm gpu_defer_diag : BoolFOption<"gpu-defer-diag", 1040 LangOpts<"GPUDeferDiag">, DefaultFalse, 1041 PosFlag<SetTrue, [CC1Option], "Defer">, NegFlag<SetFalse, [], "Don't defer">, 1042 BothFlags<[], " host/device related diagnostic messages for CUDA/HIP">>; 1043defm gpu_exclude_wrong_side_overloads : BoolFOption<"gpu-exclude-wrong-side-overloads", 1044 LangOpts<"GPUExcludeWrongSideOverloads">, DefaultFalse, 1045 PosFlag<SetTrue, [CC1Option], "Always exclude wrong side overloads">, 1046 NegFlag<SetFalse, [], "Exclude wrong side overloads only if there are same side overloads">, 1047 BothFlags<[HelpHidden], " in overloading resolution for CUDA/HIP">>; 1048def gpu_max_threads_per_block_EQ : Joined<["--"], "gpu-max-threads-per-block=">, 1049 Flags<[CC1Option]>, 1050 HelpText<"Default max threads per block for kernel launch bounds for HIP">, 1051 MarshallingInfoInt<LangOpts<"GPUMaxThreadsPerBlock">, "1024">, 1052 ShouldParseIf<hip.KeyPath>; 1053def fgpu_inline_threshold_EQ : Joined<["-"], "fgpu-inline-threshold=">, 1054 Flags<[HelpHidden]>, 1055 HelpText<"Inline threshold for device compilation for CUDA/HIP">; 1056def gpu_instrument_lib_EQ : Joined<["--"], "gpu-instrument-lib=">, 1057 HelpText<"Instrument device library for HIP, which is a LLVM bitcode containing " 1058 "__cyg_profile_func_enter and __cyg_profile_func_exit">; 1059def fgpu_sanitize : Flag<["-"], "fgpu-sanitize">, Group<f_Group>, 1060 HelpText<"Enable sanitizer for AMDGPU target">; 1061def fno_gpu_sanitize : Flag<["-"], "fno-gpu-sanitize">, Group<f_Group>; 1062def gpu_bundle_output : Flag<["--"], "gpu-bundle-output">, 1063 Group<f_Group>, HelpText<"Bundle output files of HIP device compilation">; 1064def no_gpu_bundle_output : Flag<["--"], "no-gpu-bundle-output">, 1065 Group<f_Group>, HelpText<"Do not bundle output files of HIP device compilation">; 1066def cuid_EQ : Joined<["-"], "cuid=">, Flags<[CC1Option]>, 1067 HelpText<"An ID for compilation unit, which should be the same for the same " 1068 "compilation unit but different for different compilation units. " 1069 "It is used to externalize device-side static variables for single " 1070 "source offloading languages CUDA and HIP so that they can be " 1071 "accessed by the host code of the same compilation unit.">, 1072 MarshallingInfoString<LangOpts<"CUID">>; 1073def fuse_cuid_EQ : Joined<["-"], "fuse-cuid=">, 1074 HelpText<"Method to generate ID's for compilation units for single source " 1075 "offloading languages CUDA and HIP: 'hash' (ID's generated by hashing " 1076 "file path and command line options) | 'random' (ID's generated as " 1077 "random numbers) | 'none' (disabled). Default is 'hash'. This option " 1078 "will be overridden by option '-cuid=[ID]' if it is specified." >; 1079def libomptarget_amdgpu_bc_path_EQ : Joined<["--"], "libomptarget-amdgpu-bc-path=">, Group<i_Group>, 1080 HelpText<"Path to libomptarget-amdgcn bitcode library">; 1081def libomptarget_amdgcn_bc_path_EQ : Joined<["--"], "libomptarget-amdgcn-bc-path=">, Group<i_Group>, 1082 HelpText<"Path to libomptarget-amdgcn bitcode library">, Alias<libomptarget_amdgpu_bc_path_EQ>; 1083def libomptarget_nvptx_bc_path_EQ : Joined<["--"], "libomptarget-nvptx-bc-path=">, Group<i_Group>, 1084 HelpText<"Path to libomptarget-nvptx bitcode library">; 1085def dD : Flag<["-"], "dD">, Group<d_Group>, Flags<[CC1Option]>, 1086 HelpText<"Print macro definitions in -E mode in addition to normal output">; 1087def dI : Flag<["-"], "dI">, Group<d_Group>, Flags<[CC1Option]>, 1088 HelpText<"Print include directives in -E mode in addition to normal output">, 1089 MarshallingInfoFlag<PreprocessorOutputOpts<"ShowIncludeDirectives">>; 1090def dM : Flag<["-"], "dM">, Group<d_Group>, Flags<[CC1Option]>, 1091 HelpText<"Print macro definitions in -E mode instead of normal output">; 1092def dead__strip : Flag<["-"], "dead_strip">; 1093def dependency_file : Separate<["-"], "dependency-file">, Flags<[CC1Option]>, 1094 HelpText<"Filename (or -) to write dependency output to">, 1095 MarshallingInfoString<DependencyOutputOpts<"OutputFile">>; 1096def dependency_dot : Separate<["-"], "dependency-dot">, Flags<[CC1Option]>, 1097 HelpText<"Filename to write DOT-formatted header dependencies to">, 1098 MarshallingInfoString<DependencyOutputOpts<"DOTOutputFile">>; 1099def module_dependency_dir : Separate<["-"], "module-dependency-dir">, 1100 Flags<[CC1Option]>, HelpText<"Directory to dump module dependencies to">, 1101 MarshallingInfoString<DependencyOutputOpts<"ModuleDependencyOutputDir">>; 1102def dsym_dir : JoinedOrSeparate<["-"], "dsym-dir">, 1103 Flags<[NoXarchOption, RenderAsInput]>, 1104 HelpText<"Directory to output dSYM's (if any) to">, MetaVarName<"<dir>">; 1105def dumpmachine : Flag<["-"], "dumpmachine">; 1106def dumpspecs : Flag<["-"], "dumpspecs">, Flags<[Unsupported]>; 1107def dumpversion : Flag<["-"], "dumpversion">; 1108def dylib__file : Separate<["-"], "dylib_file">; 1109def dylinker__install__name : JoinedOrSeparate<["-"], "dylinker_install_name">; 1110def dylinker : Flag<["-"], "dylinker">; 1111def dynamiclib : Flag<["-"], "dynamiclib">; 1112def dynamic : Flag<["-"], "dynamic">, Flags<[NoArgumentUnused]>; 1113def d_Flag : Flag<["-"], "d">, Group<d_Group>; 1114def d_Joined : Joined<["-"], "d">, Group<d_Group>; 1115def emit_ast : Flag<["-"], "emit-ast">, Flags<[CoreOption]>, 1116 HelpText<"Emit Clang AST files for source inputs">; 1117def emit_llvm : Flag<["-"], "emit-llvm">, Flags<[CC1Option, FC1Option, FlangOption]>, Group<Action_Group>, 1118 HelpText<"Use the LLVM representation for assembler and object files">; 1119def emit_interface_stubs : Flag<["-"], "emit-interface-stubs">, Flags<[CC1Option]>, Group<Action_Group>, 1120 HelpText<"Generate Interface Stub Files.">; 1121def emit_merged_ifs : Flag<["-"], "emit-merged-ifs">, 1122 Flags<[CC1Option]>, Group<Action_Group>, 1123 HelpText<"Generate Interface Stub Files, emit merged text not binary.">; 1124def end_no_unused_arguments : Flag<["--"], "end-no-unused-arguments">, Flags<[CoreOption]>, 1125 HelpText<"Start emitting warnings for unused driver arguments">; 1126def interface_stub_version_EQ : JoinedOrSeparate<["-"], "interface-stub-version=">, Flags<[CC1Option]>; 1127def exported__symbols__list : Separate<["-"], "exported_symbols_list">; 1128def extract_api : Flag<["-"], "extract-api">, Flags<[CC1Option]>, Group<Action_Group>, 1129 HelpText<"Extract API information">; 1130def product_name_EQ: Joined<["--"], "product-name=">, Flags<[CC1Option]>, 1131 MarshallingInfoString<FrontendOpts<"ProductName">>; 1132def extract_api_ignores_EQ: Joined<["--"], "extract-api-ignores=">, Flags<[CC1Option]>, 1133 HelpText<"File containing a new line separated list of API symbols to ignore when extracting API information.">, 1134 MarshallingInfoString<FrontendOpts<"ExtractAPIIgnoresFile">>; 1135def e : JoinedOrSeparate<["-"], "e">, Flags<[LinkerInput]>, Group<Link_Group>; 1136def fmax_tokens_EQ : Joined<["-"], "fmax-tokens=">, Group<f_Group>, Flags<[CC1Option]>, 1137 HelpText<"Max total number of preprocessed tokens for -Wmax-tokens.">, 1138 MarshallingInfoInt<LangOpts<"MaxTokens">>; 1139def fPIC : Flag<["-"], "fPIC">, Group<f_Group>; 1140def fno_PIC : Flag<["-"], "fno-PIC">, Group<f_Group>; 1141def fPIE : Flag<["-"], "fPIE">, Group<f_Group>; 1142def fno_PIE : Flag<["-"], "fno-PIE">, Group<f_Group>; 1143defm access_control : BoolFOption<"access-control", 1144 LangOpts<"AccessControl">, DefaultTrue, 1145 NegFlag<SetFalse, [CC1Option], "Disable C++ access control">, 1146 PosFlag<SetTrue>>; 1147def falign_functions : Flag<["-"], "falign-functions">, Group<f_Group>; 1148def falign_functions_EQ : Joined<["-"], "falign-functions=">, Group<f_Group>; 1149def falign_loops_EQ : Joined<["-"], "falign-loops=">, Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<N>">, 1150 HelpText<"N must be a power of two. Align loops to the boundary">, 1151 MarshallingInfoInt<CodeGenOpts<"LoopAlignment">>; 1152def fno_align_functions: Flag<["-"], "fno-align-functions">, Group<f_Group>; 1153defm allow_editor_placeholders : BoolFOption<"allow-editor-placeholders", 1154 LangOpts<"AllowEditorPlaceholders">, DefaultFalse, 1155 PosFlag<SetTrue, [CC1Option], "Treat editor placeholders as valid source code">, 1156 NegFlag<SetFalse>>; 1157def fallow_unsupported : Flag<["-"], "fallow-unsupported">, Group<f_Group>; 1158def fapple_kext : Flag<["-"], "fapple-kext">, Group<f_Group>, Flags<[CC1Option]>, 1159 HelpText<"Use Apple's kernel extensions ABI">, 1160 MarshallingInfoFlag<LangOpts<"AppleKext">>; 1161def fstrict_flex_arrays_EQ : Joined<["-"], "fstrict-flex-arrays=">, Group<f_Group>, 1162 MetaVarName<"<n>">, Values<"0,1,2,3">, 1163 LangOpts<"StrictFlexArraysLevel">, 1164 Flags<[CC1Option]>, 1165 NormalizedValuesScope<"LangOptions::StrictFlexArraysLevelKind">, 1166 NormalizedValues<["Default", "OneZeroOrIncomplete", "ZeroOrIncomplete", "IncompleteOnly"]>, 1167 HelpText<"Enable optimizations based on the strict definition of flexible arrays">, 1168 MarshallingInfoEnum<LangOpts<"StrictFlexArraysLevel">, "Default">; 1169defm apple_pragma_pack : BoolFOption<"apple-pragma-pack", 1170 LangOpts<"ApplePragmaPack">, DefaultFalse, 1171 PosFlag<SetTrue, [CC1Option], "Enable Apple gcc-compatible #pragma pack handling">, 1172 NegFlag<SetFalse>>; 1173defm xl_pragma_pack : BoolFOption<"xl-pragma-pack", 1174 LangOpts<"XLPragmaPack">, DefaultFalse, 1175 PosFlag<SetTrue, [CC1Option], "Enable IBM XL #pragma pack handling">, 1176 NegFlag<SetFalse>>; 1177def shared_libsan : Flag<["-"], "shared-libsan">, 1178 HelpText<"Dynamically link the sanitizer runtime">; 1179def static_libsan : Flag<["-"], "static-libsan">, 1180 HelpText<"Statically link the sanitizer runtime">; 1181def : Flag<["-"], "shared-libasan">, Alias<shared_libsan>; 1182def fasm : Flag<["-"], "fasm">, Group<f_Group>; 1183 1184def fassume_sane_operator_new : Flag<["-"], "fassume-sane-operator-new">, Group<f_Group>; 1185def fastcp : Flag<["-"], "fastcp">, Group<f_Group>; 1186def fastf : Flag<["-"], "fastf">, Group<f_Group>; 1187def fast : Flag<["-"], "fast">, Group<f_Group>; 1188def fasynchronous_unwind_tables : Flag<["-"], "fasynchronous-unwind-tables">, Group<f_Group>; 1189 1190defm double_square_bracket_attributes : BoolFOption<"double-square-bracket-attributes", 1191 LangOpts<"DoubleSquareBracketAttributes">, Default<!strconcat(cpp11.KeyPath, "||", c2x.KeyPath)>, 1192 PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">, 1193 BothFlags<[NoXarchOption, CC1Option], " '[[]]' attributes in all C and C++ language modes">>; 1194 1195defm autolink : BoolFOption<"autolink", 1196 CodeGenOpts<"Autolink">, DefaultTrue, 1197 NegFlag<SetFalse, [CC1Option], "Disable generation of linker directives for automatic library linking">, 1198 PosFlag<SetTrue>>; 1199 1200// In the future this option will be supported by other offloading 1201// languages and accept other values such as CPU/GPU architectures, 1202// offload kinds and target aliases. 1203def offload_EQ : CommaJoined<["--"], "offload=">, Flags<[NoXarchOption]>, 1204 HelpText<"Specify comma-separated list of offloading target triples (CUDA and HIP only)">; 1205 1206// C++ Coroutines TS 1207defm coroutines_ts : BoolFOption<"coroutines-ts", 1208 LangOpts<"Coroutines">, Default<cpp20.KeyPath>, 1209 PosFlag<SetTrue, [CC1Option], "Enable support for the C++ Coroutines TS">, 1210 NegFlag<SetFalse>>; 1211 1212defm coro_aligned_allocation : BoolFOption<"coro-aligned-allocation", 1213 LangOpts<"CoroAlignedAllocation">, DefaultFalse, 1214 PosFlag<SetTrue, [CC1Option], "Prefer aligned allocation for C++ Coroutines">, 1215 NegFlag<SetFalse>>; 1216 1217defm experimental_library : BoolFOption<"experimental-library", 1218 LangOpts<"ExperimentalLibrary">, DefaultFalse, 1219 PosFlag<SetTrue, [CC1Option, CoreOption], "Control whether unstable and experimental library features are enabled. " 1220 "This option enables various library features that are either experimental (also known as TSes), or have been " 1221 "but are not stable yet in the selected Standard Library implementation. It is not recommended to use this option " 1222 "in production code, since neither ABI nor API stability are guaranteed. This is intended to provide a preview " 1223 "of features that will ship in the future for experimentation purposes">, 1224 NegFlag<SetFalse>>; 1225 1226def fembed_offload_object_EQ : Joined<["-"], "fembed-offload-object=">, 1227 Group<f_Group>, Flags<[NoXarchOption, CC1Option]>, 1228 HelpText<"Embed Offloading device-side binary into host object file as a section.">, 1229 MarshallingInfoStringVector<CodeGenOpts<"OffloadObjects">>; 1230def fembed_bitcode_EQ : Joined<["-"], "fembed-bitcode=">, 1231 Group<f_Group>, Flags<[NoXarchOption, CC1Option, CC1AsOption]>, MetaVarName<"<option>">, 1232 HelpText<"Embed LLVM bitcode">, 1233 Values<"off,all,bitcode,marker">, NormalizedValuesScope<"CodeGenOptions">, 1234 NormalizedValues<["Embed_Off", "Embed_All", "Embed_Bitcode", "Embed_Marker"]>, 1235 MarshallingInfoEnum<CodeGenOpts<"EmbedBitcode">, "Embed_Off">; 1236def fembed_bitcode : Flag<["-"], "fembed-bitcode">, Group<f_Group>, 1237 Alias<fembed_bitcode_EQ>, AliasArgs<["all"]>, 1238 HelpText<"Embed LLVM IR bitcode as data">; 1239def fembed_bitcode_marker : Flag<["-"], "fembed-bitcode-marker">, 1240 Alias<fembed_bitcode_EQ>, AliasArgs<["marker"]>, 1241 HelpText<"Embed placeholder LLVM IR data as a marker">; 1242defm gnu_inline_asm : BoolFOption<"gnu-inline-asm", 1243 LangOpts<"GNUAsm">, DefaultTrue, 1244 NegFlag<SetFalse, [CC1Option], "Disable GNU style inline asm">, PosFlag<SetTrue>>; 1245 1246def fprofile_sample_use : Flag<["-"], "fprofile-sample-use">, Group<f_Group>, 1247 Flags<[CoreOption]>; 1248def fno_profile_sample_use : Flag<["-"], "fno-profile-sample-use">, Group<f_Group>, 1249 Flags<[CoreOption]>; 1250def fprofile_sample_use_EQ : Joined<["-"], "fprofile-sample-use=">, 1251 Group<f_Group>, Flags<[NoXarchOption, CC1Option]>, 1252 HelpText<"Enable sample-based profile guided optimizations">, 1253 MarshallingInfoString<CodeGenOpts<"SampleProfileFile">>; 1254def fprofile_sample_accurate : Flag<["-"], "fprofile-sample-accurate">, 1255 Group<f_Group>, Flags<[NoXarchOption, CC1Option]>, 1256 HelpText<"Specifies that the sample profile is accurate">, 1257 DocBrief<[{Specifies that the sample profile is accurate. If the sample 1258 profile is accurate, callsites without profile samples are marked 1259 as cold. Otherwise, treat callsites without profile samples as if 1260 we have no profile}]>, 1261 MarshallingInfoFlag<CodeGenOpts<"ProfileSampleAccurate">>; 1262def fsample_profile_use_profi : Flag<["-"], "fsample-profile-use-profi">, 1263 Flags<[NoXarchOption, CC1Option]>, Group<f_Group>, 1264 HelpText<"Use profi to infer block and edge counts">, 1265 DocBrief<[{Infer block and edge counts. If the profiles have errors or missing 1266 blocks caused by sampling, profile inference (profi) can convert 1267 basic block counts to branch probabilites to fix them by extended 1268 and re-engineered classic MCMF (min-cost max-flow) approach.}]>; 1269def fno_profile_sample_accurate : Flag<["-"], "fno-profile-sample-accurate">, 1270 Group<f_Group>, Flags<[NoXarchOption]>; 1271def fauto_profile : Flag<["-"], "fauto-profile">, Group<f_Group>, 1272 Alias<fprofile_sample_use>; 1273def fno_auto_profile : Flag<["-"], "fno-auto-profile">, Group<f_Group>, 1274 Alias<fno_profile_sample_use>; 1275def fauto_profile_EQ : Joined<["-"], "fauto-profile=">, 1276 Alias<fprofile_sample_use_EQ>; 1277def fauto_profile_accurate : Flag<["-"], "fauto-profile-accurate">, 1278 Group<f_Group>, Alias<fprofile_sample_accurate>; 1279def fno_auto_profile_accurate : Flag<["-"], "fno-auto-profile-accurate">, 1280 Group<f_Group>, Alias<fno_profile_sample_accurate>; 1281def fdebug_compilation_dir_EQ : Joined<["-"], "fdebug-compilation-dir=">, 1282 Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>, 1283 HelpText<"The compilation directory to embed in the debug info">, 1284 MarshallingInfoString<CodeGenOpts<"DebugCompilationDir">>; 1285def fdebug_compilation_dir : Separate<["-"], "fdebug-compilation-dir">, 1286 Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>, 1287 Alias<fdebug_compilation_dir_EQ>; 1288def fcoverage_compilation_dir_EQ : Joined<["-"], "fcoverage-compilation-dir=">, 1289 Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>, 1290 HelpText<"The compilation directory to embed in the coverage mapping.">, 1291 MarshallingInfoString<CodeGenOpts<"CoverageCompilationDir">>; 1292def ffile_compilation_dir_EQ : Joined<["-"], "ffile-compilation-dir=">, Group<f_Group>, 1293 Flags<[CoreOption]>, 1294 HelpText<"The compilation directory to embed in the debug info and coverage mapping.">; 1295defm debug_info_for_profiling : BoolFOption<"debug-info-for-profiling", 1296 CodeGenOpts<"DebugInfoForProfiling">, DefaultFalse, 1297 PosFlag<SetTrue, [CC1Option], "Emit extra debug info to make sample profile more accurate">, 1298 NegFlag<SetFalse>>; 1299def fprofile_instr_generate : Flag<["-"], "fprofile-instr-generate">, 1300 Group<f_Group>, Flags<[CoreOption]>, 1301 HelpText<"Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">; 1302def fprofile_instr_generate_EQ : Joined<["-"], "fprofile-instr-generate=">, 1303 Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<file>">, 1304 HelpText<"Generate instrumented code to collect execution counts into <file> (overridden by LLVM_PROFILE_FILE env var)">; 1305def fprofile_instr_use : Flag<["-"], "fprofile-instr-use">, Group<f_Group>, 1306 Flags<[CoreOption]>; 1307def fprofile_instr_use_EQ : Joined<["-"], "fprofile-instr-use=">, 1308 Group<f_Group>, Flags<[CoreOption]>, 1309 HelpText<"Use instrumentation data for profile-guided optimization">; 1310def fprofile_remapping_file_EQ : Joined<["-"], "fprofile-remapping-file=">, 1311 Group<f_Group>, Flags<[CC1Option, CoreOption]>, MetaVarName<"<file>">, 1312 HelpText<"Use the remappings described in <file> to match the profile data against names in the program">, 1313 MarshallingInfoString<CodeGenOpts<"ProfileRemappingFile">>; 1314defm coverage_mapping : BoolFOption<"coverage-mapping", 1315 CodeGenOpts<"CoverageMapping">, DefaultFalse, 1316 PosFlag<SetTrue, [CC1Option], "Generate coverage mapping to enable code coverage analysis">, 1317 NegFlag<SetFalse, [], "Disable code coverage analysis">, BothFlags<[CoreOption]>>; 1318def fprofile_generate : Flag<["-"], "fprofile-generate">, 1319 Group<f_Group>, Flags<[CoreOption]>, 1320 HelpText<"Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">; 1321def fprofile_generate_EQ : Joined<["-"], "fprofile-generate=">, 1322 Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<directory>">, 1323 HelpText<"Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">; 1324def fcs_profile_generate : Flag<["-"], "fcs-profile-generate">, 1325 Group<f_Group>, Flags<[CoreOption]>, 1326 HelpText<"Generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">; 1327def fcs_profile_generate_EQ : Joined<["-"], "fcs-profile-generate=">, 1328 Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<directory>">, 1329 HelpText<"Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">; 1330def fprofile_use : Flag<["-"], "fprofile-use">, Group<f_Group>, 1331 Flags<[CoreOption]>, Alias<fprofile_instr_use>; 1332def fprofile_use_EQ : Joined<["-"], "fprofile-use=">, 1333 Group<f_Group>, Flags<[NoXarchOption, CoreOption]>, 1334 MetaVarName<"<pathname>">, 1335 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>.">; 1336def fno_profile_instr_generate : Flag<["-"], "fno-profile-instr-generate">, 1337 Group<f_Group>, Flags<[CoreOption]>, 1338 HelpText<"Disable generation of profile instrumentation.">; 1339def fno_profile_generate : Flag<["-"], "fno-profile-generate">, 1340 Group<f_Group>, Flags<[CoreOption]>, 1341 HelpText<"Disable generation of profile instrumentation.">; 1342def fno_profile_instr_use : Flag<["-"], "fno-profile-instr-use">, 1343 Group<f_Group>, Flags<[CoreOption]>, 1344 HelpText<"Disable using instrumentation data for profile-guided optimization">; 1345def fno_profile_use : Flag<["-"], "fno-profile-use">, 1346 Alias<fno_profile_instr_use>; 1347defm profile_arcs : BoolFOption<"profile-arcs", 1348 CodeGenOpts<"EmitGcovArcs">, DefaultFalse, 1349 PosFlag<SetTrue, [CC1Option, LinkOption]>, NegFlag<SetFalse>>; 1350defm test_coverage : BoolFOption<"test-coverage", 1351 CodeGenOpts<"EmitGcovNotes">, DefaultFalse, 1352 PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>; 1353def fprofile_filter_files_EQ : Joined<["-"], "fprofile-filter-files=">, 1354 Group<f_Group>, Flags<[CC1Option, CoreOption]>, 1355 HelpText<"Instrument only functions from files where names match any regex separated by a semi-colon">, 1356 MarshallingInfoString<CodeGenOpts<"ProfileFilterFiles">>, 1357 ShouldParseIf<!strconcat(fprofile_arcs.KeyPath, "||", ftest_coverage.KeyPath)>; 1358def fprofile_exclude_files_EQ : Joined<["-"], "fprofile-exclude-files=">, 1359 Group<f_Group>, Flags<[CC1Option, CoreOption]>, 1360 HelpText<"Instrument only functions from files where names don't match all the regexes separated by a semi-colon">, 1361 MarshallingInfoString<CodeGenOpts<"ProfileExcludeFiles">>, 1362 ShouldParseIf<!strconcat(fprofile_arcs.KeyPath, "||", ftest_coverage.KeyPath)>; 1363def fprofile_update_EQ : Joined<["-"], "fprofile-update=">, 1364 Group<f_Group>, Flags<[CC1Option, CoreOption]>, Values<"atomic,prefer-atomic,single">, 1365 MetaVarName<"<method>">, HelpText<"Set update method of profile counters">, 1366 MarshallingInfoFlag<CodeGenOpts<"AtomicProfileUpdate">>; 1367defm pseudo_probe_for_profiling : BoolFOption<"pseudo-probe-for-profiling", 1368 CodeGenOpts<"PseudoProbeForProfiling">, DefaultFalse, 1369 PosFlag<SetTrue, [], "Emit">, NegFlag<SetFalse, [], "Do not emit">, 1370 BothFlags<[NoXarchOption, CC1Option], " pseudo probes for sample profiling">>; 1371def forder_file_instrumentation : Flag<["-"], "forder-file-instrumentation">, 1372 Group<f_Group>, Flags<[CC1Option, CoreOption]>, 1373 HelpText<"Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">; 1374def fprofile_list_EQ : Joined<["-"], "fprofile-list=">, 1375 Group<f_Group>, Flags<[CC1Option, CoreOption]>, 1376 HelpText<"Filename defining the list of functions/files to instrument">, 1377 MarshallingInfoStringVector<LangOpts<"ProfileListFiles">>; 1378def fprofile_function_groups : Joined<["-"], "fprofile-function-groups=">, 1379 Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<N>">, 1380 HelpText<"Partition functions into N groups and select only functions in group i to be instrumented using -fprofile-selected-function-group">, 1381 MarshallingInfoInt<CodeGenOpts<"ProfileTotalFunctionGroups">, "1">; 1382def fprofile_selected_function_group : 1383 Joined<["-"], "fprofile-selected-function-group=">, Group<f_Group>, 1384 Flags<[CC1Option]>, MetaVarName<"<i>">, 1385 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">, 1386 MarshallingInfoInt<CodeGenOpts<"ProfileSelectedFunctionGroup">>; 1387def fswift_async_fp_EQ : Joined<["-"], "fswift-async-fp=">, 1388 Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>, MetaVarName<"<option>">, 1389 HelpText<"Control emission of Swift async extended frame info">, 1390 Values<"auto,always,never">, 1391 NormalizedValuesScope<"CodeGenOptions::SwiftAsyncFramePointerKind">, 1392 NormalizedValues<["Auto", "Always", "Never"]>, 1393 MarshallingInfoEnum<CodeGenOpts<"SwiftAsyncFramePointer">, "Always">; 1394 1395defm addrsig : BoolFOption<"addrsig", 1396 CodeGenOpts<"Addrsig">, DefaultFalse, 1397 PosFlag<SetTrue, [CC1Option], "Emit">, NegFlag<SetFalse, [], "Don't emit">, 1398 BothFlags<[CoreOption], " an address-significance table">>; 1399defm blocks : OptInCC1FFlag<"blocks", "Enable the 'blocks' language feature", "", "", [CoreOption]>; 1400def fbootclasspath_EQ : Joined<["-"], "fbootclasspath=">, Group<f_Group>; 1401defm borland_extensions : BoolFOption<"borland-extensions", 1402 LangOpts<"Borland">, DefaultFalse, 1403 PosFlag<SetTrue, [CC1Option], "Accept non-standard constructs supported by the Borland compiler">, 1404 NegFlag<SetFalse>>; 1405def fbuiltin : Flag<["-"], "fbuiltin">, Group<f_Group>, Flags<[CoreOption]>; 1406def fbuiltin_module_map : Flag <["-"], "fbuiltin-module-map">, Group<f_Group>, 1407 Flags<[NoXarchOption]>, HelpText<"Load the clang builtins module map file.">; 1408defm caret_diagnostics : BoolFOption<"caret-diagnostics", 1409 DiagnosticOpts<"ShowCarets">, DefaultTrue, 1410 NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>>; 1411def fclang_abi_compat_EQ : Joined<["-"], "fclang-abi-compat=">, Group<f_clang_Group>, 1412 Flags<[CC1Option]>, MetaVarName<"<version>">, Values<"<major>.<minor>,latest">, 1413 HelpText<"Attempt to match the ABI of Clang <version>">; 1414def fclasspath_EQ : Joined<["-"], "fclasspath=">, Group<f_Group>; 1415def fcolor_diagnostics : Flag<["-"], "fcolor-diagnostics">, Group<f_Group>, 1416 Flags<[CoreOption, CC1Option, FlangOption, FC1Option]>, 1417 HelpText<"Enable colors in diagnostics">; 1418def fno_color_diagnostics : Flag<["-"], "fno-color-diagnostics">, Group<f_Group>, 1419 Flags<[CoreOption, FlangOption]>, HelpText<"Disable colors in diagnostics">; 1420def : Flag<["-"], "fdiagnostics-color">, Group<f_Group>, Flags<[CoreOption]>, Alias<fcolor_diagnostics>; 1421def : Flag<["-"], "fno-diagnostics-color">, Group<f_Group>, Flags<[CoreOption]>, Alias<fno_color_diagnostics>; 1422def fdiagnostics_color_EQ : Joined<["-"], "fdiagnostics-color=">, Group<f_Group>; 1423def fansi_escape_codes : Flag<["-"], "fansi-escape-codes">, Group<f_Group>, 1424 Flags<[CoreOption, CC1Option]>, HelpText<"Use ANSI escape codes for diagnostics">, 1425 MarshallingInfoFlag<DiagnosticOpts<"UseANSIEscapeCodes">>; 1426def fcomment_block_commands : CommaJoined<["-"], "fcomment-block-commands=">, Group<f_clang_Group>, Flags<[CC1Option]>, 1427 HelpText<"Treat each comma separated argument in <arg> as a documentation comment block command">, 1428 MetaVarName<"<arg>">, MarshallingInfoStringVector<LangOpts<"CommentOpts.BlockCommandNames">>; 1429def fparse_all_comments : Flag<["-"], "fparse-all-comments">, Group<f_clang_Group>, Flags<[CC1Option]>, 1430 MarshallingInfoFlag<LangOpts<"CommentOpts.ParseAllComments">>; 1431def frecord_command_line : Flag<["-"], "frecord-command-line">, 1432 Group<f_clang_Group>; 1433def fno_record_command_line : Flag<["-"], "fno-record-command-line">, 1434 Group<f_clang_Group>; 1435def : Flag<["-"], "frecord-gcc-switches">, Alias<frecord_command_line>; 1436def : Flag<["-"], "fno-record-gcc-switches">, Alias<fno_record_command_line>; 1437def fcommon : Flag<["-"], "fcommon">, Group<f_Group>, 1438 Flags<[CoreOption, CC1Option]>, HelpText<"Place uninitialized global variables in a common block">, 1439 MarshallingInfoNegativeFlag<CodeGenOpts<"NoCommon">>; 1440def fcompile_resource_EQ : Joined<["-"], "fcompile-resource=">, Group<f_Group>; 1441defm complete_member_pointers : BoolOption<"f", "complete-member-pointers", 1442 LangOpts<"CompleteMemberPointers">, DefaultFalse, 1443 PosFlag<SetTrue, [CC1Option], "Require">, NegFlag<SetFalse, [], "Do not require">, 1444 BothFlags<[CoreOption], " member pointer base types to be complete if they" 1445 " would be significant under the Microsoft ABI">>, 1446 Group<f_clang_Group>; 1447def fcf_runtime_abi_EQ : Joined<["-"], "fcf-runtime-abi=">, Group<f_Group>, 1448 Flags<[CC1Option]>, Values<"unspecified,standalone,objc,swift,swift-5.0,swift-4.2,swift-4.1">, 1449 NormalizedValuesScope<"LangOptions::CoreFoundationABI">, 1450 NormalizedValues<["ObjectiveC", "ObjectiveC", "ObjectiveC", "Swift5_0", "Swift5_0", "Swift4_2", "Swift4_1"]>, 1451 MarshallingInfoEnum<LangOpts<"CFRuntime">, "ObjectiveC">; 1452defm constant_cfstrings : BoolFOption<"constant-cfstrings", 1453 LangOpts<"NoConstantCFStrings">, DefaultFalse, 1454 NegFlag<SetTrue, [CC1Option], "Disable creation of CodeFoundation-type constant strings">, 1455 PosFlag<SetFalse>>; 1456def fconstant_string_class_EQ : Joined<["-"], "fconstant-string-class=">, Group<f_Group>; 1457def fconstexpr_depth_EQ : Joined<["-"], "fconstexpr-depth=">, Group<f_Group>; 1458def fconstexpr_steps_EQ : Joined<["-"], "fconstexpr-steps=">, Group<f_Group>; 1459def fexperimental_new_constant_interpreter : Flag<["-"], "fexperimental-new-constant-interpreter">, Group<f_Group>, 1460 HelpText<"Enable the experimental new constant interpreter">, Flags<[CC1Option]>, 1461 MarshallingInfoFlag<LangOpts<"EnableNewConstInterp">>; 1462def fconstexpr_backtrace_limit_EQ : Joined<["-"], "fconstexpr-backtrace-limit=">, 1463 Group<f_Group>; 1464def fcrash_diagnostics_EQ : Joined<["-"], "fcrash-diagnostics=">, Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>, 1465 HelpText<"Set level of crash diagnostic reporting, (option: off, compiler, all)">; 1466def fcrash_diagnostics : Flag<["-"], "fcrash-diagnostics">, Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>, 1467 HelpText<"Enable crash diagnostic reporting (default)">, Alias<fcrash_diagnostics_EQ>, AliasArgs<["compiler"]>; 1468def fno_crash_diagnostics : Flag<["-"], "fno-crash-diagnostics">, Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>, 1469 Alias<gen_reproducer_eq>, AliasArgs<["off"]>, 1470 HelpText<"Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash">; 1471def fcrash_diagnostics_dir : Joined<["-"], "fcrash-diagnostics-dir=">, 1472 Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>, 1473 HelpText<"Put crash-report files in <dir>">, MetaVarName<"<dir>">; 1474def fcreate_profile : Flag<["-"], "fcreate-profile">, Group<f_Group>; 1475defm cxx_exceptions: BoolFOption<"cxx-exceptions", 1476 LangOpts<"CXXExceptions">, DefaultFalse, 1477 PosFlag<SetTrue, [CC1Option], "Enable C++ exceptions">, NegFlag<SetFalse>>; 1478defm async_exceptions: BoolFOption<"async-exceptions", 1479 LangOpts<"EHAsynch">, DefaultFalse, 1480 PosFlag<SetTrue, [CC1Option], "Enable EH Asynchronous exceptions">, NegFlag<SetFalse>>; 1481defm cxx_modules : BoolFOption<"cxx-modules", 1482 LangOpts<"CPlusPlusModules">, Default<cpp20.KeyPath>, 1483 NegFlag<SetFalse, [CC1Option], "Disable">, PosFlag<SetTrue, [], "Enable">, 1484 BothFlags<[NoXarchOption], " modules for C++">>, 1485 ShouldParseIf<cplusplus.KeyPath>; 1486def fdebug_pass_arguments : Flag<["-"], "fdebug-pass-arguments">, Group<f_Group>; 1487def fdebug_pass_structure : Flag<["-"], "fdebug-pass-structure">, Group<f_Group>; 1488def fdepfile_entry : Joined<["-"], "fdepfile-entry=">, 1489 Group<f_clang_Group>, Flags<[CC1Option]>; 1490def fdiagnostics_fixit_info : Flag<["-"], "fdiagnostics-fixit-info">, Group<f_clang_Group>; 1491def fno_diagnostics_fixit_info : Flag<["-"], "fno-diagnostics-fixit-info">, Group<f_Group>, 1492 Flags<[CC1Option]>, HelpText<"Do not include fixit information in diagnostics">, 1493 MarshallingInfoNegativeFlag<DiagnosticOpts<"ShowFixits">>; 1494def fdiagnostics_parseable_fixits : Flag<["-"], "fdiagnostics-parseable-fixits">, Group<f_clang_Group>, 1495 Flags<[CoreOption, CC1Option]>, HelpText<"Print fix-its in machine parseable form">, 1496 MarshallingInfoFlag<DiagnosticOpts<"ShowParseableFixits">>; 1497def fdiagnostics_print_source_range_info : Flag<["-"], "fdiagnostics-print-source-range-info">, 1498 Group<f_clang_Group>, Flags<[CC1Option]>, 1499 HelpText<"Print source range spans in numeric form">, 1500 MarshallingInfoFlag<DiagnosticOpts<"ShowSourceRanges">>; 1501defm diagnostics_show_hotness : BoolFOption<"diagnostics-show-hotness", 1502 CodeGenOpts<"DiagnosticsWithHotness">, DefaultFalse, 1503 PosFlag<SetTrue, [CC1Option], "Enable profile hotness information in diagnostic line">, 1504 NegFlag<SetFalse>>; 1505def fdiagnostics_hotness_threshold_EQ : Joined<["-"], "fdiagnostics-hotness-threshold=">, 1506 Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<value>">, 1507 HelpText<"Prevent optimization remarks from being output if they do not have at least this profile count. " 1508 "Use 'auto' to apply the threshold from profile summary">; 1509def fdiagnostics_misexpect_tolerance_EQ : Joined<["-"], "fdiagnostics-misexpect-tolerance=">, 1510 Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<value>">, 1511 HelpText<"Prevent misexpect diagnostics from being output if the profile counts are within N% of the expected. ">; 1512defm diagnostics_show_option : BoolFOption<"diagnostics-show-option", 1513 DiagnosticOpts<"ShowOptionNames">, DefaultTrue, 1514 NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue, [], "Print option name with mappable diagnostics">>; 1515defm diagnostics_show_note_include_stack : BoolFOption<"diagnostics-show-note-include-stack", 1516 DiagnosticOpts<"ShowNoteIncludeStack">, DefaultFalse, 1517 PosFlag<SetTrue, [], "Display include stacks for diagnostic notes">, 1518 NegFlag<SetFalse>, BothFlags<[CC1Option]>>; 1519def fdiagnostics_format_EQ : Joined<["-"], "fdiagnostics-format=">, Group<f_clang_Group>; 1520def fdiagnostics_show_category_EQ : Joined<["-"], "fdiagnostics-show-category=">, Group<f_clang_Group>; 1521def fdiagnostics_show_template_tree : Flag<["-"], "fdiagnostics-show-template-tree">, 1522 Group<f_Group>, Flags<[CC1Option]>, 1523 HelpText<"Print a template comparison tree for differing templates">, 1524 MarshallingInfoFlag<DiagnosticOpts<"ShowTemplateTree">>; 1525def fdiscard_value_names : Flag<["-"], "fdiscard-value-names">, Group<f_clang_Group>, 1526 HelpText<"Discard value names in LLVM IR">, Flags<[NoXarchOption]>; 1527def fno_discard_value_names : Flag<["-"], "fno-discard-value-names">, Group<f_clang_Group>, 1528 HelpText<"Do not discard value names in LLVM IR">, Flags<[NoXarchOption]>; 1529defm dollars_in_identifiers : BoolFOption<"dollars-in-identifiers", 1530 LangOpts<"DollarIdents">, Default<!strconcat("!", asm_preprocessor.KeyPath)>, 1531 PosFlag<SetTrue, [], "Allow">, NegFlag<SetFalse, [], "Disallow">, 1532 BothFlags<[CC1Option], " '$' in identifiers">>; 1533def fdwarf2_cfi_asm : Flag<["-"], "fdwarf2-cfi-asm">, Group<clang_ignored_f_Group>; 1534def fno_dwarf2_cfi_asm : Flag<["-"], "fno-dwarf2-cfi-asm">, Group<clang_ignored_f_Group>; 1535defm dwarf_directory_asm : BoolFOption<"dwarf-directory-asm", 1536 CodeGenOpts<"NoDwarfDirectoryAsm">, DefaultFalse, 1537 NegFlag<SetTrue, [CC1Option]>, PosFlag<SetFalse>>; 1538defm elide_constructors : BoolFOption<"elide-constructors", 1539 LangOpts<"ElideConstructors">, DefaultTrue, 1540 NegFlag<SetFalse, [CC1Option], "Disable C++ copy constructor elision">, 1541 PosFlag<SetTrue>>; 1542def fno_elide_type : Flag<["-"], "fno-elide-type">, Group<f_Group>, 1543 Flags<[CC1Option]>, 1544 HelpText<"Do not elide types when printing diagnostics">, 1545 MarshallingInfoNegativeFlag<DiagnosticOpts<"ElideType">>; 1546def feliminate_unused_debug_symbols : Flag<["-"], "feliminate-unused-debug-symbols">, Group<f_Group>; 1547defm eliminate_unused_debug_types : OptOutCC1FFlag<"eliminate-unused-debug-types", 1548 "Do not emit ", "Emit ", " debug info for defined but unused types">; 1549def femit_all_decls : Flag<["-"], "femit-all-decls">, Group<f_Group>, Flags<[CC1Option]>, 1550 HelpText<"Emit all declarations, even if unused">, 1551 MarshallingInfoFlag<LangOpts<"EmitAllDecls">>; 1552defm emulated_tls : BoolFOption<"emulated-tls", 1553 CodeGenOpts<"EmulatedTLS">, DefaultFalse, 1554 PosFlag<SetTrue, [CC1Option], "Use emutls functions to access thread_local variables">, 1555 NegFlag<SetFalse>, BothFlags<[CC1Option]>>; 1556def fencoding_EQ : Joined<["-"], "fencoding=">, Group<f_Group>; 1557def ferror_limit_EQ : Joined<["-"], "ferror-limit=">, Group<f_Group>, Flags<[CoreOption]>; 1558defm exceptions : BoolFOption<"exceptions", 1559 LangOpts<"Exceptions">, DefaultFalse, 1560 PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">, 1561 BothFlags<[], " support for exception handling">>; 1562def fdwarf_exceptions : Flag<["-"], "fdwarf-exceptions">, Group<f_Group>, 1563 HelpText<"Use DWARF style exceptions">; 1564def fsjlj_exceptions : Flag<["-"], "fsjlj-exceptions">, Group<f_Group>, 1565 HelpText<"Use SjLj style exceptions">; 1566def fseh_exceptions : Flag<["-"], "fseh-exceptions">, Group<f_Group>, 1567 HelpText<"Use SEH style exceptions">; 1568def fwasm_exceptions : Flag<["-"], "fwasm-exceptions">, Group<f_Group>, 1569 HelpText<"Use WebAssembly style exceptions">; 1570def exception_model : Separate<["-"], "exception-model">, 1571 Flags<[CC1Option, NoDriverOption]>, HelpText<"The exception model">, 1572 Values<"dwarf,sjlj,seh,wasm">, 1573 NormalizedValuesScope<"LangOptions::ExceptionHandlingKind">, 1574 NormalizedValues<["DwarfCFI", "SjLj", "WinEH", "Wasm"]>, 1575 MarshallingInfoEnum<LangOpts<"ExceptionHandling">, "None">; 1576def exception_model_EQ : Joined<["-"], "exception-model=">, 1577 Flags<[CC1Option, NoDriverOption]>, Alias<exception_model>; 1578def fignore_exceptions : Flag<["-"], "fignore-exceptions">, Group<f_Group>, Flags<[CC1Option]>, 1579 HelpText<"Enable support for ignoring exception handling constructs">, 1580 MarshallingInfoFlag<LangOpts<"IgnoreExceptions">>; 1581def fexcess_precision_EQ : Joined<["-"], "fexcess-precision=">, Group<f_Group>, 1582 Flags<[CoreOption]>, 1583 HelpText<"Allows control over excess precision on targets where native " 1584 "support for the precision types is not available. By default, excess " 1585 "precision is used to calculate intermediate results following the " 1586 "rules specified in ISO C99.">, 1587 Values<"standard,fast,none">, NormalizedValuesScope<"LangOptions">, 1588 NormalizedValues<["FPP_Standard", "FPP_Fast", "FPP_None"]>; 1589def ffloat16_excess_precision_EQ : Joined<["-"], "ffloat16-excess-precision=">, 1590 Group<f_Group>, Flags<[CC1Option, NoDriverOption]>, 1591 HelpText<"Allows control over excess precision on targets where native " 1592 "support for Float16 precision types is not available. By default, excess " 1593 "precision is used to calculate intermediate results following the " 1594 "rules specified in ISO C99.">, 1595 Values<"standard,fast,none">, NormalizedValuesScope<"LangOptions">, 1596 NormalizedValues<["FPP_Standard", "FPP_Fast", "FPP_None"]>, 1597 MarshallingInfoEnum<LangOpts<"Float16ExcessPrecision">, "FPP_Standard">; 1598def : Flag<["-"], "fexpensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>; 1599def : Flag<["-"], "fno-expensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>; 1600def fextdirs_EQ : Joined<["-"], "fextdirs=">, Group<f_Group>; 1601def : Flag<["-"], "fdefer-pop">, Group<clang_ignored_gcc_optimization_f_Group>; 1602def : Flag<["-"], "fno-defer-pop">, Group<clang_ignored_gcc_optimization_f_Group>; 1603def : Flag<["-"], "fextended-identifiers">, Group<clang_ignored_f_Group>; 1604def : Flag<["-"], "fno-extended-identifiers">, Group<f_Group>, Flags<[Unsupported]>; 1605def fhosted : Flag<["-"], "fhosted">, Group<f_Group>; 1606def fdenormal_fp_math_EQ : Joined<["-"], "fdenormal-fp-math=">, Group<f_Group>, Flags<[CC1Option]>; 1607def ffile_reproducible : Flag<["-"], "ffile-reproducible">, Group<f_Group>, 1608 Flags<[CoreOption, CC1Option]>, 1609 HelpText<"Use the target's platform-specific path separator character when " 1610 "expanding the __FILE__ macro">; 1611def fno_file_reproducible : Flag<["-"], "fno-file-reproducible">, 1612 Group<f_Group>, Flags<[CoreOption, CC1Option]>, 1613 HelpText<"Use the host's platform-specific path separator character when " 1614 "expanding the __FILE__ macro">; 1615def ffp_eval_method_EQ : Joined<["-"], "ffp-eval-method=">, Group<f_Group>, Flags<[CC1Option]>, 1616 HelpText<"Specifies the evaluation method to use for floating-point arithmetic.">, 1617 Values<"source,double,extended">, NormalizedValuesScope<"LangOptions">, 1618 NormalizedValues<["FEM_Source", "FEM_Double", "FEM_Extended"]>, 1619 MarshallingInfoEnum<LangOpts<"FPEvalMethod">, "FEM_UnsetOnCommandLine">; 1620def ffp_model_EQ : Joined<["-"], "ffp-model=">, Group<f_Group>, Flags<[NoXarchOption]>, 1621 HelpText<"Controls the semantics of floating-point calculations.">; 1622def ffp_exception_behavior_EQ : Joined<["-"], "ffp-exception-behavior=">, Group<f_Group>, Flags<[CC1Option]>, 1623 HelpText<"Specifies the exception behavior of floating-point operations.">, 1624 Values<"ignore,maytrap,strict">, NormalizedValuesScope<"LangOptions">, 1625 NormalizedValues<["FPE_Ignore", "FPE_MayTrap", "FPE_Strict"]>, 1626 MarshallingInfoEnum<LangOpts<"FPExceptionMode">, "FPE_Default">; 1627defm fast_math : BoolFOption<"fast-math", 1628 LangOpts<"FastMath">, DefaultFalse, 1629 PosFlag<SetTrue, [CC1Option, FC1Option, FlangOption], "Allow aggressive, lossy floating-point optimizations", 1630 [cl_fast_relaxed_math.KeyPath]>, 1631 NegFlag<SetFalse>>; 1632defm math_errno : BoolFOption<"math-errno", 1633 LangOpts<"MathErrno">, DefaultFalse, 1634 PosFlag<SetTrue, [CC1Option], "Require math functions to indicate errors by setting errno">, 1635 NegFlag<SetFalse>>, 1636 ShouldParseIf<!strconcat("!", open_cl.KeyPath)>; 1637def fextend_args_EQ : Joined<["-"], "fextend-arguments=">, Group<f_Group>, 1638 Flags<[CC1Option, NoArgumentUnused]>, 1639 HelpText<"Controls how scalar integer arguments are extended in calls " 1640 "to unprototyped and varargs functions">, 1641 Values<"32,64">, 1642 NormalizedValues<["ExtendTo32", "ExtendTo64"]>, 1643 NormalizedValuesScope<"LangOptions::ExtendArgsKind">, 1644 MarshallingInfoEnum<LangOpts<"ExtendIntArgs">,"ExtendTo32">; 1645def fbracket_depth_EQ : Joined<["-"], "fbracket-depth=">, Group<f_Group>, Flags<[CoreOption]>; 1646def fsignaling_math : Flag<["-"], "fsignaling-math">, Group<f_Group>; 1647def fno_signaling_math : Flag<["-"], "fno-signaling-math">, Group<f_Group>; 1648defm jump_tables : BoolFOption<"jump-tables", 1649 CodeGenOpts<"NoUseJumpTables">, DefaultFalse, 1650 NegFlag<SetTrue, [CC1Option], "Do not use">, PosFlag<SetFalse, [], "Use">, 1651 BothFlags<[], " jump tables for lowering switches">>; 1652defm force_enable_int128 : BoolFOption<"force-enable-int128", 1653 TargetOpts<"ForceEnableInt128">, DefaultFalse, 1654 PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">, 1655 BothFlags<[], " support for int128_t type">>; 1656defm keep_static_consts : BoolFOption<"keep-static-consts", 1657 CodeGenOpts<"KeepStaticConsts">, DefaultFalse, 1658 PosFlag<SetTrue, [CC1Option], "Keep">, NegFlag<SetFalse, [], "Don't keep">, 1659 BothFlags<[NoXarchOption], " static const variables if unused">>; 1660defm fixed_point : BoolFOption<"fixed-point", 1661 LangOpts<"FixedPoint">, DefaultFalse, 1662 PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">, 1663 BothFlags<[], " fixed point types">>, ShouldParseIf<!strconcat("!", cplusplus.KeyPath)>; 1664defm cxx_static_destructors : BoolFOption<"c++-static-destructors", 1665 LangOpts<"RegisterStaticDestructors">, DefaultTrue, 1666 NegFlag<SetFalse, [CC1Option], "Disable C++ static destructor registration">, 1667 PosFlag<SetTrue>>; 1668def fsymbol_partition_EQ : Joined<["-"], "fsymbol-partition=">, Group<f_Group>, 1669 Flags<[CC1Option]>, MarshallingInfoString<CodeGenOpts<"SymbolPartition">>; 1670 1671defm memory_profile : OptInCC1FFlag<"memory-profile", "Enable", "Disable", " heap memory profiling">; 1672def fmemory_profile_EQ : Joined<["-"], "fmemory-profile=">, 1673 Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<directory>">, 1674 HelpText<"Enable heap memory profiling and dump results into <directory>">; 1675 1676// Begin sanitizer flags. These should all be core options exposed in all driver 1677// modes. 1678let Flags = [CC1Option, CoreOption] in { 1679 1680def fsanitize_EQ : CommaJoined<["-"], "fsanitize=">, Group<f_clang_Group>, 1681 MetaVarName<"<check>">, 1682 HelpText<"Turn on runtime checks for various forms of undefined " 1683 "or suspicious behavior. See user manual for available checks">; 1684def fno_sanitize_EQ : CommaJoined<["-"], "fno-sanitize=">, Group<f_clang_Group>, 1685 Flags<[CoreOption, NoXarchOption]>; 1686 1687def fsanitize_ignorelist_EQ : Joined<["-"], "fsanitize-ignorelist=">, 1688 Group<f_clang_Group>, HelpText<"Path to ignorelist file for sanitizers">; 1689def : Joined<["-"], "fsanitize-blacklist=">, 1690 Group<f_clang_Group>, Flags<[HelpHidden]>, Alias<fsanitize_ignorelist_EQ>, 1691 HelpText<"Alias for -fsanitize-ignorelist=">; 1692 1693def fsanitize_system_ignorelist_EQ : Joined<["-"], "fsanitize-system-ignorelist=">, 1694 HelpText<"Path to system ignorelist file for sanitizers">, Flags<[CC1Option]>; 1695def : Joined<["-"], "fsanitize-system-blacklist=">, 1696 HelpText<"Alias for -fsanitize-system-ignorelist=">, 1697 Flags<[CC1Option, HelpHidden]>, Alias<fsanitize_system_ignorelist_EQ>; 1698 1699def fno_sanitize_ignorelist : Flag<["-"], "fno-sanitize-ignorelist">, 1700 Group<f_clang_Group>, HelpText<"Don't use ignorelist file for sanitizers">; 1701def : Flag<["-"], "fno-sanitize-blacklist">, 1702 Group<f_clang_Group>, Flags<[HelpHidden]>, Alias<fno_sanitize_ignorelist>; 1703 1704def fsanitize_coverage : CommaJoined<["-"], "fsanitize-coverage=">, 1705 Group<f_clang_Group>, 1706 HelpText<"Specify the type of coverage instrumentation for Sanitizers">; 1707def fno_sanitize_coverage : CommaJoined<["-"], "fno-sanitize-coverage=">, 1708 Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>, 1709 HelpText<"Disable features of coverage instrumentation for Sanitizers">, 1710 Values<"func,bb,edge,indirect-calls,trace-bb,trace-cmp,trace-div,trace-gep," 1711 "8bit-counters,trace-pc,trace-pc-guard,no-prune,inline-8bit-counters," 1712 "inline-bool-flag">; 1713def fsanitize_coverage_allowlist : Joined<["-"], "fsanitize-coverage-allowlist=">, 1714 Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>, 1715 HelpText<"Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones">, 1716 MarshallingInfoStringVector<CodeGenOpts<"SanitizeCoverageAllowlistFiles">>; 1717def fsanitize_coverage_ignorelist : Joined<["-"], "fsanitize-coverage-ignorelist=">, 1718 Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>, 1719 HelpText<"Disable sanitizer coverage instrumentation for modules and functions " 1720 "that match the provided special case list, even the allowed ones">, 1721 MarshallingInfoStringVector<CodeGenOpts<"SanitizeCoverageIgnorelistFiles">>; 1722def fexperimental_sanitize_metadata_EQ : CommaJoined<["-"], "fexperimental-sanitize-metadata=">, 1723 Group<f_Group>, 1724 HelpText<"Specify the type of metadata to emit for binary analysis sanitizers">; 1725def fno_experimental_sanitize_metadata_EQ : CommaJoined<["-"], "fno-experimental-sanitize-metadata=">, 1726 Group<f_Group>, Flags<[CoreOption]>, 1727 HelpText<"Disable emitting metadata for binary analysis sanitizers">; 1728def fsanitize_memory_track_origins_EQ : Joined<["-"], "fsanitize-memory-track-origins=">, 1729 Group<f_clang_Group>, 1730 HelpText<"Enable origins tracking in MemorySanitizer">, 1731 MarshallingInfoInt<CodeGenOpts<"SanitizeMemoryTrackOrigins">>; 1732def fsanitize_memory_track_origins : Flag<["-"], "fsanitize-memory-track-origins">, 1733 Group<f_clang_Group>, 1734 Alias<fsanitize_memory_track_origins_EQ>, AliasArgs<["2"]>, 1735 HelpText<"Enable origins tracking in MemorySanitizer">; 1736def fno_sanitize_memory_track_origins : Flag<["-"], "fno-sanitize-memory-track-origins">, 1737 Group<f_clang_Group>, 1738 Flags<[CoreOption, NoXarchOption]>, 1739 HelpText<"Disable origins tracking in MemorySanitizer">; 1740def fsanitize_address_outline_instrumentation : Flag<["-"], "fsanitize-address-outline-instrumentation">, 1741 Group<f_clang_Group>, 1742 HelpText<"Always generate function calls for address sanitizer instrumentation">; 1743def fno_sanitize_address_outline_instrumentation : Flag<["-"], "fno-sanitize-address-outline-instrumentation">, 1744 Group<f_clang_Group>, 1745 HelpText<"Use default code inlining logic for the address sanitizer">; 1746def fsanitize_memtag_mode_EQ : Joined<["-"], "fsanitize-memtag-mode=">, 1747 Group<f_clang_Group>, 1748 HelpText<"Set default MTE mode to 'sync' (default) or 'async'">; 1749def fsanitize_hwaddress_experimental_aliasing 1750 : Flag<["-"], "fsanitize-hwaddress-experimental-aliasing">, 1751 Group<f_clang_Group>, 1752 HelpText<"Enable aliasing mode in HWAddressSanitizer">; 1753def fno_sanitize_hwaddress_experimental_aliasing 1754 : Flag<["-"], "fno-sanitize-hwaddress-experimental-aliasing">, 1755 Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>, 1756 HelpText<"Disable aliasing mode in HWAddressSanitizer">; 1757defm sanitize_memory_use_after_dtor : BoolOption<"f", "sanitize-memory-use-after-dtor", 1758 CodeGenOpts<"SanitizeMemoryUseAfterDtor">, DefaultFalse, 1759 PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">, 1760 BothFlags<[], " use-after-destroy detection in MemorySanitizer">>, 1761 Group<f_clang_Group>; 1762def fsanitize_address_field_padding : Joined<["-"], "fsanitize-address-field-padding=">, 1763 Group<f_clang_Group>, 1764 HelpText<"Level of field padding for AddressSanitizer">, 1765 MarshallingInfoInt<LangOpts<"SanitizeAddressFieldPadding">>; 1766defm sanitize_address_use_after_scope : BoolOption<"f", "sanitize-address-use-after-scope", 1767 CodeGenOpts<"SanitizeAddressUseAfterScope">, DefaultFalse, 1768 PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Disable">, 1769 BothFlags<[], " use-after-scope detection in AddressSanitizer">>, 1770 Group<f_clang_Group>; 1771def sanitize_address_use_after_return_EQ 1772 : Joined<["-"], "fsanitize-address-use-after-return=">, 1773 MetaVarName<"<mode>">, 1774 Flags<[CC1Option]>, 1775 HelpText<"Select the mode of detecting stack use-after-return in AddressSanitizer">, 1776 Group<f_clang_Group>, 1777 Values<"never,runtime,always">, 1778 NormalizedValuesScope<"llvm::AsanDetectStackUseAfterReturnMode">, 1779 NormalizedValues<["Never", "Runtime", "Always"]>, 1780 MarshallingInfoEnum<CodeGenOpts<"SanitizeAddressUseAfterReturn">, "Runtime">; 1781defm sanitize_address_poison_custom_array_cookie : BoolOption<"f", "sanitize-address-poison-custom-array-cookie", 1782 CodeGenOpts<"SanitizeAddressPoisonCustomArrayCookie">, DefaultFalse, 1783 PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">, 1784 BothFlags<[], " poisoning array cookies when using custom operator new[] in AddressSanitizer">>, 1785 Group<f_clang_Group>; 1786defm sanitize_address_globals_dead_stripping : BoolOption<"f", "sanitize-address-globals-dead-stripping", 1787 CodeGenOpts<"SanitizeAddressGlobalsDeadStripping">, DefaultFalse, 1788 PosFlag<SetTrue, [], "Enable linker dead stripping of globals in AddressSanitizer">, 1789 NegFlag<SetFalse, [], "Disable linker dead stripping of globals in AddressSanitizer">>, 1790 Group<f_clang_Group>; 1791defm sanitize_address_use_odr_indicator : BoolOption<"f", "sanitize-address-use-odr-indicator", 1792 CodeGenOpts<"SanitizeAddressUseOdrIndicator">, DefaultTrue, 1793 PosFlag<SetTrue, [], "Enable ODR indicator globals to avoid false ODR violation" 1794 " reports in partially sanitized programs at the cost of an increase in binary size">, 1795 NegFlag<SetFalse, [], "Disable ODR indicator globals">>, 1796 Group<f_clang_Group>; 1797def sanitize_address_destructor_EQ 1798 : Joined<["-"], "fsanitize-address-destructor=">, 1799 Flags<[CC1Option]>, 1800 HelpText<"Set destructor type used in ASan instrumentation">, 1801 Group<f_clang_Group>, 1802 Values<"none,global">, 1803 NormalizedValuesScope<"llvm::AsanDtorKind">, 1804 NormalizedValues<["None", "Global"]>, 1805 MarshallingInfoEnum<CodeGenOpts<"SanitizeAddressDtor">, "Global">; 1806defm sanitize_memory_param_retval 1807 : BoolFOption<"sanitize-memory-param-retval", 1808 CodeGenOpts<"SanitizeMemoryParamRetval">, 1809 DefaultTrue, 1810 PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">, 1811 BothFlags<[], " detection of uninitialized parameters and return values">>; 1812//// Note: This flag was introduced when it was necessary to distinguish between 1813// ABI for correct codegen. This is no longer needed, but the flag is 1814// not removed since targeting either ABI will behave the same. 1815// This way we cause no disturbance to existing scripts & code, and if we 1816// want to use this flag in the future we will cause no disturbance then 1817// either. 1818def fsanitize_hwaddress_abi_EQ 1819 : Joined<["-"], "fsanitize-hwaddress-abi=">, 1820 Group<f_clang_Group>, 1821 HelpText<"Select the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor). This option is currently unused.">; 1822def fsanitize_recover_EQ : CommaJoined<["-"], "fsanitize-recover=">, 1823 Group<f_clang_Group>, 1824 HelpText<"Enable recovery for specified sanitizers">; 1825def fno_sanitize_recover_EQ : CommaJoined<["-"], "fno-sanitize-recover=">, 1826 Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>, 1827 HelpText<"Disable recovery for specified sanitizers">; 1828def fsanitize_recover : Flag<["-"], "fsanitize-recover">, Group<f_clang_Group>, 1829 Alias<fsanitize_recover_EQ>, AliasArgs<["all"]>; 1830def fno_sanitize_recover : Flag<["-"], "fno-sanitize-recover">, 1831 Flags<[CoreOption, NoXarchOption]>, Group<f_clang_Group>, 1832 Alias<fno_sanitize_recover_EQ>, AliasArgs<["all"]>; 1833def fsanitize_trap_EQ : CommaJoined<["-"], "fsanitize-trap=">, Group<f_clang_Group>, 1834 HelpText<"Enable trapping for specified sanitizers">; 1835def fno_sanitize_trap_EQ : CommaJoined<["-"], "fno-sanitize-trap=">, Group<f_clang_Group>, 1836 Flags<[CoreOption, NoXarchOption]>, 1837 HelpText<"Disable trapping for specified sanitizers">; 1838def fsanitize_trap : Flag<["-"], "fsanitize-trap">, Group<f_clang_Group>, 1839 Alias<fsanitize_trap_EQ>, AliasArgs<["all"]>, 1840 HelpText<"Enable trapping for all sanitizers">; 1841def fno_sanitize_trap : Flag<["-"], "fno-sanitize-trap">, Group<f_clang_Group>, 1842 Alias<fno_sanitize_trap_EQ>, AliasArgs<["all"]>, 1843 Flags<[CoreOption, NoXarchOption]>, 1844 HelpText<"Disable trapping for all sanitizers">; 1845def fsanitize_undefined_trap_on_error 1846 : Flag<["-"], "fsanitize-undefined-trap-on-error">, Group<f_clang_Group>, 1847 Alias<fsanitize_trap_EQ>, AliasArgs<["undefined"]>; 1848def fno_sanitize_undefined_trap_on_error 1849 : Flag<["-"], "fno-sanitize-undefined-trap-on-error">, Group<f_clang_Group>, 1850 Alias<fno_sanitize_trap_EQ>, AliasArgs<["undefined"]>; 1851defm sanitize_minimal_runtime : BoolOption<"f", "sanitize-minimal-runtime", 1852 CodeGenOpts<"SanitizeMinimalRuntime">, DefaultFalse, 1853 PosFlag<SetTrue>, NegFlag<SetFalse>>, 1854 Group<f_clang_Group>; 1855def fsanitize_link_runtime : Flag<["-"], "fsanitize-link-runtime">, 1856 Group<f_clang_Group>; 1857def fno_sanitize_link_runtime : Flag<["-"], "fno-sanitize-link-runtime">, 1858 Group<f_clang_Group>; 1859def fsanitize_link_cxx_runtime : Flag<["-"], "fsanitize-link-c++-runtime">, 1860 Group<f_clang_Group>; 1861def fno_sanitize_link_cxx_runtime : Flag<["-"], "fno-sanitize-link-c++-runtime">, 1862 Group<f_clang_Group>; 1863defm sanitize_cfi_cross_dso : BoolOption<"f", "sanitize-cfi-cross-dso", 1864 CodeGenOpts<"SanitizeCfiCrossDso">, DefaultFalse, 1865 PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Disable">, 1866 BothFlags<[], " control flow integrity (CFI) checks for cross-DSO calls.">>, 1867 Group<f_clang_Group>; 1868def fsanitize_cfi_icall_generalize_pointers : Flag<["-"], "fsanitize-cfi-icall-generalize-pointers">, 1869 Group<f_clang_Group>, 1870 HelpText<"Generalize pointers in CFI indirect call type signature checks">, 1871 MarshallingInfoFlag<CodeGenOpts<"SanitizeCfiICallGeneralizePointers">>; 1872defm sanitize_cfi_canonical_jump_tables : BoolOption<"f", "sanitize-cfi-canonical-jump-tables", 1873 CodeGenOpts<"SanitizeCfiCanonicalJumpTables">, DefaultFalse, 1874 PosFlag<SetTrue, [], "Make">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Do not make">, 1875 BothFlags<[], " the jump table addresses canonical in the symbol table">>, 1876 Group<f_clang_Group>; 1877defm sanitize_stats : BoolOption<"f", "sanitize-stats", 1878 CodeGenOpts<"SanitizeStats">, DefaultFalse, 1879 PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Disable">, 1880 BothFlags<[], " sanitizer statistics gathering.">>, 1881 Group<f_clang_Group>; 1882def fsanitize_thread_memory_access : Flag<["-"], "fsanitize-thread-memory-access">, 1883 Group<f_clang_Group>, 1884 HelpText<"Enable memory access instrumentation in ThreadSanitizer (default)">; 1885def fno_sanitize_thread_memory_access : Flag<["-"], "fno-sanitize-thread-memory-access">, 1886 Group<f_clang_Group>, 1887 Flags<[CoreOption, NoXarchOption]>, 1888 HelpText<"Disable memory access instrumentation in ThreadSanitizer">; 1889def fsanitize_thread_func_entry_exit : Flag<["-"], "fsanitize-thread-func-entry-exit">, 1890 Group<f_clang_Group>, 1891 HelpText<"Enable function entry/exit instrumentation in ThreadSanitizer (default)">; 1892def fno_sanitize_thread_func_entry_exit : Flag<["-"], "fno-sanitize-thread-func-entry-exit">, 1893 Group<f_clang_Group>, 1894 Flags<[CoreOption, NoXarchOption]>, 1895 HelpText<"Disable function entry/exit instrumentation in ThreadSanitizer">; 1896def fsanitize_thread_atomics : Flag<["-"], "fsanitize-thread-atomics">, 1897 Group<f_clang_Group>, 1898 HelpText<"Enable atomic operations instrumentation in ThreadSanitizer (default)">; 1899def fno_sanitize_thread_atomics : Flag<["-"], "fno-sanitize-thread-atomics">, 1900 Group<f_clang_Group>, 1901 Flags<[CoreOption, NoXarchOption]>, 1902 HelpText<"Disable atomic operations instrumentation in ThreadSanitizer">; 1903def fsanitize_undefined_strip_path_components_EQ : Joined<["-"], "fsanitize-undefined-strip-path-components=">, 1904 Group<f_clang_Group>, MetaVarName<"<number>">, 1905 HelpText<"Strip (or keep only, if negative) a given number of path components " 1906 "when emitting check metadata.">, 1907 MarshallingInfoInt<CodeGenOpts<"EmitCheckPathComponentsToStrip">, "0", "int">; 1908 1909} // end -f[no-]sanitize* flags 1910 1911def funsafe_math_optimizations : Flag<["-"], "funsafe-math-optimizations">, 1912 Group<f_Group>, Flags<[CC1Option]>, 1913 HelpText<"Allow unsafe floating-point math optimizations which may decrease precision">, 1914 MarshallingInfoFlag<LangOpts<"UnsafeFPMath">>, 1915 ImpliedByAnyOf<[cl_unsafe_math_optimizations.KeyPath, ffast_math.KeyPath]>; 1916def fno_unsafe_math_optimizations : Flag<["-"], "fno-unsafe-math-optimizations">, 1917 Group<f_Group>; 1918def fassociative_math : Flag<["-"], "fassociative-math">, Group<f_Group>; 1919def fno_associative_math : Flag<["-"], "fno-associative-math">, Group<f_Group>; 1920defm reciprocal_math : BoolFOption<"reciprocal-math", 1921 LangOpts<"AllowRecip">, DefaultFalse, 1922 PosFlag<SetTrue, [CC1Option, FC1Option, FlangOption], "Allow division operations to be reassociated", 1923 [funsafe_math_optimizations.KeyPath]>, 1924 NegFlag<SetFalse>>; 1925defm approx_func : BoolFOption<"approx-func", LangOpts<"ApproxFunc">, DefaultFalse, 1926 PosFlag<SetTrue, [CC1Option, FC1Option, FlangOption], "Allow certain math function calls to be replaced " 1927 "with an approximately equivalent calculation", 1928 [funsafe_math_optimizations.KeyPath]>, 1929 NegFlag<SetFalse>>; 1930defm finite_math_only : BoolFOption<"finite-math-only", 1931 LangOpts<"FiniteMathOnly">, DefaultFalse, 1932 PosFlag<SetTrue, [CC1Option], "", [cl_finite_math_only.KeyPath, ffast_math.KeyPath]>, 1933 NegFlag<SetFalse>>; 1934defm signed_zeros : BoolFOption<"signed-zeros", 1935 LangOpts<"NoSignedZero">, DefaultFalse, 1936 NegFlag<SetTrue, [CC1Option, FC1Option, FlangOption], "Allow optimizations that ignore the sign of floating point zeros", 1937 [cl_no_signed_zeros.KeyPath, funsafe_math_optimizations.KeyPath]>, 1938 PosFlag<SetFalse>>; 1939def fhonor_nans : Flag<["-"], "fhonor-nans">, Group<f_Group>; 1940def fno_honor_nans : Flag<["-"], "fno-honor-nans">, Group<f_Group>; 1941def fhonor_infinities : Flag<["-"], "fhonor-infinities">, Group<f_Group>; 1942def fno_honor_infinities : Flag<["-"], "fno-honor-infinities">, Group<f_Group>; 1943// This option was originally misspelt "infinites" [sic]. 1944def : Flag<["-"], "fhonor-infinites">, Alias<fhonor_infinities>; 1945def : Flag<["-"], "fno-honor-infinites">, Alias<fno_honor_infinities>; 1946def frounding_math : Flag<["-"], "frounding-math">, Group<f_Group>, Flags<[CC1Option]>, 1947 MarshallingInfoFlag<LangOpts<"RoundingMath">>, 1948 Normalizer<"makeFlagToValueNormalizer(llvm::RoundingMode::Dynamic)">; 1949def fno_rounding_math : Flag<["-"], "fno-rounding-math">, Group<f_Group>, Flags<[CC1Option]>; 1950def ftrapping_math : Flag<["-"], "ftrapping-math">, Group<f_Group>; 1951def fno_trapping_math : Flag<["-"], "fno-trapping-math">, Group<f_Group>; 1952def ffp_contract : Joined<["-"], "ffp-contract=">, Group<f_Group>, 1953 Flags<[CC1Option, FC1Option, FlangOption]>, 1954 DocBrief<"Form fused FP ops (e.g. FMAs):" 1955 " fast (fuses across statements disregarding pragmas)" 1956 " | on (only fuses in the same statement unless dictated by pragmas)" 1957 " | off (never fuses)" 1958 " | fast-honor-pragmas (fuses across statements unless dictated by pragmas)." 1959 " Default is 'fast' for CUDA, 'fast-honor-pragmas' for HIP, and 'on' otherwise.">, 1960 HelpText<"Form fused FP ops (e.g. FMAs)">, 1961 Values<"fast,on,off,fast-honor-pragmas">; 1962 1963defm strict_float_cast_overflow : BoolFOption<"strict-float-cast-overflow", 1964 CodeGenOpts<"StrictFloatCastOverflow">, DefaultTrue, 1965 NegFlag<SetFalse, [CC1Option], "Relax language rules and try to match the behavior" 1966 " of the target's native float-to-int conversion instructions">, 1967 PosFlag<SetTrue, [], "Assume that overflowing float-to-int casts are undefined (default)">>; 1968 1969defm protect_parens : BoolFOption<"protect-parens", 1970 LangOpts<"ProtectParens">, DefaultFalse, 1971 PosFlag<SetTrue, [CoreOption, CC1Option], 1972 "Determines whether the optimizer honors parentheses when " 1973 "floating-point expressions are evaluated">, 1974 NegFlag<SetFalse>>; 1975 1976def ffor_scope : Flag<["-"], "ffor-scope">, Group<f_Group>; 1977def fno_for_scope : Flag<["-"], "fno-for-scope">, Group<f_Group>; 1978 1979defm rewrite_imports : BoolFOption<"rewrite-imports", 1980 PreprocessorOutputOpts<"RewriteImports">, DefaultFalse, 1981 PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>; 1982defm rewrite_includes : BoolFOption<"rewrite-includes", 1983 PreprocessorOutputOpts<"RewriteIncludes">, DefaultFalse, 1984 PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>; 1985 1986defm directives_only : OptInCC1FFlag<"directives-only", "">; 1987 1988defm delete_null_pointer_checks : BoolFOption<"delete-null-pointer-checks", 1989 CodeGenOpts<"NullPointerIsValid">, DefaultFalse, 1990 NegFlag<SetTrue, [CC1Option], "Do not treat usage of null pointers as undefined behavior">, 1991 PosFlag<SetFalse, [], "Treat usage of null pointers as undefined behavior (default)">, 1992 BothFlags<[CoreOption]>>; 1993 1994def frewrite_map_file_EQ : Joined<["-"], "frewrite-map-file=">, 1995 Group<f_Group>, 1996 Flags<[NoXarchOption, CC1Option]>, 1997 MarshallingInfoStringVector<CodeGenOpts<"RewriteMapFiles">>; 1998 1999defm use_line_directives : BoolFOption<"use-line-directives", 2000 PreprocessorOutputOpts<"UseLineDirectives">, DefaultFalse, 2001 PosFlag<SetTrue, [CC1Option], "Use #line in preprocessed output">, NegFlag<SetFalse>>; 2002defm minimize_whitespace : BoolFOption<"minimize-whitespace", 2003 PreprocessorOutputOpts<"MinimizeWhitespace">, DefaultFalse, 2004 PosFlag<SetTrue, [CC1Option], "Minimize whitespace when emitting preprocessor output">, NegFlag<SetFalse>>; 2005 2006def ffreestanding : Flag<["-"], "ffreestanding">, Group<f_Group>, Flags<[CC1Option]>, 2007 HelpText<"Assert that the compilation takes place in a freestanding environment">, 2008 MarshallingInfoFlag<LangOpts<"Freestanding">>; 2009def fgnuc_version_EQ : Joined<["-"], "fgnuc-version=">, Group<f_Group>, 2010 HelpText<"Sets various macros to claim compatibility with the given GCC version (default is 4.2.1)">, 2011 Flags<[CC1Option, CoreOption]>; 2012// We abuse '-f[no-]gnu-keywords' to force overriding all GNU-extension 2013// keywords. This behavior is provided by GCC's poorly named '-fasm' flag, 2014// while a subset (the non-C++ GNU keywords) is provided by GCC's 2015// '-fgnu-keywords'. Clang conflates the two for simplicity under the single 2016// name, as it doesn't seem a useful distinction. 2017defm gnu_keywords : BoolFOption<"gnu-keywords", 2018 LangOpts<"GNUKeywords">, Default<gnu_mode.KeyPath>, 2019 PosFlag<SetTrue, [], "Allow GNU-extension keywords regardless of language standard">, 2020 NegFlag<SetFalse>, BothFlags<[CC1Option]>>; 2021defm gnu89_inline : BoolFOption<"gnu89-inline", 2022 LangOpts<"GNUInline">, Default<!strconcat("!", c99.KeyPath, " && !", cplusplus.KeyPath)>, 2023 PosFlag<SetTrue, [CC1Option], "Use the gnu89 inline semantics">, 2024 NegFlag<SetFalse>>, ShouldParseIf<!strconcat("!", cplusplus.KeyPath)>; 2025def fgnu_runtime : Flag<["-"], "fgnu-runtime">, Group<f_Group>, 2026 HelpText<"Generate output compatible with the standard GNU Objective-C runtime">; 2027def fheinous_gnu_extensions : Flag<["-"], "fheinous-gnu-extensions">, Flags<[CC1Option]>, 2028 MarshallingInfoFlag<LangOpts<"HeinousExtensions">>; 2029def filelist : Separate<["-"], "filelist">, Flags<[LinkerInput]>, 2030 Group<Link_Group>; 2031def : Flag<["-"], "findirect-virtual-calls">, Alias<fapple_kext>; 2032def finline_functions : Flag<["-"], "finline-functions">, Group<f_clang_Group>, Flags<[CC1Option]>, 2033 HelpText<"Inline suitable functions">; 2034def finline_hint_functions: Flag<["-"], "finline-hint-functions">, Group<f_clang_Group>, Flags<[CC1Option]>, 2035 HelpText<"Inline functions which are (explicitly or implicitly) marked inline">; 2036def finline : Flag<["-"], "finline">, Group<clang_ignored_f_Group>; 2037def finline_max_stacksize_EQ 2038 : Joined<["-"], "finline-max-stacksize=">, 2039 Group<f_Group>, Flags<[CoreOption, CC1Option]>, 2040 HelpText<"Suppress inlining of functions whose stack size exceeds the given value">, 2041 MarshallingInfoInt<CodeGenOpts<"InlineMaxStackSize">, "UINT_MAX">; 2042defm jmc : BoolFOption<"jmc", 2043 CodeGenOpts<"JMCInstrument">, DefaultFalse, 2044 PosFlag<SetTrue, [CC1Option], "Enable just-my-code debugging">, 2045 NegFlag<SetFalse>>; 2046def fglobal_isel : Flag<["-"], "fglobal-isel">, Group<f_clang_Group>, 2047 HelpText<"Enables the global instruction selector">; 2048def fexperimental_isel : Flag<["-"], "fexperimental-isel">, Group<f_clang_Group>, 2049 Alias<fglobal_isel>; 2050def fexperimental_strict_floating_point : Flag<["-"], "fexperimental-strict-floating-point">, 2051 Group<f_clang_Group>, Flags<[CC1Option]>, 2052 HelpText<"Enables experimental strict floating point in LLVM.">, 2053 MarshallingInfoFlag<LangOpts<"ExpStrictFP">>; 2054def finput_charset_EQ : Joined<["-"], "finput-charset=">, Flags<[FlangOption, FC1Option]>, Group<f_Group>, 2055 HelpText<"Specify the default character set for source files">; 2056def fexec_charset_EQ : Joined<["-"], "fexec-charset=">, Group<f_Group>; 2057def finstrument_functions : Flag<["-"], "finstrument-functions">, Group<f_Group>, Flags<[CC1Option]>, 2058 HelpText<"Generate calls to instrument function entry and exit">, 2059 MarshallingInfoFlag<CodeGenOpts<"InstrumentFunctions">>; 2060def finstrument_functions_after_inlining : Flag<["-"], "finstrument-functions-after-inlining">, Group<f_Group>, Flags<[CC1Option]>, 2061 HelpText<"Like -finstrument-functions, but insert the calls after inlining">, 2062 MarshallingInfoFlag<CodeGenOpts<"InstrumentFunctionsAfterInlining">>; 2063def finstrument_function_entry_bare : Flag<["-"], "finstrument-function-entry-bare">, Group<f_Group>, Flags<[CC1Option]>, 2064 HelpText<"Instrument function entry only, after inlining, without arguments to the instrumentation call">, 2065 MarshallingInfoFlag<CodeGenOpts<"InstrumentFunctionEntryBare">>; 2066def fcf_protection_EQ : Joined<["-"], "fcf-protection=">, Flags<[CoreOption, CC1Option]>, Group<f_Group>, 2067 HelpText<"Instrument control-flow architecture protection">, Values<"return,branch,full,none">; 2068def fcf_protection : Flag<["-"], "fcf-protection">, Group<f_Group>, Flags<[CoreOption, CC1Option]>, 2069 Alias<fcf_protection_EQ>, AliasArgs<["full"]>, 2070 HelpText<"Enable cf-protection in 'full' mode">; 2071def mfunction_return_EQ : Joined<["-"], "mfunction-return=">, 2072 Group<m_Group>, Flags<[CoreOption, CC1Option]>, 2073 HelpText<"Replace returns with jumps to ``__x86_return_thunk`` (x86 only, error otherwise)">, 2074 Values<"keep,thunk-extern">, 2075 NormalizedValues<["Keep", "Extern"]>, 2076 NormalizedValuesScope<"llvm::FunctionReturnThunksKind">, 2077 MarshallingInfoEnum<CodeGenOpts<"FunctionReturnThunks">, "Keep">; 2078def mindirect_branch_cs_prefix : Flag<["-"], "mindirect-branch-cs-prefix">, 2079 Group<m_Group>, Flags<[CoreOption, CC1Option]>, 2080 HelpText<"Add cs prefix to call and jmp to indirect thunk">, 2081 MarshallingInfoFlag<CodeGenOpts<"IndirectBranchCSPrefix">>; 2082 2083defm xray_instrument : BoolFOption<"xray-instrument", 2084 LangOpts<"XRayInstrument">, DefaultFalse, 2085 PosFlag<SetTrue, [CC1Option], "Generate XRay instrumentation sleds on function entry and exit">, 2086 NegFlag<SetFalse>>; 2087 2088def fxray_instruction_threshold_EQ : 2089 Joined<["-"], "fxray-instruction-threshold=">, 2090 Group<f_Group>, Flags<[CC1Option]>, 2091 HelpText<"Sets the minimum function size to instrument with XRay">, 2092 MarshallingInfoInt<CodeGenOpts<"XRayInstructionThreshold">, "200">; 2093 2094def fxray_always_instrument : 2095 Joined<["-"], "fxray-always-instrument=">, 2096 Group<f_Group>, Flags<[CC1Option]>, 2097 HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.">, 2098 MarshallingInfoStringVector<LangOpts<"XRayAlwaysInstrumentFiles">>; 2099def fxray_never_instrument : 2100 Joined<["-"], "fxray-never-instrument=">, 2101 Group<f_Group>, Flags<[CC1Option]>, 2102 HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.">, 2103 MarshallingInfoStringVector<LangOpts<"XRayNeverInstrumentFiles">>; 2104def fxray_attr_list : 2105 Joined<["-"], "fxray-attr-list=">, 2106 Group<f_Group>, Flags<[CC1Option]>, 2107 HelpText<"Filename defining the list of functions/types for imbuing XRay attributes.">, 2108 MarshallingInfoStringVector<LangOpts<"XRayAttrListFiles">>; 2109def fxray_modes : 2110 Joined<["-"], "fxray-modes=">, 2111 Group<f_Group>, Flags<[CC1Option]>, 2112 HelpText<"List of modes to link in by default into XRay instrumented binaries.">; 2113 2114defm xray_always_emit_customevents : BoolFOption<"xray-always-emit-customevents", 2115 LangOpts<"XRayAlwaysEmitCustomEvents">, DefaultFalse, 2116 PosFlag<SetTrue, [CC1Option], "Always emit __xray_customevent(...) calls" 2117 " even if the containing function is not always instrumented">, 2118 NegFlag<SetFalse>>; 2119 2120defm xray_always_emit_typedevents : BoolFOption<"xray-always-emit-typedevents", 2121 LangOpts<"XRayAlwaysEmitTypedEvents">, DefaultFalse, 2122 PosFlag<SetTrue, [CC1Option], "Always emit __xray_typedevent(...) calls" 2123 " even if the containing function is not always instrumented">, 2124 NegFlag<SetFalse>>; 2125 2126defm xray_ignore_loops : BoolFOption<"xray-ignore-loops", 2127 CodeGenOpts<"XRayIgnoreLoops">, DefaultFalse, 2128 PosFlag<SetTrue, [CC1Option], "Don't instrument functions with loops" 2129 " unless they also meet the minimum function size">, 2130 NegFlag<SetFalse>>; 2131 2132defm xray_function_index : BoolFOption<"xray-function-index", 2133 CodeGenOpts<"XRayOmitFunctionIndex">, DefaultTrue, 2134 NegFlag<SetFalse, [CC1Option], "Omit function index section at the" 2135 " expense of single-function patching performance">, 2136 PosFlag<SetTrue>>; 2137 2138def fxray_link_deps : Flag<["-"], "fxray-link-deps">, Group<f_Group>, 2139 Flags<[CC1Option]>, 2140 HelpText<"Tells clang to add the link dependencies for XRay.">; 2141def fnoxray_link_deps : Flag<["-"], "fnoxray-link-deps">, Group<f_Group>, 2142 Flags<[CC1Option]>; 2143 2144def fxray_instrumentation_bundle : 2145 Joined<["-"], "fxray-instrumentation-bundle=">, 2146 Group<f_Group>, Flags<[CC1Option]>, 2147 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'.">; 2148 2149def fxray_function_groups : 2150 Joined<["-"], "fxray-function-groups=">, 2151 Group<f_Group>, Flags<[CC1Option]>, 2152 HelpText<"Only instrument 1 of N groups">, 2153 MarshallingInfoInt<CodeGenOpts<"XRayTotalFunctionGroups">, "1">; 2154 2155def fxray_selected_function_group : 2156 Joined<["-"], "fxray-selected-function-group=">, 2157 Group<f_Group>, Flags<[CC1Option]>, 2158 HelpText<"When using -fxray-function-groups, select which group of functions to instrument. Valid range is 0 to fxray-function-groups - 1">, 2159 MarshallingInfoInt<CodeGenOpts<"XRaySelectedFunctionGroup">, "0">; 2160 2161 2162defm fine_grained_bitfield_accesses : BoolOption<"f", "fine-grained-bitfield-accesses", 2163 CodeGenOpts<"FineGrainedBitfieldAccesses">, DefaultFalse, 2164 PosFlag<SetTrue, [], "Use separate accesses for consecutive bitfield runs with legal widths and alignments.">, 2165 NegFlag<SetFalse, [], "Use large-integer access for consecutive bitfield runs.">, 2166 BothFlags<[CC1Option]>>, 2167 Group<f_clang_Group>; 2168 2169def fexperimental_relative_cxx_abi_vtables : 2170 Flag<["-"], "fexperimental-relative-c++-abi-vtables">, 2171 Group<f_clang_Group>, Flags<[CC1Option]>, 2172 HelpText<"Use the experimental C++ class ABI for classes with virtual tables">; 2173def fno_experimental_relative_cxx_abi_vtables : 2174 Flag<["-"], "fno-experimental-relative-c++-abi-vtables">, 2175 Group<f_clang_Group>, Flags<[CC1Option]>, 2176 HelpText<"Do not use the experimental C++ class ABI for classes with virtual tables">; 2177 2178def fcxx_abi_EQ : Joined<["-"], "fc++-abi=">, 2179 Group<f_clang_Group>, Flags<[CC1Option]>, 2180 HelpText<"C++ ABI to use. This will override the target C++ ABI.">; 2181 2182def flat__namespace : Flag<["-"], "flat_namespace">; 2183def flax_vector_conversions_EQ : Joined<["-"], "flax-vector-conversions=">, Group<f_Group>, 2184 HelpText<"Enable implicit vector bit-casts">, Values<"none,integer,all">, Flags<[CC1Option]>, 2185 NormalizedValues<["LangOptions::LaxVectorConversionKind::None", 2186 "LangOptions::LaxVectorConversionKind::Integer", 2187 "LangOptions::LaxVectorConversionKind::All"]>, 2188 MarshallingInfoEnum<LangOpts<"LaxVectorConversions">, 2189 open_cl.KeyPath # 2190 " ? LangOptions::LaxVectorConversionKind::None" # 2191 " : LangOptions::LaxVectorConversionKind::All">; 2192def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group<f_Group>, 2193 Alias<flax_vector_conversions_EQ>, AliasArgs<["integer"]>; 2194def flimited_precision_EQ : Joined<["-"], "flimited-precision=">, Group<f_Group>; 2195def fapple_link_rtlib : Flag<["-"], "fapple-link-rtlib">, Group<f_Group>, 2196 HelpText<"Force linking the clang builtins runtime library">; 2197def flto_EQ : Joined<["-"], "flto=">, Flags<[CoreOption, CC1Option]>, Group<f_Group>, 2198 HelpText<"Set LTO mode">, Values<"thin,full">; 2199def flto_EQ_jobserver : Flag<["-"], "flto=jobserver">, Group<f_Group>, 2200 Alias<flto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode">; 2201def flto_EQ_auto : Flag<["-"], "flto=auto">, Group<f_Group>, 2202 Alias<flto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode">; 2203def flto : Flag<["-"], "flto">, Flags<[CoreOption, CC1Option]>, Group<f_Group>, 2204 Alias<flto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode">; 2205def fno_lto : Flag<["-"], "fno-lto">, Flags<[CoreOption, CC1Option]>, Group<f_Group>, 2206 HelpText<"Disable LTO mode (default)">; 2207def foffload_lto_EQ : Joined<["-"], "foffload-lto=">, Flags<[CoreOption]>, Group<f_Group>, 2208 HelpText<"Set LTO mode for offload compilation">, Values<"thin,full">; 2209def foffload_lto : Flag<["-"], "foffload-lto">, Flags<[CoreOption]>, Group<f_Group>, 2210 Alias<foffload_lto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode for offload compilation">; 2211def fno_offload_lto : Flag<["-"], "fno-offload-lto">, Flags<[CoreOption]>, Group<f_Group>, 2212 HelpText<"Disable LTO mode (default) for offload compilation">; 2213def flto_jobs_EQ : Joined<["-"], "flto-jobs=">, 2214 Flags<[CC1Option]>, Group<f_Group>, 2215 HelpText<"Controls the backend parallelism of -flto=thin (default " 2216 "of 0 means the number of threads will be derived from " 2217 "the number of CPUs detected)">; 2218def fthinlto_index_EQ : Joined<["-"], "fthinlto-index=">, 2219 Flags<[CoreOption, CC1Option]>, Group<f_Group>, 2220 HelpText<"Perform ThinLTO importing using provided function summary index">; 2221def fthin_link_bitcode_EQ : Joined<["-"], "fthin-link-bitcode=">, 2222 Flags<[CoreOption, CC1Option]>, Group<f_Group>, 2223 HelpText<"Write minimized bitcode to <file> for the ThinLTO thin link only">, 2224 MarshallingInfoString<CodeGenOpts<"ThinLinkBitcodeFile">>; 2225def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">, 2226 Group<f_Group>, Flags<[NoXarchOption, CoreOption]>; 2227defm merge_all_constants : BoolFOption<"merge-all-constants", 2228 CodeGenOpts<"MergeAllConstants">, DefaultFalse, 2229 PosFlag<SetTrue, [CC1Option, CoreOption], "Allow">, NegFlag<SetFalse, [], "Disallow">, 2230 BothFlags<[], " merging of constants">>; 2231def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group<f_Group>, Flags<[CC1Option]>, 2232 HelpText<"Format message diagnostics so that they fit within N columns">, 2233 MarshallingInfoInt<DiagnosticOpts<"MessageLength">>; 2234def frandomize_layout_seed_EQ : Joined<["-"], "frandomize-layout-seed=">, 2235 MetaVarName<"<seed>">, Group<f_clang_Group>, Flags<[CC1Option]>, 2236 HelpText<"The seed used by the randomize structure layout feature">; 2237def frandomize_layout_seed_file_EQ : Joined<["-"], "frandomize-layout-seed-file=">, 2238 MetaVarName<"<file>">, Group<f_clang_Group>, Flags<[CC1Option]>, 2239 HelpText<"File holding the seed used by the randomize structure layout feature">; 2240def fms_compatibility : Flag<["-"], "fms-compatibility">, Group<f_Group>, Flags<[CC1Option, CoreOption]>, 2241 HelpText<"Enable full Microsoft Visual C++ compatibility">, 2242 MarshallingInfoFlag<LangOpts<"MSVCCompat">>; 2243def fms_extensions : Flag<["-"], "fms-extensions">, Group<f_Group>, Flags<[CC1Option, CoreOption]>, 2244 HelpText<"Accept some non-standard constructs supported by the Microsoft compiler">, 2245 MarshallingInfoFlag<LangOpts<"MicrosoftExt">>, ImpliedByAnyOf<[fms_compatibility.KeyPath]>; 2246defm asm_blocks : BoolFOption<"asm-blocks", 2247 LangOpts<"AsmBlocks">, Default<fms_extensions.KeyPath>, 2248 PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>; 2249def fms_volatile : Flag<["-"], "fms-volatile">, Group<f_Group>, Flags<[CC1Option]>, 2250 MarshallingInfoFlag<LangOpts<"MSVolatile">>; 2251def fmsc_version : Joined<["-"], "fmsc-version=">, Group<f_Group>, Flags<[NoXarchOption, CoreOption]>, 2252 HelpText<"Microsoft compiler version number to report in _MSC_VER (0 = don't define it (default))">; 2253def fms_compatibility_version 2254 : Joined<["-"], "fms-compatibility-version=">, 2255 Group<f_Group>, 2256 Flags<[ CC1Option, CoreOption ]>, 2257 HelpText<"Dot-separated value representing the Microsoft compiler " 2258 "version number to report in _MSC_VER (0 = don't define it " 2259 "(default))">; 2260def fms_runtime_lib_EQ : Joined<["-"], "fms-runtime-lib=">, Group<f_Group>, 2261 Flags<[NoXarchOption, CoreOption]>, Values<"static,static_dbg,dll,dll_dbg">, 2262 HelpText<"Select Windows run-time library">, 2263 DocBrief<[{ 2264Specify Visual Studio C runtime library. "static" and "static_dbg" correspond 2265to the cl flags /MT and /MTd which use the multithread, static version. "dll" 2266and "dll_dbg" correspond to the cl flags /MD and /MDd which use the multithread, 2267dll version.}]>; 2268def fms_omit_default_lib : Joined<["-"], "fms-omit-default-lib">, 2269 Group<f_Group>, Flags<[NoXarchOption, CoreOption]>; 2270defm delayed_template_parsing : BoolFOption<"delayed-template-parsing", 2271 LangOpts<"DelayedTemplateParsing">, DefaultFalse, 2272 PosFlag<SetTrue, [CC1Option], "Parse templated function definitions at the end of the translation unit">, 2273 NegFlag<SetFalse, [NoXarchOption], "Disable delayed template parsing">, 2274 BothFlags<[CoreOption]>>; 2275def fms_memptr_rep_EQ : Joined<["-"], "fms-memptr-rep=">, Group<f_Group>, Flags<[CC1Option]>, 2276 Values<"single,multiple,virtual">, NormalizedValuesScope<"LangOptions">, 2277 NormalizedValues<["PPTMK_FullGeneralitySingleInheritance", "PPTMK_FullGeneralityMultipleInheritance", 2278 "PPTMK_FullGeneralityVirtualInheritance"]>, 2279 MarshallingInfoEnum<LangOpts<"MSPointerToMemberRepresentationMethod">, "PPTMK_BestCase">; 2280def fms_kernel : Flag<["-"], "fms-kernel">, Group<f_Group>, Flags<[CC1Option, NoDriverOption]>, 2281 MarshallingInfoFlag<LangOpts<"Kernel">>; 2282// __declspec is enabled by default for the PS4 by the driver, and also 2283// enabled for Microsoft Extensions or Borland Extensions, here. 2284// 2285// FIXME: __declspec is also currently enabled for CUDA, but isn't really a 2286// CUDA extension. However, it is required for supporting 2287// __clang_cuda_builtin_vars.h, which uses __declspec(property). Once that has 2288// been rewritten in terms of something more generic, remove the Opts.CUDA 2289// term here. 2290defm declspec : BoolOption<"f", "declspec", 2291 LangOpts<"DeclSpecKeyword">, DefaultFalse, 2292 PosFlag<SetTrue, [], "Allow", [fms_extensions.KeyPath, fborland_extensions.KeyPath, cuda.KeyPath]>, 2293 NegFlag<SetFalse, [], "Disallow">, 2294 BothFlags<[CC1Option], " __declspec as a keyword">>, Group<f_clang_Group>; 2295def fmodules_cache_path : Joined<["-"], "fmodules-cache-path=">, Group<i_Group>, 2296 Flags<[NoXarchOption, CC1Option]>, MetaVarName<"<directory>">, 2297 HelpText<"Specify the module cache path">; 2298def fmodules_user_build_path : Separate<["-"], "fmodules-user-build-path">, Group<i_Group>, 2299 Flags<[NoXarchOption, CC1Option]>, MetaVarName<"<directory>">, 2300 HelpText<"Specify the module user build path">, 2301 MarshallingInfoString<HeaderSearchOpts<"ModuleUserBuildPath">>; 2302def fprebuilt_module_path : Joined<["-"], "fprebuilt-module-path=">, Group<i_Group>, 2303 Flags<[NoXarchOption, CC1Option]>, MetaVarName<"<directory>">, 2304 HelpText<"Specify the prebuilt module path">; 2305defm prebuilt_implicit_modules : BoolFOption<"prebuilt-implicit-modules", 2306 HeaderSearchOpts<"EnablePrebuiltImplicitModules">, DefaultFalse, 2307 PosFlag<SetTrue, [], "Look up implicit modules in the prebuilt module path">, 2308 NegFlag<SetFalse>, BothFlags<[NoXarchOption, CC1Option]>>; 2309 2310def fmodule_output_EQ : Joined<["-"], "fmodule-output=">, Flags<[NoXarchOption, CC1Option]>, 2311 HelpText<"Save intermediate module file results when compiling a standard C++ module unit.">; 2312def fmodule_output : Flag<["-"], "fmodule-output">, Flags<[NoXarchOption, CC1Option]>, 2313 HelpText<"Save intermediate module file results when compiling a standard C++ module unit.">; 2314 2315def fmodules_prune_interval : Joined<["-"], "fmodules-prune-interval=">, Group<i_Group>, 2316 Flags<[CC1Option]>, MetaVarName<"<seconds>">, 2317 HelpText<"Specify the interval (in seconds) between attempts to prune the module cache">, 2318 MarshallingInfoInt<HeaderSearchOpts<"ModuleCachePruneInterval">, "7 * 24 * 60 * 60">; 2319def fmodules_prune_after : Joined<["-"], "fmodules-prune-after=">, Group<i_Group>, 2320 Flags<[CC1Option]>, MetaVarName<"<seconds>">, 2321 HelpText<"Specify the interval (in seconds) after which a module file will be considered unused">, 2322 MarshallingInfoInt<HeaderSearchOpts<"ModuleCachePruneAfter">, "31 * 24 * 60 * 60">; 2323def fbuild_session_timestamp : Joined<["-"], "fbuild-session-timestamp=">, 2324 Group<i_Group>, Flags<[CC1Option]>, MetaVarName<"<time since Epoch in seconds>">, 2325 HelpText<"Time when the current build session started">, 2326 MarshallingInfoInt<HeaderSearchOpts<"BuildSessionTimestamp">, "0", "uint64_t">; 2327def fbuild_session_file : Joined<["-"], "fbuild-session-file=">, 2328 Group<i_Group>, MetaVarName<"<file>">, 2329 HelpText<"Use the last modification time of <file> as the build session timestamp">; 2330def fmodules_validate_once_per_build_session : Flag<["-"], "fmodules-validate-once-per-build-session">, 2331 Group<i_Group>, Flags<[CC1Option]>, 2332 HelpText<"Don't verify input files for the modules if the module has been " 2333 "successfully validated or loaded during this build session">, 2334 MarshallingInfoFlag<HeaderSearchOpts<"ModulesValidateOncePerBuildSession">>; 2335def fmodules_disable_diagnostic_validation : Flag<["-"], "fmodules-disable-diagnostic-validation">, 2336 Group<i_Group>, Flags<[CC1Option]>, 2337 HelpText<"Disable validation of the diagnostic options when loading the module">, 2338 MarshallingInfoNegativeFlag<HeaderSearchOpts<"ModulesValidateDiagnosticOptions">>; 2339defm modules_validate_system_headers : BoolOption<"f", "modules-validate-system-headers", 2340 HeaderSearchOpts<"ModulesValidateSystemHeaders">, DefaultFalse, 2341 PosFlag<SetTrue, [CC1Option], "Validate the system headers that a module depends on when loading the module">, 2342 NegFlag<SetFalse, [NoXarchOption]>>, Group<i_Group>; 2343def fno_modules_validate_textual_header_includes : 2344 Flag<["-"], "fno-modules-validate-textual-header-includes">, 2345 Group<f_Group>, Flags<[CC1Option, NoXarchOption]>, 2346 MarshallingInfoNegativeFlag<LangOpts<"ModulesValidateTextualHeaderIncludes">>, 2347 HelpText<"Do not enforce -fmodules-decluse and private header restrictions for textual headers. " 2348 "This flag will be removed in a future Clang release.">; 2349 2350def fincremental_extensions : 2351 Flag<["-"], "fincremental-extensions">, 2352 Group<f_Group>, Flags<[CC1Option]>, 2353 HelpText<"Enable incremental processing extensions such as processing" 2354 "statements on the global scope.">, 2355 MarshallingInfoFlag<LangOpts<"IncrementalExtensions">>; 2356 2357def fvalidate_ast_input_files_content: 2358 Flag <["-"], "fvalidate-ast-input-files-content">, 2359 Group<f_Group>, Flags<[CC1Option]>, 2360 HelpText<"Compute and store the hash of input files used to build an AST." 2361 " Files with mismatching mtime's are considered valid" 2362 " if both contents is identical">, 2363 MarshallingInfoFlag<HeaderSearchOpts<"ValidateASTInputFilesContent">>; 2364def fmodules_validate_input_files_content: 2365 Flag <["-"], "fmodules-validate-input-files-content">, 2366 Group<f_Group>, Flags<[NoXarchOption]>, 2367 HelpText<"Validate PCM input files based on content if mtime differs">; 2368def fno_modules_validate_input_files_content: 2369 Flag <["-"], "fno_modules-validate-input-files-content">, 2370 Group<f_Group>, Flags<[NoXarchOption]>; 2371def fpch_validate_input_files_content: 2372 Flag <["-"], "fpch-validate-input-files-content">, 2373 Group<f_Group>, Flags<[NoXarchOption]>, 2374 HelpText<"Validate PCH input files based on content if mtime differs">; 2375def fno_pch_validate_input_files_content: 2376 Flag <["-"], "fno_pch-validate-input-files-content">, 2377 Group<f_Group>, Flags<[NoXarchOption]>; 2378defm pch_instantiate_templates : BoolFOption<"pch-instantiate-templates", 2379 LangOpts<"PCHInstantiateTemplates">, DefaultFalse, 2380 PosFlag<SetTrue, [], "Instantiate templates already while building a PCH">, 2381 NegFlag<SetFalse>, BothFlags<[CC1Option, CoreOption]>>; 2382defm pch_codegen: OptInCC1FFlag<"pch-codegen", "Generate ", "Do not generate ", 2383 "code for uses of this PCH that assumes an explicit object file will be built for the PCH">; 2384defm pch_debuginfo: OptInCC1FFlag<"pch-debuginfo", "Generate ", "Do not generate ", 2385 "debug info for types in an object file built from this PCH and do not generate them elsewhere">; 2386 2387def fimplicit_module_maps : Flag <["-"], "fimplicit-module-maps">, Group<f_Group>, 2388 Flags<[NoXarchOption, CC1Option, CoreOption]>, 2389 HelpText<"Implicitly search the file system for module map files.">, 2390 MarshallingInfoFlag<HeaderSearchOpts<"ImplicitModuleMaps">>; 2391def fmodules_ts : Flag <["-"], "fmodules-ts">, Group<f_Group>, 2392 Flags<[CC1Option]>, HelpText<"Enable support for the C++ Modules TS">, 2393 MarshallingInfoFlag<LangOpts<"ModulesTS">>; 2394defm modules : BoolFOption<"modules", 2395 LangOpts<"Modules">, Default<!strconcat(fmodules_ts.KeyPath, "||", fcxx_modules.KeyPath)>, 2396 PosFlag<SetTrue, [CC1Option], "Enable the 'modules' language feature">, 2397 NegFlag<SetFalse>, BothFlags<[NoXarchOption, CoreOption]>>; 2398def fmodule_maps : Flag <["-"], "fmodule-maps">, Flags<[CoreOption]>, Alias<fimplicit_module_maps>; 2399def fmodule_name_EQ : Joined<["-"], "fmodule-name=">, Group<f_Group>, 2400 Flags<[NoXarchOption,CC1Option,CoreOption]>, MetaVarName<"<name>">, 2401 HelpText<"Specify the name of the module to build">, 2402 MarshallingInfoString<LangOpts<"ModuleName">>; 2403def fmodule_implementation_of : Separate<["-"], "fmodule-implementation-of">, 2404 Flags<[CC1Option,CoreOption]>, Alias<fmodule_name_EQ>; 2405def fsystem_module : Flag<["-"], "fsystem-module">, Flags<[CC1Option,CoreOption]>, 2406 HelpText<"Build this module as a system module. Only used with -emit-module">, 2407 MarshallingInfoFlag<FrontendOpts<"IsSystemModule">>; 2408def fmodule_map_file : Joined<["-"], "fmodule-map-file=">, 2409 Group<f_Group>, Flags<[NoXarchOption,CC1Option,CoreOption]>, MetaVarName<"<file>">, 2410 HelpText<"Load this module map file">, 2411 MarshallingInfoStringVector<FrontendOpts<"ModuleMapFiles">>; 2412def fmodule_file : Joined<["-"], "fmodule-file=">, 2413 Group<i_Group>, Flags<[NoXarchOption,CC1Option,CoreOption]>, MetaVarName<"[<name>=]<file>">, 2414 HelpText<"Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.">; 2415def fmodules_ignore_macro : Joined<["-"], "fmodules-ignore-macro=">, Group<f_Group>, 2416 Flags<[CC1Option,CoreOption]>, 2417 HelpText<"Ignore the definition of the given macro when building and loading modules">; 2418def fmodules_strict_decluse : Flag <["-"], "fmodules-strict-decluse">, Group<f_Group>, 2419 Flags<[NoXarchOption,CC1Option,CoreOption]>, 2420 HelpText<"Like -fmodules-decluse but requires all headers to be in modules">, 2421 MarshallingInfoFlag<LangOpts<"ModulesStrictDeclUse">>; 2422defm modules_decluse : BoolFOption<"modules-decluse", 2423 LangOpts<"ModulesDeclUse">, Default<fmodules_strict_decluse.KeyPath>, 2424 PosFlag<SetTrue, [CC1Option], "Require declaration of modules used within a module">, 2425 NegFlag<SetFalse>, BothFlags<[NoXarchOption,CoreOption]>>; 2426defm modules_search_all : BoolFOption<"modules-search-all", 2427 LangOpts<"ModulesSearchAll">, DefaultFalse, 2428 PosFlag<SetTrue, [], "Search even non-imported modules to resolve references">, 2429 NegFlag<SetFalse>, BothFlags<[NoXarchOption, CC1Option,CoreOption]>>, 2430 ShouldParseIf<fmodules.KeyPath>; 2431defm implicit_modules : BoolFOption<"implicit-modules", 2432 LangOpts<"ImplicitModules">, DefaultTrue, 2433 NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>, BothFlags<[NoXarchOption,CoreOption]>>; 2434def fretain_comments_from_system_headers : Flag<["-"], "fretain-comments-from-system-headers">, Group<f_Group>, Flags<[CC1Option]>, 2435 MarshallingInfoFlag<LangOpts<"RetainCommentsFromSystemHeaders">>; 2436def fmodule_header : Flag <["-"], "fmodule-header">, Group<f_Group>, 2437 Flags<[NoXarchOption]>, HelpText<"Build a C++20 Header Unit from a header.">; 2438def fmodule_header_EQ : Joined<["-"], "fmodule-header=">, Group<f_Group>, 2439 Flags<[NoXarchOption]>, MetaVarName<"<kind>">, 2440 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.">; 2441 2442def fno_knr_functions : Flag<["-"], "fno-knr-functions">, Group<f_Group>, 2443 MarshallingInfoFlag<LangOpts<"DisableKNRFunctions">>, 2444 HelpText<"Disable support for K&R C function declarations">, 2445 Flags<[CC1Option, CoreOption]>; 2446 2447def fmudflapth : Flag<["-"], "fmudflapth">, Group<f_Group>; 2448def fmudflap : Flag<["-"], "fmudflap">, Group<f_Group>; 2449def fnested_functions : Flag<["-"], "fnested-functions">, Group<f_Group>; 2450def fnext_runtime : Flag<["-"], "fnext-runtime">, Group<f_Group>; 2451def fno_asm : Flag<["-"], "fno-asm">, Group<f_Group>; 2452def fno_asynchronous_unwind_tables : Flag<["-"], "fno-asynchronous-unwind-tables">, Group<f_Group>; 2453def fno_assume_sane_operator_new : Flag<["-"], "fno-assume-sane-operator-new">, Group<f_Group>, 2454 HelpText<"Don't assume that C++'s global operator new can't alias any pointer">, 2455 Flags<[CC1Option]>, MarshallingInfoNegativeFlag<CodeGenOpts<"AssumeSaneOperatorNew">>; 2456def fno_builtin : Flag<["-"], "fno-builtin">, Group<f_Group>, Flags<[CC1Option, CoreOption]>, 2457 HelpText<"Disable implicit builtin knowledge of functions">; 2458def fno_builtin_ : Joined<["-"], "fno-builtin-">, Group<f_Group>, Flags<[CC1Option, CoreOption]>, 2459 HelpText<"Disable implicit builtin knowledge of a specific function">; 2460def fno_common : Flag<["-"], "fno-common">, Group<f_Group>, Flags<[CC1Option]>, 2461 HelpText<"Compile common globals like normal definitions">; 2462defm digraphs : BoolFOption<"digraphs", 2463 LangOpts<"Digraphs">, Default<std#".hasDigraphs()">, 2464 PosFlag<SetTrue, [], "Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default)">, 2465 NegFlag<SetFalse, [], "Disallow alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:'">, 2466 BothFlags<[CC1Option]>>; 2467def fno_eliminate_unused_debug_symbols : Flag<["-"], "fno-eliminate-unused-debug-symbols">, Group<f_Group>; 2468def fno_inline_functions : Flag<["-"], "fno-inline-functions">, Group<f_clang_Group>, Flags<[CC1Option]>; 2469def fno_inline : Flag<["-"], "fno-inline">, Group<f_clang_Group>, Flags<[CC1Option]>; 2470def fno_global_isel : Flag<["-"], "fno-global-isel">, Group<f_clang_Group>, 2471 HelpText<"Disables the global instruction selector">; 2472def fno_experimental_isel : Flag<["-"], "fno-experimental-isel">, Group<f_clang_Group>, 2473 Alias<fno_global_isel>; 2474def fveclib : Joined<["-"], "fveclib=">, Group<f_Group>, Flags<[CC1Option]>, 2475 HelpText<"Use the given vector functions library">, 2476 Values<"Accelerate,libmvec,MASSV,SVML,SLEEF,Darwin_libsystem_m,none">, 2477 NormalizedValuesScope<"CodeGenOptions">, 2478 NormalizedValues<["Accelerate", "LIBMVEC", "MASSV", "SVML", "SLEEF", 2479 "Darwin_libsystem_m", "NoLibrary"]>, 2480 MarshallingInfoEnum<CodeGenOpts<"VecLib">, "NoLibrary">; 2481def fno_lax_vector_conversions : Flag<["-"], "fno-lax-vector-conversions">, Group<f_Group>, 2482 Alias<flax_vector_conversions_EQ>, AliasArgs<["none"]>; 2483def fno_implicit_module_maps : Flag <["-"], "fno-implicit-module-maps">, Group<f_Group>, 2484 Flags<[NoXarchOption]>; 2485def fno_module_maps : Flag <["-"], "fno-module-maps">, Alias<fno_implicit_module_maps>; 2486def fno_modules_strict_decluse : Flag <["-"], "fno-strict-modules-decluse">, Group<f_Group>, 2487 Flags<[NoXarchOption]>; 2488def fmodule_file_deps : Flag <["-"], "fmodule-file-deps">, Group<f_Group>, 2489 Flags<[NoXarchOption]>; 2490def fno_module_file_deps : Flag <["-"], "fno-module-file-deps">, Group<f_Group>, 2491 Flags<[NoXarchOption]>; 2492def fno_ms_extensions : Flag<["-"], "fno-ms-extensions">, Group<f_Group>, 2493 Flags<[CoreOption]>; 2494def fno_ms_compatibility : Flag<["-"], "fno-ms-compatibility">, Group<f_Group>, 2495 Flags<[CoreOption]>; 2496def fno_objc_legacy_dispatch : Flag<["-"], "fno-objc-legacy-dispatch">, Group<f_Group>; 2497def fno_objc_weak : Flag<["-"], "fno-objc-weak">, Group<f_Group>, Flags<[CC1Option]>; 2498def fno_omit_frame_pointer : Flag<["-"], "fno-omit-frame-pointer">, Group<f_Group>; 2499defm operator_names : BoolFOption<"operator-names", 2500 LangOpts<"CXXOperatorNames">, Default<cplusplus.KeyPath>, 2501 NegFlag<SetFalse, [CC1Option], "Do not treat C++ operator name keywords as synonyms for operators">, 2502 PosFlag<SetTrue>>; 2503def fdiagnostics_absolute_paths : Flag<["-"], "fdiagnostics-absolute-paths">, Group<f_Group>, 2504 Flags<[CC1Option, CoreOption]>, HelpText<"Print absolute paths in diagnostics">, 2505 MarshallingInfoFlag<DiagnosticOpts<"AbsolutePath">>; 2506def fno_stack_protector : Flag<["-"], "fno-stack-protector">, Group<f_Group>, 2507 HelpText<"Disable the use of stack protectors">; 2508def fno_strict_aliasing : Flag<["-"], "fno-strict-aliasing">, Group<f_Group>, 2509 Flags<[NoXarchOption, CoreOption]>; 2510def fstruct_path_tbaa : Flag<["-"], "fstruct-path-tbaa">, Group<f_Group>; 2511def fno_struct_path_tbaa : Flag<["-"], "fno-struct-path-tbaa">, Group<f_Group>; 2512def fno_strict_enums : Flag<["-"], "fno-strict-enums">, Group<f_Group>; 2513def fno_strict_overflow : Flag<["-"], "fno-strict-overflow">, Group<f_Group>; 2514def fno_temp_file : Flag<["-"], "fno-temp-file">, Group<f_Group>, 2515 Flags<[CC1Option, CoreOption]>, HelpText< 2516 "Directly create compilation output files. This may lead to incorrect incremental builds if the compiler crashes">, 2517 MarshallingInfoNegativeFlag<FrontendOpts<"UseTemporary">>; 2518defm use_cxa_atexit : BoolFOption<"use-cxa-atexit", 2519 CodeGenOpts<"CXAAtExit">, DefaultTrue, 2520 NegFlag<SetFalse, [CC1Option], "Don't use __cxa_atexit for calling destructors">, 2521 PosFlag<SetTrue>>; 2522def fno_unwind_tables : Flag<["-"], "fno-unwind-tables">, Group<f_Group>; 2523def fno_verbose_asm : Flag<["-"], "fno-verbose-asm">, Group<f_Group>, Flags<[CC1Option]>, 2524 MarshallingInfoNegativeFlag<CodeGenOpts<"AsmVerbose">>; 2525def fno_working_directory : Flag<["-"], "fno-working-directory">, Group<f_Group>; 2526def fno_wrapv : Flag<["-"], "fno-wrapv">, Group<f_Group>; 2527def fobjc_arc : Flag<["-"], "fobjc-arc">, Group<f_Group>, Flags<[CC1Option]>, 2528 HelpText<"Synthesize retain and release calls for Objective-C pointers">; 2529def fno_objc_arc : Flag<["-"], "fno-objc-arc">, Group<f_Group>; 2530defm objc_encode_cxx_class_template_spec : BoolFOption<"objc-encode-cxx-class-template-spec", 2531 LangOpts<"EncodeCXXClassTemplateSpec">, DefaultFalse, 2532 PosFlag<SetTrue, [CC1Option], "Fully encode c++ class template specialization">, 2533 NegFlag<SetFalse>>; 2534defm objc_convert_messages_to_runtime_calls : BoolFOption<"objc-convert-messages-to-runtime-calls", 2535 CodeGenOpts<"ObjCConvertMessagesToRuntimeCalls">, DefaultTrue, 2536 NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>>; 2537defm objc_arc_exceptions : BoolFOption<"objc-arc-exceptions", 2538 CodeGenOpts<"ObjCAutoRefCountExceptions">, DefaultFalse, 2539 PosFlag<SetTrue, [CC1Option], "Use EH-safe code when synthesizing retains and releases in -fobjc-arc">, 2540 NegFlag<SetFalse>>; 2541def fobjc_atdefs : Flag<["-"], "fobjc-atdefs">, Group<clang_ignored_f_Group>; 2542def fobjc_call_cxx_cdtors : Flag<["-"], "fobjc-call-cxx-cdtors">, Group<clang_ignored_f_Group>; 2543defm objc_exceptions : BoolFOption<"objc-exceptions", 2544 LangOpts<"ObjCExceptions">, DefaultFalse, 2545 PosFlag<SetTrue, [CC1Option], "Enable Objective-C exceptions">, NegFlag<SetFalse>>; 2546defm application_extension : BoolFOption<"application-extension", 2547 LangOpts<"AppExt">, DefaultFalse, 2548 PosFlag<SetTrue, [CC1Option], "Restrict code to those available for App Extensions">, 2549 NegFlag<SetFalse>>; 2550defm relaxed_template_template_args : BoolFOption<"relaxed-template-template-args", 2551 LangOpts<"RelaxedTemplateTemplateArgs">, DefaultFalse, 2552 PosFlag<SetTrue, [CC1Option], "Enable C++17 relaxed template template argument matching">, 2553 NegFlag<SetFalse>>; 2554defm sized_deallocation : BoolFOption<"sized-deallocation", 2555 LangOpts<"SizedDeallocation">, DefaultFalse, 2556 PosFlag<SetTrue, [CC1Option], "Enable C++14 sized global deallocation functions">, 2557 NegFlag<SetFalse>>; 2558defm aligned_allocation : BoolFOption<"aligned-allocation", 2559 LangOpts<"AlignedAllocation">, Default<cpp17.KeyPath>, 2560 PosFlag<SetTrue, [], "Enable C++17 aligned allocation functions">, 2561 NegFlag<SetFalse>, BothFlags<[CC1Option]>>; 2562def fnew_alignment_EQ : Joined<["-"], "fnew-alignment=">, 2563 HelpText<"Specifies the largest alignment guaranteed by '::operator new(size_t)'">, 2564 MetaVarName<"<align>">, Group<f_Group>, Flags<[CC1Option]>, 2565 MarshallingInfoInt<LangOpts<"NewAlignOverride">>; 2566def : Separate<["-"], "fnew-alignment">, Alias<fnew_alignment_EQ>; 2567def : Flag<["-"], "faligned-new">, Alias<faligned_allocation>; 2568def : Flag<["-"], "fno-aligned-new">, Alias<fno_aligned_allocation>; 2569def faligned_new_EQ : Joined<["-"], "faligned-new=">; 2570 2571def fobjc_legacy_dispatch : Flag<["-"], "fobjc-legacy-dispatch">, Group<f_Group>; 2572def fobjc_new_property : Flag<["-"], "fobjc-new-property">, Group<clang_ignored_f_Group>; 2573defm objc_infer_related_result_type : BoolFOption<"objc-infer-related-result-type", 2574 LangOpts<"ObjCInferRelatedResultType">, DefaultTrue, 2575 NegFlag<SetFalse, [CC1Option], "do not infer Objective-C related result type based on method family">, 2576 PosFlag<SetTrue>>; 2577def fobjc_link_runtime: Flag<["-"], "fobjc-link-runtime">, Group<f_Group>; 2578def fobjc_weak : Flag<["-"], "fobjc-weak">, Group<f_Group>, Flags<[CC1Option]>, 2579 HelpText<"Enable ARC-style weak references in Objective-C">; 2580 2581// Objective-C ABI options. 2582def fobjc_runtime_EQ : Joined<["-"], "fobjc-runtime=">, Group<f_Group>, Flags<[CC1Option, CoreOption]>, 2583 HelpText<"Specify the target Objective-C runtime kind and version">; 2584def fobjc_abi_version_EQ : Joined<["-"], "fobjc-abi-version=">, Group<f_Group>; 2585def fobjc_nonfragile_abi_version_EQ : Joined<["-"], "fobjc-nonfragile-abi-version=">, Group<f_Group>; 2586def fobjc_nonfragile_abi : Flag<["-"], "fobjc-nonfragile-abi">, Group<f_Group>; 2587def fno_objc_nonfragile_abi : Flag<["-"], "fno-objc-nonfragile-abi">, Group<f_Group>; 2588 2589def fobjc_sender_dependent_dispatch : Flag<["-"], "fobjc-sender-dependent-dispatch">, Group<f_Group>; 2590def fobjc_disable_direct_methods_for_testing : 2591 Flag<["-"], "fobjc-disable-direct-methods-for-testing">, 2592 Group<f_Group>, Flags<[CC1Option]>, 2593 HelpText<"Ignore attribute objc_direct so that direct methods can be tested">, 2594 MarshallingInfoFlag<LangOpts<"ObjCDisableDirectMethodsForTesting">>; 2595defm objc_avoid_heapify_local_blocks : BoolFOption<"objc-avoid-heapify-local-blocks", 2596 CodeGenOpts<"ObjCAvoidHeapifyLocalBlocks">, DefaultFalse, 2597 PosFlag<SetTrue, [], "Try">, 2598 NegFlag<SetFalse, [], "Don't try">, 2599 BothFlags<[CC1Option, NoDriverOption], " to avoid heapifying local blocks">>; 2600 2601def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group<f_Group>; 2602def fopenmp : Flag<["-"], "fopenmp">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, FlangOption, FC1Option]>, 2603 HelpText<"Parse OpenMP pragmas and generate parallel code.">; 2604def fno_openmp : Flag<["-"], "fno-openmp">, Group<f_Group>, Flags<[NoArgumentUnused]>; 2605def fopenmp_version_EQ : Joined<["-"], "fopenmp-version=">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>, 2606 HelpText<"Set OpenMP version (e.g. 45 for OpenMP 4.5, 50 for OpenMP 5.0). Default value is 50.">; 2607defm openmp_extensions: BoolFOption<"openmp-extensions", 2608 LangOpts<"OpenMPExtensions">, DefaultTrue, 2609 PosFlag<SetTrue, [CC1Option, NoArgumentUnused], 2610 "Enable all Clang extensions for OpenMP directives and clauses">, 2611 NegFlag<SetFalse, [CC1Option, NoArgumentUnused], 2612 "Disable all Clang extensions for OpenMP directives and clauses">>; 2613def fopenmp_EQ : Joined<["-"], "fopenmp=">, Group<f_Group>; 2614def fopenmp_use_tls : Flag<["-"], "fopenmp-use-tls">, Group<f_Group>, 2615 Flags<[NoArgumentUnused, HelpHidden]>; 2616def fnoopenmp_use_tls : Flag<["-"], "fnoopenmp-use-tls">, Group<f_Group>, 2617 Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2618def fopenmp_targets_EQ : CommaJoined<["-"], "fopenmp-targets=">, Flags<[NoXarchOption, CC1Option]>, 2619 HelpText<"Specify comma-separated list of triples OpenMP offloading targets to be supported">; 2620def fopenmp_relocatable_target : Flag<["-"], "fopenmp-relocatable-target">, 2621 Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2622def fnoopenmp_relocatable_target : Flag<["-"], "fnoopenmp-relocatable-target">, 2623 Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2624def fopenmp_simd : Flag<["-"], "fopenmp-simd">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>, 2625 HelpText<"Emit OpenMP code only for SIMD-based constructs.">; 2626def fopenmp_enable_irbuilder : Flag<["-"], "fopenmp-enable-irbuilder">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>, 2627 HelpText<"Use the experimental OpenMP-IR-Builder codegen path.">; 2628def fno_openmp_simd : Flag<["-"], "fno-openmp-simd">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>; 2629def fopenmp_cuda_mode : Flag<["-"], "fopenmp-cuda-mode">, Group<f_Group>, 2630 Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2631def fno_openmp_cuda_mode : Flag<["-"], "fno-openmp-cuda-mode">, Group<f_Group>, 2632 Flags<[NoArgumentUnused, HelpHidden]>; 2633def fopenmp_cuda_number_of_sm_EQ : Joined<["-"], "fopenmp-cuda-number-of-sm=">, Group<f_Group>, 2634 Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2635def fopenmp_cuda_blocks_per_sm_EQ : Joined<["-"], "fopenmp-cuda-blocks-per-sm=">, Group<f_Group>, 2636 Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2637def fopenmp_cuda_teams_reduction_recs_num_EQ : Joined<["-"], "fopenmp-cuda-teams-reduction-recs-num=">, Group<f_Group>, 2638 Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2639def fopenmp_target_debug : Flag<["-"], "fopenmp-target-debug">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>, 2640 HelpText<"Enable debugging in the OpenMP offloading device RTL">; 2641def fno_openmp_target_debug : Flag<["-"], "fno-openmp-target-debug">, Group<f_Group>, Flags<[NoArgumentUnused]>; 2642def fopenmp_target_debug_EQ : Joined<["-"], "fopenmp-target-debug=">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2643def fopenmp_assume_teams_oversubscription : Flag<["-"], "fopenmp-assume-teams-oversubscription">, 2644 Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2645def fopenmp_assume_threads_oversubscription : Flag<["-"], "fopenmp-assume-threads-oversubscription">, 2646 Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2647def fno_openmp_assume_teams_oversubscription : Flag<["-"], "fno-openmp-assume-teams-oversubscription">, 2648 Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2649def fno_openmp_assume_threads_oversubscription : Flag<["-"], "fno-openmp-assume-threads-oversubscription">, 2650 Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>; 2651def fopenmp_assume_no_thread_state : Flag<["-"], "fopenmp-assume-no-thread-state">, Group<f_Group>, 2652 Flags<[CC1Option, NoArgumentUnused, HelpHidden]>, 2653 HelpText<"Assert no thread in a parallel region modifies an ICV">, 2654 MarshallingInfoFlag<LangOpts<"OpenMPNoThreadState">>; 2655def fopenmp_assume_no_nested_parallelism : Flag<["-"], "fopenmp-assume-no-nested-parallelism">, Group<f_Group>, 2656 Flags<[CC1Option, NoArgumentUnused, HelpHidden]>, 2657 HelpText<"Assert no nested parallel regions in the GPU">, 2658 MarshallingInfoFlag<LangOpts<"OpenMPNoNestedParallelism">>; 2659def fopenmp_offload_mandatory : Flag<["-"], "fopenmp-offload-mandatory">, Group<f_Group>, 2660 Flags<[CC1Option, NoArgumentUnused]>, 2661 HelpText<"Do not create a host fallback if offloading to the device fails.">, 2662 MarshallingInfoFlag<LangOpts<"OpenMPOffloadMandatory">>; 2663def fopenmp_target_jit : Flag<["-"], "fopenmp-target-jit">, Group<f_Group>, 2664 Flags<[CoreOption, NoArgumentUnused]>, 2665 HelpText<"Emit code that can be JIT compiled for OpenMP offloading. Implies -foffload-lto=full">; 2666def fno_openmp_target_jit : Flag<["-"], "fno-openmp-target-jit">, Group<f_Group>, 2667 Flags<[CoreOption, NoArgumentUnused, HelpHidden]>; 2668def fopenmp_target_new_runtime : Flag<["-"], "fopenmp-target-new-runtime">, 2669 Group<f_Group>, Flags<[CC1Option, HelpHidden]>; 2670def fno_openmp_target_new_runtime : Flag<["-"], "fno-openmp-target-new-runtime">, 2671 Group<f_Group>, Flags<[CC1Option, HelpHidden]>; 2672defm openmp_optimistic_collapse : BoolFOption<"openmp-optimistic-collapse", 2673 LangOpts<"OpenMPOptimisticCollapse">, DefaultFalse, 2674 PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>, BothFlags<[NoArgumentUnused, HelpHidden]>>; 2675def static_openmp: Flag<["-"], "static-openmp">, 2676 HelpText<"Use the static host OpenMP runtime while linking.">; 2677def offload_new_driver : Flag<["--"], "offload-new-driver">, Flags<[CC1Option]>, Group<f_Group>, 2678 MarshallingInfoFlag<LangOpts<"OffloadingNewDriver">>, HelpText<"Use the new driver for offloading compilation.">; 2679def no_offload_new_driver : Flag<["--"], "no-offload-new-driver">, Flags<[CC1Option]>, Group<f_Group>, 2680 HelpText<"Don't Use the new driver for offloading compilation.">; 2681def offload_device_only : Flag<["--"], "offload-device-only">, 2682 HelpText<"Only compile for the offloading device.">; 2683def offload_host_only : Flag<["--"], "offload-host-only">, 2684 HelpText<"Only compile for the offloading host.">; 2685def offload_host_device : Flag<["--"], "offload-host-device">, 2686 HelpText<"Only compile for the offloading host.">; 2687def cuda_device_only : Flag<["--"], "cuda-device-only">, Alias<offload_device_only>, 2688 HelpText<"Compile CUDA code for device only">; 2689def cuda_host_only : Flag<["--"], "cuda-host-only">, Alias<offload_host_only>, 2690 HelpText<"Compile CUDA code for host only. Has no effect on non-CUDA compilations.">; 2691def cuda_compile_host_device : Flag<["--"], "cuda-compile-host-device">, Alias<offload_host_device>, 2692 HelpText<"Compile CUDA code for both host and device (default). Has no " 2693 "effect on non-CUDA compilations.">; 2694def fopenmp_new_driver : Flag<["-"], "fopenmp-new-driver">, Flags<[HelpHidden]>, 2695 HelpText<"Use the new driver for OpenMP offloading.">; 2696def fno_openmp_new_driver : Flag<["-"], "fno-openmp-new-driver">, Flags<[HelpHidden]>, 2697 HelpText<"Don't use the new driver for OpenMP offloading.">; 2698def fno_optimize_sibling_calls : Flag<["-"], "fno-optimize-sibling-calls">, Group<f_Group>, Flags<[CC1Option]>, 2699 HelpText<"Disable tail call optimization, keeping the call stack accurate">, 2700 MarshallingInfoFlag<CodeGenOpts<"DisableTailCalls">>; 2701def foptimize_sibling_calls : Flag<["-"], "foptimize-sibling-calls">, Group<f_Group>; 2702defm escaping_block_tail_calls : BoolFOption<"escaping-block-tail-calls", 2703 CodeGenOpts<"NoEscapingBlockTailCalls">, DefaultFalse, 2704 NegFlag<SetTrue, [CC1Option]>, PosFlag<SetFalse>>; 2705def force__cpusubtype__ALL : Flag<["-"], "force_cpusubtype_ALL">; 2706def force__flat__namespace : Flag<["-"], "force_flat_namespace">; 2707def force__load : Separate<["-"], "force_load">; 2708def force_addr : Joined<["-"], "fforce-addr">, Group<clang_ignored_f_Group>; 2709def foutput_class_dir_EQ : Joined<["-"], "foutput-class-dir=">, Group<f_Group>; 2710def fpack_struct : Flag<["-"], "fpack-struct">, Group<f_Group>; 2711def fno_pack_struct : Flag<["-"], "fno-pack-struct">, Group<f_Group>; 2712def fpack_struct_EQ : Joined<["-"], "fpack-struct=">, Group<f_Group>, Flags<[CC1Option]>, 2713 HelpText<"Specify the default maximum struct packing alignment">, 2714 MarshallingInfoInt<LangOpts<"PackStruct">>; 2715def fmax_type_align_EQ : Joined<["-"], "fmax-type-align=">, Group<f_Group>, Flags<[CC1Option]>, 2716 HelpText<"Specify the maximum alignment to enforce on pointers lacking an explicit alignment">, 2717 MarshallingInfoInt<LangOpts<"MaxTypeAlign">>; 2718def fno_max_type_align : Flag<["-"], "fno-max-type-align">, Group<f_Group>; 2719defm pascal_strings : BoolFOption<"pascal-strings", 2720 LangOpts<"PascalStrings">, DefaultFalse, 2721 PosFlag<SetTrue, [CC1Option], "Recognize and construct Pascal-style string literals">, 2722 NegFlag<SetFalse>>; 2723// Note: This flag has different semantics in the driver and in -cc1. The driver accepts -fpatchable-function-entry=M,N 2724// and forwards it to -cc1 as -fpatchable-function-entry=M and -fpatchable-function-entry-offset=N. In -cc1, both flags 2725// are treated as a single integer. 2726def fpatchable_function_entry_EQ : Joined<["-"], "fpatchable-function-entry=">, Group<f_Group>, Flags<[CC1Option]>, 2727 MetaVarName<"<N,M>">, HelpText<"Generate M NOPs before function entry and N-M NOPs after function entry">, 2728 MarshallingInfoInt<CodeGenOpts<"PatchableFunctionEntryCount">>; 2729def fms_hotpatch : Flag<["-"], "fms-hotpatch">, Group<f_Group>, Flags<[CC1Option, CoreOption]>, 2730 HelpText<"Ensure that all functions can be hotpatched at runtime">, 2731 MarshallingInfoFlag<CodeGenOpts<"HotPatch">>; 2732def fpcc_struct_return : Flag<["-"], "fpcc-struct-return">, Group<f_Group>, Flags<[CC1Option]>, 2733 HelpText<"Override the default ABI to return all structs on the stack">; 2734def fpch_preprocess : Flag<["-"], "fpch-preprocess">, Group<f_Group>; 2735def fpic : Flag<["-"], "fpic">, Group<f_Group>; 2736def fno_pic : Flag<["-"], "fno-pic">, Group<f_Group>; 2737def fpie : Flag<["-"], "fpie">, Group<f_Group>; 2738def fno_pie : Flag<["-"], "fno-pie">, Group<f_Group>; 2739defm pic_data_is_text_relative : SimpleMFlag<"pic-data-is-text-relative", 2740 "Assume", "Don't assume", " data segments are relative to text segment">; 2741def fdirect_access_external_data : Flag<["-"], "fdirect-access-external-data">, Group<f_Group>, Flags<[CC1Option]>, 2742 HelpText<"Don't use GOT indirection to reference external data symbols">; 2743def fno_direct_access_external_data : Flag<["-"], "fno-direct-access-external-data">, Group<f_Group>, Flags<[CC1Option]>, 2744 HelpText<"Use GOT indirection to reference external data symbols">; 2745defm plt : BoolFOption<"plt", 2746 CodeGenOpts<"NoPLT">, DefaultFalse, 2747 NegFlag<SetTrue, [CC1Option], "Use GOT indirection instead of PLT to make external function calls (x86 only)">, 2748 PosFlag<SetFalse>>; 2749defm ropi : BoolFOption<"ropi", 2750 LangOpts<"ROPI">, DefaultFalse, 2751 PosFlag<SetTrue, [CC1Option], "Generate read-only position independent code (ARM only)">, 2752 NegFlag<SetFalse>>; 2753defm rwpi : BoolFOption<"rwpi", 2754 LangOpts<"RWPI">, DefaultFalse, 2755 PosFlag<SetTrue, [CC1Option], "Generate read-write position independent code (ARM only)">, 2756 NegFlag<SetFalse>>; 2757def fplugin_EQ : Joined<["-"], "fplugin=">, Group<f_Group>, Flags<[NoXarchOption]>, MetaVarName<"<dsopath>">, 2758 HelpText<"Load the named plugin (dynamic shared object)">; 2759def fplugin_arg : Joined<["-"], "fplugin-arg-">, 2760 MetaVarName<"<name>-<arg>">, 2761 HelpText<"Pass <arg> to plugin <name>">; 2762def fpass_plugin_EQ : Joined<["-"], "fpass-plugin=">, 2763 Group<f_Group>, Flags<[CC1Option,FlangOption,FC1Option]>, MetaVarName<"<dsopath>">, 2764 HelpText<"Load pass plugin from a dynamic shared object file (only with new pass manager).">, 2765 MarshallingInfoStringVector<CodeGenOpts<"PassPlugins">>; 2766defm preserve_as_comments : BoolFOption<"preserve-as-comments", 2767 CodeGenOpts<"PreserveAsmComments">, DefaultTrue, 2768 NegFlag<SetFalse, [CC1Option], "Do not preserve comments in inline assembly">, 2769 PosFlag<SetTrue>>; 2770def framework : Separate<["-"], "framework">, Flags<[LinkerInput]>; 2771def frandom_seed_EQ : Joined<["-"], "frandom-seed=">, Group<clang_ignored_f_Group>; 2772def freg_struct_return : Flag<["-"], "freg-struct-return">, Group<f_Group>, Flags<[CC1Option]>, 2773 HelpText<"Override the default ABI to return small structs in registers">; 2774defm rtti : BoolFOption<"rtti", 2775 LangOpts<"RTTI">, Default<cplusplus.KeyPath>, 2776 NegFlag<SetFalse, [CC1Option], "Disable generation of rtti information">, 2777 PosFlag<SetTrue>>, ShouldParseIf<cplusplus.KeyPath>; 2778defm rtti_data : BoolFOption<"rtti-data", 2779 LangOpts<"RTTIData">, Default<frtti.KeyPath>, 2780 NegFlag<SetFalse, [CC1Option], "Disable generation of RTTI data">, 2781 PosFlag<SetTrue>>, ShouldParseIf<frtti.KeyPath>; 2782def : Flag<["-"], "fsched-interblock">, Group<clang_ignored_f_Group>; 2783defm short_enums : BoolFOption<"short-enums", 2784 LangOpts<"ShortEnums">, DefaultFalse, 2785 PosFlag<SetTrue, [CC1Option], "Allocate to an enum type only as many bytes as it" 2786 " needs for the declared range of possible values">, 2787 NegFlag<SetFalse>>; 2788defm char8__t : BoolFOption<"char8_t", 2789 LangOpts<"Char8">, Default<cpp20.KeyPath>, 2790 PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">, 2791 BothFlags<[CC1Option], " C++ builtin type char8_t">>; 2792def fshort_wchar : Flag<["-"], "fshort-wchar">, Group<f_Group>, 2793 HelpText<"Force wchar_t to be a short unsigned int">; 2794def fno_short_wchar : Flag<["-"], "fno-short-wchar">, Group<f_Group>, 2795 HelpText<"Force wchar_t to be an unsigned int">; 2796def fshow_overloads_EQ : Joined<["-"], "fshow-overloads=">, Group<f_Group>, Flags<[CC1Option]>, 2797 HelpText<"Which overload candidates to show when overload resolution fails. Defaults to 'all'">, 2798 Values<"best,all">, 2799 NormalizedValues<["Ovl_Best", "Ovl_All"]>, 2800 MarshallingInfoEnum<DiagnosticOpts<"ShowOverloads">, "Ovl_All">; 2801defm show_column : BoolFOption<"show-column", 2802 DiagnosticOpts<"ShowColumn">, DefaultTrue, 2803 NegFlag<SetFalse, [CC1Option], "Do not include column number on diagnostics">, 2804 PosFlag<SetTrue>>; 2805defm show_source_location : BoolFOption<"show-source-location", 2806 DiagnosticOpts<"ShowLocation">, DefaultTrue, 2807 NegFlag<SetFalse, [CC1Option], "Do not include source location information with diagnostics">, 2808 PosFlag<SetTrue>>; 2809defm spell_checking : BoolFOption<"spell-checking", 2810 LangOpts<"SpellChecking">, DefaultTrue, 2811 NegFlag<SetFalse, [CC1Option], "Disable spell-checking">, PosFlag<SetTrue>>; 2812def fspell_checking_limit_EQ : Joined<["-"], "fspell-checking-limit=">, Group<f_Group>; 2813def fsigned_bitfields : Flag<["-"], "fsigned-bitfields">, Group<f_Group>; 2814defm signed_char : BoolFOption<"signed-char", 2815 LangOpts<"CharIsSigned">, DefaultTrue, 2816 NegFlag<SetFalse, [CC1Option], "char is unsigned">, PosFlag<SetTrue, [], "char is signed">>, 2817 ShouldParseIf<!strconcat("!", open_cl.KeyPath)>; 2818defm split_stack : BoolFOption<"split-stack", 2819 CodeGenOpts<"EnableSegmentedStacks">, DefaultFalse, 2820 NegFlag<SetFalse, [], "Wouldn't use segmented stack">, 2821 PosFlag<SetTrue, [CC1Option], "Use segmented stack">>; 2822def fstack_protector_all : Flag<["-"], "fstack-protector-all">, Group<f_Group>, 2823 HelpText<"Enable stack protectors for all functions">; 2824defm stack_clash_protection : BoolFOption<"stack-clash-protection", 2825 CodeGenOpts<"StackClashProtector">, DefaultFalse, 2826 PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">, 2827 BothFlags<[], " stack clash protection">>; 2828def fstack_protector_strong : Flag<["-"], "fstack-protector-strong">, Group<f_Group>, 2829 HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. " 2830 "Compared to -fstack-protector, this uses a stronger heuristic " 2831 "that includes functions containing arrays of any size (and any type), " 2832 "as well as any calls to alloca or the taking of an address from a local variable">; 2833def fstack_protector : Flag<["-"], "fstack-protector">, Group<f_Group>, 2834 HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. " 2835 "This uses a loose heuristic which considers functions vulnerable if they " 2836 "contain a char (or 8bit integer) array or constant sized calls to alloca " 2837 ", which are of greater size than ssp-buffer-size (default: 8 bytes). All " 2838 "variable sized calls to alloca are considered vulnerable. A function with " 2839 "a stack protector has a guard value added to the stack frame that is " 2840 "checked on function exit. The guard value must be positioned in the " 2841 "stack frame such that a buffer overflow from a vulnerable variable will " 2842 "overwrite the guard value before overwriting the function's return " 2843 "address. The reference stack guard value is stored in a global variable.">; 2844def ftrivial_auto_var_init : Joined<["-"], "ftrivial-auto-var-init=">, Group<f_Group>, 2845 Flags<[CC1Option, CoreOption]>, HelpText<"Initialize trivial automatic stack variables. Defaults to 'uninitialized'">, 2846 Values<"uninitialized,zero,pattern">, 2847 NormalizedValuesScope<"LangOptions::TrivialAutoVarInitKind">, 2848 NormalizedValues<["Uninitialized", "Zero", "Pattern"]>, 2849 MarshallingInfoEnum<LangOpts<"TrivialAutoVarInit">, "Uninitialized">; 2850def ret_protector : Flag<["-"], "ret-protector">, Flags<[CC1Option]>, 2851 HelpText<"Enable Return Protectors">; 2852def fno_ret_protector : Flag<["-"], "fno-ret-protector">, Group<f_Group>, Flags<[CoreOption]>, 2853 HelpText<"Disable return protector">; 2854def fret_protector : Flag<["-"], "fret-protector">, Group<f_Group>, Flags<[CoreOption]>, 2855 HelpText<"Enable return protector">; 2856def fno_fixup_gadgets : Flag<["-"], "fno-fixup-gadgets">, Group<f_Group>, Flags<[CoreOption]>, 2857 HelpText<"Disable FixupGadgets pass (x86 only)">; 2858def ffixup_gadgets : Flag<["-"], "ffixup-gadgets">, Group<f_Group>, Flags<[CoreOption]>, 2859 HelpText<"Replace ROP friendly instructions with safe alternatives (x86 only)">; 2860def fno_ret_clean : Flag<["-"], "fno-ret-clean">, Group<f_Group>, Flags<[CoreOption]>, 2861 HelpText<"Disable ret-clean pass">; 2862def fret_clean : Flag<["-"], "fret-clean">, Group<f_Group>, Flags<[CoreOption]>, 2863 HelpText<"Clean return address from stack after call">; 2864def ftrivial_auto_var_init_stop_after : Joined<["-"], "ftrivial-auto-var-init-stop-after=">, Group<f_Group>, 2865 Flags<[CC1Option, CoreOption]>, HelpText<"Stop initializing trivial automatic stack variables after the specified number of instances">, 2866 MarshallingInfoInt<LangOpts<"TrivialAutoVarInitStopAfter">>; 2867def fstandalone_debug : Flag<["-"], "fstandalone-debug">, Group<f_Group>, Flags<[CoreOption]>, 2868 HelpText<"Emit full debug info for all types used by the program">; 2869def fno_standalone_debug : Flag<["-"], "fno-standalone-debug">, Group<f_Group>, Flags<[CoreOption]>, 2870 HelpText<"Limit debug information produced to reduce size of debug binary">; 2871def flimit_debug_info : Flag<["-"], "flimit-debug-info">, Flags<[CoreOption]>, Alias<fno_standalone_debug>; 2872def fno_limit_debug_info : Flag<["-"], "fno-limit-debug-info">, Flags<[CoreOption]>, Alias<fstandalone_debug>; 2873def fdebug_macro : Flag<["-"], "fdebug-macro">, Group<f_Group>, Flags<[CoreOption]>, 2874 HelpText<"Emit macro debug information">; 2875def fno_debug_macro : Flag<["-"], "fno-debug-macro">, Group<f_Group>, Flags<[CoreOption]>, 2876 HelpText<"Do not emit macro debug information">; 2877def fstrict_aliasing : Flag<["-"], "fstrict-aliasing">, Group<f_Group>, 2878 Flags<[NoXarchOption, CoreOption]>; 2879def fstrict_enums : Flag<["-"], "fstrict-enums">, Group<f_Group>, Flags<[CC1Option]>, 2880 HelpText<"Enable optimizations based on the strict definition of an enum's " 2881 "value range">, 2882 MarshallingInfoFlag<CodeGenOpts<"StrictEnums">>; 2883defm strict_vtable_pointers : BoolFOption<"strict-vtable-pointers", 2884 CodeGenOpts<"StrictVTablePointers">, DefaultFalse, 2885 PosFlag<SetTrue, [CC1Option], "Enable optimizations based on the strict rules for" 2886 " overwriting polymorphic C++ objects">, 2887 NegFlag<SetFalse>>; 2888def fstrict_overflow : Flag<["-"], "fstrict-overflow">, Group<f_Group>; 2889def fdriver_only : Flag<["-"], "fdriver-only">, Flags<[NoXarchOption, CoreOption]>, 2890 Group<Action_Group>, HelpText<"Only run the driver.">; 2891def fsyntax_only : Flag<["-"], "fsyntax-only">, 2892 Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option,FlangOption]>, Group<Action_Group>, 2893 HelpText<"Run the preprocessor, parser and semantic analysis stages">; 2894def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group<f_Group>; 2895def ftemplate_depth_EQ : Joined<["-"], "ftemplate-depth=">, Group<f_Group>; 2896def ftemplate_depth_ : Joined<["-"], "ftemplate-depth-">, Group<f_Group>; 2897def ftemplate_backtrace_limit_EQ : Joined<["-"], "ftemplate-backtrace-limit=">, 2898 Group<f_Group>; 2899def foperator_arrow_depth_EQ : Joined<["-"], "foperator-arrow-depth=">, 2900 Group<f_Group>; 2901 2902def fsave_optimization_record : Flag<["-"], "fsave-optimization-record">, 2903 Group<f_Group>, HelpText<"Generate a YAML optimization record file">; 2904def fsave_optimization_record_EQ : Joined<["-"], "fsave-optimization-record=">, 2905 Group<f_Group>, HelpText<"Generate an optimization record file in a specific format">, 2906 MetaVarName<"<format>">; 2907def fno_save_optimization_record : Flag<["-"], "fno-save-optimization-record">, 2908 Group<f_Group>, Flags<[NoArgumentUnused]>; 2909def foptimization_record_file_EQ : Joined<["-"], "foptimization-record-file=">, 2910 Group<f_Group>, 2911 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.">, 2912 MetaVarName<"<file>">; 2913def foptimization_record_passes_EQ : Joined<["-"], "foptimization-record-passes=">, 2914 Group<f_Group>, 2915 HelpText<"Only include passes which match a specified regular expression in the generated optimization record (by default, include all passes)">, 2916 MetaVarName<"<regex>">; 2917 2918def fvectorize : Flag<["-"], "fvectorize">, Group<f_Group>, 2919 HelpText<"Enable the loop vectorization passes">; 2920def fno_vectorize : Flag<["-"], "fno-vectorize">, Group<f_Group>; 2921def : Flag<["-"], "ftree-vectorize">, Alias<fvectorize>; 2922def : Flag<["-"], "fno-tree-vectorize">, Alias<fno_vectorize>; 2923def fslp_vectorize : Flag<["-"], "fslp-vectorize">, Group<f_Group>, 2924 HelpText<"Enable the superword-level parallelism vectorization passes">; 2925def fno_slp_vectorize : Flag<["-"], "fno-slp-vectorize">, Group<f_Group>; 2926def : Flag<["-"], "ftree-slp-vectorize">, Alias<fslp_vectorize>; 2927def : Flag<["-"], "fno-tree-slp-vectorize">, Alias<fno_slp_vectorize>; 2928def Wlarge_by_value_copy_def : Flag<["-"], "Wlarge-by-value-copy">, 2929 HelpText<"Warn if a function definition returns or accepts an object larger " 2930 "in bytes than a given value">, Flags<[HelpHidden]>; 2931def Wlarge_by_value_copy_EQ : Joined<["-"], "Wlarge-by-value-copy=">, Flags<[CC1Option]>, 2932 MarshallingInfoInt<LangOpts<"NumLargeByValueCopy">>; 2933 2934// These "special" warning flags are effectively processed as f_Group flags by the driver: 2935// Just silence warnings about -Wlarger-than for now. 2936def Wlarger_than_EQ : Joined<["-"], "Wlarger-than=">, Group<clang_ignored_f_Group>; 2937def Wlarger_than_ : Joined<["-"], "Wlarger-than-">, Alias<Wlarger_than_EQ>; 2938 2939// This is converted to -fwarn-stack-size=N and also passed through by the driver. 2940// FIXME: The driver should strip out the =<value> when passing W_value_Group through. 2941def Wframe_larger_than_EQ : Joined<["-"], "Wframe-larger-than=">, Group<W_value_Group>, 2942 Flags<[NoXarchOption, CC1Option]>; 2943def Wframe_larger_than : Flag<["-"], "Wframe-larger-than">, Alias<Wframe_larger_than_EQ>; 2944 2945def : Flag<["-"], "fterminated-vtables">, Alias<fapple_kext>; 2946defm threadsafe_statics : BoolFOption<"threadsafe-statics", 2947 LangOpts<"ThreadsafeStatics">, DefaultTrue, 2948 NegFlag<SetFalse, [CC1Option], "Do not emit code to make initialization of local statics thread safe">, 2949 PosFlag<SetTrue>>; 2950def ftime_report : Flag<["-"], "ftime-report">, Group<f_Group>, Flags<[CC1Option]>, 2951 MarshallingInfoFlag<CodeGenOpts<"TimePasses">>; 2952def ftime_report_EQ: Joined<["-"], "ftime-report=">, Group<f_Group>, 2953 Flags<[CC1Option]>, Values<"per-pass,per-pass-run">, 2954 MarshallingInfoFlag<CodeGenOpts<"TimePassesPerRun">>, 2955 HelpText<"(For new pass manager) 'per-pass': one report for each pass; " 2956 "'per-pass-run': one report for each pass invocation">; 2957def ftime_trace : Flag<["-"], "ftime-trace">, Group<f_Group>, 2958 HelpText<"Turn on time profiler. Generates JSON file based on output filename.">, 2959 DocBrief<[{ 2960Turn on time profiler. Generates JSON file based on output filename. Results 2961can be analyzed with chrome://tracing or `Speedscope App 2962<https://www.speedscope.app>`_ for flamegraph visualization.}]>, 2963 Flags<[CC1Option, CoreOption]>, 2964 MarshallingInfoFlag<FrontendOpts<"TimeTrace">>; 2965def ftime_trace_granularity_EQ : Joined<["-"], "ftime-trace-granularity=">, Group<f_Group>, 2966 HelpText<"Minimum time granularity (in microseconds) traced by time profiler">, 2967 Flags<[CC1Option, CoreOption]>, 2968 MarshallingInfoInt<FrontendOpts<"TimeTraceGranularity">, "500u">; 2969def ftime_trace_EQ : Joined<["-"], "ftime-trace=">, Group<f_Group>, 2970 HelpText<"Similar to -ftime-trace. Specify the JSON file or a directory which will contain the JSON file">, 2971 Flags<[CC1Option, CoreOption]>, 2972 MarshallingInfoString<FrontendOpts<"TimeTracePath">>; 2973def fproc_stat_report : Joined<["-"], "fproc-stat-report">, Group<f_Group>, 2974 HelpText<"Print subprocess statistics">; 2975def fproc_stat_report_EQ : Joined<["-"], "fproc-stat-report=">, Group<f_Group>, 2976 HelpText<"Save subprocess statistics to the given file">; 2977def ftlsmodel_EQ : Joined<["-"], "ftls-model=">, Group<f_Group>, Flags<[CC1Option]>, 2978 Values<"global-dynamic,local-dynamic,initial-exec,local-exec">, 2979 NormalizedValuesScope<"CodeGenOptions">, 2980 NormalizedValues<["GeneralDynamicTLSModel", "LocalDynamicTLSModel", "InitialExecTLSModel", "LocalExecTLSModel"]>, 2981 MarshallingInfoEnum<CodeGenOpts<"DefaultTLSModel">, "GeneralDynamicTLSModel">; 2982def ftrapv : Flag<["-"], "ftrapv">, Group<f_Group>, Flags<[CC1Option]>, 2983 HelpText<"Trap on integer overflow">; 2984def ftrapv_handler_EQ : Joined<["-"], "ftrapv-handler=">, Group<f_Group>, 2985 MetaVarName<"<function name>">, 2986 HelpText<"Specify the function to be called on overflow">; 2987def ftrapv_handler : Separate<["-"], "ftrapv-handler">, Group<f_Group>, Flags<[CC1Option]>; 2988def ftrap_function_EQ : Joined<["-"], "ftrap-function=">, Group<f_Group>, Flags<[CC1Option]>, 2989 HelpText<"Issue call to specified function rather than a trap instruction">, 2990 MarshallingInfoString<CodeGenOpts<"TrapFuncName">>; 2991def funroll_loops : Flag<["-"], "funroll-loops">, Group<f_Group>, 2992 HelpText<"Turn on loop unroller">, Flags<[CC1Option]>; 2993def fno_unroll_loops : Flag<["-"], "fno-unroll-loops">, Group<f_Group>, 2994 HelpText<"Turn off loop unroller">, Flags<[CC1Option]>; 2995defm reroll_loops : BoolFOption<"reroll-loops", 2996 CodeGenOpts<"RerollLoops">, DefaultFalse, 2997 PosFlag<SetTrue, [CC1Option], "Turn on loop reroller">, NegFlag<SetFalse>>; 2998def ffinite_loops: Flag<["-"], "ffinite-loops">, Group<f_Group>, 2999 HelpText<"Assume all loops are finite.">, Flags<[CC1Option]>; 3000def fno_finite_loops: Flag<["-"], "fno-finite-loops">, Group<f_Group>, 3001 HelpText<"Do not assume that any loop is finite.">, Flags<[CC1Option]>; 3002 3003def ftrigraphs : Flag<["-"], "ftrigraphs">, Group<f_Group>, 3004 HelpText<"Process trigraph sequences">, Flags<[CC1Option]>; 3005def fno_trigraphs : Flag<["-"], "fno-trigraphs">, Group<f_Group>, 3006 HelpText<"Do not process trigraph sequences">, Flags<[CC1Option]>; 3007def funsigned_bitfields : Flag<["-"], "funsigned-bitfields">, Group<f_Group>; 3008def funsigned_char : Flag<["-"], "funsigned-char">, Group<f_Group>; 3009def fno_unsigned_char : Flag<["-"], "fno-unsigned-char">; 3010def funwind_tables : Flag<["-"], "funwind-tables">, Group<f_Group>; 3011defm register_global_dtors_with_atexit : BoolFOption<"register-global-dtors-with-atexit", 3012 CodeGenOpts<"RegisterGlobalDtorsWithAtExit">, DefaultFalse, 3013 PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">, 3014 BothFlags<[], " atexit or __cxa_atexit to register global destructors">>; 3015defm use_init_array : BoolFOption<"use-init-array", 3016 CodeGenOpts<"UseInitArray">, DefaultTrue, 3017 NegFlag<SetFalse, [CC1Option], "Use .ctors/.dtors instead of .init_array/.fini_array">, 3018 PosFlag<SetTrue>>; 3019def fno_var_tracking : Flag<["-"], "fno-var-tracking">, Group<clang_ignored_f_Group>; 3020def fverbose_asm : Flag<["-"], "fverbose-asm">, Group<f_Group>, 3021 HelpText<"Generate verbose assembly output">; 3022def dA : Flag<["-"], "dA">, Alias<fverbose_asm>; 3023defm visibility_from_dllstorageclass : BoolFOption<"visibility-from-dllstorageclass", 3024 LangOpts<"VisibilityFromDLLStorageClass">, DefaultFalse, 3025 PosFlag<SetTrue, [CC1Option], "Set the visibility of symbols in the generated code from their DLL storage class">, 3026 NegFlag<SetFalse>>; 3027def fvisibility_dllexport_EQ : Joined<["-"], "fvisibility-dllexport=">, Group<f_Group>, Flags<[CC1Option]>, 3028 HelpText<"The visibility for dllexport definitions [-fvisibility-from-dllstorageclass]">, 3029 MarshallingInfoVisibility<LangOpts<"DLLExportVisibility">, "DefaultVisibility">, 3030 ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>; 3031def fvisibility_nodllstorageclass_EQ : Joined<["-"], "fvisibility-nodllstorageclass=">, Group<f_Group>, Flags<[CC1Option]>, 3032 HelpText<"The visibility for definitions without an explicit DLL export class [-fvisibility-from-dllstorageclass]">, 3033 MarshallingInfoVisibility<LangOpts<"NoDLLStorageClassVisibility">, "HiddenVisibility">, 3034 ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>; 3035def fvisibility_externs_dllimport_EQ : Joined<["-"], "fvisibility-externs-dllimport=">, Group<f_Group>, Flags<[CC1Option]>, 3036 HelpText<"The visibility for dllimport external declarations [-fvisibility-from-dllstorageclass]">, 3037 MarshallingInfoVisibility<LangOpts<"ExternDeclDLLImportVisibility">, "DefaultVisibility">, 3038 ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>; 3039def fvisibility_externs_nodllstorageclass_EQ : Joined<["-"], "fvisibility-externs-nodllstorageclass=">, Group<f_Group>, Flags<[CC1Option]>, 3040 HelpText<"The visibility for external declarations without an explicit DLL dllstorageclass [-fvisibility-from-dllstorageclass]">, 3041 MarshallingInfoVisibility<LangOpts<"ExternDeclNoDLLStorageClassVisibility">, "HiddenVisibility">, 3042 ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>; 3043def fvisibility_EQ : Joined<["-"], "fvisibility=">, Group<f_Group>, Flags<[CC1Option]>, 3044 HelpText<"Set the default symbol visibility for all global definitions">, 3045 MarshallingInfoVisibility<LangOpts<"ValueVisibilityMode">, "DefaultVisibility">; 3046defm visibility_inlines_hidden : BoolFOption<"visibility-inlines-hidden", 3047 LangOpts<"InlineVisibilityHidden">, DefaultFalse, 3048 PosFlag<SetTrue, [CC1Option], "Give inline C++ member functions hidden visibility by default">, 3049 NegFlag<SetFalse>>; 3050defm visibility_inlines_hidden_static_local_var : BoolFOption<"visibility-inlines-hidden-static-local-var", 3051 LangOpts<"VisibilityInlinesHiddenStaticLocalVar">, DefaultFalse, 3052 PosFlag<SetTrue, [CC1Option], "When -fvisibility-inlines-hidden is enabled, static variables in" 3053 " inline C++ member functions will also be given hidden visibility by default">, 3054 NegFlag<SetFalse, [], "Disables -fvisibility-inlines-hidden-static-local-var" 3055 " (this is the default on non-darwin targets)">, BothFlags<[CC1Option]>>; 3056def fvisibility_ms_compat : Flag<["-"], "fvisibility-ms-compat">, Group<f_Group>, 3057 HelpText<"Give global types 'default' visibility and global functions and " 3058 "variables 'hidden' visibility by default">; 3059def fvisibility_global_new_delete_hidden : Flag<["-"], "fvisibility-global-new-delete-hidden">, Group<f_Group>, 3060 HelpText<"Give global C++ operator new and delete declarations hidden visibility">, Flags<[CC1Option]>, 3061 MarshallingInfoFlag<LangOpts<"GlobalAllocationFunctionVisibilityHidden">>; 3062def mdefault_visibility_export_mapping_EQ : Joined<["-"], "mdefault-visibility-export-mapping=">, 3063 Values<"none,explicit,all">, 3064 NormalizedValuesScope<"LangOptions::DefaultVisiblityExportMapping">, 3065 NormalizedValues<["None", "Explicit", "All"]>, 3066 HelpText<"Mapping between default visibility and export">, 3067 Group<m_Group>, Flags<[CC1Option]>, 3068 MarshallingInfoEnum<LangOpts<"DefaultVisibilityExportMapping">,"None">; 3069defm new_infallible : BoolFOption<"new-infallible", 3070 LangOpts<"NewInfallible">, DefaultFalse, 3071 PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">, 3072 BothFlags<[CC1Option], " treating throwing global C++ operator new as always returning valid memory " 3073 "(annotates with __attribute__((returns_nonnull)) and throw()). This is detectable in source.">>; 3074defm whole_program_vtables : BoolFOption<"whole-program-vtables", 3075 CodeGenOpts<"WholeProgramVTables">, DefaultFalse, 3076 PosFlag<SetTrue, [CC1Option], "Enables whole-program vtable optimization. Requires -flto">, 3077 NegFlag<SetFalse>, BothFlags<[CoreOption]>>; 3078defm split_lto_unit : BoolFOption<"split-lto-unit", 3079 CodeGenOpts<"EnableSplitLTOUnit">, DefaultFalse, 3080 PosFlag<SetTrue, [CC1Option], "Enables splitting of the LTO unit">, 3081 NegFlag<SetFalse>, BothFlags<[CoreOption]>>; 3082defm force_emit_vtables : BoolFOption<"force-emit-vtables", 3083 CodeGenOpts<"ForceEmitVTables">, DefaultFalse, 3084 PosFlag<SetTrue, [CC1Option], "Emits more virtual tables to improve devirtualization">, 3085 NegFlag<SetFalse>, BothFlags<[CoreOption]>>; 3086defm virtual_function_elimination : BoolFOption<"virtual-function-elimination", 3087 CodeGenOpts<"VirtualFunctionElimination">, DefaultFalse, 3088 PosFlag<SetTrue, [CC1Option], "Enables dead virtual function elimination optimization. Requires -flto=full">, 3089 NegFlag<SetFalse>, BothFlags<[CoreOption]>>; 3090 3091def fwrapv : Flag<["-"], "fwrapv">, Group<f_Group>, Flags<[CC1Option]>, 3092 HelpText<"Treat signed integer overflow as two's complement">; 3093def fwritable_strings : Flag<["-"], "fwritable-strings">, Group<f_Group>, Flags<[CC1Option]>, 3094 HelpText<"Store string literals as writable data">, 3095 MarshallingInfoFlag<LangOpts<"WritableStrings">>; 3096defm zero_initialized_in_bss : BoolFOption<"zero-initialized-in-bss", 3097 CodeGenOpts<"NoZeroInitializedInBSS">, DefaultFalse, 3098 NegFlag<SetTrue, [CC1Option], "Don't place zero initialized data in BSS">, 3099 PosFlag<SetFalse>>; 3100defm function_sections : BoolFOption<"function-sections", 3101 CodeGenOpts<"FunctionSections">, DefaultFalse, 3102 PosFlag<SetTrue, [CC1Option], "Place each function in its own section">, 3103 NegFlag<SetFalse>>; 3104def fbasic_block_sections_EQ : Joined<["-"], "fbasic-block-sections=">, Group<f_Group>, 3105 Flags<[CC1Option, CC1AsOption]>, 3106 HelpText<"Place each function's basic blocks in unique sections (ELF Only)">, 3107 DocBrief<[{Generate labels for each basic block or place each basic block or a subset of basic blocks in its own section.}]>, 3108 Values<"all,labels,none,list=">, 3109 MarshallingInfoString<CodeGenOpts<"BBSections">, [{"none"}]>; 3110defm data_sections : BoolFOption<"data-sections", 3111 CodeGenOpts<"DataSections">, DefaultFalse, 3112 PosFlag<SetTrue, [CC1Option], "Place each data in its own section">, NegFlag<SetFalse>>; 3113defm stack_size_section : BoolFOption<"stack-size-section", 3114 CodeGenOpts<"StackSizeSection">, DefaultFalse, 3115 PosFlag<SetTrue, [CC1Option], "Emit section containing metadata on function stack sizes">, 3116 NegFlag<SetFalse>>; 3117def fstack_usage : Flag<["-"], "fstack-usage">, Group<f_Group>, 3118 HelpText<"Emit .su file containing information on function stack sizes">; 3119def stack_usage_file : Separate<["-"], "stack-usage-file">, 3120 Flags<[CC1Option, NoDriverOption]>, 3121 HelpText<"Filename (or -) to write stack usage output to">, 3122 MarshallingInfoString<CodeGenOpts<"StackUsageOutput">>; 3123 3124defm unique_basic_block_section_names : BoolFOption<"unique-basic-block-section-names", 3125 CodeGenOpts<"UniqueBasicBlockSectionNames">, DefaultFalse, 3126 PosFlag<SetTrue, [CC1Option], "Use unique names for basic block sections (ELF Only)">, 3127 NegFlag<SetFalse>>; 3128defm unique_internal_linkage_names : BoolFOption<"unique-internal-linkage-names", 3129 CodeGenOpts<"UniqueInternalLinkageNames">, DefaultFalse, 3130 PosFlag<SetTrue, [CC1Option], "Uniqueify Internal Linkage Symbol Names by appending" 3131 " the MD5 hash of the module path">, 3132 NegFlag<SetFalse>>; 3133defm unique_section_names : BoolFOption<"unique-section-names", 3134 CodeGenOpts<"UniqueSectionNames">, DefaultTrue, 3135 NegFlag<SetFalse, [CC1Option], "Don't use unique names for text and data sections">, 3136 PosFlag<SetTrue>>; 3137 3138defm split_machine_functions: BoolFOption<"split-machine-functions", 3139 CodeGenOpts<"SplitMachineFunctions">, DefaultFalse, 3140 PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">, 3141 BothFlags<[], " late function splitting using profile information (x86 ELF)">>; 3142 3143defm strict_return : BoolFOption<"strict-return", 3144 CodeGenOpts<"StrictReturn">, DefaultTrue, 3145 NegFlag<SetFalse, [CC1Option], "Don't treat control flow paths that fall off the end" 3146 " of a non-void function as unreachable">, 3147 PosFlag<SetTrue>>; 3148 3149def fenable_matrix : Flag<["-"], "fenable-matrix">, Group<f_Group>, 3150 Flags<[CC1Option]>, 3151 HelpText<"Enable matrix data type and related builtin functions">, 3152 MarshallingInfoFlag<LangOpts<"MatrixTypes">>; 3153 3154def fzero_call_used_regs_EQ 3155 : Joined<["-"], "fzero-call-used-regs=">, Group<f_Group>, Flags<[CC1Option]>, 3156 HelpText<"Clear call-used registers upon function return (AArch64/x86 only)">, 3157 Values<"skip,used-gpr-arg,used-gpr,used-arg,used,all-gpr-arg,all-gpr,all-arg,all">, 3158 NormalizedValues<["Skip", "UsedGPRArg", "UsedGPR", "UsedArg", "Used", 3159 "AllGPRArg", "AllGPR", "AllArg", "All"]>, 3160 NormalizedValuesScope<"llvm::ZeroCallUsedRegs::ZeroCallUsedRegsKind">, 3161 MarshallingInfoEnum<CodeGenOpts<"ZeroCallUsedRegs">, "Skip">; 3162 3163def fdebug_types_section: Flag <["-"], "fdebug-types-section">, Group<f_Group>, 3164 HelpText<"Place debug types in their own section (ELF Only)">; 3165def fno_debug_types_section: Flag<["-"], "fno-debug-types-section">, Group<f_Group>; 3166defm debug_ranges_base_address : BoolFOption<"debug-ranges-base-address", 3167 CodeGenOpts<"DebugRangesBaseAddress">, DefaultFalse, 3168 PosFlag<SetTrue, [CC1Option], "Use DWARF base address selection entries in .debug_ranges">, 3169 NegFlag<SetFalse>>; 3170defm split_dwarf_inlining : BoolFOption<"split-dwarf-inlining", 3171 CodeGenOpts<"SplitDwarfInlining">, DefaultFalse, 3172 NegFlag<SetFalse, []>, 3173 PosFlag<SetTrue, [CC1Option], "Provide minimal debug info in the object/executable" 3174 " to facilitate online symbolication/stack traces in the absence of" 3175 " .dwo/.dwp files when using Split DWARF">>; 3176def fdebug_default_version: Joined<["-"], "fdebug-default-version=">, Group<f_Group>, 3177 HelpText<"Default DWARF version to use, if a -g option caused DWARF debug info to be produced">; 3178def fdebug_prefix_map_EQ 3179 : Joined<["-"], "fdebug-prefix-map=">, Group<f_Group>, 3180 Flags<[CC1Option,CC1AsOption]>, 3181 HelpText<"remap file source paths in debug info">; 3182def fcoverage_prefix_map_EQ 3183 : Joined<["-"], "fcoverage-prefix-map=">, Group<f_Group>, 3184 Flags<[CC1Option]>, 3185 HelpText<"remap file source paths in coverage mapping">; 3186def ffile_prefix_map_EQ 3187 : Joined<["-"], "ffile-prefix-map=">, Group<f_Group>, 3188 HelpText<"remap file source paths in debug info, predefined preprocessor " 3189 "macros and __builtin_FILE(). Implies -ffile-reproducible.">; 3190def fmacro_prefix_map_EQ 3191 : Joined<["-"], "fmacro-prefix-map=">, Group<f_Group>, Flags<[CC1Option]>, 3192 HelpText<"remap file source paths in predefined preprocessor macros and " 3193 "__builtin_FILE(). Implies -ffile-reproducible.">; 3194defm force_dwarf_frame : BoolFOption<"force-dwarf-frame", 3195 CodeGenOpts<"ForceDwarfFrameSection">, DefaultFalse, 3196 PosFlag<SetTrue, [CC1Option], "Always emit a debug frame section">, NegFlag<SetFalse>>; 3197def femit_dwarf_unwind_EQ : Joined<["-"], "femit-dwarf-unwind=">, 3198 Group<f_Group>, Flags<[CC1Option, CC1AsOption]>, 3199 HelpText<"When to emit DWARF unwind (EH frame) info">, 3200 Values<"always,no-compact-unwind,default">, 3201 NormalizedValues<["Always", "NoCompactUnwind", "Default"]>, 3202 NormalizedValuesScope<"llvm::EmitDwarfUnwindType">, 3203 MarshallingInfoEnum<CodeGenOpts<"EmitDwarfUnwind">, "Default">; 3204def g_Flag : Flag<["-"], "g">, Group<g_Group>, 3205 HelpText<"Generate source-level debug information">; 3206def gline_tables_only : Flag<["-"], "gline-tables-only">, Group<gN_Group>, 3207 Flags<[CoreOption]>, HelpText<"Emit debug line number tables only">; 3208def gline_directives_only : Flag<["-"], "gline-directives-only">, Group<gN_Group>, 3209 Flags<[CoreOption]>, HelpText<"Emit debug line info directives only">; 3210def gmlt : Flag<["-"], "gmlt">, Alias<gline_tables_only>; 3211def g0 : Flag<["-"], "g0">, Group<gN_Group>; 3212def g1 : Flag<["-"], "g1">, Group<gN_Group>, Alias<gline_tables_only>; 3213def g2 : Flag<["-"], "g2">, Group<gN_Group>; 3214def g3 : Flag<["-"], "g3">, Group<gN_Group>; 3215def ggdb : Flag<["-"], "ggdb">, Group<gTune_Group>; 3216def ggdb0 : Flag<["-"], "ggdb0">, Group<ggdbN_Group>; 3217def ggdb1 : Flag<["-"], "ggdb1">, Group<ggdbN_Group>; 3218def ggdb2 : Flag<["-"], "ggdb2">, Group<ggdbN_Group>; 3219def ggdb3 : Flag<["-"], "ggdb3">, Group<ggdbN_Group>; 3220def glldb : Flag<["-"], "glldb">, Group<gTune_Group>; 3221def gsce : Flag<["-"], "gsce">, Group<gTune_Group>; 3222def gdbx : Flag<["-"], "gdbx">, Group<gTune_Group>; 3223// Equivalent to our default dwarf version. Forces usual dwarf emission when 3224// CodeView is enabled. 3225def gdwarf : Flag<["-"], "gdwarf">, Group<g_Group>, Flags<[CoreOption]>, 3226 HelpText<"Generate source-level debug information with the default dwarf version">; 3227def gdwarf_2 : Flag<["-"], "gdwarf-2">, Group<g_Group>, 3228 HelpText<"Generate source-level debug information with dwarf version 2">; 3229def gdwarf_3 : Flag<["-"], "gdwarf-3">, Group<g_Group>, 3230 HelpText<"Generate source-level debug information with dwarf version 3">; 3231def gdwarf_4 : Flag<["-"], "gdwarf-4">, Group<g_Group>, 3232 HelpText<"Generate source-level debug information with dwarf version 4">; 3233def gdwarf_5 : Flag<["-"], "gdwarf-5">, Group<g_Group>, 3234 HelpText<"Generate source-level debug information with dwarf version 5">; 3235def gdwarf64 : Flag<["-"], "gdwarf64">, Group<g_Group>, 3236 Flags<[CC1Option, CC1AsOption]>, 3237 HelpText<"Enables DWARF64 format for ELF binaries, if debug information emission is enabled.">, 3238 MarshallingInfoFlag<CodeGenOpts<"Dwarf64">>; 3239def gdwarf32 : Flag<["-"], "gdwarf32">, Group<g_Group>, 3240 Flags<[CC1Option, CC1AsOption]>, 3241 HelpText<"Enables DWARF32 format for ELF binaries, if debug information emission is enabled.">; 3242 3243def gcodeview : Flag<["-"], "gcodeview">, 3244 HelpText<"Generate CodeView debug information">, 3245 Flags<[CC1Option, CC1AsOption, CoreOption]>, 3246 MarshallingInfoFlag<CodeGenOpts<"EmitCodeView">>; 3247defm codeview_ghash : BoolOption<"g", "codeview-ghash", 3248 CodeGenOpts<"CodeViewGHash">, DefaultFalse, 3249 PosFlag<SetTrue, [CC1Option], "Emit type record hashes in a .debug$H section">, 3250 NegFlag<SetFalse>, BothFlags<[CoreOption]>>; 3251defm codeview_command_line : BoolOption<"g", "codeview-command-line", 3252 CodeGenOpts<"CodeViewCommandLine">, DefaultTrue, 3253 PosFlag<SetTrue, [], "Emit compiler path and command line into CodeView debug information">, 3254 NegFlag<SetFalse, [], "Don't emit compiler path and command line into CodeView debug information">, 3255 BothFlags<[CoreOption, CC1Option]>>; 3256defm inline_line_tables : BoolGOption<"inline-line-tables", 3257 CodeGenOpts<"NoInlineLineTables">, DefaultFalse, 3258 NegFlag<SetTrue, [CC1Option], "Don't emit inline line tables.">, 3259 PosFlag<SetFalse>, BothFlags<[CoreOption]>>; 3260 3261def gfull : Flag<["-"], "gfull">, Group<g_Group>; 3262def gused : Flag<["-"], "gused">, Group<g_Group>; 3263def gstabs : Joined<["-"], "gstabs">, Group<g_Group>, Flags<[Unsupported]>; 3264def gcoff : Joined<["-"], "gcoff">, Group<g_Group>, Flags<[Unsupported]>; 3265def gxcoff : Joined<["-"], "gxcoff">, Group<g_Group>, Flags<[Unsupported]>; 3266def gvms : Joined<["-"], "gvms">, Group<g_Group>, Flags<[Unsupported]>; 3267def gtoggle : Flag<["-"], "gtoggle">, Group<g_flags_Group>, Flags<[Unsupported]>; 3268def grecord_command_line : Flag<["-"], "grecord-command-line">, 3269 Group<g_flags_Group>; 3270def gno_record_command_line : Flag<["-"], "gno-record-command-line">, 3271 Group<g_flags_Group>; 3272def : Flag<["-"], "grecord-gcc-switches">, Alias<grecord_command_line>; 3273def : Flag<["-"], "gno-record-gcc-switches">, Alias<gno_record_command_line>; 3274defm strict_dwarf : BoolOption<"g", "strict-dwarf", 3275 CodeGenOpts<"DebugStrictDwarf">, DefaultFalse, 3276 PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>, BothFlags<[CoreOption]>>, 3277 Group<g_flags_Group>; 3278defm column_info : BoolOption<"g", "column-info", 3279 CodeGenOpts<"DebugColumnInfo">, DefaultTrue, 3280 NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>, BothFlags<[CoreOption]>>, 3281 Group<g_flags_Group>; 3282def gsplit_dwarf : Flag<["-"], "gsplit-dwarf">, Group<g_flags_Group>; 3283def gsplit_dwarf_EQ : Joined<["-"], "gsplit-dwarf=">, Group<g_flags_Group>, 3284 HelpText<"Set DWARF fission mode">, 3285 Values<"split,single">; 3286def gno_split_dwarf : Flag<["-"], "gno-split-dwarf">, Group<g_flags_Group>; 3287def gsimple_template_names : Flag<["-"], "gsimple-template-names">, Group<g_flags_Group>; 3288def gsimple_template_names_EQ 3289 : Joined<["-"], "gsimple-template-names=">, 3290 HelpText<"Use simple template names in DWARF, or include the full " 3291 "template name with a modified prefix for validation">, 3292 Values<"simple,mangled">, Flags<[CC1Option, NoDriverOption]>; 3293def gsrc_hash_EQ : Joined<["-"], "gsrc-hash=">, 3294 Group<g_flags_Group>, Flags<[CC1Option, NoDriverOption]>, 3295 Values<"md5,sha1,sha256">, 3296 NormalizedValues<["DSH_MD5", "DSH_SHA1", "DSH_SHA256"]>, 3297 NormalizedValuesScope<"CodeGenOptions">, 3298 MarshallingInfoEnum<CodeGenOpts<"DebugSrcHash">, "DSH_MD5">; 3299def gno_simple_template_names : Flag<["-"], "gno-simple-template-names">, 3300 Group<g_flags_Group>; 3301def ggnu_pubnames : Flag<["-"], "ggnu-pubnames">, Group<g_flags_Group>, Flags<[CC1Option]>; 3302def gno_gnu_pubnames : Flag<["-"], "gno-gnu-pubnames">, Group<g_flags_Group>; 3303def gpubnames : Flag<["-"], "gpubnames">, Group<g_flags_Group>, Flags<[CC1Option]>; 3304def gno_pubnames : Flag<["-"], "gno-pubnames">, Group<g_flags_Group>; 3305def gdwarf_aranges : Flag<["-"], "gdwarf-aranges">, Group<g_flags_Group>; 3306def gmodules : Flag <["-"], "gmodules">, Group<gN_Group>, 3307 HelpText<"Generate debug info with external references to clang modules" 3308 " or precompiled headers">; 3309def gno_modules : Flag <["-"], "gno-modules">, Group<g_flags_Group>; 3310def gz_EQ : Joined<["-"], "gz=">, Group<g_flags_Group>, 3311 HelpText<"DWARF debug sections compression type">; 3312def gz : Flag<["-"], "gz">, Alias<gz_EQ>, AliasArgs<["zlib"]>, Group<g_flags_Group>; 3313def gembed_source : Flag<["-"], "gembed-source">, Group<g_flags_Group>, Flags<[CC1Option]>, 3314 HelpText<"Embed source text in DWARF debug sections">, 3315 MarshallingInfoFlag<CodeGenOpts<"EmbedSource">>; 3316def gno_embed_source : Flag<["-"], "gno-embed-source">, Group<g_flags_Group>, 3317 Flags<[NoXarchOption]>, 3318 HelpText<"Restore the default behavior of not embedding source text in DWARF debug sections">; 3319def headerpad__max__install__names : Joined<["-"], "headerpad_max_install_names">; 3320def help : Flag<["-", "--"], "help">, Flags<[CC1Option,CC1AsOption, FC1Option, 3321 FlangOption]>, HelpText<"Display available options">, 3322 MarshallingInfoFlag<FrontendOpts<"ShowHelp">>; 3323def ibuiltininc : Flag<["-"], "ibuiltininc">, 3324 HelpText<"Enable builtin #include directories even when -nostdinc is used " 3325 "before or after -ibuiltininc. " 3326 "Using -nobuiltininc after the option disables it">; 3327def index_header_map : Flag<["-"], "index-header-map">, Flags<[CC1Option]>, 3328 HelpText<"Make the next included directory (-I or -F) an indexer header map">; 3329def idirafter : JoinedOrSeparate<["-"], "idirafter">, Group<clang_i_Group>, Flags<[CC1Option]>, 3330 HelpText<"Add directory to AFTER include search path">; 3331def iframework : JoinedOrSeparate<["-"], "iframework">, Group<clang_i_Group>, Flags<[CC1Option]>, 3332 HelpText<"Add directory to SYSTEM framework search path">; 3333def iframeworkwithsysroot : JoinedOrSeparate<["-"], "iframeworkwithsysroot">, 3334 Group<clang_i_Group>, 3335 HelpText<"Add directory to SYSTEM framework search path, " 3336 "absolute paths are relative to -isysroot">, 3337 MetaVarName<"<directory>">, Flags<[CC1Option]>; 3338def imacros : JoinedOrSeparate<["-", "--"], "imacros">, Group<clang_i_Group>, Flags<[CC1Option]>, 3339 HelpText<"Include macros from file before parsing">, MetaVarName<"<file>">, 3340 MarshallingInfoStringVector<PreprocessorOpts<"MacroIncludes">>; 3341def image__base : Separate<["-"], "image_base">; 3342def include_ : JoinedOrSeparate<["-", "--"], "include">, Group<clang_i_Group>, EnumName<"include">, 3343 MetaVarName<"<file>">, HelpText<"Include file before parsing">, Flags<[CC1Option]>; 3344def include_pch : Separate<["-"], "include-pch">, Group<clang_i_Group>, Flags<[CC1Option]>, 3345 HelpText<"Include precompiled header file">, MetaVarName<"<file>">, 3346 MarshallingInfoString<PreprocessorOpts<"ImplicitPCHInclude">>; 3347def relocatable_pch : Flag<["-", "--"], "relocatable-pch">, Flags<[CC1Option]>, 3348 HelpText<"Whether to build a relocatable precompiled header">, 3349 MarshallingInfoFlag<FrontendOpts<"RelocatablePCH">>; 3350def verify_pch : Flag<["-"], "verify-pch">, Group<Action_Group>, Flags<[CC1Option]>, 3351 HelpText<"Load and verify that a pre-compiled header file is not stale">; 3352def init : Separate<["-"], "init">; 3353def install__name : Separate<["-"], "install_name">; 3354def iprefix : JoinedOrSeparate<["-"], "iprefix">, Group<clang_i_Group>, Flags<[CC1Option]>, 3355 HelpText<"Set the -iwithprefix/-iwithprefixbefore prefix">, MetaVarName<"<dir>">; 3356def iquote : JoinedOrSeparate<["-"], "iquote">, Group<clang_i_Group>, Flags<[CC1Option]>, 3357 HelpText<"Add directory to QUOTE include search path">, MetaVarName<"<directory>">; 3358def isysroot : JoinedOrSeparate<["-"], "isysroot">, Group<clang_i_Group>, Flags<[CC1Option]>, 3359 HelpText<"Set the system root directory (usually /)">, MetaVarName<"<dir>">, 3360 MarshallingInfoString<HeaderSearchOpts<"Sysroot">, [{"/"}]>; 3361def isystem : JoinedOrSeparate<["-"], "isystem">, Group<clang_i_Group>, 3362 Flags<[CC1Option]>, 3363 HelpText<"Add directory to SYSTEM include search path">, MetaVarName<"<directory>">; 3364def isystem_after : JoinedOrSeparate<["-"], "isystem-after">, 3365 Group<clang_i_Group>, Flags<[NoXarchOption]>, MetaVarName<"<directory>">, 3366 HelpText<"Add directory to end of the SYSTEM include search path">; 3367def iwithprefixbefore : JoinedOrSeparate<["-"], "iwithprefixbefore">, Group<clang_i_Group>, 3368 HelpText<"Set directory to include search path with prefix">, MetaVarName<"<dir>">, 3369 Flags<[CC1Option]>; 3370def iwithprefix : JoinedOrSeparate<["-"], "iwithprefix">, Group<clang_i_Group>, Flags<[CC1Option]>, 3371 HelpText<"Set directory to SYSTEM include search path with prefix">, MetaVarName<"<dir>">; 3372def iwithsysroot : JoinedOrSeparate<["-"], "iwithsysroot">, Group<clang_i_Group>, 3373 HelpText<"Add directory to SYSTEM include search path, " 3374 "absolute paths are relative to -isysroot">, MetaVarName<"<directory>">, 3375 Flags<[CC1Option]>; 3376def ivfsoverlay : JoinedOrSeparate<["-"], "ivfsoverlay">, Group<clang_i_Group>, Flags<[CC1Option]>, 3377 HelpText<"Overlay the virtual filesystem described by file over the real file system">; 3378def imultilib : Separate<["-"], "imultilib">, Group<gfortran_Group>; 3379def keep__private__externs : Flag<["-"], "keep_private_externs">; 3380def l : JoinedOrSeparate<["-"], "l">, Flags<[LinkerInput, RenderJoined]>, 3381 Group<Link_Group>; 3382def lazy__framework : Separate<["-"], "lazy_framework">, Flags<[LinkerInput]>; 3383def lazy__library : Separate<["-"], "lazy_library">, Flags<[LinkerInput]>; 3384def mlittle_endian : Flag<["-"], "mlittle-endian">, Flags<[NoXarchOption]>; 3385def EL : Flag<["-"], "EL">, Alias<mlittle_endian>; 3386def mbig_endian : Flag<["-"], "mbig-endian">, Flags<[NoXarchOption]>; 3387def EB : Flag<["-"], "EB">, Alias<mbig_endian>; 3388def m16 : Flag<["-"], "m16">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>; 3389def m32 : Flag<["-"], "m32">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>; 3390def mqdsp6_compat : Flag<["-"], "mqdsp6-compat">, Group<m_Group>, Flags<[NoXarchOption,CC1Option]>, 3391 HelpText<"Enable hexagon-qdsp6 backward compatibility">, 3392 MarshallingInfoFlag<LangOpts<"HexagonQdsp6Compat">>; 3393def m64 : Flag<["-"], "m64">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>; 3394def mx32 : Flag<["-"], "mx32">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>; 3395def mabi_EQ : Joined<["-"], "mabi=">, Group<m_Group>; 3396def miamcu : Flag<["-"], "miamcu">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>, 3397 HelpText<"Use Intel MCU ABI">; 3398def mno_iamcu : Flag<["-"], "mno-iamcu">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>; 3399def malign_functions_EQ : Joined<["-"], "malign-functions=">, Group<clang_ignored_m_Group>; 3400def malign_loops_EQ : Joined<["-"], "malign-loops=">, Group<clang_ignored_m_Group>; 3401def malign_jumps_EQ : Joined<["-"], "malign-jumps=">, Group<clang_ignored_m_Group>; 3402def malign_branch_EQ : CommaJoined<["-"], "malign-branch=">, Group<m_Group>, Flags<[NoXarchOption]>, 3403 HelpText<"Specify types of branches to align">; 3404def malign_branch_boundary_EQ : Joined<["-"], "malign-branch-boundary=">, Group<m_Group>, Flags<[NoXarchOption]>, 3405 HelpText<"Specify the boundary's size to align branches">; 3406def mpad_max_prefix_size_EQ : Joined<["-"], "mpad-max-prefix-size=">, Group<m_Group>, Flags<[NoXarchOption]>, 3407 HelpText<"Specify maximum number of prefixes to use for padding">; 3408def mbranches_within_32B_boundaries : Flag<["-"], "mbranches-within-32B-boundaries">, Flags<[NoXarchOption]>, Group<m_Group>, 3409 HelpText<"Align selected branches (fused, jcc, jmp) within 32-byte boundary">; 3410def mfancy_math_387 : Flag<["-"], "mfancy-math-387">, Group<clang_ignored_m_Group>; 3411def mlong_calls : Flag<["-"], "mlong-calls">, Group<m_Group>, 3412 HelpText<"Generate branches with extended addressability, usually via indirect jumps.">; 3413def mdouble_EQ : Joined<["-"], "mdouble=">, Group<m_Group>, 3414 MetaVarName<"<n">, Values<"32,64">, Flags<[CC1Option]>, 3415 HelpText<"Force double to be <n> bits">, 3416 MarshallingInfoInt<LangOpts<"DoubleSize">, "0">; 3417def LongDouble_Group : OptionGroup<"<LongDouble group>">, Group<m_Group>, 3418 DocName<"Long double flags">, 3419 DocBrief<[{Selects the long double implementation}]>; 3420def mlong_double_64 : Flag<["-"], "mlong-double-64">, Group<LongDouble_Group>, Flags<[CC1Option]>, 3421 HelpText<"Force long double to be 64 bits">; 3422def mlong_double_80 : Flag<["-"], "mlong-double-80">, Group<LongDouble_Group>, Flags<[CC1Option]>, 3423 HelpText<"Force long double to be 80 bits, padded to 128 bits for storage">; 3424def mlong_double_128 : Flag<["-"], "mlong-double-128">, Group<LongDouble_Group>, Flags<[CC1Option]>, 3425 HelpText<"Force long double to be 128 bits">; 3426def mno_long_calls : Flag<["-"], "mno-long-calls">, Group<m_Group>, 3427 HelpText<"Restore the default behaviour of not generating long calls">; 3428def mexecute_only : Flag<["-"], "mexecute-only">, Group<m_arm_Features_Group>, 3429 HelpText<"Disallow generation of data access to code sections (ARM only)">; 3430def mno_execute_only : Flag<["-"], "mno-execute-only">, Group<m_arm_Features_Group>, 3431 HelpText<"Allow generation of data access to code sections (ARM only)">; 3432def mtp_mode_EQ : Joined<["-"], "mtp=">, Group<m_arm_Features_Group>, Values<"soft,cp15,el0,el1,el2,el3">, 3433 HelpText<"Thread pointer access method (AArch32/AArch64 only)">; 3434def mpure_code : Flag<["-"], "mpure-code">, Alias<mexecute_only>; // Alias for GCC compatibility 3435def mno_pure_code : Flag<["-"], "mno-pure-code">, Alias<mno_execute_only>; 3436def mtvos_version_min_EQ : Joined<["-"], "mtvos-version-min=">, Group<m_Group>; 3437def mappletvos_version_min_EQ : Joined<["-"], "mappletvos-version-min=">, Alias<mtvos_version_min_EQ>; 3438def mtvos_simulator_version_min_EQ : Joined<["-"], "mtvos-simulator-version-min=">; 3439def mappletvsimulator_version_min_EQ : Joined<["-"], "mappletvsimulator-version-min=">, Alias<mtvos_simulator_version_min_EQ>; 3440def mwatchos_version_min_EQ : Joined<["-"], "mwatchos-version-min=">, Group<m_Group>; 3441def mwatchos_simulator_version_min_EQ : Joined<["-"], "mwatchos-simulator-version-min=">; 3442def mwatchsimulator_version_min_EQ : Joined<["-"], "mwatchsimulator-version-min=">, Alias<mwatchos_simulator_version_min_EQ>; 3443def march_EQ : Joined<["-"], "march=">, Group<m_Group>, Flags<[CoreOption]>; 3444def masm_EQ : Joined<["-"], "masm=">, Group<m_Group>, Flags<[NoXarchOption]>; 3445def inline_asm_EQ : Joined<["-"], "inline-asm=">, Group<m_Group>, Flags<[CC1Option]>, 3446 Values<"att,intel">, 3447 NormalizedValuesScope<"CodeGenOptions">, NormalizedValues<["IAD_ATT", "IAD_Intel"]>, 3448 MarshallingInfoEnum<CodeGenOpts<"InlineAsmDialect">, "IAD_ATT">; 3449def mcmodel_EQ : Joined<["-"], "mcmodel=">, Group<m_Group>, Flags<[CC1Option]>, 3450 MarshallingInfoString<TargetOpts<"CodeModel">, [{"default"}]>; 3451def mtls_size_EQ : Joined<["-"], "mtls-size=">, Group<m_Group>, Flags<[NoXarchOption, CC1Option]>, 3452 HelpText<"Specify bit size of immediate TLS offsets (AArch64 ELF only): " 3453 "12 (for 4KB) | 24 (for 16MB, default) | 32 (for 4GB) | 48 (for 256TB, needs -mcmodel=large)">, 3454 MarshallingInfoInt<CodeGenOpts<"TLSSize">>; 3455def mimplicit_it_EQ : Joined<["-"], "mimplicit-it=">, Group<m_Group>; 3456def mdefault_build_attributes : Joined<["-"], "mdefault-build-attributes">, Group<m_Group>; 3457def mno_default_build_attributes : Joined<["-"], "mno-default-build-attributes">, Group<m_Group>; 3458def mconstant_cfstrings : Flag<["-"], "mconstant-cfstrings">, Group<clang_ignored_m_Group>; 3459def mconsole : Joined<["-"], "mconsole">, Group<m_Group>, Flags<[NoXarchOption]>; 3460def mwindows : Joined<["-"], "mwindows">, Group<m_Group>, Flags<[NoXarchOption]>; 3461def mdll : Joined<["-"], "mdll">, Group<m_Group>, Flags<[NoXarchOption]>; 3462def municode : Joined<["-"], "municode">, Group<m_Group>, Flags<[NoXarchOption]>; 3463def mthreads : Joined<["-"], "mthreads">, Group<m_Group>, Flags<[NoXarchOption]>; 3464def mguard_EQ : Joined<["-"], "mguard=">, Group<m_Group>, Flags<[NoXarchOption]>, 3465 HelpText<"Enable or disable Control Flow Guard checks and guard tables emission">, 3466 Values<"none,cf,cf-nochecks">; 3467def mcpu_EQ : Joined<["-"], "mcpu=">, Group<m_Group>; 3468def mmcu_EQ : Joined<["-"], "mmcu=">, Group<m_Group>; 3469def msim : Flag<["-"], "msim">, Group<m_Group>; 3470def mdynamic_no_pic : Joined<["-"], "mdynamic-no-pic">, Group<m_Group>; 3471def mfix_and_continue : Flag<["-"], "mfix-and-continue">, Group<clang_ignored_m_Group>; 3472def mieee_fp : Flag<["-"], "mieee-fp">, Group<clang_ignored_m_Group>; 3473def minline_all_stringops : Flag<["-"], "minline-all-stringops">, Group<clang_ignored_m_Group>; 3474def mno_inline_all_stringops : Flag<["-"], "mno-inline-all-stringops">, Group<clang_ignored_m_Group>; 3475def malign_double : Flag<["-"], "malign-double">, Group<m_Group>, Flags<[CC1Option]>, 3476 HelpText<"Align doubles to two words in structs (x86 only)">, 3477 MarshallingInfoFlag<LangOpts<"AlignDouble">>; 3478def mfloat_abi_EQ : Joined<["-"], "mfloat-abi=">, Group<m_Group>, Values<"soft,softfp,hard">; 3479def mfpmath_EQ : Joined<["-"], "mfpmath=">, Group<m_Group>; 3480def mfpu_EQ : Joined<["-"], "mfpu=">, Group<m_Group>; 3481def mhwdiv_EQ : Joined<["-"], "mhwdiv=">, Group<m_Group>; 3482def mhwmult_EQ : Joined<["-"], "mhwmult=">, Group<m_Group>; 3483def mglobal_merge : Flag<["-"], "mglobal-merge">, Group<m_Group>, Flags<[CC1Option]>, 3484 HelpText<"Enable merging of globals">; 3485def mhard_float : Flag<["-"], "mhard-float">, Group<m_Group>; 3486def mios_version_min_EQ : Joined<["-"], "mios-version-min=">, 3487 Group<m_Group>, HelpText<"Set iOS deployment target">; 3488def : Joined<["-"], "miphoneos-version-min=">, 3489 Group<m_Group>, Alias<mios_version_min_EQ>; 3490def mios_simulator_version_min_EQ : Joined<["-"], "mios-simulator-version-min=">; 3491def : Joined<["-"], "miphonesimulator-version-min=">, Alias<mios_simulator_version_min_EQ>; 3492def mkernel : Flag<["-"], "mkernel">, Group<m_Group>; 3493def mlinker_version_EQ : Joined<["-"], "mlinker-version=">, 3494 Flags<[NoXarchOption]>; 3495def mllvm : Separate<["-"], "mllvm">,Flags<[CC1Option,CC1AsOption,CoreOption,FC1Option,FlangOption]>, 3496 HelpText<"Additional arguments to forward to LLVM's option processing">, 3497 MarshallingInfoStringVector<FrontendOpts<"LLVMArgs">>; 3498def mmlir : Separate<["-"], "mmlir">, Flags<[CoreOption,FC1Option,FlangOption]>, 3499 HelpText<"Additional arguments to forward to MLIR's option processing">; 3500def ffuchsia_api_level_EQ : Joined<["-"], "ffuchsia-api-level=">, 3501 Group<m_Group>, Flags<[CC1Option]>, HelpText<"Set Fuchsia API level">, 3502 MarshallingInfoInt<LangOpts<"FuchsiaAPILevel">>; 3503def mmacos_version_min_EQ : Joined<["-"], "mmacos-version-min=">, 3504 Group<m_Group>, HelpText<"Set macOS deployment target">; 3505def : Joined<["-"], "mmacosx-version-min=">, 3506 Group<m_Group>, Alias<mmacos_version_min_EQ>; 3507def mms_bitfields : Flag<["-"], "mms-bitfields">, Group<m_Group>, Flags<[CC1Option]>, 3508 HelpText<"Set the default structure layout to be compatible with the Microsoft compiler standard">, 3509 MarshallingInfoFlag<LangOpts<"MSBitfields">>; 3510def moutline : Flag<["-"], "moutline">, Group<f_clang_Group>, Flags<[CC1Option]>, 3511 HelpText<"Enable function outlining (AArch64 only)">; 3512def mno_outline : Flag<["-"], "mno-outline">, Group<f_clang_Group>, Flags<[CC1Option]>, 3513 HelpText<"Disable function outlining (AArch64 only)">; 3514def mno_ms_bitfields : Flag<["-"], "mno-ms-bitfields">, Group<m_Group>, 3515 HelpText<"Do not set the default structure layout to be compatible with the Microsoft compiler standard">; 3516def mskip_rax_setup : Flag<["-"], "mskip-rax-setup">, Group<m_Group>, Flags<[CC1Option]>, 3517 HelpText<"Skip setting up RAX register when passing variable arguments (x86 only)">, 3518 MarshallingInfoFlag<CodeGenOpts<"SkipRaxSetup">>; 3519def mno_skip_rax_setup : Flag<["-"], "mno-skip-rax-setup">, Group<m_Group>, Flags<[CC1Option]>; 3520def mstackrealign : Flag<["-"], "mstackrealign">, Group<m_Group>, Flags<[CC1Option]>, 3521 HelpText<"Force realign the stack at entry to every function">, 3522 MarshallingInfoFlag<CodeGenOpts<"StackRealignment">>; 3523def mstack_alignment : Joined<["-"], "mstack-alignment=">, Group<m_Group>, Flags<[CC1Option]>, 3524 HelpText<"Set the stack alignment">, 3525 MarshallingInfoInt<CodeGenOpts<"StackAlignment">>; 3526def mstack_probe_size : Joined<["-"], "mstack-probe-size=">, Group<m_Group>, Flags<[CC1Option]>, 3527 HelpText<"Set the stack probe size">, 3528 MarshallingInfoInt<CodeGenOpts<"StackProbeSize">, "4096">; 3529def mstack_arg_probe : Flag<["-"], "mstack-arg-probe">, Group<m_Group>, 3530 HelpText<"Enable stack probes">; 3531def mno_stack_arg_probe : Flag<["-"], "mno-stack-arg-probe">, Group<m_Group>, Flags<[CC1Option]>, 3532 HelpText<"Disable stack probes which are enabled by default">, 3533 MarshallingInfoFlag<CodeGenOpts<"NoStackArgProbe">>; 3534def mthread_model : Separate<["-"], "mthread-model">, Group<m_Group>, Flags<[CC1Option]>, 3535 HelpText<"The thread model to use. Defaults to 'posix')">, Values<"posix,single">, 3536 NormalizedValues<["POSIX", "Single"]>, NormalizedValuesScope<"LangOptions::ThreadModelKind">, 3537 MarshallingInfoEnum<LangOpts<"ThreadModel">, "POSIX">; 3538def meabi : Separate<["-"], "meabi">, Group<m_Group>, Flags<[CC1Option]>, 3539 HelpText<"Set EABI type. Default depends on triple)">, Values<"default,4,5,gnu">, 3540 MarshallingInfoEnum<TargetOpts<"EABIVersion">, "Default">, 3541 NormalizedValuesScope<"llvm::EABI">, 3542 NormalizedValues<["Default", "EABI4", "EABI5", "GNU"]>; 3543def mtargetos_EQ : Joined<["-"], "mtargetos=">, Group<m_Group>, 3544 HelpText<"Set the deployment target to be the specified OS and OS version">; 3545 3546def mno_constant_cfstrings : Flag<["-"], "mno-constant-cfstrings">, Group<m_Group>; 3547def mno_global_merge : Flag<["-"], "mno-global-merge">, Group<m_Group>, Flags<[CC1Option]>, 3548 HelpText<"Disable merging of globals">; 3549def mno_pascal_strings : Flag<["-"], "mno-pascal-strings">, 3550 Alias<fno_pascal_strings>; 3551def mno_red_zone : Flag<["-"], "mno-red-zone">, Group<m_Group>; 3552def mno_tls_direct_seg_refs : Flag<["-"], "mno-tls-direct-seg-refs">, Group<m_Group>, Flags<[CC1Option]>, 3553 HelpText<"Disable direct TLS access through segment registers">, 3554 MarshallingInfoFlag<CodeGenOpts<"IndirectTlsSegRefs">>; 3555def mno_relax_all : Flag<["-"], "mno-relax-all">, Group<m_Group>; 3556def mno_rtd: Flag<["-"], "mno-rtd">, Group<m_Group>; 3557def mno_soft_float : Flag<["-"], "mno-soft-float">, Group<m_Group>; 3558def mno_stackrealign : Flag<["-"], "mno-stackrealign">, Group<m_Group>; 3559 3560def mretpoline : Flag<["-"], "mretpoline">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>; 3561def mno_retpoline : Flag<["-"], "mno-retpoline">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>; 3562defm speculative_load_hardening : BoolOption<"m", "speculative-load-hardening", 3563 CodeGenOpts<"SpeculativeLoadHardening">, DefaultFalse, 3564 PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>, BothFlags<[CoreOption]>>, 3565 Group<m_Group>; 3566def mlvi_hardening : Flag<["-"], "mlvi-hardening">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>, 3567 HelpText<"Enable all mitigations for Load Value Injection (LVI)">; 3568def mno_lvi_hardening : Flag<["-"], "mno-lvi-hardening">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>, 3569 HelpText<"Disable mitigations for Load Value Injection (LVI)">; 3570def mlvi_cfi : Flag<["-"], "mlvi-cfi">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>, 3571 HelpText<"Enable only control-flow mitigations for Load Value Injection (LVI)">; 3572def mno_lvi_cfi : Flag<["-"], "mno-lvi-cfi">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>, 3573 HelpText<"Disable control-flow mitigations for Load Value Injection (LVI)">; 3574def m_seses : Flag<["-"], "mseses">, Group<m_Group>, Flags<[CoreOption, NoXarchOption]>, 3575 HelpText<"Enable speculative execution side effect suppression (SESES). " 3576 "Includes LVI control flow integrity mitigations">; 3577def mno_seses : Flag<["-"], "mno-seses">, Group<m_Group>, Flags<[CoreOption, NoXarchOption]>, 3578 HelpText<"Disable speculative execution side effect suppression (SESES)">; 3579 3580def mrelax : Flag<["-"], "mrelax">, Group<m_Group>, 3581 HelpText<"Enable linker relaxation">; 3582def mno_relax : Flag<["-"], "mno-relax">, Group<m_Group>, 3583 HelpText<"Disable linker relaxation">; 3584def msmall_data_limit_EQ : Joined<["-"], "msmall-data-limit=">, Group<m_Group>, 3585 Alias<G>, 3586 HelpText<"Put global and static data smaller than the limit into a special section">; 3587def msave_restore : Flag<["-"], "msave-restore">, Group<m_riscv_Features_Group>, 3588 HelpText<"Enable using library calls for save and restore">; 3589def mno_save_restore : Flag<["-"], "mno-save-restore">, Group<m_riscv_Features_Group>, 3590 HelpText<"Disable using library calls for save and restore">; 3591def mcmodel_EQ_medlow : Flag<["-"], "mcmodel=medlow">, Group<m_Group>, 3592 Flags<[CC1Option]>, Alias<mcmodel_EQ>, AliasArgs<["small"]>, 3593 HelpText<"Equivalent to -mcmodel=small, compatible with RISC-V gcc.">; 3594def mcmodel_EQ_medany : Flag<["-"], "mcmodel=medany">, Group<m_Group>, 3595 Flags<[CC1Option]>, Alias<mcmodel_EQ>, AliasArgs<["medium"]>, 3596 HelpText<"Equivalent to -mcmodel=medium, compatible with RISC-V gcc.">; 3597def menable_experimental_extensions : Flag<["-"], "menable-experimental-extensions">, Group<m_Group>, 3598 HelpText<"Enable use of experimental RISC-V extensions.">; 3599 3600def munaligned_access : Flag<["-"], "munaligned-access">, Group<m_arm_Features_Group>, 3601 HelpText<"Allow memory accesses to be unaligned (AArch32/AArch64 only)">; 3602def mno_unaligned_access : Flag<["-"], "mno-unaligned-access">, Group<m_arm_Features_Group>, 3603 HelpText<"Force all memory accesses to be aligned (AArch32/AArch64 only)">; 3604def mstrict_align : Flag<["-"], "mstrict-align">, Alias<mno_unaligned_access>, Flags<[CC1Option,HelpHidden]>, 3605 HelpText<"Force all memory accesses to be aligned (same as mno-unaligned-access)">; 3606def mno_thumb : Flag<["-"], "mno-thumb">, Group<m_arm_Features_Group>; 3607def mrestrict_it: Flag<["-"], "mrestrict-it">, Group<m_arm_Features_Group>, 3608 HelpText<"Disallow generation of complex IT blocks.">; 3609def mno_restrict_it: Flag<["-"], "mno-restrict-it">, Group<m_arm_Features_Group>, 3610 HelpText<"Allow generation of complex IT blocks.">; 3611def marm : Flag<["-"], "marm">, Alias<mno_thumb>; 3612def ffixed_r9 : Flag<["-"], "ffixed-r9">, Group<m_arm_Features_Group>, 3613 HelpText<"Reserve the r9 register (ARM only)">; 3614def mno_movt : Flag<["-"], "mno-movt">, Group<m_arm_Features_Group>, 3615 HelpText<"Disallow use of movt/movw pairs (ARM only)">; 3616def mcrc : Flag<["-"], "mcrc">, Group<m_Group>, 3617 HelpText<"Allow use of CRC instructions (ARM/Mips only)">; 3618def mnocrc : Flag<["-"], "mnocrc">, Group<m_arm_Features_Group>, 3619 HelpText<"Disallow use of CRC instructions (ARM only)">; 3620def mno_neg_immediates: Flag<["-"], "mno-neg-immediates">, Group<m_arm_Features_Group>, 3621 HelpText<"Disallow converting instructions with negative immediates to their negation or inversion.">; 3622def mcmse : Flag<["-"], "mcmse">, Group<m_arm_Features_Group>, 3623 Flags<[NoXarchOption,CC1Option]>, 3624 HelpText<"Allow use of CMSE (Armv8-M Security Extensions)">, 3625 MarshallingInfoFlag<LangOpts<"Cmse">>; 3626def ForceAAPCSBitfieldLoad : Flag<["-"], "faapcs-bitfield-load">, Group<m_arm_Features_Group>, 3627 Flags<[NoXarchOption,CC1Option]>, 3628 HelpText<"Follows the AAPCS standard that all volatile bit-field write generates at least one load. (ARM only).">, 3629 MarshallingInfoFlag<CodeGenOpts<"ForceAAPCSBitfieldLoad">>; 3630defm aapcs_bitfield_width : BoolOption<"f", "aapcs-bitfield-width", 3631 CodeGenOpts<"AAPCSBitfieldWidth">, DefaultTrue, 3632 NegFlag<SetFalse, [], "Do not follow">, PosFlag<SetTrue, [], "Follow">, 3633 BothFlags<[NoXarchOption, CC1Option], " the AAPCS standard requirement stating that" 3634 " volatile bit-field width is dictated by the field container type. (ARM only).">>, 3635 Group<m_arm_Features_Group>; 3636def mframe_chain : Joined<["-"], "mframe-chain=">, 3637 Group<m_arm_Features_Group>, Values<"none,aapcs,aapcs+leaf">, 3638 HelpText<"Select the frame chain model used to emit frame records (Arm only).">; 3639def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group<m_Group>, 3640 HelpText<"Generate code which only uses the general purpose registers (AArch64/x86 only)">; 3641def mfix_cmse_cve_2021_35465 : Flag<["-"], "mfix-cmse-cve-2021-35465">, 3642 Group<m_arm_Features_Group>, 3643 HelpText<"Work around VLLDM erratum CVE-2021-35465 (ARM only)">; 3644def mno_fix_cmse_cve_2021_35465 : Flag<["-"], "mno-fix-cmse-cve-2021-35465">, 3645 Group<m_arm_Features_Group>, 3646 HelpText<"Don't work around VLLDM erratum CVE-2021-35465 (ARM only)">; 3647def mfix_cortex_a57_aes_1742098 : Flag<["-"], "mfix-cortex-a57-aes-1742098">, 3648 Group<m_arm_Features_Group>, 3649 HelpText<"Work around Cortex-A57 Erratum 1742098 (ARM only)">; 3650def mno_fix_cortex_a57_aes_1742098 : Flag<["-"], "mno-fix-cortex-a57-aes-1742098">, 3651 Group<m_arm_Features_Group>, 3652 HelpText<"Don't work around Cortex-A57 Erratum 1742098 (ARM only)">; 3653def mfix_cortex_a72_aes_1655431 : Flag<["-"], "mfix-cortex-a72-aes-1655431">, 3654 Group<m_arm_Features_Group>, 3655 HelpText<"Work around Cortex-A72 Erratum 1655431 (ARM only)">, 3656 Alias<mfix_cortex_a57_aes_1742098>; 3657def mno_fix_cortex_a72_aes_1655431 : Flag<["-"], "mno-fix-cortex-a72-aes-1655431">, 3658 Group<m_arm_Features_Group>, 3659 HelpText<"Don't work around Cortex-A72 Erratum 1655431 (ARM only)">, 3660 Alias<mno_fix_cortex_a57_aes_1742098>; 3661def mfix_cortex_a53_835769 : Flag<["-"], "mfix-cortex-a53-835769">, 3662 Group<m_aarch64_Features_Group>, 3663 HelpText<"Workaround Cortex-A53 erratum 835769 (AArch64 only)">; 3664def mno_fix_cortex_a53_835769 : Flag<["-"], "mno-fix-cortex-a53-835769">, 3665 Group<m_aarch64_Features_Group>, 3666 HelpText<"Don't workaround Cortex-A53 erratum 835769 (AArch64 only)">; 3667def mmark_bti_property : Flag<["-"], "mmark-bti-property">, 3668 Group<m_aarch64_Features_Group>, 3669 HelpText<"Add .note.gnu.property with BTI to assembly files (AArch64 only)">; 3670def mno_bti_at_return_twice : Flag<["-"], "mno-bti-at-return-twice">, 3671 Group<m_arm_Features_Group>, 3672 HelpText<"Do not add a BTI instruction after a setjmp or other" 3673 " return-twice construct (Arm/AArch64 only)">; 3674 3675foreach i = {1-31} in 3676 def ffixed_x#i : Flag<["-"], "ffixed-x"#i>, Group<m_Group>, 3677 HelpText<"Reserve the x"#i#" register (AArch64/RISC-V only)">; 3678 3679foreach i = {8-15,18} in 3680 def fcall_saved_x#i : Flag<["-"], "fcall-saved-x"#i>, Group<m_aarch64_Features_Group>, 3681 HelpText<"Make the x"#i#" register call-saved (AArch64 only)">; 3682 3683def msve_vector_bits_EQ : Joined<["-"], "msve-vector-bits=">, Group<m_aarch64_Features_Group>, 3684 HelpText<"Specify the size in bits of an SVE vector register. Defaults to the" 3685 " vector length agnostic value of \"scalable\". (AArch64 only)">; 3686 3687def mvscale_min_EQ : Joined<["-"], "mvscale-min=">, 3688 Group<m_aarch64_Features_Group>, Flags<[NoXarchOption,CC1Option]>, 3689 HelpText<"Specify the vscale minimum. Defaults to \"1\". (AArch64 only)">, 3690 MarshallingInfoInt<LangOpts<"VScaleMin">>; 3691def mvscale_max_EQ : Joined<["-"], "mvscale-max=">, 3692 Group<m_aarch64_Features_Group>, Flags<[NoXarchOption,CC1Option]>, 3693 HelpText<"Specify the vscale maximum. Defaults to the" 3694 " vector length agnostic value of \"0\". (AArch64 only)">, 3695 MarshallingInfoInt<LangOpts<"VScaleMax">>; 3696 3697def msign_return_address_EQ : Joined<["-"], "msign-return-address=">, 3698 Flags<[CC1Option]>, Group<m_Group>, Values<"none,all,non-leaf">, 3699 HelpText<"Select return address signing scope">; 3700def mbranch_protection_EQ : Joined<["-"], "mbranch-protection=">, 3701 Group<m_Group>, 3702 HelpText<"Enforce targets of indirect branches and function returns">; 3703 3704def mharden_sls_EQ : Joined<["-"], "mharden-sls=">, 3705 HelpText<"Select straight-line speculation hardening scope (ARM/AArch64/X86" 3706 " only). <arg> must be: all, none, retbr(ARM/AArch64)," 3707 " blr(ARM/AArch64), comdat(ARM/AArch64), nocomdat(ARM/AArch64)," 3708 " return(X86), indirect-jmp(X86)">; 3709 3710def msimd128 : Flag<["-"], "msimd128">, Group<m_wasm_Features_Group>; 3711def mno_simd128 : Flag<["-"], "mno-simd128">, Group<m_wasm_Features_Group>; 3712def mrelaxed_simd : Flag<["-"], "mrelaxed-simd">, Group<m_wasm_Features_Group>; 3713def mno_relaxed_simd : Flag<["-"], "mno-relaxed-simd">, Group<m_wasm_Features_Group>; 3714def mnontrapping_fptoint : Flag<["-"], "mnontrapping-fptoint">, Group<m_wasm_Features_Group>; 3715def mno_nontrapping_fptoint : Flag<["-"], "mno-nontrapping-fptoint">, Group<m_wasm_Features_Group>; 3716def msign_ext : Flag<["-"], "msign-ext">, Group<m_wasm_Features_Group>; 3717def mno_sign_ext : Flag<["-"], "mno-sign-ext">, Group<m_wasm_Features_Group>; 3718def mexception_handing : Flag<["-"], "mexception-handling">, Group<m_wasm_Features_Group>; 3719def mno_exception_handing : Flag<["-"], "mno-exception-handling">, Group<m_wasm_Features_Group>; 3720def matomics : Flag<["-"], "matomics">, Group<m_wasm_Features_Group>; 3721def mno_atomics : Flag<["-"], "mno-atomics">, Group<m_wasm_Features_Group>; 3722def mbulk_memory : Flag<["-"], "mbulk-memory">, Group<m_wasm_Features_Group>; 3723def mno_bulk_memory : Flag<["-"], "mno-bulk-memory">, Group<m_wasm_Features_Group>; 3724def mmutable_globals : Flag<["-"], "mmutable-globals">, Group<m_wasm_Features_Group>; 3725def mno_mutable_globals : Flag<["-"], "mno-mutable-globals">, Group<m_wasm_Features_Group>; 3726def mmultivalue : Flag<["-"], "mmultivalue">, Group<m_wasm_Features_Group>; 3727def mno_multivalue : Flag<["-"], "mno-multivalue">, Group<m_wasm_Features_Group>; 3728def mtail_call : Flag<["-"], "mtail-call">, Group<m_wasm_Features_Group>; 3729def mno_tail_call : Flag<["-"], "mno-tail-call">, Group<m_wasm_Features_Group>; 3730def mreference_types : Flag<["-"], "mreference-types">, Group<m_wasm_Features_Group>; 3731def mno_reference_types : Flag<["-"], "mno-reference-types">, Group<m_wasm_Features_Group>; 3732def mextended_const : Flag<["-"], "mextended-const">, Group<m_wasm_Features_Group>; 3733def mno_extended_const : Flag<["-"], "mno-extended-const">, Group<m_wasm_Features_Group>; 3734def mexec_model_EQ : Joined<["-"], "mexec-model=">, Group<m_wasm_Features_Driver_Group>, 3735 Values<"command,reactor">, 3736 HelpText<"Execution model (WebAssembly only)">; 3737 3738defm amdgpu_ieee : BoolOption<"m", "amdgpu-ieee", 3739 CodeGenOpts<"EmitIEEENaNCompliantInsts">, DefaultTrue, 3740 PosFlag<SetTrue, [], "Sets the IEEE bit in the expected default floating point " 3741 " mode register. Floating point opcodes that support exception flag " 3742 "gathering quiet and propagate signaling NaN inputs per IEEE 754-2008. " 3743 "This option changes the ABI. (AMDGPU only)">, 3744 NegFlag<SetFalse, [CC1Option]>>, Group<m_Group>; 3745 3746def mcode_object_version_EQ : Joined<["-"], "mcode-object-version=">, Group<m_Group>, 3747 HelpText<"Specify code object ABI version. Defaults to 4. (AMDGPU only)">, 3748 Flags<[CC1Option]>, 3749 Values<"none,2,3,4,5">, 3750 NormalizedValuesScope<"TargetOptions">, 3751 NormalizedValues<["COV_None", "COV_2", "COV_3", "COV_4", "COV_5"]>, 3752 MarshallingInfoEnum<TargetOpts<"CodeObjectVersion">, "COV_4">; 3753 3754defm code_object_v3_legacy : SimpleMFlag<"code-object-v3", 3755 "Legacy option to specify code object ABI V3", 3756 "Legacy option to specify code object ABI V2", 3757 " (AMDGPU only)">; 3758defm cumode : SimpleMFlag<"cumode", 3759 "Specify CU wavefront", "Specify WGP wavefront", 3760 " execution mode (AMDGPU only)", m_amdgpu_Features_Group>; 3761defm tgsplit : SimpleMFlag<"tgsplit", "Enable", "Disable", 3762 " threadgroup split execution mode (AMDGPU only)", m_amdgpu_Features_Group>; 3763defm wavefrontsize64 : SimpleMFlag<"wavefrontsize64", 3764 "Specify wavefront size 64", "Specify wavefront size 32", 3765 " mode (AMDGPU only)">; 3766 3767defm unsafe_fp_atomics : BoolOption<"m", "unsafe-fp-atomics", 3768 TargetOpts<"AllowAMDGPUUnsafeFPAtomics">, DefaultFalse, 3769 PosFlag<SetTrue, [CC1Option], "Enable unsafe floating point atomic instructions (AMDGPU only)">, 3770 NegFlag<SetFalse>>, Group<m_Group>; 3771 3772def faltivec : Flag<["-"], "faltivec">, Group<f_Group>, Flags<[NoXarchOption]>; 3773def fno_altivec : Flag<["-"], "fno-altivec">, Group<f_Group>, Flags<[NoXarchOption]>; 3774def maltivec : Flag<["-"], "maltivec">, Group<m_ppc_Features_Group>; 3775def mno_altivec : Flag<["-"], "mno-altivec">, Group<m_ppc_Features_Group>; 3776def mpcrel: Flag<["-"], "mpcrel">, Group<m_ppc_Features_Group>; 3777def mno_pcrel: Flag<["-"], "mno-pcrel">, Group<m_ppc_Features_Group>; 3778def mprefixed: Flag<["-"], "mprefixed">, Group<m_ppc_Features_Group>; 3779def mno_prefixed: Flag<["-"], "mno-prefixed">, Group<m_ppc_Features_Group>; 3780def mspe : Flag<["-"], "mspe">, Group<m_ppc_Features_Group>; 3781def mno_spe : Flag<["-"], "mno-spe">, Group<m_ppc_Features_Group>; 3782def mefpu2 : Flag<["-"], "mefpu2">, Group<m_ppc_Features_Group>; 3783def mabi_EQ_vec_extabi : Flag<["-"], "mabi=vec-extabi">, Group<m_Group>, Flags<[CC1Option]>, 3784 HelpText<"Enable the extended Altivec ABI on AIX (AIX only). Uses volatile and nonvolatile vector registers">, 3785 MarshallingInfoFlag<LangOpts<"EnableAIXExtendedAltivecABI">>; 3786def mabi_EQ_vec_default : Flag<["-"], "mabi=vec-default">, Group<m_Group>, Flags<[CC1Option]>, 3787 HelpText<"Enable the default Altivec ABI on AIX (AIX only). Uses only volatile vector registers.">; 3788def mabi_EQ_quadword_atomics : Flag<["-"], "mabi=quadword-atomics">, 3789 Group<m_Group>, Flags<[CC1Option]>, 3790 HelpText<"Enable quadword atomics ABI on AIX (AIX PPC64 only). Uses lqarx/stqcx. instructions.">, 3791 MarshallingInfoFlag<LangOpts<"EnableAIXQuadwordAtomicsABI">>; 3792def mvsx : Flag<["-"], "mvsx">, Group<m_ppc_Features_Group>; 3793def mno_vsx : Flag<["-"], "mno-vsx">, Group<m_ppc_Features_Group>; 3794def msecure_plt : Flag<["-"], "msecure-plt">, Group<m_ppc_Features_Group>; 3795def mpower8_vector : Flag<["-"], "mpower8-vector">, 3796 Group<m_ppc_Features_Group>; 3797def mno_power8_vector : Flag<["-"], "mno-power8-vector">, 3798 Group<m_ppc_Features_Group>; 3799def mpower9_vector : Flag<["-"], "mpower9-vector">, 3800 Group<m_ppc_Features_Group>; 3801def mno_power9_vector : Flag<["-"], "mno-power9-vector">, 3802 Group<m_ppc_Features_Group>; 3803def mpower10_vector : Flag<["-"], "mpower10-vector">, 3804 Group<m_ppc_Features_Group>; 3805def mno_power10_vector : Flag<["-"], "mno-power10-vector">, 3806 Group<m_ppc_Features_Group>; 3807def mpower8_crypto : Flag<["-"], "mcrypto">, 3808 Group<m_ppc_Features_Group>; 3809def mnopower8_crypto : Flag<["-"], "mno-crypto">, 3810 Group<m_ppc_Features_Group>; 3811def mdirect_move : Flag<["-"], "mdirect-move">, 3812 Group<m_ppc_Features_Group>; 3813def mnodirect_move : Flag<["-"], "mno-direct-move">, 3814 Group<m_ppc_Features_Group>; 3815def mpaired_vector_memops: Flag<["-"], "mpaired-vector-memops">, 3816 Group<m_ppc_Features_Group>; 3817def mnopaired_vector_memops: Flag<["-"], "mno-paired-vector-memops">, 3818 Group<m_ppc_Features_Group>; 3819def mhtm : Flag<["-"], "mhtm">, Group<m_ppc_Features_Group>; 3820def mno_htm : Flag<["-"], "mno-htm">, Group<m_ppc_Features_Group>; 3821def mfprnd : Flag<["-"], "mfprnd">, Group<m_ppc_Features_Group>; 3822def mno_fprnd : Flag<["-"], "mno-fprnd">, Group<m_ppc_Features_Group>; 3823def mcmpb : Flag<["-"], "mcmpb">, Group<m_ppc_Features_Group>; 3824def mno_cmpb : Flag<["-"], "mno-cmpb">, Group<m_ppc_Features_Group>; 3825def misel : Flag<["-"], "misel">, Group<m_ppc_Features_Group>; 3826def mno_isel : Flag<["-"], "mno-isel">, Group<m_ppc_Features_Group>; 3827def mmfocrf : Flag<["-"], "mmfocrf">, Group<m_ppc_Features_Group>; 3828def mmfcrf : Flag<["-"], "mmfcrf">, Alias<mmfocrf>; 3829def mno_mfocrf : Flag<["-"], "mno-mfocrf">, Group<m_ppc_Features_Group>; 3830def mno_mfcrf : Flag<["-"], "mno-mfcrf">, Alias<mno_mfocrf>; 3831def mpopcntd : Flag<["-"], "mpopcntd">, Group<m_ppc_Features_Group>; 3832def mno_popcntd : Flag<["-"], "mno-popcntd">, Group<m_ppc_Features_Group>; 3833def mcrbits : Flag<["-"], "mcrbits">, Group<m_ppc_Features_Group>; 3834def mno_crbits : Flag<["-"], "mno-crbits">, Group<m_ppc_Features_Group>; 3835def minvariant_function_descriptors : 3836 Flag<["-"], "minvariant-function-descriptors">, Group<m_ppc_Features_Group>; 3837def mno_invariant_function_descriptors : 3838 Flag<["-"], "mno-invariant-function-descriptors">, 3839 Group<m_ppc_Features_Group>; 3840def mfloat128: Flag<["-"], "mfloat128">, 3841 Group<m_ppc_Features_Group>; 3842def mno_float128 : Flag<["-"], "mno-float128">, 3843 Group<m_ppc_Features_Group>; 3844def mlongcall: Flag<["-"], "mlongcall">, 3845 Group<m_ppc_Features_Group>; 3846def mno_longcall : Flag<["-"], "mno-longcall">, 3847 Group<m_ppc_Features_Group>; 3848def mmma: Flag<["-"], "mmma">, Group<m_ppc_Features_Group>; 3849def mno_mma: Flag<["-"], "mno-mma">, Group<m_ppc_Features_Group>; 3850def mrop_protect : Flag<["-"], "mrop-protect">, 3851 Group<m_ppc_Features_Group>; 3852def mprivileged : Flag<["-"], "mprivileged">, 3853 Group<m_ppc_Features_Group>; 3854def maix_struct_return : Flag<["-"], "maix-struct-return">, 3855 Group<m_Group>, Flags<[CC1Option]>, 3856 HelpText<"Return all structs in memory (PPC32 only)">; 3857def msvr4_struct_return : Flag<["-"], "msvr4-struct-return">, 3858 Group<m_Group>, Flags<[CC1Option]>, 3859 HelpText<"Return small structs in registers (PPC32 only)">; 3860 3861def mvx : Flag<["-"], "mvx">, Group<m_Group>; 3862def mno_vx : Flag<["-"], "mno-vx">, Group<m_Group>; 3863 3864defm zvector : BoolFOption<"zvector", 3865 LangOpts<"ZVector">, DefaultFalse, 3866 PosFlag<SetTrue, [CC1Option], "Enable System z vector language extension">, 3867 NegFlag<SetFalse>>; 3868def mzvector : Flag<["-"], "mzvector">, Alias<fzvector>; 3869def mno_zvector : Flag<["-"], "mno-zvector">, Alias<fno_zvector>; 3870 3871def mignore_xcoff_visibility : Flag<["-"], "mignore-xcoff-visibility">, Group<m_Group>, 3872HelpText<"Not emit the visibility attribute for asm in AIX OS or give all symbols 'unspecified' visibility in XCOFF object file">, 3873 Flags<[CC1Option]>; 3874defm backchain : BoolOption<"m", "backchain", 3875 CodeGenOpts<"Backchain">, DefaultFalse, 3876 PosFlag<SetTrue, [], "Link stack frames through backchain on System Z">, 3877 NegFlag<SetFalse>, BothFlags<[NoXarchOption,CC1Option]>>, Group<m_Group>; 3878 3879def mno_warn_nonportable_cfstrings : Flag<["-"], "mno-warn-nonportable-cfstrings">, Group<m_Group>; 3880def mno_omit_leaf_frame_pointer : Flag<["-"], "mno-omit-leaf-frame-pointer">, Group<m_Group>; 3881def momit_leaf_frame_pointer : Flag<["-"], "momit-leaf-frame-pointer">, Group<m_Group>, 3882 HelpText<"Omit frame pointer setup for leaf functions">; 3883def moslib_EQ : Joined<["-"], "moslib=">, Group<m_Group>; 3884def mpascal_strings : Flag<["-"], "mpascal-strings">, Alias<fpascal_strings>; 3885def mred_zone : Flag<["-"], "mred-zone">, Group<m_Group>; 3886def mtls_direct_seg_refs : Flag<["-"], "mtls-direct-seg-refs">, Group<m_Group>, 3887 HelpText<"Enable direct TLS access through segment registers (default)">; 3888def mregparm_EQ : Joined<["-"], "mregparm=">, Group<m_Group>; 3889def mrelax_all : Flag<["-"], "mrelax-all">, Group<m_Group>, Flags<[CC1Option,CC1AsOption]>, 3890 HelpText<"(integrated-as) Relax all machine instructions">, 3891 MarshallingInfoFlag<CodeGenOpts<"RelaxAll">>; 3892def mincremental_linker_compatible : Flag<["-"], "mincremental-linker-compatible">, Group<m_Group>, 3893 Flags<[CC1Option,CC1AsOption]>, 3894 HelpText<"(integrated-as) Emit an object file which can be used with an incremental linker">, 3895 MarshallingInfoFlag<CodeGenOpts<"IncrementalLinkerCompatible">>; 3896def mno_incremental_linker_compatible : Flag<["-"], "mno-incremental-linker-compatible">, Group<m_Group>, 3897 HelpText<"(integrated-as) Emit an object file which cannot be used with an incremental linker">; 3898def mrtd : Flag<["-"], "mrtd">, Group<m_Group>, Flags<[CC1Option]>, 3899 HelpText<"Make StdCall calling convention the default">; 3900def msmall_data_threshold_EQ : Joined <["-"], "msmall-data-threshold=">, 3901 Group<m_Group>, Alias<G>; 3902def msoft_float : Flag<["-"], "msoft-float">, Group<m_Group>, Flags<[CC1Option]>, 3903 HelpText<"Use software floating point">, 3904 MarshallingInfoFlag<CodeGenOpts<"SoftFloat">>; 3905def mno_fmv : Flag<["-"], "mno-fmv">, Group<f_clang_Group>, Flags<[CC1Option]>, 3906 HelpText<"Disable function multiversioning">; 3907def moutline_atomics : Flag<["-"], "moutline-atomics">, Group<f_clang_Group>, Flags<[CC1Option]>, 3908 HelpText<"Generate local calls to out-of-line atomic operations">; 3909def mno_outline_atomics : Flag<["-"], "mno-outline-atomics">, Group<f_clang_Group>, Flags<[CC1Option]>, 3910 HelpText<"Don't generate local calls to out-of-line atomic operations">; 3911def mno_implicit_float : Flag<["-"], "mno-implicit-float">, Group<m_Group>, 3912 HelpText<"Don't generate implicit floating point or vector instructions">; 3913def mimplicit_float : Flag<["-"], "mimplicit-float">, Group<m_Group>; 3914def mrecip : Flag<["-"], "mrecip">, Group<m_Group>; 3915def mrecip_EQ : CommaJoined<["-"], "mrecip=">, Group<m_Group>, Flags<[CC1Option]>, 3916 MarshallingInfoStringVector<CodeGenOpts<"Reciprocals">>; 3917def mprefer_vector_width_EQ : Joined<["-"], "mprefer-vector-width=">, Group<m_Group>, Flags<[CC1Option]>, 3918 HelpText<"Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.">, 3919 MarshallingInfoString<CodeGenOpts<"PreferVectorWidth">>; 3920def mstack_protector_guard_EQ : Joined<["-"], "mstack-protector-guard=">, Group<m_Group>, Flags<[CC1Option]>, 3921 HelpText<"Use the given guard (global, tls) for addressing the stack-protector guard">, 3922 MarshallingInfoString<CodeGenOpts<"StackProtectorGuard">>; 3923def mstack_protector_guard_offset_EQ : Joined<["-"], "mstack-protector-guard-offset=">, Group<m_Group>, Flags<[CC1Option]>, 3924 HelpText<"Use the given offset for addressing the stack-protector guard">, 3925 MarshallingInfoInt<CodeGenOpts<"StackProtectorGuardOffset">, "INT_MAX", "int">; 3926def mstack_protector_guard_symbol_EQ : Joined<["-"], "mstack-protector-guard-symbol=">, Group<m_Group>, Flags<[CC1Option]>, 3927 HelpText<"Use the given symbol for addressing the stack-protector guard">, 3928 MarshallingInfoString<CodeGenOpts<"StackProtectorGuardSymbol">>; 3929def mstack_protector_guard_reg_EQ : Joined<["-"], "mstack-protector-guard-reg=">, Group<m_Group>, Flags<[CC1Option]>, 3930 HelpText<"Use the given reg for addressing the stack-protector guard">, 3931 MarshallingInfoString<CodeGenOpts<"StackProtectorGuardReg">>; 3932def mfentry : Flag<["-"], "mfentry">, HelpText<"Insert calls to fentry at function entry (x86/SystemZ only)">, 3933 Flags<[CC1Option]>, Group<m_Group>, 3934 MarshallingInfoFlag<CodeGenOpts<"CallFEntry">>; 3935def mnop_mcount : Flag<["-"], "mnop-mcount">, HelpText<"Generate mcount/__fentry__ calls as nops. To activate they need to be patched in.">, 3936 Flags<[CC1Option]>, Group<m_Group>, 3937 MarshallingInfoFlag<CodeGenOpts<"MNopMCount">>; 3938def mrecord_mcount : Flag<["-"], "mrecord-mcount">, HelpText<"Generate a __mcount_loc section entry for each __fentry__ call.">, 3939 Flags<[CC1Option]>, Group<m_Group>, 3940 MarshallingInfoFlag<CodeGenOpts<"RecordMCount">>; 3941def mpacked_stack : Flag<["-"], "mpacked-stack">, HelpText<"Use packed stack layout (SystemZ only).">, 3942 Flags<[CC1Option]>, Group<m_Group>, 3943 MarshallingInfoFlag<CodeGenOpts<"PackedStack">>; 3944def mno_packed_stack : Flag<["-"], "mno-packed-stack">, Flags<[CC1Option]>, Group<m_Group>; 3945def mips16 : Flag<["-"], "mips16">, Group<m_mips_Features_Group>; 3946def mno_mips16 : Flag<["-"], "mno-mips16">, Group<m_mips_Features_Group>; 3947def mmicromips : Flag<["-"], "mmicromips">, Group<m_mips_Features_Group>; 3948def mno_micromips : Flag<["-"], "mno-micromips">, Group<m_mips_Features_Group>; 3949def mxgot : Flag<["-"], "mxgot">, Group<m_mips_Features_Group>; 3950def mno_xgot : Flag<["-"], "mno-xgot">, Group<m_mips_Features_Group>; 3951def mldc1_sdc1 : Flag<["-"], "mldc1-sdc1">, Group<m_mips_Features_Group>; 3952def mno_ldc1_sdc1 : Flag<["-"], "mno-ldc1-sdc1">, Group<m_mips_Features_Group>; 3953def mcheck_zero_division : Flag<["-"], "mcheck-zero-division">, 3954 Group<m_mips_Features_Group>; 3955def mno_check_zero_division : Flag<["-"], "mno-check-zero-division">, 3956 Group<m_mips_Features_Group>; 3957def mfix4300 : Flag<["-"], "mfix4300">, Group<m_mips_Features_Group>; 3958def mcompact_branches_EQ : Joined<["-"], "mcompact-branches=">, 3959 Group<m_mips_Features_Group>; 3960def mfix_loongson2f_btb : Flag<["-"], "mfix-loongson2f-btb">, 3961 Group<m_mips_Features_Group>; 3962def mbranch_likely : Flag<["-"], "mbranch-likely">, Group<m_Group>, 3963 IgnoredGCCCompat; 3964def mno_branch_likely : Flag<["-"], "mno-branch-likely">, Group<m_Group>, 3965 IgnoredGCCCompat; 3966def mindirect_jump_EQ : Joined<["-"], "mindirect-jump=">, 3967 Group<m_mips_Features_Group>, 3968 HelpText<"Change indirect jump instructions to inhibit speculation">; 3969def mdsp : Flag<["-"], "mdsp">, Group<m_mips_Features_Group>; 3970def mno_dsp : Flag<["-"], "mno-dsp">, Group<m_mips_Features_Group>; 3971def mdspr2 : Flag<["-"], "mdspr2">, Group<m_mips_Features_Group>; 3972def mno_dspr2 : Flag<["-"], "mno-dspr2">, Group<m_mips_Features_Group>; 3973def msingle_float : Flag<["-"], "msingle-float">, Group<m_Group>; 3974def mdouble_float : Flag<["-"], "mdouble-float">, Group<m_Group>; 3975def mmadd4 : Flag<["-"], "mmadd4">, Group<m_mips_Features_Group>, 3976 HelpText<"Enable the generation of 4-operand madd.s, madd.d and related instructions.">; 3977def mno_madd4 : Flag<["-"], "mno-madd4">, Group<m_mips_Features_Group>, 3978 HelpText<"Disable the generation of 4-operand madd.s, madd.d and related instructions.">; 3979def mmsa : Flag<["-"], "mmsa">, Group<m_mips_Features_Group>, 3980 HelpText<"Enable MSA ASE (MIPS only)">; 3981def mno_msa : Flag<["-"], "mno-msa">, Group<m_mips_Features_Group>, 3982 HelpText<"Disable MSA ASE (MIPS only)">; 3983def mmt : Flag<["-"], "mmt">, Group<m_mips_Features_Group>, 3984 HelpText<"Enable MT ASE (MIPS only)">; 3985def mno_mt : Flag<["-"], "mno-mt">, Group<m_mips_Features_Group>, 3986 HelpText<"Disable MT ASE (MIPS only)">; 3987def mfp64 : Flag<["-"], "mfp64">, Group<m_mips_Features_Group>, 3988 HelpText<"Use 64-bit floating point registers (MIPS only)">; 3989def mfp32 : Flag<["-"], "mfp32">, Group<m_mips_Features_Group>, 3990 HelpText<"Use 32-bit floating point registers (MIPS only)">; 3991def mgpopt : Flag<["-"], "mgpopt">, Group<m_mips_Features_Group>, 3992 HelpText<"Use GP relative accesses for symbols known to be in a small" 3993 " data section (MIPS)">; 3994def mno_gpopt : Flag<["-"], "mno-gpopt">, Group<m_mips_Features_Group>, 3995 HelpText<"Do not use GP relative accesses for symbols known to be in a small" 3996 " data section (MIPS)">; 3997def mlocal_sdata : Flag<["-"], "mlocal-sdata">, 3998 Group<m_mips_Features_Group>, 3999 HelpText<"Extend the -G behaviour to object local data (MIPS)">; 4000def mno_local_sdata : Flag<["-"], "mno-local-sdata">, 4001 Group<m_mips_Features_Group>, 4002 HelpText<"Do not extend the -G behaviour to object local data (MIPS)">; 4003def mextern_sdata : Flag<["-"], "mextern-sdata">, 4004 Group<m_mips_Features_Group>, 4005 HelpText<"Assume that externally defined data is in the small data if it" 4006 " meets the -G <size> threshold (MIPS)">; 4007def mno_extern_sdata : Flag<["-"], "mno-extern-sdata">, 4008 Group<m_mips_Features_Group>, 4009 HelpText<"Do not assume that externally defined data is in the small data if" 4010 " it meets the -G <size> threshold (MIPS)">; 4011def membedded_data : Flag<["-"], "membedded-data">, 4012 Group<m_mips_Features_Group>, 4013 HelpText<"Place constants in the .rodata section instead of the .sdata " 4014 "section even if they meet the -G <size> threshold (MIPS)">; 4015def mno_embedded_data : Flag<["-"], "mno-embedded-data">, 4016 Group<m_mips_Features_Group>, 4017 HelpText<"Do not place constants in the .rodata section instead of the " 4018 ".sdata if they meet the -G <size> threshold (MIPS)">; 4019def mnan_EQ : Joined<["-"], "mnan=">, Group<m_mips_Features_Group>; 4020def mabs_EQ : Joined<["-"], "mabs=">, Group<m_mips_Features_Group>; 4021def mabicalls : Flag<["-"], "mabicalls">, Group<m_mips_Features_Group>, 4022 HelpText<"Enable SVR4-style position-independent code (Mips only)">; 4023def mno_abicalls : Flag<["-"], "mno-abicalls">, Group<m_mips_Features_Group>, 4024 HelpText<"Disable SVR4-style position-independent code (Mips only)">; 4025def mno_crc : Flag<["-"], "mno-crc">, Group<m_mips_Features_Group>, 4026 HelpText<"Disallow use of CRC instructions (Mips only)">; 4027def mvirt : Flag<["-"], "mvirt">, Group<m_mips_Features_Group>; 4028def mno_virt : Flag<["-"], "mno-virt">, Group<m_mips_Features_Group>; 4029def mginv : Flag<["-"], "mginv">, Group<m_mips_Features_Group>; 4030def mno_ginv : Flag<["-"], "mno-ginv">, Group<m_mips_Features_Group>; 4031def mips1 : Flag<["-"], "mips1">, 4032 Alias<march_EQ>, AliasArgs<["mips1"]>, Group<m_mips_Features_Group>, 4033 HelpText<"Equivalent to -march=mips1">, Flags<[HelpHidden]>; 4034def mips2 : Flag<["-"], "mips2">, 4035 Alias<march_EQ>, AliasArgs<["mips2"]>, Group<m_mips_Features_Group>, 4036 HelpText<"Equivalent to -march=mips2">, Flags<[HelpHidden]>; 4037def mips3 : Flag<["-"], "mips3">, 4038 Alias<march_EQ>, AliasArgs<["mips3"]>, Group<m_mips_Features_Group>, 4039 HelpText<"Equivalent to -march=mips3">, Flags<[HelpHidden]>; 4040def mips4 : Flag<["-"], "mips4">, 4041 Alias<march_EQ>, AliasArgs<["mips4"]>, Group<m_mips_Features_Group>, 4042 HelpText<"Equivalent to -march=mips4">, Flags<[HelpHidden]>; 4043def mips5 : Flag<["-"], "mips5">, 4044 Alias<march_EQ>, AliasArgs<["mips5"]>, Group<m_mips_Features_Group>, 4045 HelpText<"Equivalent to -march=mips5">, Flags<[HelpHidden]>; 4046def mips32 : Flag<["-"], "mips32">, 4047 Alias<march_EQ>, AliasArgs<["mips32"]>, Group<m_mips_Features_Group>, 4048 HelpText<"Equivalent to -march=mips32">, Flags<[HelpHidden]>; 4049def mips32r2 : Flag<["-"], "mips32r2">, 4050 Alias<march_EQ>, AliasArgs<["mips32r2"]>, Group<m_mips_Features_Group>, 4051 HelpText<"Equivalent to -march=mips32r2">, Flags<[HelpHidden]>; 4052def mips32r3 : Flag<["-"], "mips32r3">, 4053 Alias<march_EQ>, AliasArgs<["mips32r3"]>, Group<m_mips_Features_Group>, 4054 HelpText<"Equivalent to -march=mips32r3">, Flags<[HelpHidden]>; 4055def mips32r5 : Flag<["-"], "mips32r5">, 4056 Alias<march_EQ>, AliasArgs<["mips32r5"]>, Group<m_mips_Features_Group>, 4057 HelpText<"Equivalent to -march=mips32r5">, Flags<[HelpHidden]>; 4058def mips32r6 : Flag<["-"], "mips32r6">, 4059 Alias<march_EQ>, AliasArgs<["mips32r6"]>, Group<m_mips_Features_Group>, 4060 HelpText<"Equivalent to -march=mips32r6">, Flags<[HelpHidden]>; 4061def mips64 : Flag<["-"], "mips64">, 4062 Alias<march_EQ>, AliasArgs<["mips64"]>, Group<m_mips_Features_Group>, 4063 HelpText<"Equivalent to -march=mips64">, Flags<[HelpHidden]>; 4064def mips64r2 : Flag<["-"], "mips64r2">, 4065 Alias<march_EQ>, AliasArgs<["mips64r2"]>, Group<m_mips_Features_Group>, 4066 HelpText<"Equivalent to -march=mips64r2">, Flags<[HelpHidden]>; 4067def mips64r3 : Flag<["-"], "mips64r3">, 4068 Alias<march_EQ>, AliasArgs<["mips64r3"]>, Group<m_mips_Features_Group>, 4069 HelpText<"Equivalent to -march=mips64r3">, Flags<[HelpHidden]>; 4070def mips64r5 : Flag<["-"], "mips64r5">, 4071 Alias<march_EQ>, AliasArgs<["mips64r5"]>, Group<m_mips_Features_Group>, 4072 HelpText<"Equivalent to -march=mips64r5">, Flags<[HelpHidden]>; 4073def mips64r6 : Flag<["-"], "mips64r6">, 4074 Alias<march_EQ>, AliasArgs<["mips64r6"]>, Group<m_mips_Features_Group>, 4075 HelpText<"Equivalent to -march=mips64r6">, Flags<[HelpHidden]>; 4076def mfpxx : Flag<["-"], "mfpxx">, Group<m_mips_Features_Group>, 4077 HelpText<"Avoid FPU mode dependent operations when used with the O32 ABI">, 4078 Flags<[HelpHidden]>; 4079def modd_spreg : Flag<["-"], "modd-spreg">, Group<m_mips_Features_Group>, 4080 HelpText<"Enable odd single-precision floating point registers">, 4081 Flags<[HelpHidden]>; 4082def mno_odd_spreg : Flag<["-"], "mno-odd-spreg">, Group<m_mips_Features_Group>, 4083 HelpText<"Disable odd single-precision floating point registers">, 4084 Flags<[HelpHidden]>; 4085def mrelax_pic_calls : Flag<["-"], "mrelax-pic-calls">, 4086 Group<m_mips_Features_Group>, 4087 HelpText<"Produce relaxation hints for linkers to try optimizing PIC " 4088 "call sequences into direct calls (MIPS only)">, Flags<[HelpHidden]>; 4089def mno_relax_pic_calls : Flag<["-"], "mno-relax-pic-calls">, 4090 Group<m_mips_Features_Group>, 4091 HelpText<"Do not produce relaxation hints for linkers to try optimizing PIC " 4092 "call sequences into direct calls (MIPS only)">, Flags<[HelpHidden]>; 4093def mglibc : Flag<["-"], "mglibc">, Group<m_libc_Group>, Flags<[HelpHidden]>; 4094def muclibc : Flag<["-"], "muclibc">, Group<m_libc_Group>, Flags<[HelpHidden]>; 4095def module_file_info : Flag<["-"], "module-file-info">, Flags<[NoXarchOption,CC1Option]>, Group<Action_Group>, 4096 HelpText<"Provide information about a particular module file">; 4097def mthumb : Flag<["-"], "mthumb">, Group<m_Group>; 4098def mtune_EQ : Joined<["-"], "mtune=">, Group<m_Group>, 4099 HelpText<"Only supported on AArch64, PowerPC, RISC-V, SystemZ, and X86">; 4100def multi__module : Flag<["-"], "multi_module">; 4101def multiply__defined__unused : Separate<["-"], "multiply_defined_unused">; 4102def multiply__defined : Separate<["-"], "multiply_defined">; 4103def mwarn_nonportable_cfstrings : Flag<["-"], "mwarn-nonportable-cfstrings">, Group<m_Group>; 4104def canonical_prefixes : Flag<["-"], "canonical-prefixes">, Flags<[HelpHidden, CoreOption]>, 4105 HelpText<"Use absolute paths for invoking subcommands (default)">; 4106def no_canonical_prefixes : Flag<["-"], "no-canonical-prefixes">, Flags<[HelpHidden, CoreOption]>, 4107 HelpText<"Use relative paths for invoking subcommands">; 4108def no_cpp_precomp : Flag<["-"], "no-cpp-precomp">, Group<clang_ignored_f_Group>; 4109def no_integrated_cpp : Flag<["-", "--"], "no-integrated-cpp">, Flags<[NoXarchOption]>; 4110def no_pedantic : Flag<["-", "--"], "no-pedantic">, Group<pedantic_Group>; 4111def no__dead__strip__inits__and__terms : Flag<["-"], "no_dead_strip_inits_and_terms">; 4112def nobuiltininc : Flag<["-"], "nobuiltininc">, Flags<[CC1Option, CoreOption]>, 4113 HelpText<"Disable builtin #include directories">, 4114 MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseBuiltinIncludes">>; 4115def nogpuinc : Flag<["-"], "nogpuinc">, HelpText<"Do not add include paths for CUDA/HIP and" 4116 " do not include the default CUDA/HIP wrapper headers">; 4117def nohipwrapperinc : Flag<["-"], "nohipwrapperinc">, 4118 HelpText<"Do not include the default HIP wrapper headers and include paths">; 4119def : Flag<["-"], "nocudainc">, Alias<nogpuinc>; 4120def nogpulib : Flag<["-"], "nogpulib">, MarshallingInfoFlag<LangOpts<"NoGPULib">>, 4121 Flags<[CC1Option]>, HelpText<"Do not link device library for CUDA/HIP device compilation">; 4122def : Flag<["-"], "nocudalib">, Alias<nogpulib>; 4123def nodefaultlibs : Flag<["-"], "nodefaultlibs">; 4124def nodriverkitlib : Flag<["-"], "nodriverkitlib">; 4125def nofixprebinding : Flag<["-"], "nofixprebinding">; 4126def nolibc : Flag<["-"], "nolibc">; 4127def nomultidefs : Flag<["-"], "nomultidefs">; 4128def nopie : Flag<["-"], "nopie">; 4129def no_pie : Flag<["-"], "no-pie">, Alias<nopie>; 4130def noprebind : Flag<["-"], "noprebind">; 4131def noprofilelib : Flag<["-"], "noprofilelib">; 4132def noseglinkedit : Flag<["-"], "noseglinkedit">; 4133def nostartfiles : Flag<["-"], "nostartfiles">, Group<Link_Group>; 4134def nostdinc : Flag<["-"], "nostdinc">, Flags<[CoreOption]>; 4135def nostdlibinc : Flag<["-"], "nostdlibinc">; 4136def nostdincxx : Flag<["-"], "nostdinc++">, Flags<[CC1Option]>, 4137 HelpText<"Disable standard #include directories for the C++ standard library">, 4138 MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseStandardCXXIncludes">>; 4139def nostdlib : Flag<["-"], "nostdlib">, Group<Link_Group>; 4140def nostdlibxx : Flag<["-"], "nostdlib++">; 4141def object : Flag<["-"], "object">; 4142def o : JoinedOrSeparate<["-"], "o">, Flags<[NoXarchOption, 4143 CC1Option, CC1AsOption, FC1Option, FlangOption]>, 4144 HelpText<"Write output to <file>">, MetaVarName<"<file>">, 4145 MarshallingInfoString<FrontendOpts<"OutputFile">>; 4146def object_file_name_EQ : Joined<["-"], "object-file-name=">, Flags<[CC1Option, CC1AsOption, CoreOption]>, 4147 HelpText<"Set the output <file> for debug infos">, MetaVarName<"<file>">, 4148 MarshallingInfoString<CodeGenOpts<"ObjectFilenameForDebug">>; 4149def object_file_name : Separate<["-"], "object-file-name">, Flags<[CC1Option, CC1AsOption, CoreOption]>, 4150 Alias<object_file_name_EQ>; 4151def pagezero__size : JoinedOrSeparate<["-"], "pagezero_size">; 4152def pass_exit_codes : Flag<["-", "--"], "pass-exit-codes">, Flags<[Unsupported]>; 4153def pedantic_errors : Flag<["-", "--"], "pedantic-errors">, Group<pedantic_Group>, Flags<[CC1Option]>, 4154 MarshallingInfoFlag<DiagnosticOpts<"PedanticErrors">>; 4155def pedantic : Flag<["-", "--"], "pedantic">, Group<pedantic_Group>, Flags<[CC1Option,FlangOption,FC1Option]>, 4156 HelpText<"Warn on language extensions">, MarshallingInfoFlag<DiagnosticOpts<"Pedantic">>; 4157def pg : Flag<["-"], "pg">, HelpText<"Enable mcount instrumentation">, Flags<[CC1Option]>, 4158 MarshallingInfoFlag<CodeGenOpts<"InstrumentForProfiling">>; 4159def pipe : Flag<["-", "--"], "pipe">, 4160 HelpText<"Use pipes between commands, when possible">; 4161def prebind__all__twolevel__modules : Flag<["-"], "prebind_all_twolevel_modules">; 4162def prebind : Flag<["-"], "prebind">; 4163def preload : Flag<["-"], "preload">; 4164def print_file_name_EQ : Joined<["-", "--"], "print-file-name=">, 4165 HelpText<"Print the full library path of <file>">, MetaVarName<"<file>">; 4166def print_ivar_layout : Flag<["-"], "print-ivar-layout">, Flags<[CC1Option]>, 4167 HelpText<"Enable Objective-C Ivar layout bitmap print trace">, 4168 MarshallingInfoFlag<LangOpts<"ObjCGCBitmapPrint">>; 4169def print_libgcc_file_name : Flag<["-", "--"], "print-libgcc-file-name">, 4170 HelpText<"Print the library path for the currently used compiler runtime " 4171 "library (\"libgcc.a\" or \"libclang_rt.builtins.*.a\")">; 4172def print_multi_directory : Flag<["-", "--"], "print-multi-directory">; 4173def print_multi_lib : Flag<["-", "--"], "print-multi-lib">; 4174def print_multi_os_directory : Flag<["-", "--"], "print-multi-os-directory">, 4175 Flags<[Unsupported]>; 4176def print_target_triple : Flag<["-", "--"], "print-target-triple">, 4177 HelpText<"Print the normalized target triple">, Flags<[FlangOption]>; 4178def print_effective_triple : Flag<["-", "--"], "print-effective-triple">, 4179 HelpText<"Print the effective target triple">, Flags<[FlangOption]>; 4180// GCC --disable-multiarch, GCC --enable-multiarch (upstream and Debian 4181// specific) have different behaviors. We choose not to support the option. 4182def : Flag<["-", "--"], "print-multiarch">, Flags<[Unsupported]>; 4183def print_prog_name_EQ : Joined<["-", "--"], "print-prog-name=">, 4184 HelpText<"Print the full program path of <name>">, MetaVarName<"<name>">; 4185def print_resource_dir : Flag<["-", "--"], "print-resource-dir">, 4186 HelpText<"Print the resource directory pathname">; 4187def print_search_dirs : Flag<["-", "--"], "print-search-dirs">, 4188 HelpText<"Print the paths used for finding libraries and programs">; 4189def print_targets : Flag<["-", "--"], "print-targets">, 4190 HelpText<"Print the registered targets">; 4191def print_rocm_search_dirs : Flag<["-", "--"], "print-rocm-search-dirs">, 4192 HelpText<"Print the paths used for finding ROCm installation">; 4193def print_runtime_dir : Flag<["-", "--"], "print-runtime-dir">, 4194 HelpText<"Print the directory pathname containing clangs runtime libraries">; 4195def print_diagnostic_options : Flag<["-", "--"], "print-diagnostic-options">, 4196 HelpText<"Print all of Clang's warning options">; 4197def private__bundle : Flag<["-"], "private_bundle">; 4198def pthreads : Flag<["-"], "pthreads">; 4199defm pthread : BoolOption<"", "pthread", 4200 LangOpts<"POSIXThreads">, DefaultFalse, 4201 PosFlag<SetTrue, [], "Support POSIX threads in generated code">, 4202 NegFlag<SetFalse>, BothFlags<[CC1Option]>>; 4203def p : Flag<["-"], "p">, Alias<pg>; 4204def pie : Flag<["-"], "pie">, Group<Link_Group>; 4205def static_pie : Flag<["-"], "static-pie">, Group<Link_Group>; 4206def read__only__relocs : Separate<["-"], "read_only_relocs">; 4207def remap : Flag<["-"], "remap">; 4208def rewrite_objc : Flag<["-"], "rewrite-objc">, Flags<[NoXarchOption,CC1Option]>, 4209 HelpText<"Rewrite Objective-C source to C++">, Group<Action_Group>; 4210def rewrite_legacy_objc : Flag<["-"], "rewrite-legacy-objc">, Flags<[NoXarchOption]>, 4211 HelpText<"Rewrite Legacy Objective-C source to C++">; 4212def rdynamic : Flag<["-"], "rdynamic">, Group<Link_Group>; 4213def resource_dir : Separate<["-"], "resource-dir">, 4214 Flags<[NoXarchOption, CC1Option, CoreOption, HelpHidden]>, 4215 HelpText<"The directory which holds the compiler resource files">, 4216 MarshallingInfoString<HeaderSearchOpts<"ResourceDir">>; 4217def resource_dir_EQ : Joined<["-"], "resource-dir=">, Flags<[NoXarchOption, CoreOption]>, 4218 Alias<resource_dir>; 4219def rpath : Separate<["-"], "rpath">, Flags<[LinkerInput]>, Group<Link_Group>; 4220def rtlib_EQ : Joined<["-", "--"], "rtlib=">, 4221 HelpText<"Compiler runtime library to use">; 4222def frtlib_add_rpath: Flag<["-"], "frtlib-add-rpath">, Flags<[NoArgumentUnused]>, 4223 HelpText<"Add -rpath with architecture-specific resource directory to the linker flags">; 4224def fno_rtlib_add_rpath: Flag<["-"], "fno-rtlib-add-rpath">, Flags<[NoArgumentUnused]>, 4225 HelpText<"Do not add -rpath with architecture-specific resource directory to the linker flags">; 4226def offload_add_rpath: Flag<["--"], "offload-add-rpath">, Flags<[NoArgumentUnused]>, 4227 HelpText<"Add -rpath with HIP runtime library directory to the linker flags">; 4228def no_offload_add_rpath: Flag<["--"], "no-offload-add-rpath">, Flags<[NoArgumentUnused]>, 4229 HelpText<"Do not add -rpath with HIP runtime library directory to the linker flags">; 4230defm openmp_implicit_rpath: BoolFOption<"openmp-implicit-rpath", 4231 LangOpts<"OpenMP">, 4232 DefaultTrue, 4233 PosFlag<SetTrue, [], "Set rpath on OpenMP executables">, 4234 NegFlag<SetFalse>, 4235 BothFlags<[NoArgumentUnused]>>; 4236def r : Flag<["-"], "r">, Flags<[LinkerInput,NoArgumentUnused]>, 4237 Group<Link_Group>; 4238def save_temps_EQ : Joined<["-", "--"], "save-temps=">, Flags<[CC1Option, FlangOption, NoXarchOption]>, 4239 HelpText<"Save intermediate compilation results.">; 4240def save_temps : Flag<["-", "--"], "save-temps">, Flags<[FlangOption, NoXarchOption]>, 4241 Alias<save_temps_EQ>, AliasArgs<["cwd"]>, 4242 HelpText<"Save intermediate compilation results">; 4243def save_stats_EQ : Joined<["-", "--"], "save-stats=">, Flags<[NoXarchOption]>, 4244 HelpText<"Save llvm statistics.">; 4245def save_stats : Flag<["-", "--"], "save-stats">, Flags<[NoXarchOption]>, 4246 Alias<save_stats_EQ>, AliasArgs<["cwd"]>, 4247 HelpText<"Save llvm statistics.">; 4248def via_file_asm : Flag<["-", "--"], "via-file-asm">, InternalDebugOpt, 4249 HelpText<"Write assembly to file for input to assemble jobs">; 4250def sectalign : MultiArg<["-"], "sectalign", 3>; 4251def sectcreate : MultiArg<["-"], "sectcreate", 3>; 4252def sectobjectsymbols : MultiArg<["-"], "sectobjectsymbols", 2>; 4253def sectorder : MultiArg<["-"], "sectorder", 3>; 4254def seg1addr : JoinedOrSeparate<["-"], "seg1addr">; 4255def seg__addr__table__filename : Separate<["-"], "seg_addr_table_filename">; 4256def seg__addr__table : Separate<["-"], "seg_addr_table">; 4257def segaddr : MultiArg<["-"], "segaddr", 2>; 4258def segcreate : MultiArg<["-"], "segcreate", 3>; 4259def seglinkedit : Flag<["-"], "seglinkedit">; 4260def segprot : MultiArg<["-"], "segprot", 3>; 4261def segs__read__only__addr : Separate<["-"], "segs_read_only_addr">; 4262def segs__read__write__addr : Separate<["-"], "segs_read_write_addr">; 4263def segs__read__ : Joined<["-"], "segs_read_">; 4264def shared_libgcc : Flag<["-"], "shared-libgcc">; 4265def shared : Flag<["-", "--"], "shared">, Group<Link_Group>; 4266def single__module : Flag<["-"], "single_module">; 4267def specs_EQ : Joined<["-", "--"], "specs=">, Group<Link_Group>; 4268def specs : Separate<["-", "--"], "specs">, Flags<[Unsupported]>; 4269def start_no_unused_arguments : Flag<["--"], "start-no-unused-arguments">, Flags<[CoreOption]>, 4270 HelpText<"Don't emit warnings about unused arguments for the following arguments">; 4271def static_libgcc : Flag<["-"], "static-libgcc">; 4272def static_libstdcxx : Flag<["-"], "static-libstdc++">; 4273def static : Flag<["-", "--"], "static">, Group<Link_Group>, Flags<[NoArgumentUnused]>; 4274def std_default_EQ : Joined<["-"], "std-default=">; 4275def std_EQ : Joined<["-", "--"], "std=">, Flags<[CC1Option,FlangOption,FC1Option]>, 4276 Group<CompileOnly_Group>, HelpText<"Language standard to compile for">, 4277 ValuesCode<[{ 4278 static constexpr const char VALUES_CODE [] = 4279 #define LANGSTANDARD(id, name, lang, desc, features) name "," 4280 #define LANGSTANDARD_ALIAS(id, alias) alias "," 4281 #include "clang/Basic/LangStandards.def" 4282 ; 4283 }]>; 4284def stdlib_EQ : Joined<["-", "--"], "stdlib=">, Flags<[CC1Option]>, 4285 HelpText<"C++ standard library to use">, Values<"libc++,libstdc++,platform">; 4286def stdlibxx_isystem : JoinedOrSeparate<["-"], "stdlib++-isystem">, 4287 Group<clang_i_Group>, 4288 HelpText<"Use directory as the C++ standard library include path">, 4289 Flags<[NoXarchOption]>, MetaVarName<"<directory>">; 4290def unwindlib_EQ : Joined<["-", "--"], "unwindlib=">, Flags<[CC1Option]>, 4291 HelpText<"Unwind library to use">, Values<"libgcc,unwindlib,platform">; 4292def sub__library : JoinedOrSeparate<["-"], "sub_library">; 4293def sub__umbrella : JoinedOrSeparate<["-"], "sub_umbrella">; 4294def system_header_prefix : Joined<["--"], "system-header-prefix=">, 4295 Group<clang_i_Group>, Flags<[CC1Option]>, MetaVarName<"<prefix>">, 4296 HelpText<"Treat all #include paths starting with <prefix> as including a " 4297 "system header.">; 4298def : Separate<["--"], "system-header-prefix">, Alias<system_header_prefix>; 4299def no_system_header_prefix : Joined<["--"], "no-system-header-prefix=">, 4300 Group<clang_i_Group>, Flags<[CC1Option]>, MetaVarName<"<prefix>">, 4301 HelpText<"Treat all #include paths starting with <prefix> as not including a " 4302 "system header.">; 4303def : Separate<["--"], "no-system-header-prefix">, Alias<no_system_header_prefix>; 4304def s : Flag<["-"], "s">, Group<Link_Group>; 4305def target : Joined<["--"], "target=">, Flags<[NoXarchOption, CoreOption, FlangOption]>, 4306 HelpText<"Generate code for the given target">; 4307def darwin_target_variant : Separate<["-"], "darwin-target-variant">, 4308 Flags<[NoXarchOption, CoreOption]>, 4309 HelpText<"Generate code for an additional runtime variant of the deployment target">; 4310def print_supported_cpus : Flag<["-", "--"], "print-supported-cpus">, 4311 Group<CompileOnly_Group>, Flags<[CC1Option, CoreOption]>, 4312 HelpText<"Print supported cpu models for the given target (if target is not specified," 4313 " it will print the supported cpus for the default target)">, 4314 MarshallingInfoFlag<FrontendOpts<"PrintSupportedCPUs">>; 4315def mcpu_EQ_QUESTION : Flag<["-"], "mcpu=?">, Alias<print_supported_cpus>; 4316def mtune_EQ_QUESTION : Flag<["-"], "mtune=?">, Alias<print_supported_cpus>; 4317def time : Flag<["-"], "time">, 4318 HelpText<"Time individual commands">; 4319def traditional_cpp : Flag<["-", "--"], "traditional-cpp">, Flags<[CC1Option]>, 4320 HelpText<"Enable some traditional CPP emulation">, 4321 MarshallingInfoFlag<LangOpts<"TraditionalCPP">>; 4322def traditional : Flag<["-", "--"], "traditional">; 4323def trigraphs : Flag<["-", "--"], "trigraphs">, Alias<ftrigraphs>, 4324 HelpText<"Process trigraph sequences">; 4325def twolevel__namespace__hints : Flag<["-"], "twolevel_namespace_hints">; 4326def twolevel__namespace : Flag<["-"], "twolevel_namespace">; 4327def t : Flag<["-"], "t">, Group<Link_Group>; 4328def umbrella : Separate<["-"], "umbrella">; 4329def undefined : JoinedOrSeparate<["-"], "undefined">, Group<u_Group>; 4330def undef : Flag<["-"], "undef">, Group<u_Group>, Flags<[CC1Option]>, 4331 HelpText<"undef all system defines">, 4332 MarshallingInfoNegativeFlag<PreprocessorOpts<"UsePredefines">>; 4333def unexported__symbols__list : Separate<["-"], "unexported_symbols_list">; 4334def u : JoinedOrSeparate<["-"], "u">, Group<u_Group>; 4335def v : Flag<["-"], "v">, Flags<[CC1Option, CoreOption]>, 4336 HelpText<"Show commands to run and use verbose output">, 4337 MarshallingInfoFlag<HeaderSearchOpts<"Verbose">>; 4338def altivec_src_compat : Joined<["-"], "faltivec-src-compat=">, 4339 Flags<[CC1Option]>, Group<f_Group>, 4340 HelpText<"Source-level compatibility for Altivec vectors (for PowerPC " 4341 "targets). This includes results of vector comparison (scalar for " 4342 "'xl', vector for 'gcc') as well as behavior when initializing with " 4343 "a scalar (splatting for 'xl', element zero only for 'gcc'). For " 4344 "'mixed', the compatibility is as 'gcc' for 'vector bool/vector " 4345 "pixel' and as 'xl' for other types. Current default is 'mixed'.">, 4346 Values<"mixed,gcc,xl">, 4347 NormalizedValuesScope<"LangOptions::AltivecSrcCompatKind">, 4348 NormalizedValues<["Mixed", "GCC", "XL"]>, 4349 MarshallingInfoEnum<LangOpts<"AltivecSrcCompat">, "Mixed">; 4350def verify_debug_info : Flag<["--"], "verify-debug-info">, Flags<[NoXarchOption]>, 4351 HelpText<"Verify the binary representation of debug output">; 4352def weak_l : Joined<["-"], "weak-l">, Flags<[LinkerInput]>; 4353def weak__framework : Separate<["-"], "weak_framework">, Flags<[LinkerInput]>; 4354def weak__library : Separate<["-"], "weak_library">, Flags<[LinkerInput]>; 4355def weak__reference__mismatches : Separate<["-"], "weak_reference_mismatches">; 4356def whatsloaded : Flag<["-"], "whatsloaded">; 4357def why_load : Flag<["-"], "why_load">; 4358def whyload : Flag<["-"], "whyload">, Alias<why_load>; 4359def w : Flag<["-"], "w">, HelpText<"Suppress all warnings">, Flags<[CC1Option]>, 4360 MarshallingInfoFlag<DiagnosticOpts<"IgnoreWarnings">>; 4361def x : JoinedOrSeparate<["-"], "x">, 4362Flags<[NoXarchOption,CC1Option,FlangOption,FC1Option]>, 4363 HelpText<"Treat subsequent input files as having type <language>">, 4364 MetaVarName<"<language>">; 4365def y : Joined<["-"], "y">; 4366 4367defm integrated_as : BoolFOption<"integrated-as", 4368 CodeGenOpts<"DisableIntegratedAS">, DefaultFalse, 4369 NegFlag<SetTrue, [CC1Option, FlangOption], "Disable">, PosFlag<SetFalse, [], "Enable">, 4370 BothFlags<[], " the integrated assembler">>; 4371 4372def fintegrated_cc1 : Flag<["-"], "fintegrated-cc1">, 4373 Flags<[CoreOption, NoXarchOption]>, Group<f_Group>, 4374 HelpText<"Run cc1 in-process">; 4375def fno_integrated_cc1 : Flag<["-"], "fno-integrated-cc1">, 4376 Flags<[CoreOption, NoXarchOption]>, Group<f_Group>, 4377 HelpText<"Spawn a separate process for each cc1">; 4378 4379def fintegrated_objemitter : Flag<["-"], "fintegrated-objemitter">, 4380 Flags<[CoreOption, NoXarchOption]>, Group<f_Group>, 4381 HelpText<"Use internal machine object code emitter.">; 4382def fno_integrated_objemitter : Flag<["-"], "fno-integrated-objemitter">, 4383 Flags<[CoreOption, NoXarchOption]>, Group<f_Group>, 4384 HelpText<"Use external machine object code emitter.">; 4385 4386def : Flag<["-"], "integrated-as">, Alias<fintegrated_as>, Flags<[NoXarchOption]>; 4387def : Flag<["-"], "no-integrated-as">, Alias<fno_integrated_as>, 4388 Flags<[CC1Option, FlangOption, NoXarchOption]>; 4389 4390def working_directory : Separate<["-"], "working-directory">, Flags<[CC1Option]>, 4391 HelpText<"Resolve file paths relative to the specified directory">, 4392 MarshallingInfoString<FileSystemOpts<"WorkingDir">>; 4393def working_directory_EQ : Joined<["-"], "working-directory=">, Flags<[CC1Option]>, 4394 Alias<working_directory>; 4395 4396// Double dash options, which are usually an alias for one of the previous 4397// options. 4398 4399def _mhwdiv_EQ : Joined<["--"], "mhwdiv=">, Alias<mhwdiv_EQ>; 4400def _mhwdiv : Separate<["--"], "mhwdiv">, Alias<mhwdiv_EQ>; 4401def _CLASSPATH_EQ : Joined<["--"], "CLASSPATH=">, Alias<fclasspath_EQ>; 4402def _CLASSPATH : Separate<["--"], "CLASSPATH">, Alias<fclasspath_EQ>; 4403def _all_warnings : Flag<["--"], "all-warnings">, Alias<Wall>; 4404def _analyzer_no_default_checks : Flag<["--"], "analyzer-no-default-checks">, Flags<[NoXarchOption]>; 4405def _analyzer_output : JoinedOrSeparate<["--"], "analyzer-output">, Flags<[NoXarchOption]>, 4406 HelpText<"Static analyzer report output format (html|plist|plist-multi-file|plist-html|sarif|sarif-html|text).">; 4407def _analyze : Flag<["--"], "analyze">, Flags<[NoXarchOption, CoreOption]>, 4408 HelpText<"Run the static analyzer">; 4409def _assemble : Flag<["--"], "assemble">, Alias<S>; 4410def _assert_EQ : Joined<["--"], "assert=">, Alias<A>; 4411def _assert : Separate<["--"], "assert">, Alias<A>; 4412def _bootclasspath_EQ : Joined<["--"], "bootclasspath=">, Alias<fbootclasspath_EQ>; 4413def _bootclasspath : Separate<["--"], "bootclasspath">, Alias<fbootclasspath_EQ>; 4414def _classpath_EQ : Joined<["--"], "classpath=">, Alias<fclasspath_EQ>; 4415def _classpath : Separate<["--"], "classpath">, Alias<fclasspath_EQ>; 4416def _comments_in_macros : Flag<["--"], "comments-in-macros">, Alias<CC>; 4417def _comments : Flag<["--"], "comments">, Alias<C>; 4418def _compile : Flag<["--"], "compile">, Alias<c>; 4419def _constant_cfstrings : Flag<["--"], "constant-cfstrings">; 4420def _debug_EQ : Joined<["--"], "debug=">, Alias<g_Flag>; 4421def _debug : Flag<["--"], "debug">, Alias<g_Flag>; 4422def _define_macro_EQ : Joined<["--"], "define-macro=">, Alias<D>; 4423def _define_macro : Separate<["--"], "define-macro">, Alias<D>; 4424def _dependencies : Flag<["--"], "dependencies">, Alias<M>; 4425def _dyld_prefix_EQ : Joined<["--"], "dyld-prefix=">; 4426def _dyld_prefix : Separate<["--"], "dyld-prefix">, Alias<_dyld_prefix_EQ>; 4427def _encoding_EQ : Joined<["--"], "encoding=">, Alias<fencoding_EQ>; 4428def _encoding : Separate<["--"], "encoding">, Alias<fencoding_EQ>; 4429def _entry : Flag<["--"], "entry">, Alias<e>; 4430def _extdirs_EQ : Joined<["--"], "extdirs=">, Alias<fextdirs_EQ>; 4431def _extdirs : Separate<["--"], "extdirs">, Alias<fextdirs_EQ>; 4432def _extra_warnings : Flag<["--"], "extra-warnings">, Alias<W_Joined>; 4433def _for_linker_EQ : Joined<["--"], "for-linker=">, Alias<Xlinker>; 4434def _for_linker : Separate<["--"], "for-linker">, Alias<Xlinker>; 4435def _force_link_EQ : Joined<["--"], "force-link=">, Alias<u>; 4436def _force_link : Separate<["--"], "force-link">, Alias<u>; 4437def _help_hidden : Flag<["--"], "help-hidden">, 4438 HelpText<"Display help for hidden options">; 4439def _imacros_EQ : Joined<["--"], "imacros=">, Alias<imacros>; 4440def _include_barrier : Flag<["--"], "include-barrier">, Alias<I_>; 4441def _include_directory_after_EQ : Joined<["--"], "include-directory-after=">, Alias<idirafter>; 4442def _include_directory_after : Separate<["--"], "include-directory-after">, Alias<idirafter>; 4443def _include_directory_EQ : Joined<["--"], "include-directory=">, Alias<I>; 4444def _include_directory : Separate<["--"], "include-directory">, Alias<I>; 4445def _include_prefix_EQ : Joined<["--"], "include-prefix=">, Alias<iprefix>; 4446def _include_prefix : Separate<["--"], "include-prefix">, Alias<iprefix>; 4447def _include_with_prefix_after_EQ : Joined<["--"], "include-with-prefix-after=">, Alias<iwithprefix>; 4448def _include_with_prefix_after : Separate<["--"], "include-with-prefix-after">, Alias<iwithprefix>; 4449def _include_with_prefix_before_EQ : Joined<["--"], "include-with-prefix-before=">, Alias<iwithprefixbefore>; 4450def _include_with_prefix_before : Separate<["--"], "include-with-prefix-before">, Alias<iwithprefixbefore>; 4451def _include_with_prefix_EQ : Joined<["--"], "include-with-prefix=">, Alias<iwithprefix>; 4452def _include_with_prefix : Separate<["--"], "include-with-prefix">, Alias<iwithprefix>; 4453def _include_EQ : Joined<["--"], "include=">, Alias<include_>; 4454def _language_EQ : Joined<["--"], "language=">, Alias<x>; 4455def _language : Separate<["--"], "language">, Alias<x>; 4456def _library_directory_EQ : Joined<["--"], "library-directory=">, Alias<L>; 4457def _library_directory : Separate<["--"], "library-directory">, Alias<L>; 4458def _no_line_commands : Flag<["--"], "no-line-commands">, Alias<P>; 4459def _no_standard_includes : Flag<["--"], "no-standard-includes">, Alias<nostdinc>; 4460def _no_standard_libraries : Flag<["--"], "no-standard-libraries">, Alias<nostdlib>; 4461def _no_undefined : Flag<["--"], "no-undefined">, Flags<[LinkerInput]>; 4462def _no_warnings : Flag<["--"], "no-warnings">, Alias<w>; 4463def _optimize_EQ : Joined<["--"], "optimize=">, Alias<O>; 4464def _optimize : Flag<["--"], "optimize">, Alias<O>; 4465def _output_class_directory_EQ : Joined<["--"], "output-class-directory=">, Alias<foutput_class_dir_EQ>; 4466def _output_class_directory : Separate<["--"], "output-class-directory">, Alias<foutput_class_dir_EQ>; 4467def _output_EQ : Joined<["--"], "output=">, Alias<o>; 4468def _output : Separate<["--"], "output">, Alias<o>; 4469def _param : Separate<["--"], "param">, Group<CompileOnly_Group>; 4470def _param_EQ : Joined<["--"], "param=">, Alias<_param>; 4471def _precompile : Flag<["--"], "precompile">, Flags<[NoXarchOption]>, 4472 Group<Action_Group>, HelpText<"Only precompile the input">; 4473def _prefix_EQ : Joined<["--"], "prefix=">, Alias<B>; 4474def _prefix : Separate<["--"], "prefix">, Alias<B>; 4475def _preprocess : Flag<["--"], "preprocess">, Alias<E>; 4476def _print_diagnostic_categories : Flag<["--"], "print-diagnostic-categories">; 4477def _print_file_name : Separate<["--"], "print-file-name">, Alias<print_file_name_EQ>; 4478def _print_missing_file_dependencies : Flag<["--"], "print-missing-file-dependencies">, Alias<MG>; 4479def _print_prog_name : Separate<["--"], "print-prog-name">, Alias<print_prog_name_EQ>; 4480def _profile : Flag<["--"], "profile">, Alias<p>; 4481def _resource_EQ : Joined<["--"], "resource=">, Alias<fcompile_resource_EQ>; 4482def _resource : Separate<["--"], "resource">, Alias<fcompile_resource_EQ>; 4483def _rtlib : Separate<["--"], "rtlib">, Alias<rtlib_EQ>; 4484def _serialize_diags : Separate<["-", "--"], "serialize-diagnostics">, Flags<[NoXarchOption]>, 4485 HelpText<"Serialize compiler diagnostics to a file">; 4486// We give --version different semantics from -version. 4487def _version : Flag<["--"], "version">, 4488 Flags<[CoreOption, FlangOption]>, 4489 HelpText<"Print version information">; 4490def _signed_char : Flag<["--"], "signed-char">, Alias<fsigned_char>; 4491def _std : Separate<["--"], "std">, Alias<std_EQ>; 4492def _stdlib : Separate<["--"], "stdlib">, Alias<stdlib_EQ>; 4493def _sysroot_EQ : Joined<["--"], "sysroot=">; 4494def _sysroot : Separate<["--"], "sysroot">, Alias<_sysroot_EQ>; 4495def _target_help : Flag<["--"], "target-help">; 4496def _trace_includes : Flag<["--"], "trace-includes">, Alias<H>; 4497def _undefine_macro_EQ : Joined<["--"], "undefine-macro=">, Alias<U>; 4498def _undefine_macro : Separate<["--"], "undefine-macro">, Alias<U>; 4499def _unsigned_char : Flag<["--"], "unsigned-char">, Alias<funsigned_char>; 4500def _user_dependencies : Flag<["--"], "user-dependencies">, Alias<MM>; 4501def _verbose : Flag<["--"], "verbose">, Alias<v>; 4502def _warn__EQ : Joined<["--"], "warn-=">, Alias<W_Joined>; 4503def _warn_ : Joined<["--"], "warn-">, Alias<W_Joined>; 4504def _write_dependencies : Flag<["--"], "write-dependencies">, Alias<MD>; 4505def _write_user_dependencies : Flag<["--"], "write-user-dependencies">, Alias<MMD>; 4506def _ : Joined<["--"], "">, Flags<[Unsupported]>; 4507 4508// Hexagon feature flags. 4509def mieee_rnd_near : Flag<["-"], "mieee-rnd-near">, 4510 Group<m_hexagon_Features_Group>; 4511def mv5 : Flag<["-"], "mv5">, Group<m_hexagon_Features_Group>, Alias<mcpu_EQ>, 4512 AliasArgs<["hexagonv5"]>; 4513def mv55 : Flag<["-"], "mv55">, Group<m_hexagon_Features_Group>, 4514 Alias<mcpu_EQ>, AliasArgs<["hexagonv55"]>; 4515def mv60 : Flag<["-"], "mv60">, Group<m_hexagon_Features_Group>, 4516 Alias<mcpu_EQ>, AliasArgs<["hexagonv60"]>; 4517def mv62 : Flag<["-"], "mv62">, Group<m_hexagon_Features_Group>, 4518 Alias<mcpu_EQ>, AliasArgs<["hexagonv62"]>; 4519def mv65 : Flag<["-"], "mv65">, Group<m_hexagon_Features_Group>, 4520 Alias<mcpu_EQ>, AliasArgs<["hexagonv65"]>; 4521def mv66 : Flag<["-"], "mv66">, Group<m_hexagon_Features_Group>, 4522 Alias<mcpu_EQ>, AliasArgs<["hexagonv66"]>; 4523def mv67 : Flag<["-"], "mv67">, Group<m_hexagon_Features_Group>, 4524 Alias<mcpu_EQ>, AliasArgs<["hexagonv67"]>; 4525def mv67t : Flag<["-"], "mv67t">, Group<m_hexagon_Features_Group>, 4526 Alias<mcpu_EQ>, AliasArgs<["hexagonv67t"]>; 4527def mv68 : Flag<["-"], "mv68">, Group<m_hexagon_Features_Group>, 4528 Alias<mcpu_EQ>, AliasArgs<["hexagonv68"]>; 4529def mv69 : Flag<["-"], "mv69">, Group<m_hexagon_Features_Group>, 4530 Alias<mcpu_EQ>, AliasArgs<["hexagonv69"]>; 4531def mv71 : Flag<["-"], "mv71">, Group<m_hexagon_Features_Group>, 4532 Alias<mcpu_EQ>, AliasArgs<["hexagonv71"]>; 4533def mv71t : Flag<["-"], "mv71t">, Group<m_hexagon_Features_Group>, 4534 Alias<mcpu_EQ>, AliasArgs<["hexagonv71t"]>; 4535def mv73 : Flag<["-"], "mv73">, Group<m_hexagon_Features_Group>, 4536 Alias<mcpu_EQ>, AliasArgs<["hexagonv73"]>; 4537def mhexagon_hvx : Flag<["-"], "mhvx">, Group<m_hexagon_Features_HVX_Group>, 4538 HelpText<"Enable Hexagon Vector eXtensions">; 4539def mhexagon_hvx_EQ : Joined<["-"], "mhvx=">, 4540 Group<m_hexagon_Features_HVX_Group>, 4541 HelpText<"Enable Hexagon Vector eXtensions">; 4542def mno_hexagon_hvx : Flag<["-"], "mno-hvx">, 4543 Group<m_hexagon_Features_HVX_Group>, 4544 HelpText<"Disable Hexagon Vector eXtensions">; 4545def mhexagon_hvx_length_EQ : Joined<["-"], "mhvx-length=">, 4546 Group<m_hexagon_Features_HVX_Group>, HelpText<"Set Hexagon Vector Length">, 4547 Values<"64B,128B">; 4548def mhexagon_hvx_qfloat : Flag<["-"], "mhvx-qfloat">, 4549 Group<m_hexagon_Features_HVX_Group>, 4550 HelpText<"Enable Hexagon HVX QFloat instructions">; 4551def mno_hexagon_hvx_qfloat : Flag<["-"], "mno-hvx-qfloat">, 4552 Group<m_hexagon_Features_HVX_Group>, 4553 HelpText<"Disable Hexagon HVX QFloat instructions">; 4554def mhexagon_hvx_ieee_fp : Flag<["-"], "mhvx-ieee-fp">, 4555 Group<m_hexagon_Features_Group>, 4556 HelpText<"Enable Hexagon HVX IEEE floating-point">; 4557def mno_hexagon_hvx_ieee_fp : Flag<["-"], "mno-hvx-ieee-fp">, 4558 Group<m_hexagon_Features_Group>, 4559 HelpText<"Disable Hexagon HVX IEEE floating-point">; 4560def ffixed_r19: Flag<["-"], "ffixed-r19">, 4561 HelpText<"Reserve register r19 (Hexagon only)">; 4562def mmemops : Flag<["-"], "mmemops">, Group<m_hexagon_Features_Group>, 4563 Flags<[CC1Option]>, HelpText<"Enable generation of memop instructions">; 4564def mno_memops : Flag<["-"], "mno-memops">, Group<m_hexagon_Features_Group>, 4565 Flags<[CC1Option]>, HelpText<"Disable generation of memop instructions">; 4566def mpackets : Flag<["-"], "mpackets">, Group<m_hexagon_Features_Group>, 4567 Flags<[CC1Option]>, HelpText<"Enable generation of instruction packets">; 4568def mno_packets : Flag<["-"], "mno-packets">, Group<m_hexagon_Features_Group>, 4569 Flags<[CC1Option]>, HelpText<"Disable generation of instruction packets">; 4570def mnvj : Flag<["-"], "mnvj">, Group<m_hexagon_Features_Group>, 4571 Flags<[CC1Option]>, HelpText<"Enable generation of new-value jumps">; 4572def mno_nvj : Flag<["-"], "mno-nvj">, Group<m_hexagon_Features_Group>, 4573 Flags<[CC1Option]>, HelpText<"Disable generation of new-value jumps">; 4574def mnvs : Flag<["-"], "mnvs">, Group<m_hexagon_Features_Group>, 4575 Flags<[CC1Option]>, HelpText<"Enable generation of new-value stores">; 4576def mno_nvs : Flag<["-"], "mno-nvs">, Group<m_hexagon_Features_Group>, 4577 Flags<[CC1Option]>, HelpText<"Disable generation of new-value stores">; 4578def mcabac: Flag<["-"], "mcabac">, Group<m_hexagon_Features_Group>, 4579 HelpText<"Enable CABAC instructions">; 4580 4581// SPARC feature flags 4582def mfpu : Flag<["-"], "mfpu">, Group<m_sparc_Features_Group>; 4583def mno_fpu : Flag<["-"], "mno-fpu">, Group<m_sparc_Features_Group>; 4584def mfsmuld : Flag<["-"], "mfsmuld">, Group<m_sparc_Features_Group>; 4585def mno_fsmuld : Flag<["-"], "mno-fsmuld">, Group<m_sparc_Features_Group>; 4586def mpopc : Flag<["-"], "mpopc">, Group<m_sparc_Features_Group>; 4587def mno_popc : Flag<["-"], "mno-popc">, Group<m_sparc_Features_Group>; 4588def mvis : Flag<["-"], "mvis">, Group<m_sparc_Features_Group>; 4589def mno_vis : Flag<["-"], "mno-vis">, Group<m_sparc_Features_Group>; 4590def mvis2 : Flag<["-"], "mvis2">, Group<m_sparc_Features_Group>; 4591def mno_vis2 : Flag<["-"], "mno-vis2">, Group<m_sparc_Features_Group>; 4592def mvis3 : Flag<["-"], "mvis3">, Group<m_sparc_Features_Group>; 4593def mno_vis3 : Flag<["-"], "mno-vis3">, Group<m_sparc_Features_Group>; 4594def mhard_quad_float : Flag<["-"], "mhard-quad-float">, Group<m_sparc_Features_Group>; 4595def msoft_quad_float : Flag<["-"], "msoft-quad-float">, Group<m_sparc_Features_Group>; 4596 4597// M68k features flags 4598def m68000 : Flag<["-"], "m68000">, Group<m_m68k_Features_Group>; 4599def m68010 : Flag<["-"], "m68010">, Group<m_m68k_Features_Group>; 4600def m68020 : Flag<["-"], "m68020">, Group<m_m68k_Features_Group>; 4601def m68030 : Flag<["-"], "m68030">, Group<m_m68k_Features_Group>; 4602def m68040 : Flag<["-"], "m68040">, Group<m_m68k_Features_Group>; 4603def m68060 : Flag<["-"], "m68060">, Group<m_m68k_Features_Group>; 4604 4605foreach i = {0-6} in 4606 def ffixed_a#i : Flag<["-"], "ffixed-a"#i>, Group<m_m68k_Features_Group>, 4607 HelpText<"Reserve the a"#i#" register (M68k only)">; 4608foreach i = {0-7} in 4609 def ffixed_d#i : Flag<["-"], "ffixed-d"#i>, Group<m_m68k_Features_Group>, 4610 HelpText<"Reserve the d"#i#" register (M68k only)">; 4611 4612// X86 feature flags 4613def mx87 : Flag<["-"], "mx87">, Group<m_x86_Features_Group>; 4614def mno_x87 : Flag<["-"], "mno-x87">, Group<m_x86_Features_Group>; 4615def m80387 : Flag<["-"], "m80387">, Alias<mx87>; 4616def mno_80387 : Flag<["-"], "mno-80387">, Alias<mno_x87>; 4617def mno_fp_ret_in_387 : Flag<["-"], "mno-fp-ret-in-387">, Alias<mno_x87>; 4618def mmmx : Flag<["-"], "mmmx">, Group<m_x86_Features_Group>; 4619def mno_mmx : Flag<["-"], "mno-mmx">, Group<m_x86_Features_Group>; 4620def m3dnow : Flag<["-"], "m3dnow">, Group<m_x86_Features_Group>; 4621def mno_3dnow : Flag<["-"], "mno-3dnow">, Group<m_x86_Features_Group>; 4622def m3dnowa : Flag<["-"], "m3dnowa">, Group<m_x86_Features_Group>; 4623def mno_3dnowa : Flag<["-"], "mno-3dnowa">, Group<m_x86_Features_Group>; 4624def mamx_bf16 : Flag<["-"], "mamx-bf16">, Group<m_x86_Features_Group>; 4625def mno_amx_bf16 : Flag<["-"], "mno-amx-bf16">, Group<m_x86_Features_Group>; 4626def mamx_fp16 : Flag<["-"], "mamx-fp16">, Group<m_x86_Features_Group>; 4627def mno_amx_fp16 : Flag<["-"], "mno-amx-fp16">, Group<m_x86_Features_Group>; 4628def mamx_int8 : Flag<["-"], "mamx-int8">, Group<m_x86_Features_Group>; 4629def mno_amx_int8 : Flag<["-"], "mno-amx-int8">, Group<m_x86_Features_Group>; 4630def mamx_tile : Flag<["-"], "mamx-tile">, Group<m_x86_Features_Group>; 4631def mno_amx_tile : Flag<["-"], "mno-amx-tile">, Group<m_x86_Features_Group>; 4632def mcmpccxadd : Flag<["-"], "mcmpccxadd">, Group<m_x86_Features_Group>; 4633def mno_cmpccxadd : Flag<["-"], "mno-cmpccxadd">, Group<m_x86_Features_Group>; 4634def msse : Flag<["-"], "msse">, Group<m_x86_Features_Group>; 4635def mno_sse : Flag<["-"], "mno-sse">, Group<m_x86_Features_Group>; 4636def msse2 : Flag<["-"], "msse2">, Group<m_x86_Features_Group>; 4637def mno_sse2 : Flag<["-"], "mno-sse2">, Group<m_x86_Features_Group>; 4638def msse3 : Flag<["-"], "msse3">, Group<m_x86_Features_Group>; 4639def mno_sse3 : Flag<["-"], "mno-sse3">, Group<m_x86_Features_Group>; 4640def mssse3 : Flag<["-"], "mssse3">, Group<m_x86_Features_Group>; 4641def mno_ssse3 : Flag<["-"], "mno-ssse3">, Group<m_x86_Features_Group>; 4642def msse4_1 : Flag<["-"], "msse4.1">, Group<m_x86_Features_Group>; 4643def mno_sse4_1 : Flag<["-"], "mno-sse4.1">, Group<m_x86_Features_Group>; 4644def msse4_2 : Flag<["-"], "msse4.2">, Group<m_x86_Features_Group>; 4645def mno_sse4_2 : Flag<["-"], "mno-sse4.2">, Group<m_x86_Features_Group>; 4646def msse4 : Flag<["-"], "msse4">, Alias<msse4_2>; 4647// -mno-sse4 turns off sse4.1 which has the effect of turning off everything 4648// later than 4.1. -msse4 turns on 4.2 which has the effect of turning on 4649// everything earlier than 4.2. 4650def mno_sse4 : Flag<["-"], "mno-sse4">, Alias<mno_sse4_1>; 4651def msse4a : Flag<["-"], "msse4a">, Group<m_x86_Features_Group>; 4652def mno_sse4a : Flag<["-"], "mno-sse4a">, Group<m_x86_Features_Group>; 4653def mavx : Flag<["-"], "mavx">, Group<m_x86_Features_Group>; 4654def mno_avx : Flag<["-"], "mno-avx">, Group<m_x86_Features_Group>; 4655def mavx2 : Flag<["-"], "mavx2">, Group<m_x86_Features_Group>; 4656def mno_avx2 : Flag<["-"], "mno-avx2">, Group<m_x86_Features_Group>; 4657def mavx512f : Flag<["-"], "mavx512f">, Group<m_x86_Features_Group>; 4658def mno_avx512f : Flag<["-"], "mno-avx512f">, Group<m_x86_Features_Group>; 4659def mavx512bf16 : Flag<["-"], "mavx512bf16">, Group<m_x86_Features_Group>; 4660def mno_avx512bf16 : Flag<["-"], "mno-avx512bf16">, Group<m_x86_Features_Group>; 4661def mavx512bitalg : Flag<["-"], "mavx512bitalg">, Group<m_x86_Features_Group>; 4662def mno_avx512bitalg : Flag<["-"], "mno-avx512bitalg">, Group<m_x86_Features_Group>; 4663def mavx512bw : Flag<["-"], "mavx512bw">, Group<m_x86_Features_Group>; 4664def mno_avx512bw : Flag<["-"], "mno-avx512bw">, Group<m_x86_Features_Group>; 4665def mavx512cd : Flag<["-"], "mavx512cd">, Group<m_x86_Features_Group>; 4666def mno_avx512cd : Flag<["-"], "mno-avx512cd">, Group<m_x86_Features_Group>; 4667def mavx512dq : Flag<["-"], "mavx512dq">, Group<m_x86_Features_Group>; 4668def mno_avx512dq : Flag<["-"], "mno-avx512dq">, Group<m_x86_Features_Group>; 4669def mavx512er : Flag<["-"], "mavx512er">, Group<m_x86_Features_Group>; 4670def mno_avx512er : Flag<["-"], "mno-avx512er">, Group<m_x86_Features_Group>; 4671def mavx512fp16 : Flag<["-"], "mavx512fp16">, Group<m_x86_Features_Group>; 4672def mno_avx512fp16 : Flag<["-"], "mno-avx512fp16">, Group<m_x86_Features_Group>; 4673def mavx512ifma : Flag<["-"], "mavx512ifma">, Group<m_x86_Features_Group>; 4674def mno_avx512ifma : Flag<["-"], "mno-avx512ifma">, Group<m_x86_Features_Group>; 4675def mavx512pf : Flag<["-"], "mavx512pf">, Group<m_x86_Features_Group>; 4676def mno_avx512pf : Flag<["-"], "mno-avx512pf">, Group<m_x86_Features_Group>; 4677def mavx512vbmi : Flag<["-"], "mavx512vbmi">, Group<m_x86_Features_Group>; 4678def mno_avx512vbmi : Flag<["-"], "mno-avx512vbmi">, Group<m_x86_Features_Group>; 4679def mavx512vbmi2 : Flag<["-"], "mavx512vbmi2">, Group<m_x86_Features_Group>; 4680def mno_avx512vbmi2 : Flag<["-"], "mno-avx512vbmi2">, Group<m_x86_Features_Group>; 4681def mavx512vl : Flag<["-"], "mavx512vl">, Group<m_x86_Features_Group>; 4682def mno_avx512vl : Flag<["-"], "mno-avx512vl">, Group<m_x86_Features_Group>; 4683def mavx512vnni : Flag<["-"], "mavx512vnni">, Group<m_x86_Features_Group>; 4684def mno_avx512vnni : Flag<["-"], "mno-avx512vnni">, Group<m_x86_Features_Group>; 4685def mavx512vpopcntdq : Flag<["-"], "mavx512vpopcntdq">, Group<m_x86_Features_Group>; 4686def mno_avx512vpopcntdq : Flag<["-"], "mno-avx512vpopcntdq">, Group<m_x86_Features_Group>; 4687def mavx512vp2intersect : Flag<["-"], "mavx512vp2intersect">, Group<m_x86_Features_Group>; 4688def mno_avx512vp2intersect : Flag<["-"], "mno-avx512vp2intersect">, Group<m_x86_Features_Group>; 4689def mavxifma : Flag<["-"], "mavxifma">, Group<m_x86_Features_Group>; 4690def mno_avxifma : Flag<["-"], "mno-avxifma">, Group<m_x86_Features_Group>; 4691def mavxneconvert : Flag<["-"], "mavxneconvert">, Group<m_x86_Features_Group>; 4692def mno_avxneconvert : Flag<["-"], "mno-avxneconvert">, Group<m_x86_Features_Group>; 4693def mavxvnniint8 : Flag<["-"], "mavxvnniint8">, Group<m_x86_Features_Group>; 4694def mno_avxvnniint8 : Flag<["-"], "mno-avxvnniint8">, Group<m_x86_Features_Group>; 4695def mavxvnni : Flag<["-"], "mavxvnni">, Group<m_x86_Features_Group>; 4696def mno_avxvnni : Flag<["-"], "mno-avxvnni">, Group<m_x86_Features_Group>; 4697def madx : Flag<["-"], "madx">, Group<m_x86_Features_Group>; 4698def mno_adx : Flag<["-"], "mno-adx">, Group<m_x86_Features_Group>; 4699def maes : Flag<["-"], "maes">, Group<m_x86_Features_Group>; 4700def mno_aes : Flag<["-"], "mno-aes">, Group<m_x86_Features_Group>; 4701def mbmi : Flag<["-"], "mbmi">, Group<m_x86_Features_Group>; 4702def mno_bmi : Flag<["-"], "mno-bmi">, Group<m_x86_Features_Group>; 4703def mbmi2 : Flag<["-"], "mbmi2">, Group<m_x86_Features_Group>; 4704def mno_bmi2 : Flag<["-"], "mno-bmi2">, Group<m_x86_Features_Group>; 4705def mcldemote : Flag<["-"], "mcldemote">, Group<m_x86_Features_Group>; 4706def mno_cldemote : Flag<["-"], "mno-cldemote">, Group<m_x86_Features_Group>; 4707def mclflushopt : Flag<["-"], "mclflushopt">, Group<m_x86_Features_Group>; 4708def mno_clflushopt : Flag<["-"], "mno-clflushopt">, Group<m_x86_Features_Group>; 4709def mclwb : Flag<["-"], "mclwb">, Group<m_x86_Features_Group>; 4710def mno_clwb : Flag<["-"], "mno-clwb">, Group<m_x86_Features_Group>; 4711def mwbnoinvd : Flag<["-"], "mwbnoinvd">, Group<m_x86_Features_Group>; 4712def mno_wbnoinvd : Flag<["-"], "mno-wbnoinvd">, Group<m_x86_Features_Group>; 4713def mclzero : Flag<["-"], "mclzero">, Group<m_x86_Features_Group>; 4714def mno_clzero : Flag<["-"], "mno-clzero">, Group<m_x86_Features_Group>; 4715def mcrc32 : Flag<["-"], "mcrc32">, Group<m_x86_Features_Group>; 4716def mno_crc32 : Flag<["-"], "mno-crc32">, Group<m_x86_Features_Group>; 4717def mcx16 : Flag<["-"], "mcx16">, Group<m_x86_Features_Group>; 4718def mno_cx16 : Flag<["-"], "mno-cx16">, Group<m_x86_Features_Group>; 4719def menqcmd : Flag<["-"], "menqcmd">, Group<m_x86_Features_Group>; 4720def mno_enqcmd : Flag<["-"], "mno-enqcmd">, Group<m_x86_Features_Group>; 4721def mf16c : Flag<["-"], "mf16c">, Group<m_x86_Features_Group>; 4722def mno_f16c : Flag<["-"], "mno-f16c">, Group<m_x86_Features_Group>; 4723def mfma : Flag<["-"], "mfma">, Group<m_x86_Features_Group>; 4724def mno_fma : Flag<["-"], "mno-fma">, Group<m_x86_Features_Group>; 4725def mfma4 : Flag<["-"], "mfma4">, Group<m_x86_Features_Group>; 4726def mno_fma4 : Flag<["-"], "mno-fma4">, Group<m_x86_Features_Group>; 4727def mfsgsbase : Flag<["-"], "mfsgsbase">, Group<m_x86_Features_Group>; 4728def mno_fsgsbase : Flag<["-"], "mno-fsgsbase">, Group<m_x86_Features_Group>; 4729def mfxsr : Flag<["-"], "mfxsr">, Group<m_x86_Features_Group>; 4730def mno_fxsr : Flag<["-"], "mno-fxsr">, Group<m_x86_Features_Group>; 4731def minvpcid : Flag<["-"], "minvpcid">, Group<m_x86_Features_Group>; 4732def mno_invpcid : Flag<["-"], "mno-invpcid">, Group<m_x86_Features_Group>; 4733def mgfni : Flag<["-"], "mgfni">, Group<m_x86_Features_Group>; 4734def mno_gfni : Flag<["-"], "mno-gfni">, Group<m_x86_Features_Group>; 4735def mhreset : Flag<["-"], "mhreset">, Group<m_x86_Features_Group>; 4736def mno_hreset : Flag<["-"], "mno-hreset">, Group<m_x86_Features_Group>; 4737def mkl : Flag<["-"], "mkl">, Group<m_x86_Features_Group>; 4738def mno_kl : Flag<["-"], "mno-kl">, Group<m_x86_Features_Group>; 4739def mwidekl : Flag<["-"], "mwidekl">, Group<m_x86_Features_Group>; 4740def mno_widekl : Flag<["-"], "mno-widekl">, Group<m_x86_Features_Group>; 4741def mlwp : Flag<["-"], "mlwp">, Group<m_x86_Features_Group>; 4742def mno_lwp : Flag<["-"], "mno-lwp">, Group<m_x86_Features_Group>; 4743def mlzcnt : Flag<["-"], "mlzcnt">, Group<m_x86_Features_Group>; 4744def mno_lzcnt : Flag<["-"], "mno-lzcnt">, Group<m_x86_Features_Group>; 4745def mmovbe : Flag<["-"], "mmovbe">, Group<m_x86_Features_Group>; 4746def mno_movbe : Flag<["-"], "mno-movbe">, Group<m_x86_Features_Group>; 4747def mmovdiri : Flag<["-"], "mmovdiri">, Group<m_x86_Features_Group>; 4748def mno_movdiri : Flag<["-"], "mno-movdiri">, Group<m_x86_Features_Group>; 4749def mmovdir64b : Flag<["-"], "mmovdir64b">, Group<m_x86_Features_Group>; 4750def mno_movdir64b : Flag<["-"], "mno-movdir64b">, Group<m_x86_Features_Group>; 4751def mmwaitx : Flag<["-"], "mmwaitx">, Group<m_x86_Features_Group>; 4752def mno_mwaitx : Flag<["-"], "mno-mwaitx">, Group<m_x86_Features_Group>; 4753def mpku : Flag<["-"], "mpku">, Group<m_x86_Features_Group>; 4754def mno_pku : Flag<["-"], "mno-pku">, Group<m_x86_Features_Group>; 4755def mpclmul : Flag<["-"], "mpclmul">, Group<m_x86_Features_Group>; 4756def mno_pclmul : Flag<["-"], "mno-pclmul">, Group<m_x86_Features_Group>; 4757def mpconfig : Flag<["-"], "mpconfig">, Group<m_x86_Features_Group>; 4758def mno_pconfig : Flag<["-"], "mno-pconfig">, Group<m_x86_Features_Group>; 4759def mpopcnt : Flag<["-"], "mpopcnt">, Group<m_x86_Features_Group>; 4760def mno_popcnt : Flag<["-"], "mno-popcnt">, Group<m_x86_Features_Group>; 4761def mprefetchi : Flag<["-"], "mprefetchi">, Group<m_x86_Features_Group>; 4762def mno_prefetchi : Flag<["-"], "mno-prefetchi">, Group<m_x86_Features_Group>; 4763def mprefetchwt1 : Flag<["-"], "mprefetchwt1">, Group<m_x86_Features_Group>; 4764def mno_prefetchwt1 : Flag<["-"], "mno-prefetchwt1">, Group<m_x86_Features_Group>; 4765def mprfchw : Flag<["-"], "mprfchw">, Group<m_x86_Features_Group>; 4766def mno_prfchw : Flag<["-"], "mno-prfchw">, Group<m_x86_Features_Group>; 4767def mptwrite : Flag<["-"], "mptwrite">, Group<m_x86_Features_Group>; 4768def mno_ptwrite : Flag<["-"], "mno-ptwrite">, Group<m_x86_Features_Group>; 4769def mraoint : Flag<["-"], "mraoint">, Group<m_x86_Features_Group>; 4770def mno_raoint : Flag<["-"], "mno-raoint">, Group<m_x86_Features_Group>; 4771def mrdpid : Flag<["-"], "mrdpid">, Group<m_x86_Features_Group>; 4772def mno_rdpid : Flag<["-"], "mno-rdpid">, Group<m_x86_Features_Group>; 4773def mrdpru : Flag<["-"], "mrdpru">, Group<m_x86_Features_Group>; 4774def mno_rdpru : Flag<["-"], "mno-rdpru">, Group<m_x86_Features_Group>; 4775def mrdrnd : Flag<["-"], "mrdrnd">, Group<m_x86_Features_Group>; 4776def mno_rdrnd : Flag<["-"], "mno-rdrnd">, Group<m_x86_Features_Group>; 4777def mrtm : Flag<["-"], "mrtm">, Group<m_x86_Features_Group>; 4778def mno_rtm : Flag<["-"], "mno-rtm">, Group<m_x86_Features_Group>; 4779def mrdseed : Flag<["-"], "mrdseed">, Group<m_x86_Features_Group>; 4780def mno_rdseed : Flag<["-"], "mno-rdseed">, Group<m_x86_Features_Group>; 4781def msahf : Flag<["-"], "msahf">, Group<m_x86_Features_Group>; 4782def mno_sahf : Flag<["-"], "mno-sahf">, Group<m_x86_Features_Group>; 4783def mserialize : Flag<["-"], "mserialize">, Group<m_x86_Features_Group>; 4784def mno_serialize : Flag<["-"], "mno-serialize">, Group<m_x86_Features_Group>; 4785def msgx : Flag<["-"], "msgx">, Group<m_x86_Features_Group>; 4786def mno_sgx : Flag<["-"], "mno-sgx">, Group<m_x86_Features_Group>; 4787def msha : Flag<["-"], "msha">, Group<m_x86_Features_Group>; 4788def mno_sha : Flag<["-"], "mno-sha">, Group<m_x86_Features_Group>; 4789def mtbm : Flag<["-"], "mtbm">, Group<m_x86_Features_Group>; 4790def mno_tbm : Flag<["-"], "mno-tbm">, Group<m_x86_Features_Group>; 4791def mtsxldtrk : Flag<["-"], "mtsxldtrk">, Group<m_x86_Features_Group>; 4792def mno_tsxldtrk : Flag<["-"], "mno-tsxldtrk">, Group<m_x86_Features_Group>; 4793def muintr : Flag<["-"], "muintr">, Group<m_x86_Features_Group>; 4794def mno_uintr : Flag<["-"], "mno-uintr">, Group<m_x86_Features_Group>; 4795def mvaes : Flag<["-"], "mvaes">, Group<m_x86_Features_Group>; 4796def mno_vaes : Flag<["-"], "mno-vaes">, Group<m_x86_Features_Group>; 4797def mvpclmulqdq : Flag<["-"], "mvpclmulqdq">, Group<m_x86_Features_Group>; 4798def mno_vpclmulqdq : Flag<["-"], "mno-vpclmulqdq">, Group<m_x86_Features_Group>; 4799def mwaitpkg : Flag<["-"], "mwaitpkg">, Group<m_x86_Features_Group>; 4800def mno_waitpkg : Flag<["-"], "mno-waitpkg">, Group<m_x86_Features_Group>; 4801def mxop : Flag<["-"], "mxop">, Group<m_x86_Features_Group>; 4802def mno_xop : Flag<["-"], "mno-xop">, Group<m_x86_Features_Group>; 4803def mxsave : Flag<["-"], "mxsave">, Group<m_x86_Features_Group>; 4804def mno_xsave : Flag<["-"], "mno-xsave">, Group<m_x86_Features_Group>; 4805def mxsavec : Flag<["-"], "mxsavec">, Group<m_x86_Features_Group>; 4806def mno_xsavec : Flag<["-"], "mno-xsavec">, Group<m_x86_Features_Group>; 4807def mxsaveopt : Flag<["-"], "mxsaveopt">, Group<m_x86_Features_Group>; 4808def mno_xsaveopt : Flag<["-"], "mno-xsaveopt">, Group<m_x86_Features_Group>; 4809def mxsaves : Flag<["-"], "mxsaves">, Group<m_x86_Features_Group>; 4810def mno_xsaves : Flag<["-"], "mno-xsaves">, Group<m_x86_Features_Group>; 4811def mshstk : Flag<["-"], "mshstk">, Group<m_x86_Features_Group>; 4812def mno_shstk : Flag<["-"], "mno-shstk">, Group<m_x86_Features_Group>; 4813def mretpoline_external_thunk : Flag<["-"], "mretpoline-external-thunk">, Group<m_x86_Features_Group>; 4814def mno_retpoline_external_thunk : Flag<["-"], "mno-retpoline-external-thunk">, Group<m_x86_Features_Group>; 4815def msave_args : Flag<["-"], "msave-args">, Group<m_x86_Features_Group>; 4816def mno_save_args : Flag<["-"], "mno-save-args">, Group<m_x86_Features_Group>; 4817def mvzeroupper : Flag<["-"], "mvzeroupper">, Group<m_x86_Features_Group>; 4818def mno_vzeroupper : Flag<["-"], "mno-vzeroupper">, Group<m_x86_Features_Group>; 4819 4820// These are legacy user-facing driver-level option spellings. They are always 4821// aliases for options that are spelled using the more common Unix / GNU flag 4822// style of double-dash and equals-joined flags. 4823def target_legacy_spelling : Separate<["-"], "target">, 4824 Alias<target>, 4825 Flags<[CoreOption]>; 4826 4827// Special internal option to handle -Xlinker --no-demangle. 4828def Z_Xlinker__no_demangle : Flag<["-"], "Z-Xlinker-no-demangle">, 4829 Flags<[Unsupported, NoArgumentUnused]>; 4830 4831// Special internal option to allow forwarding arbitrary arguments to linker. 4832def Zlinker_input : Separate<["-"], "Zlinker-input">, 4833 Flags<[Unsupported, NoArgumentUnused]>; 4834 4835// Reserved library options. 4836def Z_reserved_lib_stdcxx : Flag<["-"], "Z-reserved-lib-stdc++">, 4837 Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, Group<reserved_lib_Group>; 4838def Z_reserved_lib_cckext : Flag<["-"], "Z-reserved-lib-cckext">, 4839 Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, Group<reserved_lib_Group>; 4840 4841// Ignored options 4842multiclass BooleanFFlag<string name> { 4843 def f#NAME : Flag<["-"], "f"#name>; 4844 def fno_#NAME : Flag<["-"], "fno-"#name>; 4845} 4846 4847defm : BooleanFFlag<"keep-inline-functions">, Group<clang_ignored_gcc_optimization_f_Group>; 4848 4849def fprofile_dir : Joined<["-"], "fprofile-dir=">, Group<f_Group>; 4850 4851// The default value matches BinutilsVersion in MCAsmInfo.h. 4852def fbinutils_version_EQ : Joined<["-"], "fbinutils-version=">, 4853 MetaVarName<"<major.minor>">, Group<f_Group>, Flags<[CC1Option]>, 4854 HelpText<"Produced object files can use all ELF features supported by this " 4855 "binutils version and newer. If -fno-integrated-as is specified, the " 4856 "generated assembly will consider GNU as support. 'none' means that all ELF " 4857 "features can be used, regardless of binutils support. Defaults to 2.26.">; 4858def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group<f_Group>, Flags<[CoreOption, LinkOption]>; 4859def ld_path_EQ : Joined<["--"], "ld-path=">, Group<Link_Group>; 4860 4861defm align_labels : BooleanFFlag<"align-labels">, Group<clang_ignored_gcc_optimization_f_Group>; 4862def falign_labels_EQ : Joined<["-"], "falign-labels=">, Group<clang_ignored_gcc_optimization_f_Group>; 4863defm align_loops : BooleanFFlag<"align-loops">, Group<clang_ignored_gcc_optimization_f_Group>; 4864defm align_jumps : BooleanFFlag<"align-jumps">, Group<clang_ignored_gcc_optimization_f_Group>; 4865def falign_jumps_EQ : Joined<["-"], "falign-jumps=">, Group<clang_ignored_gcc_optimization_f_Group>; 4866 4867// FIXME: This option should be supported and wired up to our diognostics, but 4868// ignore it for now to avoid breaking builds that use it. 4869def fdiagnostics_show_location_EQ : Joined<["-"], "fdiagnostics-show-location=">, Group<clang_ignored_f_Group>; 4870 4871defm fcheck_new : BooleanFFlag<"check-new">, Group<clang_ignored_f_Group>; 4872defm caller_saves : BooleanFFlag<"caller-saves">, Group<clang_ignored_gcc_optimization_f_Group>; 4873defm reorder_blocks : BooleanFFlag<"reorder-blocks">, Group<clang_ignored_gcc_optimization_f_Group>; 4874defm branch_count_reg : BooleanFFlag<"branch-count-reg">, Group<clang_ignored_gcc_optimization_f_Group>; 4875defm default_inline : BooleanFFlag<"default-inline">, Group<clang_ignored_gcc_optimization_f_Group>; 4876defm fat_lto_objects : BooleanFFlag<"fat-lto-objects">, Group<clang_ignored_gcc_optimization_f_Group>; 4877defm float_store : BooleanFFlag<"float-store">, Group<clang_ignored_gcc_optimization_f_Group>; 4878defm friend_injection : BooleanFFlag<"friend-injection">, Group<clang_ignored_f_Group>; 4879defm function_attribute_list : BooleanFFlag<"function-attribute-list">, Group<clang_ignored_f_Group>; 4880defm gcse : BooleanFFlag<"gcse">, Group<clang_ignored_gcc_optimization_f_Group>; 4881defm gcse_after_reload: BooleanFFlag<"gcse-after-reload">, Group<clang_ignored_gcc_optimization_f_Group>; 4882defm gcse_las: BooleanFFlag<"gcse-las">, Group<clang_ignored_gcc_optimization_f_Group>; 4883defm gcse_sm: BooleanFFlag<"gcse-sm">, Group<clang_ignored_gcc_optimization_f_Group>; 4884defm gnu : BooleanFFlag<"gnu">, Group<clang_ignored_f_Group>; 4885defm implicit_templates : BooleanFFlag<"implicit-templates">, Group<clang_ignored_f_Group>; 4886defm implement_inlines : BooleanFFlag<"implement-inlines">, Group<clang_ignored_f_Group>; 4887defm merge_constants : BooleanFFlag<"merge-constants">, Group<clang_ignored_gcc_optimization_f_Group>; 4888defm modulo_sched : BooleanFFlag<"modulo-sched">, Group<clang_ignored_gcc_optimization_f_Group>; 4889defm modulo_sched_allow_regmoves : BooleanFFlag<"modulo-sched-allow-regmoves">, 4890 Group<clang_ignored_gcc_optimization_f_Group>; 4891defm inline_functions_called_once : BooleanFFlag<"inline-functions-called-once">, 4892 Group<clang_ignored_gcc_optimization_f_Group>; 4893def finline_limit_EQ : Joined<["-"], "finline-limit=">, Group<clang_ignored_gcc_optimization_f_Group>; 4894defm finline_limit : BooleanFFlag<"inline-limit">, Group<clang_ignored_gcc_optimization_f_Group>; 4895defm inline_small_functions : BooleanFFlag<"inline-small-functions">, 4896 Group<clang_ignored_gcc_optimization_f_Group>; 4897defm ipa_cp : BooleanFFlag<"ipa-cp">, 4898 Group<clang_ignored_gcc_optimization_f_Group>; 4899defm ivopts : BooleanFFlag<"ivopts">, Group<clang_ignored_gcc_optimization_f_Group>; 4900defm semantic_interposition : BoolFOption<"semantic-interposition", 4901 LangOpts<"SemanticInterposition">, DefaultFalse, 4902 PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>; 4903defm non_call_exceptions : BooleanFFlag<"non-call-exceptions">, Group<clang_ignored_f_Group>; 4904defm peel_loops : BooleanFFlag<"peel-loops">, Group<clang_ignored_gcc_optimization_f_Group>; 4905defm permissive : BooleanFFlag<"permissive">, Group<clang_ignored_f_Group>; 4906defm prefetch_loop_arrays : BooleanFFlag<"prefetch-loop-arrays">, Group<clang_ignored_gcc_optimization_f_Group>; 4907defm printf : BooleanFFlag<"printf">, Group<clang_ignored_f_Group>; 4908defm profile : BooleanFFlag<"profile">, Group<clang_ignored_f_Group>; 4909defm profile_correction : BooleanFFlag<"profile-correction">, Group<clang_ignored_gcc_optimization_f_Group>; 4910defm profile_generate_sampling : BooleanFFlag<"profile-generate-sampling">, Group<clang_ignored_f_Group>; 4911defm profile_reusedist : BooleanFFlag<"profile-reusedist">, Group<clang_ignored_f_Group>; 4912defm profile_values : BooleanFFlag<"profile-values">, Group<clang_ignored_gcc_optimization_f_Group>; 4913defm regs_graph : BooleanFFlag<"regs-graph">, Group<clang_ignored_f_Group>; 4914defm rename_registers : BooleanFFlag<"rename-registers">, Group<clang_ignored_gcc_optimization_f_Group>; 4915defm ripa : BooleanFFlag<"ripa">, Group<clang_ignored_f_Group>; 4916defm schedule_insns : BooleanFFlag<"schedule-insns">, Group<clang_ignored_gcc_optimization_f_Group>; 4917defm schedule_insns2 : BooleanFFlag<"schedule-insns2">, Group<clang_ignored_gcc_optimization_f_Group>; 4918defm see : BooleanFFlag<"see">, Group<clang_ignored_f_Group>; 4919defm signaling_nans : BooleanFFlag<"signaling-nans">, Group<clang_ignored_gcc_optimization_f_Group>; 4920defm single_precision_constant : BooleanFFlag<"single-precision-constant">, 4921 Group<clang_ignored_gcc_optimization_f_Group>; 4922defm spec_constr_count : BooleanFFlag<"spec-constr-count">, Group<clang_ignored_f_Group>; 4923defm stack_check : BooleanFFlag<"stack-check">, Group<clang_ignored_f_Group>; 4924defm strength_reduce : 4925 BooleanFFlag<"strength-reduce">, Group<clang_ignored_gcc_optimization_f_Group>; 4926defm tls_model : BooleanFFlag<"tls-model">, Group<clang_ignored_f_Group>; 4927defm tracer : BooleanFFlag<"tracer">, Group<clang_ignored_gcc_optimization_f_Group>; 4928defm tree_dce : BooleanFFlag<"tree-dce">, Group<clang_ignored_gcc_optimization_f_Group>; 4929defm tree_salias : BooleanFFlag<"tree-salias">, Group<clang_ignored_f_Group>; 4930defm tree_ter : BooleanFFlag<"tree-ter">, Group<clang_ignored_gcc_optimization_f_Group>; 4931defm tree_vectorizer_verbose : BooleanFFlag<"tree-vectorizer-verbose">, Group<clang_ignored_f_Group>; 4932defm tree_vrp : BooleanFFlag<"tree-vrp">, Group<clang_ignored_gcc_optimization_f_Group>; 4933defm : BooleanFFlag<"unit-at-a-time">, Group<clang_ignored_gcc_optimization_f_Group>; 4934defm unroll_all_loops : BooleanFFlag<"unroll-all-loops">, Group<clang_ignored_gcc_optimization_f_Group>; 4935defm unsafe_loop_optimizations : BooleanFFlag<"unsafe-loop-optimizations">, 4936 Group<clang_ignored_gcc_optimization_f_Group>; 4937defm unswitch_loops : BooleanFFlag<"unswitch-loops">, Group<clang_ignored_gcc_optimization_f_Group>; 4938defm use_linker_plugin : BooleanFFlag<"use-linker-plugin">, Group<clang_ignored_gcc_optimization_f_Group>; 4939defm vect_cost_model : BooleanFFlag<"vect-cost-model">, Group<clang_ignored_gcc_optimization_f_Group>; 4940defm variable_expansion_in_unroller : BooleanFFlag<"variable-expansion-in-unroller">, 4941 Group<clang_ignored_gcc_optimization_f_Group>; 4942defm web : BooleanFFlag<"web">, Group<clang_ignored_gcc_optimization_f_Group>; 4943defm whole_program : BooleanFFlag<"whole-program">, Group<clang_ignored_gcc_optimization_f_Group>; 4944defm devirtualize : BooleanFFlag<"devirtualize">, Group<clang_ignored_gcc_optimization_f_Group>; 4945defm devirtualize_speculatively : BooleanFFlag<"devirtualize-speculatively">, 4946 Group<clang_ignored_gcc_optimization_f_Group>; 4947 4948// Generic gfortran options. 4949def A_DASH : Joined<["-"], "A-">, Group<gfortran_Group>; 4950def static_libgfortran : Flag<["-"], "static-libgfortran">, Group<gfortran_Group>; 4951 4952// "f" options with values for gfortran. 4953def fblas_matmul_limit_EQ : Joined<["-"], "fblas-matmul-limit=">, Group<gfortran_Group>; 4954def fcheck_EQ : Joined<["-"], "fcheck=">, Group<gfortran_Group>; 4955def fcoarray_EQ : Joined<["-"], "fcoarray=">, Group<gfortran_Group>; 4956def ffpe_trap_EQ : Joined<["-"], "ffpe-trap=">, Group<gfortran_Group>; 4957def ffree_line_length_VALUE : Joined<["-"], "ffree-line-length-">, Group<gfortran_Group>; 4958def finit_character_EQ : Joined<["-"], "finit-character=">, Group<gfortran_Group>; 4959def finit_integer_EQ : Joined<["-"], "finit-integer=">, Group<gfortran_Group>; 4960def finit_logical_EQ : Joined<["-"], "finit-logical=">, Group<gfortran_Group>; 4961def finit_real_EQ : Joined<["-"], "finit-real=">, Group<gfortran_Group>; 4962def fmax_array_constructor_EQ : Joined<["-"], "fmax-array-constructor=">, Group<gfortran_Group>; 4963def fmax_errors_EQ : Joined<["-"], "fmax-errors=">, Group<gfortran_Group>; 4964def fmax_stack_var_size_EQ : Joined<["-"], "fmax-stack-var-size=">, Group<gfortran_Group>; 4965def fmax_subrecord_length_EQ : Joined<["-"], "fmax-subrecord-length=">, Group<gfortran_Group>; 4966def frecord_marker_EQ : Joined<["-"], "frecord-marker=">, Group<gfortran_Group>; 4967 4968// "f" flags for gfortran. 4969defm aggressive_function_elimination : BooleanFFlag<"aggressive-function-elimination">, Group<gfortran_Group>; 4970defm align_commons : BooleanFFlag<"align-commons">, Group<gfortran_Group>; 4971defm all_intrinsics : BooleanFFlag<"all-intrinsics">, Group<gfortran_Group>; 4972def fautomatic : Flag<["-"], "fautomatic">; // -fno-automatic is significant 4973defm backtrace : BooleanFFlag<"backtrace">, Group<gfortran_Group>; 4974defm bounds_check : BooleanFFlag<"bounds-check">, Group<gfortran_Group>; 4975defm check_array_temporaries : BooleanFFlag<"check-array-temporaries">, Group<gfortran_Group>; 4976defm cray_pointer : BooleanFFlag<"cray-pointer">, Group<gfortran_Group>; 4977defm d_lines_as_code : BooleanFFlag<"d-lines-as-code">, Group<gfortran_Group>; 4978defm d_lines_as_comments : BooleanFFlag<"d-lines-as-comments">, Group<gfortran_Group>; 4979defm dollar_ok : BooleanFFlag<"dollar-ok">, Group<gfortran_Group>; 4980defm dump_fortran_optimized : BooleanFFlag<"dump-fortran-optimized">, Group<gfortran_Group>; 4981defm dump_fortran_original : BooleanFFlag<"dump-fortran-original">, Group<gfortran_Group>; 4982defm dump_parse_tree : BooleanFFlag<"dump-parse-tree">, Group<gfortran_Group>; 4983defm external_blas : BooleanFFlag<"external-blas">, Group<gfortran_Group>; 4984defm f2c : BooleanFFlag<"f2c">, Group<gfortran_Group>; 4985defm frontend_optimize : BooleanFFlag<"frontend-optimize">, Group<gfortran_Group>; 4986defm init_local_zero : BooleanFFlag<"init-local-zero">, Group<gfortran_Group>; 4987defm integer_4_integer_8 : BooleanFFlag<"integer-4-integer-8">, Group<gfortran_Group>; 4988defm max_identifier_length : BooleanFFlag<"max-identifier-length">, Group<gfortran_Group>; 4989defm module_private : BooleanFFlag<"module-private">, Group<gfortran_Group>; 4990defm pack_derived : BooleanFFlag<"pack-derived">, Group<gfortran_Group>; 4991//defm protect_parens : BooleanFFlag<"protect-parens">, Group<gfortran_Group>; 4992defm range_check : BooleanFFlag<"range-check">, Group<gfortran_Group>; 4993defm real_4_real_10 : BooleanFFlag<"real-4-real-10">, Group<gfortran_Group>; 4994defm real_4_real_16 : BooleanFFlag<"real-4-real-16">, Group<gfortran_Group>; 4995defm real_4_real_8 : BooleanFFlag<"real-4-real-8">, Group<gfortran_Group>; 4996defm real_8_real_10 : BooleanFFlag<"real-8-real-10">, Group<gfortran_Group>; 4997defm real_8_real_16 : BooleanFFlag<"real-8-real-16">, Group<gfortran_Group>; 4998defm real_8_real_4 : BooleanFFlag<"real-8-real-4">, Group<gfortran_Group>; 4999defm realloc_lhs : BooleanFFlag<"realloc-lhs">, Group<gfortran_Group>; 5000defm recursive : BooleanFFlag<"recursive">, Group<gfortran_Group>; 5001defm repack_arrays : BooleanFFlag<"repack-arrays">, Group<gfortran_Group>; 5002defm second_underscore : BooleanFFlag<"second-underscore">, Group<gfortran_Group>; 5003defm sign_zero : BooleanFFlag<"sign-zero">, Group<gfortran_Group>; 5004defm stack_arrays : BooleanFFlag<"stack-arrays">, Group<gfortran_Group>; 5005defm underscoring : BooleanFFlag<"underscoring">, Group<gfortran_Group>; 5006defm whole_file : BooleanFFlag<"whole-file">, Group<gfortran_Group>; 5007 5008// C++ SYCL options 5009def fsycl : Flag<["-"], "fsycl">, Flags<[NoXarchOption, CoreOption]>, 5010 Group<sycl_Group>, HelpText<"Enables SYCL kernels compilation for device">; 5011def fno_sycl : Flag<["-"], "fno-sycl">, Flags<[NoXarchOption, CoreOption]>, 5012 Group<sycl_Group>, HelpText<"Disables SYCL kernels compilation for device">; 5013 5014//===----------------------------------------------------------------------===// 5015// FLangOption + NoXarchOption 5016//===----------------------------------------------------------------------===// 5017 5018def flang_experimental_exec : Flag<["-"], "flang-experimental-exec">, 5019 Flags<[FlangOption, FlangOnlyOption, NoXarchOption, HelpHidden]>, 5020 HelpText<"Enable support for generating executables (experimental)">; 5021 5022//===----------------------------------------------------------------------===// 5023// FLangOption + CoreOption + NoXarchOption 5024//===----------------------------------------------------------------------===// 5025 5026def Xflang : Separate<["-"], "Xflang">, 5027 HelpText<"Pass <arg> to the flang compiler">, MetaVarName<"<arg>">, 5028 Flags<[FlangOption, FlangOnlyOption, NoXarchOption, CoreOption]>, 5029 Group<CompileOnly_Group>; 5030 5031//===----------------------------------------------------------------------===// 5032// FlangOption and FC1 Options 5033//===----------------------------------------------------------------------===// 5034 5035let Flags = [FC1Option, FlangOption, FlangOnlyOption] in { 5036 5037def cpp : Flag<["-"], "cpp">, Group<f_Group>, 5038 HelpText<"Enable predefined and command line preprocessor macros">; 5039def nocpp : Flag<["-"], "nocpp">, Group<f_Group>, 5040 HelpText<"Disable predefined and command line preprocessor macros">; 5041def module_dir : JoinedOrSeparate<["-"], "module-dir">, MetaVarName<"<dir>">, 5042 HelpText<"Put MODULE files in <dir>">, 5043 DocBrief<[{This option specifies where to put .mod files for compiled modules. 5044It is also added to the list of directories to be searched by an USE statement. 5045The default is the current directory.}]>; 5046 5047def ffixed_form : Flag<["-"], "ffixed-form">, Group<f_Group>, 5048 HelpText<"Process source files in fixed form">; 5049def ffree_form : Flag<["-"], "ffree-form">, Group<f_Group>, 5050 HelpText<"Process source files in free form">; 5051def ffixed_line_length_EQ : Joined<["-"], "ffixed-line-length=">, Group<f_Group>, 5052 HelpText<"Use <value> as character line width in fixed mode">, 5053 DocBrief<[{Set column after which characters are ignored in typical fixed-form lines in the source 5054file}]>; 5055def ffixed_line_length_VALUE : Joined<["-"], "ffixed-line-length-">, Group<f_Group>, Alias<ffixed_line_length_EQ>; 5056def fconvert_EQ : Joined<["-"], "fconvert=">, Group<f_Group>, 5057 HelpText<"Set endian conversion of data for unformatted files">; 5058def fopenacc : Flag<["-"], "fopenacc">, Group<f_Group>, 5059 HelpText<"Enable OpenACC">; 5060def fdefault_double_8 : Flag<["-"],"fdefault-double-8">, Group<f_Group>, 5061 HelpText<"Set the default double precision kind to an 8 byte wide type">; 5062def fdefault_integer_8 : Flag<["-"],"fdefault-integer-8">, Group<f_Group>, 5063 HelpText<"Set the default integer kind to an 8 byte wide type">; 5064def fdefault_real_8 : Flag<["-"],"fdefault-real-8">, Group<f_Group>, 5065 HelpText<"Set the default real kind to an 8 byte wide type">; 5066def flarge_sizes : Flag<["-"],"flarge-sizes">, Group<f_Group>, 5067 HelpText<"Use INTEGER(KIND=8) for the result type in size-related intrinsics">; 5068 5069def falternative_parameter_statement : Flag<["-"], "falternative-parameter-statement">, Group<f_Group>, 5070 HelpText<"Enable the old style PARAMETER statement">; 5071def fintrinsic_modules_path : Separate<["-"], "fintrinsic-modules-path">, Group<f_Group>, MetaVarName<"<dir>">, 5072 HelpText<"Specify where to find the compiled intrinsic modules">, 5073 DocBrief<[{This option specifies the location of pre-compiled intrinsic modules, 5074 if they are not in the default location expected by the compiler.}]>; 5075 5076defm backslash : OptInFC1FFlag<"backslash", "Specify that backslash in string introduces an escape character">; 5077defm xor_operator : OptInFC1FFlag<"xor-operator", "Enable .XOR. as a synonym of .NEQV.">; 5078defm logical_abbreviations : OptInFC1FFlag<"logical-abbreviations", "Enable logical abbreviations">; 5079defm implicit_none : OptInFC1FFlag<"implicit-none", "No implicit typing allowed unless overridden by IMPLICIT statements">; 5080 5081def fno_automatic : Flag<["-"], "fno-automatic">, Group<f_Group>, 5082 HelpText<"Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE">; 5083 5084} // let Flags = [FC1Option, FlangOption, FlangOnlyOption] 5085 5086def J : JoinedOrSeparate<["-"], "J">, 5087 Flags<[RenderJoined, FlangOption, FC1Option, FlangOnlyOption]>, 5088 Group<gfortran_Group>, 5089 Alias<module_dir>; 5090 5091//===----------------------------------------------------------------------===// 5092// FC1 Options 5093//===----------------------------------------------------------------------===// 5094 5095let Flags = [FC1Option, FlangOnlyOption] in { 5096 5097def fget_definition : MultiArg<["-"], "fget-definition", 3>, 5098 HelpText<"Get the symbol definition from <line> <start-column> <end-column>">, 5099 Group<Action_Group>; 5100def test_io : Flag<["-"], "test-io">, Group<Action_Group>, 5101 HelpText<"Run the InputOuputTest action. Use for development and testing only.">; 5102def fdebug_unparse_no_sema : Flag<["-"], "fdebug-unparse-no-sema">, Group<Action_Group>, 5103 HelpText<"Unparse and stop (skips the semantic checks)">, 5104 DocBrief<[{Only run the parser, then unparse the parse-tree and output the 5105generated Fortran source file. Semantic checks are disabled.}]>; 5106def fdebug_unparse : Flag<["-"], "fdebug-unparse">, Group<Action_Group>, 5107 HelpText<"Unparse and stop.">, 5108 DocBrief<[{Run the parser and the semantic checks. Then unparse the 5109parse-tree and output the generated Fortran source file.}]>; 5110def fdebug_unparse_with_symbols : Flag<["-"], "fdebug-unparse-with-symbols">, Group<Action_Group>, 5111 HelpText<"Unparse and stop.">; 5112def fdebug_dump_symbols : Flag<["-"], "fdebug-dump-symbols">, Group<Action_Group>, 5113 HelpText<"Dump symbols after the semantic analysis">; 5114def fdebug_dump_parse_tree : Flag<["-"], "fdebug-dump-parse-tree">, Group<Action_Group>, 5115 HelpText<"Dump the parse tree">, 5116 DocBrief<[{Run the Parser and the semantic checks, and then output the 5117parse tree.}]>; 5118def fdebug_dump_pft : Flag<["-"], "fdebug-dump-pft">, Group<Action_Group>, 5119 HelpText<"Dump the pre-fir parse tree">; 5120def fdebug_dump_parse_tree_no_sema : Flag<["-"], "fdebug-dump-parse-tree-no-sema">, Group<Action_Group>, 5121 HelpText<"Dump the parse tree (skips the semantic checks)">, 5122 DocBrief<[{Run the Parser and then output the parse tree. Semantic 5123checks are disabled.}]>; 5124def fdebug_dump_all : Flag<["-"], "fdebug-dump-all">, Group<Action_Group>, 5125 HelpText<"Dump symbols and the parse tree after the semantic checks">; 5126def fdebug_dump_provenance : Flag<["-"], "fdebug-dump-provenance">, Group<Action_Group>, 5127 HelpText<"Dump provenance">; 5128def fdebug_dump_parsing_log : Flag<["-"], "fdebug-dump-parsing-log">, Group<Action_Group>, 5129 HelpText<"Run instrumented parse and dump the parsing log">; 5130def fdebug_measure_parse_tree : Flag<["-"], "fdebug-measure-parse-tree">, Group<Action_Group>, 5131 HelpText<"Measure the parse tree">; 5132def fdebug_pre_fir_tree : Flag<["-"], "fdebug-pre-fir-tree">, Group<Action_Group>, 5133 HelpText<"Dump the pre-FIR tree">; 5134def fdebug_module_writer : Flag<["-"],"fdebug-module-writer">, 5135 HelpText<"Enable debug messages while writing module files">; 5136def fget_symbols_sources : Flag<["-"], "fget-symbols-sources">, Group<Action_Group>, 5137 HelpText<"Dump symbols and their source code locations">; 5138 5139def module_suffix : Separate<["-"], "module-suffix">, Group<f_Group>, MetaVarName<"<suffix>">, 5140 HelpText<"Use <suffix> as the suffix for module files (the default value is `.mod`)">; 5141def fno_reformat : Flag<["-"], "fno-reformat">, Group<Preprocessor_Group>, 5142 HelpText<"Dump the cooked character stream in -E mode">; 5143defm analyzed_objects_for_unparse : OptOutFC1FFlag<"analyzed-objects-for-unparse", "", "Do not use the analyzed objects when unparsing">; 5144 5145def emit_mlir : Flag<["-"], "emit-mlir">, Group<Action_Group>, 5146 HelpText<"Build the parse tree, then lower it to MLIR">; 5147def emit_fir : Flag<["-"], "emit-fir">, Alias<emit_mlir>; 5148 5149} // let Flags = [FC1Option, FlangOnlyOption] 5150 5151//===----------------------------------------------------------------------===// 5152// Target Options (cc1 + cc1as) 5153//===----------------------------------------------------------------------===// 5154 5155let Flags = [CC1Option, CC1AsOption, NoDriverOption] in { 5156 5157def tune_cpu : Separate<["-"], "tune-cpu">, 5158 HelpText<"Tune for a specific cpu type">, 5159 MarshallingInfoString<TargetOpts<"TuneCPU">>; 5160def target_abi : Separate<["-"], "target-abi">, 5161 HelpText<"Target a particular ABI type">, 5162 MarshallingInfoString<TargetOpts<"ABI">>; 5163def target_sdk_version_EQ : Joined<["-"], "target-sdk-version=">, 5164 HelpText<"The version of target SDK used for compilation">; 5165def darwin_target_variant_sdk_version_EQ : Joined<["-"], 5166 "darwin-target-variant-sdk-version=">, 5167 HelpText<"The version of darwin target variant SDK used for compilation">; 5168 5169} // let Flags = [CC1Option, CC1AsOption, NoDriverOption] 5170 5171let Flags = [CC1Option, CC1AsOption] in { 5172 5173def darwin_target_variant_triple : Separate<["-"], "darwin-target-variant-triple">, 5174 HelpText<"Specify the darwin target variant triple">, 5175 MarshallingInfoString<TargetOpts<"DarwinTargetVariantTriple">>, 5176 Normalizer<"normalizeTriple">; 5177 5178} // let Flags = [CC1Option, CC1AsOption] 5179 5180//===----------------------------------------------------------------------===// 5181// Target Options (cc1 + cc1as + fc1) 5182//===----------------------------------------------------------------------===// 5183 5184let Flags = [CC1Option, CC1AsOption, FC1Option, NoDriverOption] in { 5185 5186def target_cpu : Separate<["-"], "target-cpu">, 5187 HelpText<"Target a specific cpu type">, 5188 MarshallingInfoString<TargetOpts<"CPU">>; 5189def target_feature : Separate<["-"], "target-feature">, 5190 HelpText<"Target specific attributes">, 5191 MarshallingInfoStringVector<TargetOpts<"FeaturesAsWritten">>; 5192def triple : Separate<["-"], "triple">, 5193 HelpText<"Specify target triple (e.g. i686-apple-darwin9)">, 5194 MarshallingInfoString<TargetOpts<"Triple">, "llvm::Triple::normalize(llvm::sys::getDefaultTargetTriple())">, 5195 AlwaysEmit, Normalizer<"normalizeTriple">; 5196 5197} // let Flags = [CC1Option, CC1ASOption, FC1Option, NoDriverOption] 5198 5199//===----------------------------------------------------------------------===// 5200// Target Options (other) 5201//===----------------------------------------------------------------------===// 5202 5203let Flags = [CC1Option, NoDriverOption] in { 5204 5205def target_linker_version : Separate<["-"], "target-linker-version">, 5206 HelpText<"Target linker version">, 5207 MarshallingInfoString<TargetOpts<"LinkerVersion">>; 5208def triple_EQ : Joined<["-"], "triple=">, Alias<triple>; 5209def mfpmath : Separate<["-"], "mfpmath">, 5210 HelpText<"Which unit to use for fp math">, 5211 MarshallingInfoString<TargetOpts<"FPMath">>; 5212 5213defm padding_on_unsigned_fixed_point : BoolOption<"f", "padding-on-unsigned-fixed-point", 5214 LangOpts<"PaddingOnUnsignedFixedPoint">, DefaultFalse, 5215 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">, 5216 NegFlag<SetFalse>>, 5217 ShouldParseIf<ffixed_point.KeyPath>; 5218 5219} // let Flags = [CC1Option, NoDriverOption] 5220 5221//===----------------------------------------------------------------------===// 5222// Analyzer Options 5223//===----------------------------------------------------------------------===// 5224 5225let Flags = [CC1Option, NoDriverOption] in { 5226 5227def analysis_UnoptimizedCFG : Flag<["-"], "unoptimized-cfg">, 5228 HelpText<"Generate unoptimized CFGs for all analyses">, 5229 MarshallingInfoFlag<AnalyzerOpts<"UnoptimizedCFG">>; 5230def analysis_CFGAddImplicitDtors : Flag<["-"], "cfg-add-implicit-dtors">, 5231 HelpText<"Add C++ implicit destructors to CFGs for all analyses">; 5232 5233def analyzer_constraints : Separate<["-"], "analyzer-constraints">, 5234 HelpText<"Source Code Analysis - Symbolic Constraint Engines">; 5235def analyzer_constraints_EQ : Joined<["-"], "analyzer-constraints=">, 5236 Alias<analyzer_constraints>; 5237 5238def analyzer_output : Separate<["-"], "analyzer-output">, 5239 HelpText<"Source Code Analysis - Output Options">; 5240def analyzer_output_EQ : Joined<["-"], "analyzer-output=">, 5241 Alias<analyzer_output>; 5242 5243def analyzer_purge : Separate<["-"], "analyzer-purge">, 5244 HelpText<"Source Code Analysis - Dead Symbol Removal Frequency">; 5245def analyzer_purge_EQ : Joined<["-"], "analyzer-purge=">, Alias<analyzer_purge>; 5246 5247def analyzer_opt_analyze_headers : Flag<["-"], "analyzer-opt-analyze-headers">, 5248 HelpText<"Force the static analyzer to analyze functions defined in header files">, 5249 MarshallingInfoFlag<AnalyzerOpts<"AnalyzeAll">>; 5250def analyzer_display_progress : Flag<["-"], "analyzer-display-progress">, 5251 HelpText<"Emit verbose output about the analyzer's progress">, 5252 MarshallingInfoFlag<AnalyzerOpts<"AnalyzerDisplayProgress">>; 5253def analyze_function : Separate<["-"], "analyze-function">, 5254 HelpText<"Run analysis on specific function (for C++ include parameters in name)">, 5255 MarshallingInfoString<AnalyzerOpts<"AnalyzeSpecificFunction">>; 5256def analyze_function_EQ : Joined<["-"], "analyze-function=">, Alias<analyze_function>; 5257def trim_egraph : Flag<["-"], "trim-egraph">, 5258 HelpText<"Only show error-related paths in the analysis graph">, 5259 MarshallingInfoFlag<AnalyzerOpts<"TrimGraph">>; 5260def analyzer_viz_egraph_graphviz : Flag<["-"], "analyzer-viz-egraph-graphviz">, 5261 HelpText<"Display exploded graph using GraphViz">, 5262 MarshallingInfoFlag<AnalyzerOpts<"visualizeExplodedGraphWithGraphViz">>; 5263def analyzer_dump_egraph : Separate<["-"], "analyzer-dump-egraph">, 5264 HelpText<"Dump exploded graph to the specified file">, 5265 MarshallingInfoString<AnalyzerOpts<"DumpExplodedGraphTo">>; 5266def analyzer_dump_egraph_EQ : Joined<["-"], "analyzer-dump-egraph=">, Alias<analyzer_dump_egraph>; 5267 5268def analyzer_inline_max_stack_depth : Separate<["-"], "analyzer-inline-max-stack-depth">, 5269 HelpText<"Bound on stack depth while inlining (4 by default)">, 5270 // Cap the stack depth at 4 calls (5 stack frames, base + 4 calls). 5271 MarshallingInfoInt<AnalyzerOpts<"InlineMaxStackDepth">, "5">; 5272def analyzer_inline_max_stack_depth_EQ : Joined<["-"], "analyzer-inline-max-stack-depth=">, 5273 Alias<analyzer_inline_max_stack_depth>; 5274 5275def analyzer_inlining_mode : Separate<["-"], "analyzer-inlining-mode">, 5276 HelpText<"Specify the function selection heuristic used during inlining">; 5277def analyzer_inlining_mode_EQ : Joined<["-"], "analyzer-inlining-mode=">, Alias<analyzer_inlining_mode>; 5278 5279def analyzer_disable_retry_exhausted : Flag<["-"], "analyzer-disable-retry-exhausted">, 5280 HelpText<"Do not re-analyze paths leading to exhausted nodes with a different strategy (may decrease code coverage)">, 5281 MarshallingInfoFlag<AnalyzerOpts<"NoRetryExhausted">>; 5282 5283def analyzer_max_loop : Separate<["-"], "analyzer-max-loop">, 5284 HelpText<"The maximum number of times the analyzer will go through a loop">, 5285 MarshallingInfoInt<AnalyzerOpts<"maxBlockVisitOnPath">, "4">; 5286def analyzer_stats : Flag<["-"], "analyzer-stats">, 5287 HelpText<"Print internal analyzer statistics.">, 5288 MarshallingInfoFlag<AnalyzerOpts<"PrintStats">>; 5289 5290def analyzer_checker : Separate<["-"], "analyzer-checker">, 5291 HelpText<"Choose analyzer checkers to enable">, 5292 ValuesCode<[{ 5293 static constexpr const char VALUES_CODE [] = 5294 #define GET_CHECKERS 5295 #define CHECKER(FULLNAME, CLASS, HT, DOC_URI, IS_HIDDEN) FULLNAME "," 5296 #include "clang/StaticAnalyzer/Checkers/Checkers.inc" 5297 #undef GET_CHECKERS 5298 #define GET_PACKAGES 5299 #define PACKAGE(FULLNAME) FULLNAME "," 5300 #include "clang/StaticAnalyzer/Checkers/Checkers.inc" 5301 #undef GET_PACKAGES 5302 ; 5303 }]>; 5304def analyzer_checker_EQ : Joined<["-"], "analyzer-checker=">, 5305 Alias<analyzer_checker>; 5306 5307def analyzer_disable_checker : Separate<["-"], "analyzer-disable-checker">, 5308 HelpText<"Choose analyzer checkers to disable">; 5309def analyzer_disable_checker_EQ : Joined<["-"], "analyzer-disable-checker=">, 5310 Alias<analyzer_disable_checker>; 5311 5312def analyzer_disable_all_checks : Flag<["-"], "analyzer-disable-all-checks">, 5313 HelpText<"Disable all static analyzer checks">, 5314 MarshallingInfoFlag<AnalyzerOpts<"DisableAllCheckers">>; 5315 5316def analyzer_checker_help : Flag<["-"], "analyzer-checker-help">, 5317 HelpText<"Display the list of analyzer checkers that are available">, 5318 MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerHelp">>; 5319 5320def analyzer_checker_help_alpha : Flag<["-"], "analyzer-checker-help-alpha">, 5321 HelpText<"Display the list of in development analyzer checkers. These " 5322 "are NOT considered safe, they are unstable and will emit incorrect " 5323 "reports. Enable ONLY FOR DEVELOPMENT purposes">, 5324 MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerHelpAlpha">>; 5325 5326def analyzer_checker_help_developer : Flag<["-"], "analyzer-checker-help-developer">, 5327 HelpText<"Display the list of developer-only checkers such as modeling " 5328 "and debug checkers">, 5329 MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerHelpDeveloper">>; 5330 5331def analyzer_config_help : Flag<["-"], "analyzer-config-help">, 5332 HelpText<"Display the list of -analyzer-config options. These are meant for " 5333 "development purposes only!">, 5334 MarshallingInfoFlag<AnalyzerOpts<"ShowConfigOptionsList">>; 5335 5336def analyzer_list_enabled_checkers : Flag<["-"], "analyzer-list-enabled-checkers">, 5337 HelpText<"Display the list of enabled analyzer checkers">, 5338 MarshallingInfoFlag<AnalyzerOpts<"ShowEnabledCheckerList">>; 5339 5340def analyzer_config : Separate<["-"], "analyzer-config">, 5341 HelpText<"Choose analyzer options to enable">; 5342 5343def analyzer_checker_option_help : Flag<["-"], "analyzer-checker-option-help">, 5344 HelpText<"Display the list of checker and package options">, 5345 MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionList">>; 5346 5347def analyzer_checker_option_help_alpha : Flag<["-"], "analyzer-checker-option-help-alpha">, 5348 HelpText<"Display the list of in development checker and package options. " 5349 "These are NOT considered safe, they are unstable and will emit " 5350 "incorrect reports. Enable ONLY FOR DEVELOPMENT purposes">, 5351 MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionAlphaList">>; 5352 5353def analyzer_checker_option_help_developer : Flag<["-"], "analyzer-checker-option-help-developer">, 5354 HelpText<"Display the list of checker and package options meant for " 5355 "development purposes only">, 5356 MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionDeveloperList">>; 5357 5358def analyzer_config_compatibility_mode : Separate<["-"], "analyzer-config-compatibility-mode">, 5359 HelpText<"Don't emit errors on invalid analyzer-config inputs">, 5360 Values<"true,false">, NormalizedValues<[[{false}], [{true}]]>, 5361 MarshallingInfoEnum<AnalyzerOpts<"ShouldEmitErrorsOnInvalidConfigValue">, [{true}]>; 5362 5363def analyzer_config_compatibility_mode_EQ : Joined<["-"], "analyzer-config-compatibility-mode=">, 5364 Alias<analyzer_config_compatibility_mode>; 5365 5366def analyzer_werror : Flag<["-"], "analyzer-werror">, 5367 HelpText<"Emit analyzer results as errors rather than warnings">, 5368 MarshallingInfoFlag<AnalyzerOpts<"AnalyzerWerror">>; 5369 5370} // let Flags = [CC1Option, NoDriverOption] 5371 5372//===----------------------------------------------------------------------===// 5373// Migrator Options 5374//===----------------------------------------------------------------------===// 5375 5376def migrator_no_nsalloc_error : Flag<["-"], "no-ns-alloc-error">, 5377 HelpText<"Do not error on use of NSAllocateCollectable/NSReallocateCollectable">, 5378 Flags<[CC1Option, NoDriverOption]>, 5379 MarshallingInfoFlag<MigratorOpts<"NoNSAllocReallocError">>; 5380 5381def migrator_no_finalize_removal : Flag<["-"], "no-finalize-removal">, 5382 HelpText<"Do not remove finalize method in gc mode">, 5383 Flags<[CC1Option, NoDriverOption]>, 5384 MarshallingInfoFlag<MigratorOpts<"NoFinalizeRemoval">>; 5385 5386//===----------------------------------------------------------------------===// 5387// CodeGen Options 5388//===----------------------------------------------------------------------===// 5389 5390let Flags = [CC1Option, CC1AsOption, FC1Option, NoDriverOption] in { 5391 5392def mrelocation_model : Separate<["-"], "mrelocation-model">, 5393 HelpText<"The relocation model to use">, Values<"static,pic,ropi,rwpi,ropi-rwpi,dynamic-no-pic">, 5394 NormalizedValuesScope<"llvm::Reloc">, 5395 NormalizedValues<["Static", "PIC_", "ROPI", "RWPI", "ROPI_RWPI", "DynamicNoPIC"]>, 5396 MarshallingInfoEnum<CodeGenOpts<"RelocationModel">, "PIC_">; 5397 5398} // let Flags = [CC1Option, CC1AsOption, FC1Option, NoDriverOption] 5399 5400let Flags = [CC1Option, CC1AsOption, NoDriverOption] in { 5401 5402def debug_info_kind_EQ : Joined<["-"], "debug-info-kind=">; 5403def debug_info_macro : Flag<["-"], "debug-info-macro">, 5404 HelpText<"Emit macro debug information">, 5405 MarshallingInfoFlag<CodeGenOpts<"MacroDebugInfo">>; 5406def default_function_attr : Separate<["-"], "default-function-attr">, 5407 HelpText<"Apply given attribute to all functions">, 5408 MarshallingInfoStringVector<CodeGenOpts<"DefaultFunctionAttrs">>; 5409def dwarf_version_EQ : Joined<["-"], "dwarf-version=">, 5410 MarshallingInfoInt<CodeGenOpts<"DwarfVersion">>; 5411def debugger_tuning_EQ : Joined<["-"], "debugger-tuning=">, 5412 Values<"gdb,lldb,sce,dbx">, 5413 NormalizedValuesScope<"llvm::DebuggerKind">, NormalizedValues<["GDB", "LLDB", "SCE", "DBX"]>, 5414 MarshallingInfoEnum<CodeGenOpts<"DebuggerTuning">, "Default">; 5415def dwarf_debug_flags : Separate<["-"], "dwarf-debug-flags">, 5416 HelpText<"The string to embed in the Dwarf debug flags record.">, 5417 MarshallingInfoString<CodeGenOpts<"DwarfDebugFlags">>; 5418def record_command_line : Separate<["-"], "record-command-line">, 5419 HelpText<"The string to embed in the .LLVM.command.line section.">, 5420 MarshallingInfoString<CodeGenOpts<"RecordCommandLine">>; 5421def compress_debug_sections_EQ : Joined<["-", "--"], "compress-debug-sections=">, 5422 HelpText<"DWARF debug sections compression type">, Values<"none,zlib,zstd">, 5423 NormalizedValuesScope<"llvm::DebugCompressionType">, NormalizedValues<["None", "Zlib", "Zstd"]>, 5424 MarshallingInfoEnum<CodeGenOpts<"CompressDebugSections">, "None">; 5425def compress_debug_sections : Flag<["-", "--"], "compress-debug-sections">, 5426 Alias<compress_debug_sections_EQ>, AliasArgs<["zlib"]>; 5427def mno_exec_stack : Flag<["-"], "mnoexecstack">, 5428 HelpText<"Mark the file as not needing an executable stack">, 5429 MarshallingInfoFlag<CodeGenOpts<"NoExecStack">>; 5430def massembler_no_warn : Flag<["-"], "massembler-no-warn">, 5431 HelpText<"Make assembler not emit warnings">, 5432 MarshallingInfoFlag<CodeGenOpts<"NoWarn">>; 5433def massembler_fatal_warnings : Flag<["-"], "massembler-fatal-warnings">, 5434 HelpText<"Make assembler warnings fatal">, 5435 MarshallingInfoFlag<CodeGenOpts<"FatalWarnings">>; 5436def mrelax_relocations_no : Flag<["-"], "mrelax-relocations=no">, 5437 HelpText<"Disable x86 relax relocations">, 5438 MarshallingInfoNegativeFlag<CodeGenOpts<"RelaxELFRelocations">>; 5439def msave_temp_labels : Flag<["-"], "msave-temp-labels">, 5440 HelpText<"Save temporary labels in the symbol table. " 5441 "Note this may change .s semantics and shouldn't generally be used " 5442 "on compiler-generated code.">, 5443 MarshallingInfoFlag<CodeGenOpts<"SaveTempLabels">>; 5444def mno_type_check : Flag<["-"], "mno-type-check">, 5445 HelpText<"Don't perform type checking of the assembly code (wasm only)">, 5446 MarshallingInfoFlag<CodeGenOpts<"NoTypeCheck">>; 5447def fno_math_builtin : Flag<["-"], "fno-math-builtin">, 5448 HelpText<"Disable implicit builtin knowledge of math functions">, 5449 MarshallingInfoFlag<LangOpts<"NoMathBuiltin">>; 5450def fno_use_ctor_homing: Flag<["-"], "fno-use-ctor-homing">, 5451 HelpText<"Don't use constructor homing for debug info">; 5452def fuse_ctor_homing: Flag<["-"], "fuse-ctor-homing">, 5453 HelpText<"Use constructor homing if we are using limited debug info already">; 5454def as_secure_log_file : Separate<["-"], "as-secure-log-file">, 5455 HelpText<"Emit .secure_log_unique directives to this filename.">, 5456 MarshallingInfoString<CodeGenOpts<"AsSecureLogFile">>; 5457 5458} // let Flags = [CC1Option, CC1AsOption, NoDriverOption] 5459 5460let Flags = [CC1Option, NoDriverOption] in { 5461 5462def disable_llvm_verifier : Flag<["-"], "disable-llvm-verifier">, 5463 HelpText<"Don't run the LLVM IR verifier pass">, 5464 MarshallingInfoNegativeFlag<CodeGenOpts<"VerifyModule">>; 5465def disable_llvm_passes : Flag<["-"], "disable-llvm-passes">, 5466 HelpText<"Use together with -emit-llvm to get pristine LLVM IR from the " 5467 "frontend by not running any LLVM passes at all">, 5468 MarshallingInfoFlag<CodeGenOpts<"DisableLLVMPasses">>; 5469def disable_llvm_optzns : Flag<["-"], "disable-llvm-optzns">, 5470 Alias<disable_llvm_passes>; 5471def disable_lifetimemarkers : Flag<["-"], "disable-lifetime-markers">, 5472 HelpText<"Disable lifetime-markers emission even when optimizations are " 5473 "enabled">, 5474 MarshallingInfoFlag<CodeGenOpts<"DisableLifetimeMarkers">>; 5475def disable_O0_optnone : Flag<["-"], "disable-O0-optnone">, 5476 HelpText<"Disable adding the optnone attribute to functions at O0">, 5477 MarshallingInfoFlag<CodeGenOpts<"DisableO0ImplyOptNone">>; 5478def disable_red_zone : Flag<["-"], "disable-red-zone">, 5479 HelpText<"Do not emit code that uses the red zone.">, 5480 MarshallingInfoFlag<CodeGenOpts<"DisableRedZone">>; 5481def dwarf_ext_refs : Flag<["-"], "dwarf-ext-refs">, 5482 HelpText<"Generate debug info with external references to clang modules" 5483 " or precompiled headers">, 5484 MarshallingInfoFlag<CodeGenOpts<"DebugTypeExtRefs">>; 5485def dwarf_explicit_import : Flag<["-"], "dwarf-explicit-import">, 5486 HelpText<"Generate explicit import from anonymous namespace to containing" 5487 " scope">, 5488 MarshallingInfoFlag<CodeGenOpts<"DebugExplicitImport">>; 5489def debug_forward_template_params : Flag<["-"], "debug-forward-template-params">, 5490 HelpText<"Emit complete descriptions of template parameters in forward" 5491 " declarations">, 5492 MarshallingInfoFlag<CodeGenOpts<"DebugFwdTemplateParams">>; 5493def fforbid_guard_variables : Flag<["-"], "fforbid-guard-variables">, 5494 HelpText<"Emit an error if a C++ static local initializer would need a guard variable">, 5495 MarshallingInfoFlag<CodeGenOpts<"ForbidGuardVariables">>; 5496def no_implicit_float : Flag<["-"], "no-implicit-float">, 5497 HelpText<"Don't generate implicit floating point or vector instructions">, 5498 MarshallingInfoFlag<CodeGenOpts<"NoImplicitFloat">>; 5499def fdump_vtable_layouts : Flag<["-"], "fdump-vtable-layouts">, 5500 HelpText<"Dump the layouts of all vtables that will be emitted in a translation unit">, 5501 MarshallingInfoFlag<LangOpts<"DumpVTableLayouts">>; 5502def fmerge_functions : Flag<["-"], "fmerge-functions">, 5503 HelpText<"Permit merging of identical functions when optimizing.">, 5504 MarshallingInfoFlag<CodeGenOpts<"MergeFunctions">>; 5505def coverage_data_file : Separate<["-"], "coverage-data-file">, 5506 HelpText<"Emit coverage data to this filename.">, 5507 MarshallingInfoString<CodeGenOpts<"CoverageDataFile">>, 5508 ShouldParseIf<!strconcat(fprofile_arcs.KeyPath, "||", ftest_coverage.KeyPath)>; 5509def coverage_data_file_EQ : Joined<["-"], "coverage-data-file=">, 5510 Alias<coverage_data_file>; 5511def coverage_notes_file : Separate<["-"], "coverage-notes-file">, 5512 HelpText<"Emit coverage notes to this filename.">, 5513 MarshallingInfoString<CodeGenOpts<"CoverageNotesFile">>, 5514 ShouldParseIf<!strconcat(fprofile_arcs.KeyPath, "||", ftest_coverage.KeyPath)>; 5515def coverage_notes_file_EQ : Joined<["-"], "coverage-notes-file=">, 5516 Alias<coverage_notes_file>; 5517def coverage_version_EQ : Joined<["-"], "coverage-version=">, 5518 HelpText<"Four-byte version string for gcov files.">; 5519def dump_coverage_mapping : Flag<["-"], "dump-coverage-mapping">, 5520 HelpText<"Dump the coverage mapping records, for testing">, 5521 MarshallingInfoFlag<CodeGenOpts<"DumpCoverageMapping">>; 5522def fuse_register_sized_bitfield_access: Flag<["-"], "fuse-register-sized-bitfield-access">, 5523 HelpText<"Use register sized accesses to bit-fields, when possible.">, 5524 MarshallingInfoFlag<CodeGenOpts<"UseRegisterSizedBitfieldAccess">>; 5525def relaxed_aliasing : Flag<["-"], "relaxed-aliasing">, 5526 HelpText<"Turn off Type Based Alias Analysis">, 5527 MarshallingInfoFlag<CodeGenOpts<"RelaxedAliasing">>; 5528def no_struct_path_tbaa : Flag<["-"], "no-struct-path-tbaa">, 5529 HelpText<"Turn off struct-path aware Type Based Alias Analysis">, 5530 MarshallingInfoNegativeFlag<CodeGenOpts<"StructPathTBAA">>; 5531def new_struct_path_tbaa : Flag<["-"], "new-struct-path-tbaa">, 5532 HelpText<"Enable enhanced struct-path aware Type Based Alias Analysis">; 5533def mdebug_pass : Separate<["-"], "mdebug-pass">, 5534 HelpText<"Enable additional debug output">, 5535 MarshallingInfoString<CodeGenOpts<"DebugPass">>; 5536def mframe_pointer_EQ : Joined<["-"], "mframe-pointer=">, 5537 HelpText<"Specify which frame pointers to retain.">, Values<"all,non-leaf,none">, 5538 NormalizedValuesScope<"CodeGenOptions::FramePointerKind">, NormalizedValues<["All", "NonLeaf", "None"]>, 5539 MarshallingInfoEnum<CodeGenOpts<"FramePointer">, "None">; 5540def mabi_EQ_ieeelongdouble : Flag<["-"], "mabi=ieeelongdouble">, 5541 HelpText<"Use IEEE 754 quadruple-precision for long double">, 5542 MarshallingInfoFlag<LangOpts<"PPCIEEELongDouble">>; 5543def mfloat_abi : Separate<["-"], "mfloat-abi">, 5544 HelpText<"The float ABI to use">, 5545 MarshallingInfoString<CodeGenOpts<"FloatABI">>; 5546def mtp : Separate<["-"], "mtp">, 5547 HelpText<"Mode for reading thread pointer">; 5548def mlimit_float_precision : Separate<["-"], "mlimit-float-precision">, 5549 HelpText<"Limit float precision to the given value">, 5550 MarshallingInfoString<CodeGenOpts<"LimitFloatPrecision">>; 5551def mregparm : Separate<["-"], "mregparm">, 5552 HelpText<"Limit the number of registers available for integer arguments">, 5553 MarshallingInfoInt<CodeGenOpts<"NumRegisterParameters">>; 5554def msmall_data_limit : Separate<["-"], "msmall-data-limit">, 5555 HelpText<"Put global and static data smaller than the limit into a special section">, 5556 MarshallingInfoInt<CodeGenOpts<"SmallDataLimit">>; 5557def funwind_tables_EQ : Joined<["-"], "funwind-tables=">, 5558 HelpText<"Generate unwinding tables for all functions">, 5559 MarshallingInfoInt<CodeGenOpts<"UnwindTables">>; 5560defm constructor_aliases : BoolOption<"m", "constructor-aliases", 5561 CodeGenOpts<"CXXCtorDtorAliases">, DefaultFalse, 5562 PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">, 5563 BothFlags<[CC1Option], " emitting complete constructors and destructors as aliases when possible">>; 5564def mlink_bitcode_file : Separate<["-"], "mlink-bitcode-file">, 5565 HelpText<"Link the given bitcode file before performing optimizations.">; 5566def mlink_builtin_bitcode : Separate<["-"], "mlink-builtin-bitcode">, 5567 HelpText<"Link and internalize needed symbols from the given bitcode file " 5568 "before performing optimizations.">; 5569def vectorize_loops : Flag<["-"], "vectorize-loops">, 5570 HelpText<"Run the Loop vectorization passes">, 5571 MarshallingInfoFlag<CodeGenOpts<"VectorizeLoop">>; 5572def vectorize_slp : Flag<["-"], "vectorize-slp">, 5573 HelpText<"Run the SLP vectorization passes">, 5574 MarshallingInfoFlag<CodeGenOpts<"VectorizeSLP">>; 5575def dependent_lib : Joined<["--"], "dependent-lib=">, 5576 HelpText<"Add dependent library">, 5577 MarshallingInfoStringVector<CodeGenOpts<"DependentLibraries">>; 5578def linker_option : Joined<["--"], "linker-option=">, 5579 HelpText<"Add linker option">, 5580 MarshallingInfoStringVector<CodeGenOpts<"LinkerOptions">>; 5581def fsanitize_coverage_type : Joined<["-"], "fsanitize-coverage-type=">, 5582 HelpText<"Sanitizer coverage type">, 5583 MarshallingInfoInt<CodeGenOpts<"SanitizeCoverageType">>; 5584def fsanitize_coverage_indirect_calls 5585 : Flag<["-"], "fsanitize-coverage-indirect-calls">, 5586 HelpText<"Enable sanitizer coverage for indirect calls">, 5587 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageIndirectCalls">>; 5588def fsanitize_coverage_trace_bb 5589 : Flag<["-"], "fsanitize-coverage-trace-bb">, 5590 HelpText<"Enable basic block tracing in sanitizer coverage">, 5591 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceBB">>; 5592def fsanitize_coverage_trace_cmp 5593 : Flag<["-"], "fsanitize-coverage-trace-cmp">, 5594 HelpText<"Enable cmp instruction tracing in sanitizer coverage">, 5595 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceCmp">>; 5596def fsanitize_coverage_trace_div 5597 : Flag<["-"], "fsanitize-coverage-trace-div">, 5598 HelpText<"Enable div instruction tracing in sanitizer coverage">, 5599 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceDiv">>; 5600def fsanitize_coverage_trace_gep 5601 : Flag<["-"], "fsanitize-coverage-trace-gep">, 5602 HelpText<"Enable gep instruction tracing in sanitizer coverage">, 5603 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceGep">>; 5604def fsanitize_coverage_8bit_counters 5605 : Flag<["-"], "fsanitize-coverage-8bit-counters">, 5606 HelpText<"Enable frequency counters in sanitizer coverage">, 5607 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverage8bitCounters">>; 5608def fsanitize_coverage_inline_8bit_counters 5609 : Flag<["-"], "fsanitize-coverage-inline-8bit-counters">, 5610 HelpText<"Enable inline 8-bit counters in sanitizer coverage">, 5611 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageInline8bitCounters">>; 5612def fsanitize_coverage_inline_bool_flag 5613 : Flag<["-"], "fsanitize-coverage-inline-bool-flag">, 5614 HelpText<"Enable inline bool flag in sanitizer coverage">, 5615 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageInlineBoolFlag">>; 5616def fsanitize_coverage_pc_table 5617 : Flag<["-"], "fsanitize-coverage-pc-table">, 5618 HelpText<"Create a table of coverage-instrumented PCs">, 5619 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoveragePCTable">>; 5620def fsanitize_coverage_control_flow 5621 : Flag<["-"], "fsanitize-coverage-control-flow">, 5622 HelpText<"Collect control flow of function">, 5623 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageControlFlow">>; 5624def fsanitize_coverage_trace_pc 5625 : Flag<["-"], "fsanitize-coverage-trace-pc">, 5626 HelpText<"Enable PC tracing in sanitizer coverage">, 5627 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTracePC">>; 5628def fsanitize_coverage_trace_pc_guard 5629 : Flag<["-"], "fsanitize-coverage-trace-pc-guard">, 5630 HelpText<"Enable PC tracing with guard in sanitizer coverage">, 5631 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTracePCGuard">>; 5632def fsanitize_coverage_no_prune 5633 : Flag<["-"], "fsanitize-coverage-no-prune">, 5634 HelpText<"Disable coverage pruning (i.e. instrument all blocks/edges)">, 5635 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageNoPrune">>; 5636def fsanitize_coverage_stack_depth 5637 : Flag<["-"], "fsanitize-coverage-stack-depth">, 5638 HelpText<"Enable max stack depth tracing">, 5639 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageStackDepth">>; 5640def fsanitize_coverage_trace_loads 5641 : Flag<["-"], "fsanitize-coverage-trace-loads">, 5642 HelpText<"Enable tracing of loads">, 5643 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceLoads">>; 5644def fsanitize_coverage_trace_stores 5645 : Flag<["-"], "fsanitize-coverage-trace-stores">, 5646 HelpText<"Enable tracing of stores">, 5647 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceStores">>; 5648def fexperimental_sanitize_metadata_EQ_covered 5649 : Flag<["-"], "fexperimental-sanitize-metadata=covered">, 5650 HelpText<"Emit PCs for code covered with binary analysis sanitizers">, 5651 MarshallingInfoFlag<CodeGenOpts<"SanitizeBinaryMetadataCovered">>; 5652def fexperimental_sanitize_metadata_EQ_atomics 5653 : Flag<["-"], "fexperimental-sanitize-metadata=atomics">, 5654 HelpText<"Emit PCs for atomic operations used by binary analysis sanitizers">, 5655 MarshallingInfoFlag<CodeGenOpts<"SanitizeBinaryMetadataAtomics">>; 5656def fexperimental_sanitize_metadata_EQ_uar 5657 : Flag<["-"], "fexperimental-sanitize-metadata=uar">, 5658 HelpText<"Emit PCs for start of functions that are subject for use-after-return checking.">, 5659 MarshallingInfoFlag<CodeGenOpts<"SanitizeBinaryMetadataUAR">>; 5660def fpatchable_function_entry_offset_EQ 5661 : Joined<["-"], "fpatchable-function-entry-offset=">, MetaVarName<"<M>">, 5662 HelpText<"Generate M NOPs before function entry">, 5663 MarshallingInfoInt<CodeGenOpts<"PatchableFunctionEntryOffset">>; 5664def fprofile_instrument_EQ : Joined<["-"], "fprofile-instrument=">, 5665 HelpText<"Enable PGO instrumentation">, Values<"none,clang,llvm,csllvm">, 5666 NormalizedValuesScope<"CodeGenOptions">, 5667 NormalizedValues<["ProfileNone", "ProfileClangInstr", "ProfileIRInstr", "ProfileCSIRInstr"]>, 5668 MarshallingInfoEnum<CodeGenOpts<"ProfileInstr">, "ProfileNone">; 5669def fprofile_instrument_path_EQ : Joined<["-"], "fprofile-instrument-path=">, 5670 HelpText<"Generate instrumented code to collect execution counts into " 5671 "<file> (overridden by LLVM_PROFILE_FILE env var)">, 5672 MarshallingInfoString<CodeGenOpts<"InstrProfileOutput">>; 5673def fprofile_instrument_use_path_EQ : 5674 Joined<["-"], "fprofile-instrument-use-path=">, 5675 HelpText<"Specify the profile path in PGO use compilation">, 5676 MarshallingInfoString<CodeGenOpts<"ProfileInstrumentUsePath">>; 5677def flto_visibility_public_std: 5678 Flag<["-"], "flto-visibility-public-std">, 5679 HelpText<"Use public LTO visibility for classes in std and stdext namespaces">, 5680 MarshallingInfoFlag<CodeGenOpts<"LTOVisibilityPublicStd">>; 5681defm lto_unit : BoolOption<"f", "lto-unit", 5682 CodeGenOpts<"LTOUnit">, DefaultFalse, 5683 PosFlag<SetTrue, [CC1Option], "Emit IR to support LTO unit features (CFI, whole program vtable opt)">, 5684 NegFlag<SetFalse>>; 5685def fverify_debuginfo_preserve 5686 : Flag<["-"], "fverify-debuginfo-preserve">, 5687 HelpText<"Enable Debug Info Metadata preservation testing in " 5688 "optimizations.">, 5689 MarshallingInfoFlag<CodeGenOpts<"EnableDIPreservationVerify">>; 5690def fverify_debuginfo_preserve_export 5691 : Joined<["-"], "fverify-debuginfo-preserve-export=">, 5692 MetaVarName<"<file>">, 5693 HelpText<"Export debug info (by testing original Debug Info) failures " 5694 "into specified (JSON) file (should be abs path as we use " 5695 "append mode to insert new JSON objects).">, 5696 MarshallingInfoString<CodeGenOpts<"DIBugsReportFilePath">>; 5697def fwarn_stack_size_EQ 5698 : Joined<["-"], "fwarn-stack-size=">, 5699 MarshallingInfoInt<CodeGenOpts<"WarnStackSize">, "UINT_MAX">; 5700// The driver option takes the key as a parameter to the -msign-return-address= 5701// and -mbranch-protection= options, but CC1 has a separate option so we 5702// don't have to parse the parameter twice. 5703def msign_return_address_key_EQ : Joined<["-"], "msign-return-address-key=">, 5704 Values<"a_key,b_key">; 5705def mbranch_target_enforce : Flag<["-"], "mbranch-target-enforce">, 5706 MarshallingInfoFlag<LangOpts<"BranchTargetEnforcement">>; 5707def fno_dllexport_inlines : Flag<["-"], "fno-dllexport-inlines">, 5708 MarshallingInfoNegativeFlag<LangOpts<"DllExportInlines">>; 5709def cfguard_no_checks : Flag<["-"], "cfguard-no-checks">, 5710 HelpText<"Emit Windows Control Flow Guard tables only (no checks)">, 5711 MarshallingInfoFlag<CodeGenOpts<"ControlFlowGuardNoChecks">>; 5712def cfguard : Flag<["-"], "cfguard">, 5713 HelpText<"Emit Windows Control Flow Guard tables and checks">, 5714 MarshallingInfoFlag<CodeGenOpts<"ControlFlowGuard">>; 5715def ehcontguard : Flag<["-"], "ehcontguard">, 5716 HelpText<"Emit Windows EH Continuation Guard tables">, 5717 MarshallingInfoFlag<CodeGenOpts<"EHContGuard">>; 5718 5719def fdenormal_fp_math_f32_EQ : Joined<["-"], "fdenormal-fp-math-f32=">, 5720 Group<f_Group>; 5721 5722def fctor_dtor_return_this : Flag<["-"], "fctor-dtor-return-this">, 5723 HelpText<"Change the C++ ABI to returning `this` pointer from constructors " 5724 "and non-deleting destructors. (No effect on Microsoft ABI)">, 5725 MarshallingInfoFlag<CodeGenOpts<"CtorDtorReturnThis">>; 5726 5727defm experimental_assignment_tracking : 5728 BoolOption<"f", "experimental-assignment-tracking", 5729 CodeGenOpts<"EnableAssignmentTracking">, DefaultFalse, 5730 PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>, BothFlags<[CoreOption]>>, 5731 Group<f_Group>; 5732 5733} // let Flags = [CC1Option, NoDriverOption] 5734 5735//===----------------------------------------------------------------------===// 5736// Dependency Output Options 5737//===----------------------------------------------------------------------===// 5738 5739let Flags = [CC1Option, NoDriverOption] in { 5740 5741def sys_header_deps : Flag<["-"], "sys-header-deps">, 5742 HelpText<"Include system headers in dependency output">, 5743 MarshallingInfoFlag<DependencyOutputOpts<"IncludeSystemHeaders">>; 5744def module_file_deps : Flag<["-"], "module-file-deps">, 5745 HelpText<"Include module files in dependency output">, 5746 MarshallingInfoFlag<DependencyOutputOpts<"IncludeModuleFiles">>; 5747def header_include_file : Separate<["-"], "header-include-file">, 5748 HelpText<"Filename (or -) to write header include output to">, 5749 MarshallingInfoString<DependencyOutputOpts<"HeaderIncludeOutputFile">>; 5750def header_include_format_EQ : Joined<["-"], "header-include-format=">, 5751 HelpText<"set format in which header info is emitted">, 5752 Values<"textual,json">, NormalizedValues<["HIFMT_Textual", "HIFMT_JSON"]>, 5753 MarshallingInfoEnum<DependencyOutputOpts<"HeaderIncludeFormat">, "HIFMT_Textual">; 5754def header_include_filtering_EQ : Joined<["-"], "header-include-filtering=">, 5755 HelpText<"set the flag that enables filtering header information">, 5756 Values<"none,only-direct-system">, NormalizedValues<["HIFIL_None", "HIFIL_Only_Direct_System"]>, 5757 MarshallingInfoEnum<DependencyOutputOpts<"HeaderIncludeFiltering">, "HIFIL_None">; 5758def show_includes : Flag<["--"], "show-includes">, 5759 HelpText<"Print cl.exe style /showIncludes to stdout">; 5760 5761} // let Flags = [CC1Option, NoDriverOption] 5762 5763//===----------------------------------------------------------------------===// 5764// Diagnostic Options 5765//===----------------------------------------------------------------------===// 5766 5767let Flags = [CC1Option, NoDriverOption] in { 5768 5769def diagnostic_log_file : Separate<["-"], "diagnostic-log-file">, 5770 HelpText<"Filename (or -) to log diagnostics to">, 5771 MarshallingInfoString<DiagnosticOpts<"DiagnosticLogFile">>; 5772def diagnostic_serialized_file : Separate<["-"], "serialize-diagnostic-file">, 5773 MetaVarName<"<filename>">, 5774 HelpText<"File for serializing diagnostics in a binary format">; 5775 5776def fdiagnostics_format : Separate<["-"], "fdiagnostics-format">, 5777 HelpText<"Change diagnostic formatting to match IDE and command line tools">, 5778 Values<"clang,msvc,vi,sarif,SARIF">, 5779 NormalizedValuesScope<"DiagnosticOptions">, NormalizedValues<["Clang", "MSVC", "Vi", "SARIF", "SARIF"]>, 5780 MarshallingInfoEnum<DiagnosticOpts<"Format">, "Clang">; 5781def fdiagnostics_show_category : Separate<["-"], "fdiagnostics-show-category">, 5782 HelpText<"Print diagnostic category">, 5783 Values<"none,id,name">, 5784 NormalizedValues<["0", "1", "2"]>, 5785 MarshallingInfoEnum<DiagnosticOpts<"ShowCategories">, "0">; 5786def fno_diagnostics_use_presumed_location : Flag<["-"], "fno-diagnostics-use-presumed-location">, 5787 HelpText<"Ignore #line directives when displaying diagnostic locations">, 5788 MarshallingInfoNegativeFlag<DiagnosticOpts<"ShowPresumedLoc">>; 5789def ftabstop : Separate<["-"], "ftabstop">, MetaVarName<"<N>">, 5790 HelpText<"Set the tab stop distance.">, 5791 MarshallingInfoInt<DiagnosticOpts<"TabStop">, "DiagnosticOptions::DefaultTabStop">; 5792def ferror_limit : Separate<["-"], "ferror-limit">, MetaVarName<"<N>">, 5793 HelpText<"Set the maximum number of errors to emit before stopping (0 = no limit).">, 5794 MarshallingInfoInt<DiagnosticOpts<"ErrorLimit">>; 5795def fmacro_backtrace_limit : Separate<["-"], "fmacro-backtrace-limit">, MetaVarName<"<N>">, 5796 HelpText<"Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit).">, 5797 MarshallingInfoInt<DiagnosticOpts<"MacroBacktraceLimit">, "DiagnosticOptions::DefaultMacroBacktraceLimit">; 5798def ftemplate_backtrace_limit : Separate<["-"], "ftemplate-backtrace-limit">, MetaVarName<"<N>">, 5799 HelpText<"Set the maximum number of entries to print in a template instantiation backtrace (0 = no limit).">, 5800 MarshallingInfoInt<DiagnosticOpts<"TemplateBacktraceLimit">, "DiagnosticOptions::DefaultTemplateBacktraceLimit">; 5801def fconstexpr_backtrace_limit : Separate<["-"], "fconstexpr-backtrace-limit">, MetaVarName<"<N>">, 5802 HelpText<"Set the maximum number of entries to print in a constexpr evaluation backtrace (0 = no limit).">, 5803 MarshallingInfoInt<DiagnosticOpts<"ConstexprBacktraceLimit">, "DiagnosticOptions::DefaultConstexprBacktraceLimit">; 5804def fspell_checking_limit : Separate<["-"], "fspell-checking-limit">, MetaVarName<"<N>">, 5805 HelpText<"Set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit).">, 5806 MarshallingInfoInt<DiagnosticOpts<"SpellCheckingLimit">, "DiagnosticOptions::DefaultSpellCheckingLimit">; 5807def fcaret_diagnostics_max_lines : 5808 Separate<["-"], "fcaret-diagnostics-max-lines">, MetaVarName<"<N>">, 5809 HelpText<"Set the maximum number of source lines to show in a caret diagnostic">, 5810 MarshallingInfoInt<DiagnosticOpts<"SnippetLineLimit">, "DiagnosticOptions::DefaultSnippetLineLimit">; 5811def verify_EQ : CommaJoined<["-"], "verify=">, 5812 MetaVarName<"<prefixes>">, 5813 HelpText<"Verify diagnostic output using comment directives that start with" 5814 " prefixes in the comma-separated sequence <prefixes>">; 5815def verify : Flag<["-"], "verify">, 5816 HelpText<"Equivalent to -verify=expected">; 5817def verify_ignore_unexpected : Flag<["-"], "verify-ignore-unexpected">, 5818 HelpText<"Ignore unexpected diagnostic messages">; 5819def verify_ignore_unexpected_EQ : CommaJoined<["-"], "verify-ignore-unexpected=">, 5820 HelpText<"Ignore unexpected diagnostic messages">; 5821def Wno_rewrite_macros : Flag<["-"], "Wno-rewrite-macros">, 5822 HelpText<"Silence ObjC rewriting warnings">, 5823 MarshallingInfoFlag<DiagnosticOpts<"NoRewriteMacros">>; 5824 5825} // let Flags = [CC1Option, NoDriverOption] 5826 5827//===----------------------------------------------------------------------===// 5828// Frontend Options 5829//===----------------------------------------------------------------------===// 5830 5831let Flags = [CC1Option, NoDriverOption] in { 5832 5833// This isn't normally used, it is just here so we can parse a 5834// CompilerInvocation out of a driver-derived argument vector. 5835def cc1 : Flag<["-"], "cc1">; 5836def cc1as : Flag<["-"], "cc1as">; 5837 5838def ast_merge : Separate<["-"], "ast-merge">, 5839 MetaVarName<"<ast file>">, 5840 HelpText<"Merge the given AST file into the translation unit being compiled.">, 5841 MarshallingInfoStringVector<FrontendOpts<"ASTMergeFiles">>; 5842def aux_target_cpu : Separate<["-"], "aux-target-cpu">, 5843 HelpText<"Target a specific auxiliary cpu type">; 5844def aux_target_feature : Separate<["-"], "aux-target-feature">, 5845 HelpText<"Target specific auxiliary attributes">; 5846def aux_triple : Separate<["-"], "aux-triple">, 5847 HelpText<"Auxiliary target triple.">, 5848 MarshallingInfoString<FrontendOpts<"AuxTriple">>; 5849def code_completion_at : Separate<["-"], "code-completion-at">, 5850 MetaVarName<"<file>:<line>:<column>">, 5851 HelpText<"Dump code-completion information at a location">; 5852def remap_file : Separate<["-"], "remap-file">, 5853 MetaVarName<"<from>;<to>">, 5854 HelpText<"Replace the contents of the <from> file with the contents of the <to> file">; 5855def code_completion_at_EQ : Joined<["-"], "code-completion-at=">, 5856 Alias<code_completion_at>; 5857def code_completion_macros : Flag<["-"], "code-completion-macros">, 5858 HelpText<"Include macros in code-completion results">, 5859 MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeMacros">>; 5860def code_completion_patterns : Flag<["-"], "code-completion-patterns">, 5861 HelpText<"Include code patterns in code-completion results">, 5862 MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeCodePatterns">>; 5863def no_code_completion_globals : Flag<["-"], "no-code-completion-globals">, 5864 HelpText<"Do not include global declarations in code-completion results.">, 5865 MarshallingInfoNegativeFlag<FrontendOpts<"CodeCompleteOpts.IncludeGlobals">>; 5866def no_code_completion_ns_level_decls : Flag<["-"], "no-code-completion-ns-level-decls">, 5867 HelpText<"Do not include declarations inside namespaces (incl. global namespace) in the code-completion results.">, 5868 MarshallingInfoNegativeFlag<FrontendOpts<"CodeCompleteOpts.IncludeNamespaceLevelDecls">>; 5869def code_completion_brief_comments : Flag<["-"], "code-completion-brief-comments">, 5870 HelpText<"Include brief documentation comments in code-completion results.">, 5871 MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeBriefComments">>; 5872def code_completion_with_fixits : Flag<["-"], "code-completion-with-fixits">, 5873 HelpText<"Include code completion results which require small fix-its.">, 5874 MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeFixIts">>; 5875def disable_free : Flag<["-"], "disable-free">, 5876 HelpText<"Disable freeing of memory on exit">, 5877 MarshallingInfoFlag<FrontendOpts<"DisableFree">>; 5878defm clear_ast_before_backend : BoolOption<"", 5879 "clear-ast-before-backend", 5880 CodeGenOpts<"ClearASTBeforeBackend">, 5881 DefaultFalse, 5882 PosFlag<SetTrue, [], "Clear">, 5883 NegFlag<SetFalse, [], "Don't clear">, 5884 BothFlags<[], " the Clang AST before running backend code generation">>; 5885defm enable_noundef_analysis : BoolOption<"", 5886 "enable-noundef-analysis", 5887 CodeGenOpts<"EnableNoundefAttrs">, 5888 DefaultTrue, 5889 PosFlag<SetTrue, [], "Enable">, 5890 NegFlag<SetFalse, [], "Disable">, 5891 BothFlags<[], " analyzing function argument and return types for mandatory definedness">>; 5892defm opaque_pointers : BoolOption<"", 5893 "opaque-pointers", 5894 CodeGenOpts<"OpaquePointers">, 5895 DefaultTrue, 5896 PosFlag<SetTrue, [], "Enable">, 5897 NegFlag<SetFalse, [], "Disable">, 5898 BothFlags<[], " opaque pointers">>; 5899def discard_value_names : Flag<["-"], "discard-value-names">, 5900 HelpText<"Discard value names in LLVM IR">, 5901 MarshallingInfoFlag<CodeGenOpts<"DiscardValueNames">>; 5902def plugin_arg : JoinedAndSeparate<["-"], "plugin-arg-">, 5903 MetaVarName<"<name> <arg>">, 5904 HelpText<"Pass <arg> to plugin <name>">; 5905def add_plugin : Separate<["-"], "add-plugin">, MetaVarName<"<name>">, 5906 HelpText<"Use the named plugin action in addition to the default action">, 5907 MarshallingInfoStringVector<FrontendOpts<"AddPluginActions">>; 5908def ast_dump_filter : Separate<["-"], "ast-dump-filter">, 5909 MetaVarName<"<dump_filter>">, 5910 HelpText<"Use with -ast-dump or -ast-print to dump/print only AST declaration" 5911 " nodes having a certain substring in a qualified name. Use" 5912 " -ast-list to list all filterable declaration node names.">, 5913 MarshallingInfoString<FrontendOpts<"ASTDumpFilter">>; 5914def ast_dump_filter_EQ : Joined<["-"], "ast-dump-filter=">, 5915 Alias<ast_dump_filter>; 5916def fno_modules_global_index : Flag<["-"], "fno-modules-global-index">, 5917 HelpText<"Do not automatically generate or update the global module index">, 5918 MarshallingInfoNegativeFlag<FrontendOpts<"UseGlobalModuleIndex">>; 5919def fno_modules_error_recovery : Flag<["-"], "fno-modules-error-recovery">, 5920 HelpText<"Do not automatically import modules for error recovery">, 5921 MarshallingInfoNegativeFlag<LangOpts<"ModulesErrorRecovery">>; 5922def fmodule_map_file_home_is_cwd : Flag<["-"], "fmodule-map-file-home-is-cwd">, 5923 HelpText<"Use the current working directory as the home directory of " 5924 "module maps specified by -fmodule-map-file=<FILE>">, 5925 MarshallingInfoFlag<HeaderSearchOpts<"ModuleMapFileHomeIsCwd">>; 5926def fmodule_file_home_is_cwd : Flag<["-"], "fmodule-file-home-is-cwd">, 5927 HelpText<"Use the current working directory as the base directory of " 5928 "compiled module files.">, 5929 MarshallingInfoFlag<HeaderSearchOpts<"ModuleFileHomeIsCwd">>; 5930def fmodule_feature : Separate<["-"], "fmodule-feature">, 5931 MetaVarName<"<feature>">, 5932 HelpText<"Enable <feature> in module map requires declarations">, 5933 MarshallingInfoStringVector<LangOpts<"ModuleFeatures">>; 5934def fmodules_embed_file_EQ : Joined<["-"], "fmodules-embed-file=">, 5935 MetaVarName<"<file>">, 5936 HelpText<"Embed the contents of the specified file into the module file " 5937 "being compiled.">, 5938 MarshallingInfoStringVector<FrontendOpts<"ModulesEmbedFiles">>; 5939def fmodules_embed_all_files : Joined<["-"], "fmodules-embed-all-files">, 5940 HelpText<"Embed the contents of all files read by this compilation into " 5941 "the produced module file.">, 5942 MarshallingInfoFlag<FrontendOpts<"ModulesEmbedAllFiles">>; 5943defm fimplicit_modules_use_lock : BoolOption<"f", "implicit-modules-use-lock", 5944 FrontendOpts<"BuildingImplicitModuleUsesLock">, DefaultTrue, 5945 NegFlag<SetFalse>, 5946 PosFlag<SetTrue, [], 5947 "Use filesystem locks for implicit modules builds to avoid " 5948 "duplicating work in competing clang invocations.">>; 5949// FIXME: We only need this in C++ modules / Modules TS if we might textually 5950// enter a different module (eg, when building a header unit). 5951def fmodules_local_submodule_visibility : 5952 Flag<["-"], "fmodules-local-submodule-visibility">, 5953 HelpText<"Enforce name visibility rules across submodules of the same " 5954 "top-level module.">, 5955 MarshallingInfoFlag<LangOpts<"ModulesLocalVisibility">>, 5956 ImpliedByAnyOf<[fmodules_ts.KeyPath, fcxx_modules.KeyPath]>; 5957def fmodules_codegen : 5958 Flag<["-"], "fmodules-codegen">, 5959 HelpText<"Generate code for uses of this module that assumes an explicit " 5960 "object file will be built for the module">, 5961 MarshallingInfoFlag<LangOpts<"ModulesCodegen">>; 5962def fmodules_debuginfo : 5963 Flag<["-"], "fmodules-debuginfo">, 5964 HelpText<"Generate debug info for types in an object file built from this " 5965 "module and do not generate them elsewhere">, 5966 MarshallingInfoFlag<LangOpts<"ModulesDebugInfo">>; 5967def fmodule_format_EQ : Joined<["-"], "fmodule-format=">, 5968 HelpText<"Select the container format for clang modules and PCH. " 5969 "Supported options are 'raw' and 'obj'.">, 5970 MarshallingInfoString<HeaderSearchOpts<"ModuleFormat">, [{"raw"}]>; 5971def ftest_module_file_extension_EQ : 5972 Joined<["-"], "ftest-module-file-extension=">, 5973 HelpText<"introduce a module file extension for testing purposes. " 5974 "The argument is parsed as blockname:major:minor:hashed:user info">; 5975 5976defm recovery_ast : BoolOption<"f", "recovery-ast", 5977 LangOpts<"RecoveryAST">, DefaultTrue, 5978 NegFlag<SetFalse>, PosFlag<SetTrue, [], "Preserve expressions in AST rather " 5979 "than dropping them when encountering semantic errors">>; 5980defm recovery_ast_type : BoolOption<"f", "recovery-ast-type", 5981 LangOpts<"RecoveryASTType">, DefaultTrue, 5982 NegFlag<SetFalse>, PosFlag<SetTrue, [], "Preserve the type for recovery " 5983 "expressions when possible">>; 5984 5985let Group = Action_Group in { 5986 5987def Eonly : Flag<["-"], "Eonly">, 5988 HelpText<"Just run preprocessor, no output (for timings)">; 5989def dump_raw_tokens : Flag<["-"], "dump-raw-tokens">, 5990 HelpText<"Lex file in raw mode and dump raw tokens">; 5991def analyze : Flag<["-"], "analyze">, 5992 HelpText<"Run static analysis engine">; 5993def dump_tokens : Flag<["-"], "dump-tokens">, 5994 HelpText<"Run preprocessor, dump internal rep of tokens">; 5995def fixit : Flag<["-"], "fixit">, 5996 HelpText<"Apply fix-it advice to the input source">; 5997def fixit_EQ : Joined<["-"], "fixit=">, 5998 HelpText<"Apply fix-it advice creating a file with the given suffix">; 5999def print_preamble : Flag<["-"], "print-preamble">, 6000 HelpText<"Print the \"preamble\" of a file, which is a candidate for implicit" 6001 " precompiled headers.">; 6002def emit_html : Flag<["-"], "emit-html">, 6003 HelpText<"Output input source as HTML">; 6004def ast_print : Flag<["-"], "ast-print">, 6005 HelpText<"Build ASTs and then pretty-print them">; 6006def ast_list : Flag<["-"], "ast-list">, 6007 HelpText<"Build ASTs and print the list of declaration node qualified names">; 6008def ast_dump : Flag<["-"], "ast-dump">, 6009 HelpText<"Build ASTs and then debug dump them">; 6010def ast_dump_EQ : Joined<["-"], "ast-dump=">, 6011 HelpText<"Build ASTs and then debug dump them in the specified format. " 6012 "Supported formats include: default, json">; 6013def ast_dump_all : Flag<["-"], "ast-dump-all">, 6014 HelpText<"Build ASTs and then debug dump them, forcing deserialization">; 6015def ast_dump_all_EQ : Joined<["-"], "ast-dump-all=">, 6016 HelpText<"Build ASTs and then debug dump them in the specified format, " 6017 "forcing deserialization. Supported formats include: default, json">; 6018def ast_dump_decl_types : Flag<["-"], "ast-dump-decl-types">, 6019 HelpText<"Include declaration types in AST dumps">, 6020 MarshallingInfoFlag<FrontendOpts<"ASTDumpDeclTypes">>; 6021def templight_dump : Flag<["-"], "templight-dump">, 6022 HelpText<"Dump templight information to stdout">; 6023def ast_dump_lookups : Flag<["-"], "ast-dump-lookups">, 6024 HelpText<"Build ASTs and then debug dump their name lookup tables">, 6025 MarshallingInfoFlag<FrontendOpts<"ASTDumpLookups">>; 6026def ast_view : Flag<["-"], "ast-view">, 6027 HelpText<"Build ASTs and view them with GraphViz">; 6028def emit_module : Flag<["-"], "emit-module">, 6029 HelpText<"Generate pre-compiled module file from a module map">; 6030def emit_module_interface : Flag<["-"], "emit-module-interface">, 6031 HelpText<"Generate pre-compiled module file from a C++ module interface">; 6032def emit_header_unit : Flag<["-"], "emit-header-unit">, 6033 HelpText<"Generate C++20 header units from header files">; 6034def emit_pch : Flag<["-"], "emit-pch">, 6035 HelpText<"Generate pre-compiled header file">; 6036def emit_llvm_only : Flag<["-"], "emit-llvm-only">, 6037 HelpText<"Build ASTs and convert to LLVM, discarding output">; 6038def emit_codegen_only : Flag<["-"], "emit-codegen-only">, 6039 HelpText<"Generate machine code, but discard output">; 6040def rewrite_test : Flag<["-"], "rewrite-test">, 6041 HelpText<"Rewriter playground">; 6042def rewrite_macros : Flag<["-"], "rewrite-macros">, 6043 HelpText<"Expand macros without full preprocessing">; 6044def migrate : Flag<["-"], "migrate">, 6045 HelpText<"Migrate source code">; 6046def compiler_options_dump : Flag<["-"], "compiler-options-dump">, 6047 HelpText<"Dump the compiler configuration options">; 6048def print_dependency_directives_minimized_source : Flag<["-"], 6049 "print-dependency-directives-minimized-source">, 6050 HelpText<"Print the output of the dependency directives source minimizer">; 6051} 6052 6053defm emit_llvm_uselists : BoolOption<"", "emit-llvm-uselists", 6054 CodeGenOpts<"EmitLLVMUseLists">, DefaultFalse, 6055 PosFlag<SetTrue, [], "Preserve">, 6056 NegFlag<SetFalse, [], "Don't preserve">, 6057 BothFlags<[], " order of LLVM use-lists when serializing">>; 6058 6059def mt_migrate_directory : Separate<["-"], "mt-migrate-directory">, 6060 HelpText<"Directory for temporary files produced during ARC or ObjC migration">, 6061 MarshallingInfoString<FrontendOpts<"MTMigrateDir">>; 6062 6063def arcmt_action_EQ : Joined<["-"], "arcmt-action=">, Flags<[CC1Option, NoDriverOption]>, 6064 HelpText<"The ARC migration action to take">, 6065 Values<"check,modify,migrate">, 6066 NormalizedValuesScope<"FrontendOptions">, 6067 NormalizedValues<["ARCMT_Check", "ARCMT_Modify", "ARCMT_Migrate"]>, 6068 MarshallingInfoEnum<FrontendOpts<"ARCMTAction">, "ARCMT_None">; 6069 6070def opt_record_file : Separate<["-"], "opt-record-file">, 6071 HelpText<"File name to use for YAML optimization record output">, 6072 MarshallingInfoString<CodeGenOpts<"OptRecordFile">>; 6073def opt_record_passes : Separate<["-"], "opt-record-passes">, 6074 HelpText<"Only record remark information for passes whose names match the given regular expression">; 6075def opt_record_format : Separate<["-"], "opt-record-format">, 6076 HelpText<"The format used for serializing remarks (default: YAML)">; 6077 6078def print_stats : Flag<["-"], "print-stats">, 6079 HelpText<"Print performance metrics and statistics">, 6080 MarshallingInfoFlag<FrontendOpts<"ShowStats">>; 6081def stats_file : Joined<["-"], "stats-file=">, 6082 HelpText<"Filename to write statistics to">, 6083 MarshallingInfoString<FrontendOpts<"StatsFile">>; 6084def fdump_record_layouts_simple : Flag<["-"], "fdump-record-layouts-simple">, 6085 HelpText<"Dump record layout information in a simple form used for testing">, 6086 MarshallingInfoFlag<LangOpts<"DumpRecordLayoutsSimple">>; 6087def fdump_record_layouts_canonical : Flag<["-"], "fdump-record-layouts-canonical">, 6088 HelpText<"Dump record layout information with canonical field types">, 6089 MarshallingInfoFlag<LangOpts<"DumpRecordLayoutsCanonical">>; 6090def fdump_record_layouts_complete : Flag<["-"], "fdump-record-layouts-complete">, 6091 HelpText<"Dump record layout information for all complete types">, 6092 MarshallingInfoFlag<LangOpts<"DumpRecordLayoutsComplete">>; 6093def fdump_record_layouts : Flag<["-"], "fdump-record-layouts">, 6094 HelpText<"Dump record layout information">, 6095 MarshallingInfoFlag<LangOpts<"DumpRecordLayouts">>, 6096 ImpliedByAnyOf<[fdump_record_layouts_simple.KeyPath, fdump_record_layouts_complete.KeyPath, fdump_record_layouts_canonical.KeyPath]>; 6097def fix_what_you_can : Flag<["-"], "fix-what-you-can">, 6098 HelpText<"Apply fix-it advice even in the presence of unfixable errors">, 6099 MarshallingInfoFlag<FrontendOpts<"FixWhatYouCan">>; 6100def fix_only_warnings : Flag<["-"], "fix-only-warnings">, 6101 HelpText<"Apply fix-it advice only for warnings, not errors">, 6102 MarshallingInfoFlag<FrontendOpts<"FixOnlyWarnings">>; 6103def fixit_recompile : Flag<["-"], "fixit-recompile">, 6104 HelpText<"Apply fix-it changes and recompile">, 6105 MarshallingInfoFlag<FrontendOpts<"FixAndRecompile">>; 6106def fixit_to_temp : Flag<["-"], "fixit-to-temporary">, 6107 HelpText<"Apply fix-it changes to temporary files">, 6108 MarshallingInfoFlag<FrontendOpts<"FixToTemporaries">>; 6109 6110def foverride_record_layout_EQ : Joined<["-"], "foverride-record-layout=">, 6111 HelpText<"Override record layouts with those in the given file">, 6112 MarshallingInfoString<FrontendOpts<"OverrideRecordLayoutsFile">>; 6113def pch_through_header_EQ : Joined<["-"], "pch-through-header=">, 6114 HelpText<"Stop PCH generation after including this file. When using a PCH, " 6115 "skip tokens until after this file is included.">, 6116 MarshallingInfoString<PreprocessorOpts<"PCHThroughHeader">>; 6117def pch_through_hdrstop_create : Flag<["-"], "pch-through-hdrstop-create">, 6118 HelpText<"When creating a PCH, stop PCH generation after #pragma hdrstop.">, 6119 MarshallingInfoFlag<PreprocessorOpts<"PCHWithHdrStopCreate">>; 6120def pch_through_hdrstop_use : Flag<["-"], "pch-through-hdrstop-use">, 6121 HelpText<"When using a PCH, skip tokens until after a #pragma hdrstop.">; 6122def fno_pch_timestamp : Flag<["-"], "fno-pch-timestamp">, 6123 HelpText<"Disable inclusion of timestamp in precompiled headers">, 6124 MarshallingInfoNegativeFlag<FrontendOpts<"IncludeTimestamps">>; 6125def building_pch_with_obj : Flag<["-"], "building-pch-with-obj">, 6126 HelpText<"This compilation is part of building a PCH with corresponding object file.">, 6127 MarshallingInfoFlag<LangOpts<"BuildingPCHWithObjectFile">>; 6128 6129def aligned_alloc_unavailable : Flag<["-"], "faligned-alloc-unavailable">, 6130 HelpText<"Aligned allocation/deallocation functions are unavailable">, 6131 MarshallingInfoFlag<LangOpts<"AlignedAllocationUnavailable">>, 6132 ShouldParseIf<faligned_allocation.KeyPath>; 6133 6134} // let Flags = [CC1Option, NoDriverOption] 6135 6136//===----------------------------------------------------------------------===// 6137// Language Options 6138//===----------------------------------------------------------------------===// 6139 6140def version : Flag<["-"], "version">, 6141 HelpText<"Print the compiler version">, 6142 Flags<[CC1Option, CC1AsOption, FC1Option, NoDriverOption]>, 6143 MarshallingInfoFlag<FrontendOpts<"ShowVersion">>; 6144 6145def main_file_name : Separate<["-"], "main-file-name">, 6146 HelpText<"Main file name to use for debug info and source if missing">, 6147 Flags<[CC1Option, CC1AsOption, NoDriverOption]>, 6148 MarshallingInfoString<CodeGenOpts<"MainFileName">>; 6149def split_dwarf_output : Separate<["-"], "split-dwarf-output">, 6150 HelpText<"File name to use for split dwarf debug info output">, 6151 Flags<[CC1Option, CC1AsOption, NoDriverOption]>, 6152 MarshallingInfoString<CodeGenOpts<"SplitDwarfOutput">>; 6153 6154let Flags = [CC1Option, FC1Option, NoDriverOption] in { 6155 6156def mreassociate : Flag<["-"], "mreassociate">, 6157 HelpText<"Allow reassociation transformations for floating-point instructions">, 6158 MarshallingInfoFlag<LangOpts<"AllowFPReassoc">>, ImpliedByAnyOf<[funsafe_math_optimizations.KeyPath]>; 6159def menable_no_nans : Flag<["-"], "menable-no-nans">, 6160 HelpText<"Allow optimization to assume there are no NaNs.">, 6161 MarshallingInfoFlag<LangOpts<"NoHonorNaNs">>, ImpliedByAnyOf<[ffinite_math_only.KeyPath]>; 6162def menable_no_infinities : Flag<["-"], "menable-no-infs">, 6163 HelpText<"Allow optimization to assume there are no infinities.">, 6164 MarshallingInfoFlag<LangOpts<"NoHonorInfs">>, ImpliedByAnyOf<[ffinite_math_only.KeyPath]>; 6165 6166def pic_level : Separate<["-"], "pic-level">, 6167 HelpText<"Value for __PIC__">, 6168 MarshallingInfoInt<LangOpts<"PICLevel">>; 6169def pic_is_pie : Flag<["-"], "pic-is-pie">, 6170 HelpText<"File is for a position independent executable">, 6171 MarshallingInfoFlag<LangOpts<"PIE">>; 6172 6173} // let Flags = [CC1Option, FC1Option, NoDriverOption] 6174 6175let Flags = [CC1Option, NoDriverOption] in { 6176 6177def fblocks_runtime_optional : Flag<["-"], "fblocks-runtime-optional">, 6178 HelpText<"Weakly link in the blocks runtime">, 6179 MarshallingInfoFlag<LangOpts<"BlocksRuntimeOptional">>; 6180def fexternc_nounwind : Flag<["-"], "fexternc-nounwind">, 6181 HelpText<"Assume all functions with C linkage do not unwind">, 6182 MarshallingInfoFlag<LangOpts<"ExternCNoUnwind">>; 6183def split_dwarf_file : Separate<["-"], "split-dwarf-file">, 6184 HelpText<"Name of the split dwarf debug info file to encode in the object file">, 6185 MarshallingInfoString<CodeGenOpts<"SplitDwarfFile">>; 6186def fno_wchar : Flag<["-"], "fno-wchar">, 6187 HelpText<"Disable C++ builtin type wchar_t">, 6188 MarshallingInfoNegativeFlag<LangOpts<"WChar">, cplusplus.KeyPath>, 6189 ShouldParseIf<cplusplus.KeyPath>; 6190def fconstant_string_class : Separate<["-"], "fconstant-string-class">, 6191 MetaVarName<"<class name>">, 6192 HelpText<"Specify the class to use for constant Objective-C string objects.">, 6193 MarshallingInfoString<LangOpts<"ObjCConstantStringClass">>; 6194def fobjc_arc_cxxlib_EQ : Joined<["-"], "fobjc-arc-cxxlib=">, 6195 HelpText<"Objective-C++ Automatic Reference Counting standard library kind">, 6196 Values<"libc++,libstdc++,none">, 6197 NormalizedValues<["ARCXX_libcxx", "ARCXX_libstdcxx", "ARCXX_nolib"]>, 6198 MarshallingInfoEnum<PreprocessorOpts<"ObjCXXARCStandardLibrary">, "ARCXX_nolib">; 6199def fobjc_runtime_has_weak : Flag<["-"], "fobjc-runtime-has-weak">, 6200 HelpText<"The target Objective-C runtime supports ARC weak operations">; 6201def fobjc_dispatch_method_EQ : Joined<["-"], "fobjc-dispatch-method=">, 6202 HelpText<"Objective-C dispatch method to use">, 6203 Values<"legacy,non-legacy,mixed">, 6204 NormalizedValuesScope<"CodeGenOptions">, NormalizedValues<["Legacy", "NonLegacy", "Mixed"]>, 6205 MarshallingInfoEnum<CodeGenOpts<"ObjCDispatchMethod">, "Legacy">; 6206def disable_objc_default_synthesize_properties : Flag<["-"], "disable-objc-default-synthesize-properties">, 6207 HelpText<"disable the default synthesis of Objective-C properties">, 6208 MarshallingInfoNegativeFlag<LangOpts<"ObjCDefaultSynthProperties">>; 6209def fencode_extended_block_signature : Flag<["-"], "fencode-extended-block-signature">, 6210 HelpText<"enable extended encoding of block type signature">, 6211 MarshallingInfoFlag<LangOpts<"EncodeExtendedBlockSig">>; 6212def function_alignment : Separate<["-"], "function-alignment">, 6213 HelpText<"default alignment for functions">, 6214 MarshallingInfoInt<LangOpts<"FunctionAlignment">>; 6215def fhalf_no_semantic_interposition : Flag<["-"], "fhalf-no-semantic-interposition">, 6216 HelpText<"Like -fno-semantic-interposition but don't use local aliases">, 6217 MarshallingInfoFlag<LangOpts<"HalfNoSemanticInterposition">>; 6218def fno_validate_pch : Flag<["-"], "fno-validate-pch">, 6219 HelpText<"Disable validation of precompiled headers">, 6220 MarshallingInfoFlag<PreprocessorOpts<"DisablePCHOrModuleValidation">, "DisableValidationForModuleKind::None">, 6221 Normalizer<"makeFlagToValueNormalizer(DisableValidationForModuleKind::All)">; 6222def fallow_pcm_with_errors : Flag<["-"], "fallow-pcm-with-compiler-errors">, 6223 HelpText<"Accept a PCM file that was created with compiler errors">, 6224 MarshallingInfoFlag<FrontendOpts<"AllowPCMWithCompilerErrors">>; 6225def fallow_pch_with_errors : Flag<["-"], "fallow-pch-with-compiler-errors">, 6226 HelpText<"Accept a PCH file that was created with compiler errors">, 6227 MarshallingInfoFlag<PreprocessorOpts<"AllowPCHWithCompilerErrors">>, 6228 ImpliedByAnyOf<[fallow_pcm_with_errors.KeyPath]>; 6229def fallow_pch_with_different_modules_cache_path : 6230 Flag<["-"], "fallow-pch-with-different-modules-cache-path">, 6231 HelpText<"Accept a PCH file that was created with a different modules cache path">, 6232 MarshallingInfoFlag<PreprocessorOpts<"AllowPCHWithDifferentModulesCachePath">>; 6233def fno_modules_share_filemanager : Flag<["-"], "fno-modules-share-filemanager">, 6234 HelpText<"Disable sharing the FileManager when building a module implicitly">, 6235 MarshallingInfoNegativeFlag<FrontendOpts<"ModulesShareFileManager">>; 6236def dump_deserialized_pch_decls : Flag<["-"], "dump-deserialized-decls">, 6237 HelpText<"Dump declarations that are deserialized from PCH, for testing">, 6238 MarshallingInfoFlag<PreprocessorOpts<"DumpDeserializedPCHDecls">>; 6239def error_on_deserialized_pch_decl : Separate<["-"], "error-on-deserialized-decl">, 6240 HelpText<"Emit error if a specific declaration is deserialized from PCH, for testing">; 6241def error_on_deserialized_pch_decl_EQ : Joined<["-"], "error-on-deserialized-decl=">, 6242 Alias<error_on_deserialized_pch_decl>; 6243def static_define : Flag<["-"], "static-define">, 6244 HelpText<"Should __STATIC__ be defined">, 6245 MarshallingInfoFlag<LangOpts<"Static">>; 6246def stack_protector : Separate<["-"], "stack-protector">, 6247 HelpText<"Enable stack protectors">, 6248 Values<"0,1,2,3">, 6249 NormalizedValuesScope<"LangOptions">, 6250 NormalizedValues<["SSPOff", "SSPOn", "SSPStrong", "SSPReq"]>, 6251 MarshallingInfoEnum<LangOpts<"StackProtector">, "SSPOff">; 6252def stack_protector_buffer_size : Separate<["-"], "stack-protector-buffer-size">, 6253 HelpText<"Lower bound for a buffer to be considered for stack protection">, 6254 MarshallingInfoInt<CodeGenOpts<"SSPBufferSize">, "8">; 6255def ftype_visibility : Joined<["-"], "ftype-visibility=">, 6256 HelpText<"Default type visibility">, 6257 MarshallingInfoVisibility<LangOpts<"TypeVisibilityMode">, fvisibility_EQ.KeyPath>; 6258def fapply_global_visibility_to_externs : Flag<["-"], "fapply-global-visibility-to-externs">, 6259 HelpText<"Apply global symbol visibility to external declarations without an explicit visibility">, 6260 MarshallingInfoFlag<LangOpts<"SetVisibilityForExternDecls">>; 6261def ftemplate_depth : Separate<["-"], "ftemplate-depth">, 6262 HelpText<"Maximum depth of recursive template instantiation">, 6263 MarshallingInfoInt<LangOpts<"InstantiationDepth">, "1024">; 6264def foperator_arrow_depth : Separate<["-"], "foperator-arrow-depth">, 6265 HelpText<"Maximum number of 'operator->'s to call for a member access">, 6266 MarshallingInfoInt<LangOpts<"ArrowDepth">, "256">; 6267def fconstexpr_depth : Separate<["-"], "fconstexpr-depth">, 6268 HelpText<"Maximum depth of recursive constexpr function calls">, 6269 MarshallingInfoInt<LangOpts<"ConstexprCallDepth">, "512">; 6270def fconstexpr_steps : Separate<["-"], "fconstexpr-steps">, 6271 HelpText<"Maximum number of steps in constexpr function evaluation">, 6272 MarshallingInfoInt<LangOpts<"ConstexprStepLimit">, "1048576">; 6273def fbracket_depth : Separate<["-"], "fbracket-depth">, 6274 HelpText<"Maximum nesting level for parentheses, brackets, and braces">, 6275 MarshallingInfoInt<LangOpts<"BracketDepth">, "256">; 6276defm const_strings : BoolOption<"f", "const-strings", 6277 LangOpts<"ConstStrings">, DefaultFalse, 6278 PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">, 6279 BothFlags<[], " a const qualified type for string literals in C and ObjC">>; 6280def fno_bitfield_type_align : Flag<["-"], "fno-bitfield-type-align">, 6281 HelpText<"Ignore bit-field types when aligning structures">, 6282 MarshallingInfoFlag<LangOpts<"NoBitFieldTypeAlign">>; 6283def ffake_address_space_map : Flag<["-"], "ffake-address-space-map">, 6284 HelpText<"Use a fake address space map; OpenCL testing purposes only">, 6285 MarshallingInfoFlag<LangOpts<"FakeAddressSpaceMap">>; 6286def faddress_space_map_mangling_EQ : Joined<["-"], "faddress-space-map-mangling=">, 6287 HelpText<"Set the mode for address space map based mangling; OpenCL testing purposes only">, 6288 Values<"target,no,yes">, 6289 NormalizedValuesScope<"LangOptions">, 6290 NormalizedValues<["ASMM_Target", "ASMM_Off", "ASMM_On"]>, 6291 MarshallingInfoEnum<LangOpts<"AddressSpaceMapMangling">, "ASMM_Target">; 6292def funknown_anytype : Flag<["-"], "funknown-anytype">, 6293 HelpText<"Enable parser support for the __unknown_anytype type; for testing purposes only">, 6294 MarshallingInfoFlag<LangOpts<"ParseUnknownAnytype">>; 6295def fdebugger_support : Flag<["-"], "fdebugger-support">, 6296 HelpText<"Enable special debugger support behavior">, 6297 MarshallingInfoFlag<LangOpts<"DebuggerSupport">>; 6298def fdebugger_cast_result_to_id : Flag<["-"], "fdebugger-cast-result-to-id">, 6299 HelpText<"Enable casting unknown expression results to id">, 6300 MarshallingInfoFlag<LangOpts<"DebuggerCastResultToId">>; 6301def fdebugger_objc_literal : Flag<["-"], "fdebugger-objc-literal">, 6302 HelpText<"Enable special debugger support for Objective-C subscripting and literals">, 6303 MarshallingInfoFlag<LangOpts<"DebuggerObjCLiteral">>; 6304defm deprecated_macro : BoolOption<"f", "deprecated-macro", 6305 LangOpts<"Deprecated">, DefaultFalse, 6306 PosFlag<SetTrue, [], "Defines">, NegFlag<SetFalse, [], "Undefines">, 6307 BothFlags<[], " the __DEPRECATED macro">>; 6308def fobjc_subscripting_legacy_runtime : Flag<["-"], "fobjc-subscripting-legacy-runtime">, 6309 HelpText<"Allow Objective-C array and dictionary subscripting in legacy runtime">; 6310// TODO: Enforce values valid for MSVtorDispMode. 6311def vtordisp_mode_EQ : Joined<["-"], "vtordisp-mode=">, 6312 HelpText<"Control vtordisp placement on win32 targets">, 6313 MarshallingInfoInt<LangOpts<"VtorDispMode">, "1">; 6314def fnative_half_type: Flag<["-"], "fnative-half-type">, 6315 HelpText<"Use the native half type for __fp16 instead of promoting to float">, 6316 MarshallingInfoFlag<LangOpts<"NativeHalfType">>, 6317 ImpliedByAnyOf<[open_cl.KeyPath, render_script.KeyPath]>; 6318def fnative_half_arguments_and_returns : Flag<["-"], "fnative-half-arguments-and-returns">, 6319 HelpText<"Use the native __fp16 type for arguments and returns (and skip ABI-specific lowering)">, 6320 MarshallingInfoFlag<LangOpts<"NativeHalfArgsAndReturns">>, 6321 ImpliedByAnyOf<[open_cl.KeyPath, render_script.KeyPath, hlsl.KeyPath]>; 6322def fdefault_calling_conv_EQ : Joined<["-"], "fdefault-calling-conv=">, 6323 HelpText<"Set default calling convention">, 6324 Values<"cdecl,fastcall,stdcall,vectorcall,regcall">, 6325 NormalizedValuesScope<"LangOptions">, 6326 NormalizedValues<["DCC_CDecl", "DCC_FastCall", "DCC_StdCall", "DCC_VectorCall", "DCC_RegCall"]>, 6327 MarshallingInfoEnum<LangOpts<"DefaultCallingConv">, "DCC_None">; 6328 6329// These options cannot be marshalled, because they are used to set up the LangOptions defaults. 6330def finclude_default_header : Flag<["-"], "finclude-default-header">, 6331 HelpText<"Include default header file for OpenCL and HLSL">; 6332def fdeclare_opencl_builtins : Flag<["-"], "fdeclare-opencl-builtins">, 6333 HelpText<"Add OpenCL builtin function declarations (experimental)">; 6334 6335def fpreserve_vec3_type : Flag<["-"], "fpreserve-vec3-type">, 6336 HelpText<"Preserve 3-component vector type">, 6337 MarshallingInfoFlag<CodeGenOpts<"PreserveVec3Type">>, 6338 ImpliedByAnyOf<[hlsl.KeyPath]>; 6339def fwchar_type_EQ : Joined<["-"], "fwchar-type=">, 6340 HelpText<"Select underlying type for wchar_t">, 6341 Values<"char,short,int">, 6342 NormalizedValues<["1", "2", "4"]>, 6343 MarshallingInfoEnum<LangOpts<"WCharSize">, "0">; 6344defm signed_wchar : BoolOption<"f", "signed-wchar", 6345 LangOpts<"WCharIsSigned">, DefaultTrue, 6346 NegFlag<SetFalse, [CC1Option], "Use an unsigned">, PosFlag<SetTrue, [], "Use a signed">, 6347 BothFlags<[], " type for wchar_t">>; 6348def fcompatibility_qualified_id_block_param_type_checking : Flag<["-"], "fcompatibility-qualified-id-block-type-checking">, 6349 HelpText<"Allow using blocks with parameters of more specific type than " 6350 "the type system guarantees when a parameter is qualified id">, 6351 MarshallingInfoFlag<LangOpts<"CompatibilityQualifiedIdBlockParamTypeChecking">>; 6352def fpass_by_value_is_noalias: Flag<["-"], "fpass-by-value-is-noalias">, 6353 HelpText<"Allows assuming by-value parameters do not alias any other value. " 6354 "Has no effect on non-trivially-copyable classes in C++.">, Group<f_Group>, 6355 MarshallingInfoFlag<CodeGenOpts<"PassByValueIsNoAlias">>; 6356 6357// FIXME: Remove these entirely once functionality/tests have been excised. 6358def fobjc_gc_only : Flag<["-"], "fobjc-gc-only">, Group<f_Group>, 6359 HelpText<"Use GC exclusively for Objective-C related memory management">; 6360def fobjc_gc : Flag<["-"], "fobjc-gc">, Group<f_Group>, 6361 HelpText<"Enable Objective-C garbage collection">; 6362 6363def fexperimental_max_bitint_width_EQ: 6364 Joined<["-"], "fexperimental-max-bitint-width=">, Group<f_Group>, 6365 MetaVarName<"<N>">, 6366 HelpText<"Set the maximum bitwidth for _BitInt (this option is expected to be removed in the future)">, 6367 MarshallingInfoInt<LangOpts<"MaxBitIntWidth">>; 6368 6369} // let Flags = [CC1Option, NoDriverOption] 6370 6371//===----------------------------------------------------------------------===// 6372// Header Search Options 6373//===----------------------------------------------------------------------===// 6374 6375let Flags = [CC1Option, NoDriverOption] in { 6376 6377def nostdsysteminc : Flag<["-"], "nostdsysteminc">, 6378 HelpText<"Disable standard system #include directories">, 6379 MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseStandardSystemIncludes">>; 6380def fdisable_module_hash : Flag<["-"], "fdisable-module-hash">, 6381 HelpText<"Disable the module hash">, 6382 MarshallingInfoFlag<HeaderSearchOpts<"DisableModuleHash">>; 6383def fmodules_hash_content : Flag<["-"], "fmodules-hash-content">, 6384 HelpText<"Enable hashing the content of a module file">, 6385 MarshallingInfoFlag<HeaderSearchOpts<"ModulesHashContent">>; 6386def fmodules_strict_context_hash : Flag<["-"], "fmodules-strict-context-hash">, 6387 HelpText<"Enable hashing of all compiler options that could impact the " 6388 "semantics of a module in an implicit build">, 6389 MarshallingInfoFlag<HeaderSearchOpts<"ModulesStrictContextHash">>; 6390def c_isystem : Separate<["-"], "c-isystem">, MetaVarName<"<directory>">, 6391 HelpText<"Add directory to the C SYSTEM include search path">; 6392def objc_isystem : Separate<["-"], "objc-isystem">, 6393 MetaVarName<"<directory>">, 6394 HelpText<"Add directory to the ObjC SYSTEM include search path">; 6395def objcxx_isystem : Separate<["-"], "objcxx-isystem">, 6396 MetaVarName<"<directory>">, 6397 HelpText<"Add directory to the ObjC++ SYSTEM include search path">; 6398def internal_isystem : Separate<["-"], "internal-isystem">, 6399 MetaVarName<"<directory>">, 6400 HelpText<"Add directory to the internal system include search path; these " 6401 "are assumed to not be user-provided and are used to model system " 6402 "and standard headers' paths.">; 6403def internal_externc_isystem : Separate<["-"], "internal-externc-isystem">, 6404 MetaVarName<"<directory>">, 6405 HelpText<"Add directory to the internal system include search path with " 6406 "implicit extern \"C\" semantics; these are assumed to not be " 6407 "user-provided and are used to model system and standard headers' " 6408 "paths.">; 6409 6410} // let Flags = [CC1Option, NoDriverOption] 6411 6412//===----------------------------------------------------------------------===// 6413// Preprocessor Options 6414//===----------------------------------------------------------------------===// 6415 6416let Flags = [CC1Option, NoDriverOption] in { 6417 6418def chain_include : Separate<["-"], "chain-include">, MetaVarName<"<file>">, 6419 HelpText<"Include and chain a header file after turning it into PCH">; 6420def preamble_bytes_EQ : Joined<["-"], "preamble-bytes=">, 6421 HelpText<"Assume that the precompiled header is a precompiled preamble " 6422 "covering the first N bytes of the main file">; 6423def detailed_preprocessing_record : Flag<["-"], "detailed-preprocessing-record">, 6424 HelpText<"include a detailed record of preprocessing actions">, 6425 MarshallingInfoFlag<PreprocessorOpts<"DetailedRecord">>; 6426def setup_static_analyzer : Flag<["-"], "setup-static-analyzer">, 6427 HelpText<"Set up preprocessor for static analyzer (done automatically when static analyzer is run).">, 6428 MarshallingInfoFlag<PreprocessorOpts<"SetUpStaticAnalyzer">>; 6429def disable_pragma_debug_crash : Flag<["-"], "disable-pragma-debug-crash">, 6430 HelpText<"Disable any #pragma clang __debug that can lead to crashing behavior. This is meant for testing.">, 6431 MarshallingInfoFlag<PreprocessorOpts<"DisablePragmaDebugCrash">>; 6432def source_date_epoch : Separate<["-"], "source-date-epoch">, 6433 MetaVarName<"<time since Epoch in seconds>">, 6434 HelpText<"Time to be used in __DATE__, __TIME__, and __TIMESTAMP__ macros">; 6435 6436} // let Flags = [CC1Option, NoDriverOption] 6437 6438//===----------------------------------------------------------------------===// 6439// CUDA Options 6440//===----------------------------------------------------------------------===// 6441 6442let Flags = [CC1Option, NoDriverOption] in { 6443 6444def fcuda_is_device : Flag<["-"], "fcuda-is-device">, 6445 HelpText<"Generate code for CUDA device">, 6446 MarshallingInfoFlag<LangOpts<"CUDAIsDevice">>; 6447def fcuda_include_gpubinary : Separate<["-"], "fcuda-include-gpubinary">, 6448 HelpText<"Incorporate CUDA device-side binary into host object file.">, 6449 MarshallingInfoString<CodeGenOpts<"CudaGpuBinaryFileName">>; 6450def fcuda_allow_variadic_functions : Flag<["-"], "fcuda-allow-variadic-functions">, 6451 HelpText<"Allow variadic functions in CUDA device code.">, 6452 MarshallingInfoFlag<LangOpts<"CUDAAllowVariadicFunctions">>; 6453def fno_cuda_host_device_constexpr : Flag<["-"], "fno-cuda-host-device-constexpr">, 6454 HelpText<"Don't treat unattributed constexpr functions as __host__ __device__.">, 6455 MarshallingInfoNegativeFlag<LangOpts<"CUDAHostDeviceConstexpr">>; 6456 6457} // let Flags = [CC1Option, NoDriverOption] 6458 6459//===----------------------------------------------------------------------===// 6460// OpenMP Options 6461//===----------------------------------------------------------------------===// 6462 6463def fopenmp_is_device : Flag<["-"], "fopenmp-is-device">, 6464 HelpText<"Generate code only for an OpenMP target device.">, 6465 Flags<[CC1Option, NoDriverOption]>; 6466def fopenmp_host_ir_file_path : Separate<["-"], "fopenmp-host-ir-file-path">, 6467 HelpText<"Path to the IR file produced by the frontend for the host.">, 6468 Flags<[CC1Option, NoDriverOption]>; 6469 6470//===----------------------------------------------------------------------===// 6471// SYCL Options 6472//===----------------------------------------------------------------------===// 6473 6474def fsycl_is_device : Flag<["-"], "fsycl-is-device">, 6475 HelpText<"Generate code for SYCL device.">, 6476 Flags<[CC1Option, NoDriverOption]>, 6477 MarshallingInfoFlag<LangOpts<"SYCLIsDevice">>; 6478def fsycl_is_host : Flag<["-"], "fsycl-is-host">, 6479 HelpText<"SYCL host compilation">, 6480 Flags<[CC1Option, NoDriverOption]>, 6481 MarshallingInfoFlag<LangOpts<"SYCLIsHost">>; 6482 6483def sycl_std_EQ : Joined<["-"], "sycl-std=">, Group<sycl_Group>, 6484 Flags<[CC1Option, NoArgumentUnused, CoreOption]>, 6485 HelpText<"SYCL language standard to compile for.">, 6486 Values<"2020,2017,121,1.2.1,sycl-1.2.1">, 6487 NormalizedValues<["SYCL_2020", "SYCL_2017", "SYCL_2017", "SYCL_2017", "SYCL_2017"]>, 6488 NormalizedValuesScope<"LangOptions">, 6489 MarshallingInfoEnum<LangOpts<"SYCLVersion">, "SYCL_None">, 6490 ShouldParseIf<!strconcat(fsycl_is_device.KeyPath, "||", fsycl_is_host.KeyPath)>; 6491 6492defm cuda_approx_transcendentals : BoolFOption<"cuda-approx-transcendentals", 6493 LangOpts<"CUDADeviceApproxTranscendentals">, DefaultFalse, 6494 PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">, 6495 BothFlags<[], " approximate transcendental functions">>, 6496 ShouldParseIf<fcuda_is_device.KeyPath>; 6497 6498//===----------------------------------------------------------------------===// 6499// Frontend Options - cc1 + fc1 6500//===----------------------------------------------------------------------===// 6501 6502let Flags = [CC1Option, FC1Option, NoDriverOption] in { 6503let Group = Action_Group in { 6504 6505def emit_obj : Flag<["-"], "emit-obj">, 6506 HelpText<"Emit native object files">; 6507def init_only : Flag<["-"], "init-only">, 6508 HelpText<"Only execute frontend initialization">; 6509def emit_llvm_bc : Flag<["-"], "emit-llvm-bc">, 6510 HelpText<"Build ASTs then convert to LLVM, emit .bc file">; 6511 6512} // let Group = Action_Group 6513 6514def load : Separate<["-"], "load">, MetaVarName<"<dsopath>">, 6515 HelpText<"Load the named plugin (dynamic shared object)">; 6516def plugin : Separate<["-"], "plugin">, MetaVarName<"<name>">, 6517 HelpText<"Use the named plugin action instead of the default action (use \"help\" to list available options)">; 6518defm debug_pass_manager : BoolOption<"f", "debug-pass-manager", 6519 CodeGenOpts<"DebugPassManager">, DefaultFalse, 6520 PosFlag<SetTrue, [], "Prints debug information for the new pass manager">, 6521 NegFlag<SetFalse, [], "Disables debug printing for the new pass manager">>; 6522 6523} // let Flags = [CC1Option, FC1Option, NoDriverOption] 6524 6525//===----------------------------------------------------------------------===// 6526// cc1as-only Options 6527//===----------------------------------------------------------------------===// 6528 6529let Flags = [CC1AsOption, NoDriverOption] in { 6530 6531// Language Options 6532def n : Flag<["-"], "n">, 6533 HelpText<"Don't automatically start assembly file with a text section">; 6534 6535// Frontend Options 6536def filetype : Separate<["-"], "filetype">, 6537 HelpText<"Specify the output file type ('asm', 'null', or 'obj')">; 6538 6539// Transliterate Options 6540def output_asm_variant : Separate<["-"], "output-asm-variant">, 6541 HelpText<"Select the asm variant index to use for output">; 6542def show_encoding : Flag<["-"], "show-encoding">, 6543 HelpText<"Show instruction encoding information in transliterate mode">; 6544def show_inst : Flag<["-"], "show-inst">, 6545 HelpText<"Show internal instruction representation in transliterate mode">; 6546 6547// Assemble Options 6548def dwarf_debug_producer : Separate<["-"], "dwarf-debug-producer">, 6549 HelpText<"The string to embed in the Dwarf debug AT_producer record.">; 6550 6551def defsym : Separate<["-"], "defsym">, 6552 HelpText<"Define a value for a symbol">; 6553 6554} // let Flags = [CC1AsOption] 6555 6556//===----------------------------------------------------------------------===// 6557// clang-cl Options 6558//===----------------------------------------------------------------------===// 6559 6560def cl_Group : OptionGroup<"<clang-cl options>">, Flags<[CLDXCOption]>, 6561 HelpText<"CL.EXE COMPATIBILITY OPTIONS">; 6562 6563def cl_compile_Group : OptionGroup<"<clang-cl compile-only options>">, 6564 Group<cl_Group>; 6565 6566def cl_ignored_Group : OptionGroup<"<clang-cl ignored options>">, 6567 Group<cl_Group>; 6568 6569class CLFlag<string name> : Option<["/", "-"], name, KIND_FLAG>, 6570 Group<cl_Group>, Flags<[CLOption, NoXarchOption]>; 6571 6572class CLDXCFlag<string name> : Option<["/", "-"], name, KIND_FLAG>, 6573 Group<cl_Group>, Flags<[CLDXCOption, NoXarchOption]>; 6574 6575class CLCompileFlag<string name> : Option<["/", "-"], name, KIND_FLAG>, 6576 Group<cl_compile_Group>, Flags<[CLOption, NoXarchOption]>; 6577 6578class CLIgnoredFlag<string name> : Option<["/", "-"], name, KIND_FLAG>, 6579 Group<cl_ignored_Group>, Flags<[CLOption, NoXarchOption]>; 6580 6581class CLJoined<string name> : Option<["/", "-"], name, KIND_JOINED>, 6582 Group<cl_Group>, Flags<[CLOption, NoXarchOption]>; 6583 6584class CLDXCJoined<string name> : Option<["/", "-"], name, KIND_JOINED>, 6585 Group<cl_Group>, Flags<[CLDXCOption, NoXarchOption]>; 6586 6587class CLCompileJoined<string name> : Option<["/", "-"], name, KIND_JOINED>, 6588 Group<cl_compile_Group>, Flags<[CLOption, NoXarchOption]>; 6589 6590class CLIgnoredJoined<string name> : Option<["/", "-"], name, KIND_JOINED>, 6591 Group<cl_ignored_Group>, Flags<[CLOption, NoXarchOption, HelpHidden]>; 6592 6593class CLJoinedOrSeparate<string name> : Option<["/", "-"], name, 6594 KIND_JOINED_OR_SEPARATE>, Group<cl_Group>, Flags<[CLOption, NoXarchOption]>; 6595 6596class CLDXCJoinedOrSeparate<string name> : Option<["/", "-"], name, 6597 KIND_JOINED_OR_SEPARATE>, Group<cl_Group>, Flags<[CLDXCOption, NoXarchOption]>; 6598 6599class CLCompileJoinedOrSeparate<string name> : Option<["/", "-"], name, 6600 KIND_JOINED_OR_SEPARATE>, Group<cl_compile_Group>, 6601 Flags<[CLOption, NoXarchOption]>; 6602 6603class CLRemainingArgsJoined<string name> : Option<["/", "-"], name, 6604 KIND_REMAINING_ARGS_JOINED>, Group<cl_Group>, Flags<[CLOption, NoXarchOption]>; 6605 6606// Aliases: 6607// (We don't put any of these in cl_compile_Group as the options they alias are 6608// already in the right group.) 6609 6610def _SLASH_Brepro : CLFlag<"Brepro">, 6611 HelpText<"Do not write current time into COFF output (breaks link.exe /incremental)">, 6612 Alias<mno_incremental_linker_compatible>; 6613def _SLASH_Brepro_ : CLFlag<"Brepro-">, 6614 HelpText<"Write current time into COFF output (default)">, 6615 Alias<mincremental_linker_compatible>; 6616def _SLASH_C : CLFlag<"C">, 6617 HelpText<"Do not discard comments when preprocessing">, Alias<C>; 6618def _SLASH_c : CLFlag<"c">, HelpText<"Compile only">, Alias<c>; 6619def _SLASH_d1PP : CLFlag<"d1PP">, 6620 HelpText<"Retain macro definitions in /E mode">, Alias<dD>; 6621def _SLASH_d1reportAllClassLayout : CLFlag<"d1reportAllClassLayout">, 6622 HelpText<"Dump record layout information">, 6623 Alias<Xclang>, AliasArgs<["-fdump-record-layouts"]>; 6624def _SLASH_diagnostics_caret : CLFlag<"diagnostics:caret">, 6625 HelpText<"Enable caret and column diagnostics (default)">; 6626def _SLASH_diagnostics_column : CLFlag<"diagnostics:column">, 6627 HelpText<"Disable caret diagnostics but keep column info">; 6628def _SLASH_diagnostics_classic : CLFlag<"diagnostics:classic">, 6629 HelpText<"Disable column and caret diagnostics">; 6630def _SLASH_D : CLJoinedOrSeparate<"D">, HelpText<"Define macro">, 6631 MetaVarName<"<macro[=value]>">, Alias<D>; 6632def _SLASH_E : CLFlag<"E">, HelpText<"Preprocess to stdout">, Alias<E>; 6633def _SLASH_external_COLON_I : CLJoinedOrSeparate<"external:I">, Alias<isystem>, 6634 HelpText<"Add directory to include search path with warnings suppressed">, 6635 MetaVarName<"<dir>">; 6636def _SLASH_fp_contract : CLFlag<"fp:contract">, HelpText<"">, Alias<ffp_contract>, AliasArgs<["on"]>; 6637def _SLASH_fp_except : CLFlag<"fp:except">, HelpText<"">, Alias<ffp_exception_behavior_EQ>, AliasArgs<["strict"]>; 6638def _SLASH_fp_except_ : CLFlag<"fp:except-">, HelpText<"">, Alias<ffp_exception_behavior_EQ>, AliasArgs<["ignore"]>; 6639def _SLASH_fp_fast : CLFlag<"fp:fast">, HelpText<"">, Alias<ffast_math>; 6640def _SLASH_fp_precise : CLFlag<"fp:precise">, HelpText<"">, Alias<ffp_model_EQ>, AliasArgs<["precise"]>; 6641def _SLASH_fp_strict : CLFlag<"fp:strict">, HelpText<"">, Alias<ffp_model_EQ>, AliasArgs<["strict"]>; 6642def _SLASH_fsanitize_EQ_address : CLFlag<"fsanitize=address">, 6643 HelpText<"Enable AddressSanitizer">, 6644 Alias<fsanitize_EQ>, AliasArgs<["address"]>; 6645def _SLASH_GA : CLFlag<"GA">, Alias<ftlsmodel_EQ>, AliasArgs<["local-exec"]>, 6646 HelpText<"Assume thread-local variables are defined in the executable">; 6647def _SLASH_GR : CLFlag<"GR">, HelpText<"Emit RTTI data (default)">; 6648def _SLASH_GR_ : CLFlag<"GR-">, HelpText<"Do not emit RTTI data">; 6649def _SLASH_GF : CLIgnoredFlag<"GF">, 6650 HelpText<"Enable string pooling (default)">; 6651def _SLASH_GF_ : CLFlag<"GF-">, HelpText<"Disable string pooling">, 6652 Alias<fwritable_strings>; 6653def _SLASH_GS : CLFlag<"GS">, 6654 HelpText<"Enable buffer security check (default)">; 6655def _SLASH_GS_ : CLFlag<"GS-">, HelpText<"Disable buffer security check">; 6656def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">, 6657 Alias<mstack_probe_size>, AliasArgs<["4096"]>; 6658def _SLASH_Gs : CLJoined<"Gs">, 6659 HelpText<"Set stack probe size (default 4096)">, Alias<mstack_probe_size>; 6660def _SLASH_Gy : CLFlag<"Gy">, HelpText<"Put each function in its own section">, 6661 Alias<ffunction_sections>; 6662def _SLASH_Gy_ : CLFlag<"Gy-">, 6663 HelpText<"Do not put each function in its own section (default)">, 6664 Alias<fno_function_sections>; 6665def _SLASH_Gw : CLFlag<"Gw">, HelpText<"Put each data item in its own section">, 6666 Alias<fdata_sections>; 6667def _SLASH_Gw_ : CLFlag<"Gw-">, 6668 HelpText<"Do not put each data item in its own section (default)">, 6669 Alias<fno_data_sections>; 6670def _SLASH_help : CLFlag<"help">, Alias<help>, 6671 HelpText<"Display available options">; 6672def _SLASH_HELP : CLFlag<"HELP">, Alias<help>; 6673def _SLASH_hotpatch : CLFlag<"hotpatch">, Alias<fms_hotpatch>, 6674 HelpText<"Create hotpatchable image">; 6675def _SLASH_I : CLDXCJoinedOrSeparate<"I">, 6676 HelpText<"Add directory to include search path">, MetaVarName<"<dir>">, 6677 Alias<I>; 6678def _SLASH_J : CLFlag<"J">, HelpText<"Make char type unsigned">, 6679 Alias<funsigned_char>; 6680 6681// The _SLASH_O option handles all the /O flags, but we also provide separate 6682// aliased options to provide separate help messages. 6683def _SLASH_O : CLDXCJoined<"O">, 6684 HelpText<"Set multiple /O flags at once; e.g. '/O2y-' for '/O2 /Oy-'">, 6685 MetaVarName<"<flags>">; 6686def : CLFlag<"O1">, Alias<_SLASH_O>, AliasArgs<["1"]>, 6687 HelpText<"Optimize for size (like /Og /Os /Oy /Ob2 /GF /Gy)">; 6688def : CLFlag<"O2">, Alias<_SLASH_O>, AliasArgs<["2"]>, 6689 HelpText<"Optimize for speed (like /Og /Oi /Ot /Oy /Ob2 /GF /Gy)">; 6690def : CLFlag<"Ob0">, Alias<_SLASH_O>, AliasArgs<["b0"]>, 6691 HelpText<"Disable function inlining">; 6692def : CLFlag<"Ob1">, Alias<_SLASH_O>, AliasArgs<["b1"]>, 6693 HelpText<"Only inline functions explicitly or implicitly marked inline">; 6694def : CLFlag<"Ob2">, Alias<_SLASH_O>, AliasArgs<["b2"]>, 6695 HelpText<"Inline functions as deemed beneficial by the compiler">; 6696def : CLDXCFlag<"Od">, Alias<_SLASH_O>, AliasArgs<["d"]>, 6697 HelpText<"Disable optimization">; 6698def : CLFlag<"Og">, Alias<_SLASH_O>, AliasArgs<["g"]>, 6699 HelpText<"No effect">; 6700def : CLFlag<"Oi">, Alias<_SLASH_O>, AliasArgs<["i"]>, 6701 HelpText<"Enable use of builtin functions">; 6702def : CLFlag<"Oi-">, Alias<_SLASH_O>, AliasArgs<["i-"]>, 6703 HelpText<"Disable use of builtin functions">; 6704def : CLFlag<"Os">, Alias<_SLASH_O>, AliasArgs<["s"]>, 6705 HelpText<"Optimize for size">; 6706def : CLFlag<"Ot">, Alias<_SLASH_O>, AliasArgs<["t"]>, 6707 HelpText<"Optimize for speed">; 6708def : CLFlag<"Ox">, Alias<_SLASH_O>, AliasArgs<["x"]>, 6709 HelpText<"Deprecated (like /Og /Oi /Ot /Oy /Ob2); use /O2">; 6710def : CLFlag<"Oy">, Alias<_SLASH_O>, AliasArgs<["y"]>, 6711 HelpText<"Enable frame pointer omission (x86 only)">; 6712def : CLFlag<"Oy-">, Alias<_SLASH_O>, AliasArgs<["y-"]>, 6713 HelpText<"Disable frame pointer omission (x86 only, default)">; 6714 6715def _SLASH_QUESTION : CLFlag<"?">, Alias<help>, 6716 HelpText<"Display available options">; 6717def _SLASH_Qvec : CLFlag<"Qvec">, 6718 HelpText<"Enable the loop vectorization passes">, Alias<fvectorize>; 6719def _SLASH_Qvec_ : CLFlag<"Qvec-">, 6720 HelpText<"Disable the loop vectorization passes">, Alias<fno_vectorize>; 6721def _SLASH_showIncludes : CLFlag<"showIncludes">, 6722 HelpText<"Print info about included files to stderr">; 6723def _SLASH_showIncludes_user : CLFlag<"showIncludes:user">, 6724 HelpText<"Like /showIncludes but omit system headers">; 6725def _SLASH_showFilenames : CLFlag<"showFilenames">, 6726 HelpText<"Print the name of each compiled file">; 6727def _SLASH_showFilenames_ : CLFlag<"showFilenames-">, 6728 HelpText<"Do not print the name of each compiled file (default)">; 6729def _SLASH_source_charset : CLCompileJoined<"source-charset:">, 6730 HelpText<"Set source encoding, supports only UTF-8">, 6731 Alias<finput_charset_EQ>; 6732def _SLASH_execution_charset : CLCompileJoined<"execution-charset:">, 6733 HelpText<"Set runtime encoding, supports only UTF-8">, 6734 Alias<fexec_charset_EQ>; 6735def _SLASH_std : CLCompileJoined<"std:">, 6736 HelpText<"Set language version (c++14,c++17,c++20,c++latest,c11,c17)">; 6737def _SLASH_U : CLJoinedOrSeparate<"U">, HelpText<"Undefine macro">, 6738 MetaVarName<"<macro>">, Alias<U>; 6739def _SLASH_validate_charset : CLFlag<"validate-charset">, 6740 Alias<W_Joined>, AliasArgs<["invalid-source-encoding"]>; 6741def _SLASH_validate_charset_ : CLFlag<"validate-charset-">, 6742 Alias<W_Joined>, AliasArgs<["no-invalid-source-encoding"]>; 6743def _SLASH_external_W0 : CLFlag<"external:W0">, HelpText<"Ignore warnings from system headers (default)">, Alias<Wno_system_headers>; 6744def _SLASH_external_W1 : CLFlag<"external:W1">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>; 6745def _SLASH_external_W2 : CLFlag<"external:W2">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>; 6746def _SLASH_external_W3 : CLFlag<"external:W3">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>; 6747def _SLASH_external_W4 : CLFlag<"external:W4">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>; 6748def _SLASH_W0 : CLFlag<"W0">, HelpText<"Disable all warnings">, Alias<w>; 6749def _SLASH_W1 : CLFlag<"W1">, HelpText<"Enable -Wall">, Alias<Wall>; 6750def _SLASH_W2 : CLFlag<"W2">, HelpText<"Enable -Wall">, Alias<Wall>; 6751def _SLASH_W3 : CLFlag<"W3">, HelpText<"Enable -Wall">, Alias<Wall>; 6752def _SLASH_W4 : CLFlag<"W4">, HelpText<"Enable -Wall and -Wextra">, Alias<WCL4>; 6753def _SLASH_Wall : CLFlag<"Wall">, HelpText<"Enable -Weverything">, 6754 Alias<W_Joined>, AliasArgs<["everything"]>; 6755def _SLASH_WX : CLFlag<"WX">, HelpText<"Treat warnings as errors">, 6756 Alias<W_Joined>, AliasArgs<["error"]>; 6757def _SLASH_WX_ : CLFlag<"WX-">, 6758 HelpText<"Do not treat warnings as errors (default)">, 6759 Alias<W_Joined>, AliasArgs<["no-error"]>; 6760def _SLASH_w_flag : CLFlag<"w">, HelpText<"Disable all warnings">, Alias<w>; 6761def _SLASH_wd : CLCompileJoined<"wd">; 6762def _SLASH_vd : CLJoined<"vd">, HelpText<"Control vtordisp placement">, 6763 Alias<vtordisp_mode_EQ>; 6764def _SLASH_X : CLFlag<"X">, 6765 HelpText<"Do not add %INCLUDE% to include search path">, Alias<nostdlibinc>; 6766def _SLASH_Zc_sizedDealloc : CLFlag<"Zc:sizedDealloc">, 6767 HelpText<"Enable C++14 sized global deallocation functions">, 6768 Alias<fsized_deallocation>; 6769def _SLASH_Zc_sizedDealloc_ : CLFlag<"Zc:sizedDealloc-">, 6770 HelpText<"Disable C++14 sized global deallocation functions">, 6771 Alias<fno_sized_deallocation>; 6772def _SLASH_Zc_alignedNew : CLFlag<"Zc:alignedNew">, 6773 HelpText<"Enable C++17 aligned allocation functions">, 6774 Alias<faligned_allocation>; 6775def _SLASH_Zc_alignedNew_ : CLFlag<"Zc:alignedNew-">, 6776 HelpText<"Disable C++17 aligned allocation functions">, 6777 Alias<fno_aligned_allocation>; 6778def _SLASH_Zc_char8_t : CLFlag<"Zc:char8_t">, 6779 HelpText<"Enable char8_t from C++2a">, 6780 Alias<fchar8__t>; 6781def _SLASH_Zc_char8_t_ : CLFlag<"Zc:char8_t-">, 6782 HelpText<"Disable char8_t from c++2a">, 6783 Alias<fno_char8__t>; 6784def _SLASH_Zc_strictStrings : CLFlag<"Zc:strictStrings">, 6785 HelpText<"Treat string literals as const">, Alias<W_Joined>, 6786 AliasArgs<["error=c++11-compat-deprecated-writable-strings"]>; 6787def _SLASH_Zc_threadSafeInit : CLFlag<"Zc:threadSafeInit">, 6788 HelpText<"Enable thread-safe initialization of static variables">, 6789 Alias<fthreadsafe_statics>; 6790def _SLASH_Zc_threadSafeInit_ : CLFlag<"Zc:threadSafeInit-">, 6791 HelpText<"Disable thread-safe initialization of static variables">, 6792 Alias<fno_threadsafe_statics>; 6793def _SLASH_Zc_trigraphs : CLFlag<"Zc:trigraphs">, 6794 HelpText<"Enable trigraphs">, Alias<ftrigraphs>; 6795def _SLASH_Zc_trigraphs_off : CLFlag<"Zc:trigraphs-">, 6796 HelpText<"Disable trigraphs (default)">, Alias<fno_trigraphs>; 6797def _SLASH_Zc_twoPhase : CLFlag<"Zc:twoPhase">, 6798 HelpText<"Enable two-phase name lookup in templates">, 6799 Alias<fno_delayed_template_parsing>; 6800def _SLASH_Zc_twoPhase_ : CLFlag<"Zc:twoPhase-">, 6801 HelpText<"Disable two-phase name lookup in templates (default)">, 6802 Alias<fdelayed_template_parsing>; 6803def _SLASH_Zc_wchar_t : CLFlag<"Zc:wchar_t">, 6804 HelpText<"Enable C++ builtin type wchar_t (default)">; 6805def _SLASH_Zc_wchar_t_ : CLFlag<"Zc:wchar_t-">, 6806 HelpText<"Disable C++ builtin type wchar_t">; 6807def _SLASH_Z7 : CLFlag<"Z7">, 6808 HelpText<"Enable CodeView debug information in object files">; 6809def _SLASH_ZH_MD5 : CLFlag<"ZH:MD5">, 6810 HelpText<"Use MD5 for file checksums in debug info (default)">, 6811 Alias<gsrc_hash_EQ>, AliasArgs<["md5"]>; 6812def _SLASH_ZH_SHA1 : CLFlag<"ZH:SHA1">, 6813 HelpText<"Use SHA1 for file checksums in debug info">, 6814 Alias<gsrc_hash_EQ>, AliasArgs<["sha1"]>; 6815def _SLASH_ZH_SHA_256 : CLFlag<"ZH:SHA_256">, 6816 HelpText<"Use SHA256 for file checksums in debug info">, 6817 Alias<gsrc_hash_EQ>, AliasArgs<["sha256"]>; 6818def _SLASH_Zi : CLFlag<"Zi">, Alias<_SLASH_Z7>, 6819 HelpText<"Like /Z7">; 6820def _SLASH_Zp : CLJoined<"Zp">, 6821 HelpText<"Set default maximum struct packing alignment">, 6822 Alias<fpack_struct_EQ>; 6823def _SLASH_Zp_flag : CLFlag<"Zp">, 6824 HelpText<"Set default maximum struct packing alignment to 1">, 6825 Alias<fpack_struct_EQ>, AliasArgs<["1"]>; 6826def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Run the preprocessor, parser and semantic analysis stages">, 6827 Alias<fsyntax_only>; 6828def _SLASH_openmp_ : CLFlag<"openmp-">, 6829 HelpText<"Disable OpenMP support">, Alias<fno_openmp>; 6830def _SLASH_openmp : CLFlag<"openmp">, HelpText<"Enable OpenMP support">, 6831 Alias<fopenmp>; 6832def _SLASH_openmp_experimental : CLFlag<"openmp:experimental">, 6833 HelpText<"Enable OpenMP support with experimental SIMD support">, 6834 Alias<fopenmp>; 6835def _SLASH_tune : CLCompileJoined<"tune:">, 6836 HelpText<"Set CPU for optimization without affecting instruction set">, 6837 Alias<mtune_EQ>; 6838def _SLASH_QIntel_jcc_erratum : CLFlag<"QIntel-jcc-erratum">, 6839 HelpText<"Align branches within 32-byte boundaries to mitigate the performance impact of the Intel JCC erratum.">, 6840 Alias<mbranches_within_32B_boundaries>; 6841def _SLASH_arm64EC : CLFlag<"arm64EC">, 6842 HelpText<"Set build target to arm64ec">; 6843 6844// Non-aliases: 6845 6846def _SLASH_arch : CLCompileJoined<"arch:">, 6847 HelpText<"Set architecture for code generation">; 6848 6849def _SLASH_M_Group : OptionGroup<"</M group>">, Group<cl_compile_Group>; 6850def _SLASH_volatile_Group : OptionGroup<"</volatile group>">, 6851 Group<cl_compile_Group>; 6852 6853def _SLASH_EH : CLJoined<"EH">, HelpText<"Set exception handling model">; 6854def _SLASH_EP : CLFlag<"EP">, 6855 HelpText<"Disable linemarker output and preprocess to stdout">; 6856def _SLASH_external_env : CLJoined<"external:env:">, 6857 HelpText<"Add dirs in env var <var> to include search path with warnings suppressed">, 6858 MetaVarName<"<var>">; 6859def _SLASH_FA : CLJoined<"FA">, 6860 HelpText<"Output assembly code file during compilation">; 6861def _SLASH_Fa : CLJoined<"Fa">, 6862 HelpText<"Set assembly output file name (with /FA)">, 6863 MetaVarName<"<file or dir/>">; 6864def _SLASH_FI : CLJoinedOrSeparate<"FI">, 6865 HelpText<"Include file before parsing">, Alias<include_>; 6866def _SLASH_Fe : CLJoined<"Fe">, 6867 HelpText<"Set output executable file name">, 6868 MetaVarName<"<file or dir/>">; 6869def _SLASH_Fe_COLON : CLJoined<"Fe:">, Alias<_SLASH_Fe>; 6870def _SLASH_Fi : CLCompileJoined<"Fi">, 6871 HelpText<"Set preprocess output file name (with /P)">, 6872 MetaVarName<"<file>">; 6873def _SLASH_Fo : CLCompileJoined<"Fo">, 6874 HelpText<"Set output object file (with /c)">, 6875 MetaVarName<"<file or dir/>">; 6876def _SLASH_guard : CLJoined<"guard:">, 6877 HelpText<"Enable Control Flow Guard with /guard:cf, or only the table with /guard:cf,nochecks. " 6878 "Enable EH Continuation Guard with /guard:ehcont">; 6879def _SLASH_GX : CLFlag<"GX">, 6880 HelpText<"Deprecated; use /EHsc">; 6881def _SLASH_GX_ : CLFlag<"GX-">, 6882 HelpText<"Deprecated (like not passing /EH)">; 6883def _SLASH_imsvc : CLJoinedOrSeparate<"imsvc">, 6884 HelpText<"Add <dir> to system include search path, as if in %INCLUDE%">, 6885 MetaVarName<"<dir>">; 6886def _SLASH_JMC : CLFlag<"JMC">, 6887 HelpText<"Enable just-my-code debugging">; 6888def _SLASH_JMC_ : CLFlag<"JMC-">, 6889 HelpText<"Disable just-my-code debugging (default)">; 6890def _SLASH_LD : CLFlag<"LD">, HelpText<"Create DLL">; 6891def _SLASH_LDd : CLFlag<"LDd">, HelpText<"Create debug DLL">; 6892def _SLASH_link : CLRemainingArgsJoined<"link">, 6893 HelpText<"Forward options to the linker">, MetaVarName<"<options>">; 6894def _SLASH_MD : Option<["/", "-"], "MD", KIND_FLAG>, Group<_SLASH_M_Group>, 6895 Flags<[CLOption, NoXarchOption]>, HelpText<"Use DLL run-time">; 6896def _SLASH_MDd : Option<["/", "-"], "MDd", KIND_FLAG>, Group<_SLASH_M_Group>, 6897 Flags<[CLOption, NoXarchOption]>, HelpText<"Use DLL debug run-time">; 6898def _SLASH_MT : Option<["/", "-"], "MT", KIND_FLAG>, Group<_SLASH_M_Group>, 6899 Flags<[CLOption, NoXarchOption]>, HelpText<"Use static run-time">; 6900def _SLASH_MTd : Option<["/", "-"], "MTd", KIND_FLAG>, Group<_SLASH_M_Group>, 6901 Flags<[CLOption, NoXarchOption]>, HelpText<"Use static debug run-time">; 6902def _SLASH_o : CLJoinedOrSeparate<"o">, 6903 HelpText<"Deprecated (set output file name); use /Fe or /Fe">, 6904 MetaVarName<"<file or dir/>">; 6905def _SLASH_P : CLFlag<"P">, HelpText<"Preprocess to file">; 6906def _SLASH_permissive : CLFlag<"permissive">, 6907 HelpText<"Enable some non conforming code to compile">; 6908def _SLASH_permissive_ : CLFlag<"permissive-">, 6909 HelpText<"Disable non conforming code from compiling (default)">; 6910def _SLASH_Tc : CLCompileJoinedOrSeparate<"Tc">, 6911 HelpText<"Treat <file> as C source file">, MetaVarName<"<file>">; 6912def _SLASH_TC : CLCompileFlag<"TC">, HelpText<"Treat all source files as C">; 6913def _SLASH_Tp : CLCompileJoinedOrSeparate<"Tp">, 6914 HelpText<"Treat <file> as C++ source file">, MetaVarName<"<file>">; 6915def _SLASH_TP : CLCompileFlag<"TP">, HelpText<"Treat all source files as C++">; 6916def _SLASH_diasdkdir : CLJoinedOrSeparate<"diasdkdir">, 6917 HelpText<"Path to the DIA SDK">, MetaVarName<"<dir>">; 6918def _SLASH_vctoolsdir : CLJoinedOrSeparate<"vctoolsdir">, 6919 HelpText<"Path to the VCToolChain">, MetaVarName<"<dir>">; 6920def _SLASH_vctoolsversion : CLJoinedOrSeparate<"vctoolsversion">, 6921 HelpText<"For use with /winsysroot, defaults to newest found">; 6922def _SLASH_winsdkdir : CLJoinedOrSeparate<"winsdkdir">, 6923 HelpText<"Path to the Windows SDK">, MetaVarName<"<dir>">; 6924def _SLASH_winsdkversion : CLJoinedOrSeparate<"winsdkversion">, 6925 HelpText<"Full version of the Windows SDK, defaults to newest found">; 6926def _SLASH_winsysroot : CLJoinedOrSeparate<"winsysroot">, 6927 HelpText<"Same as \"/diasdkdir <dir>/DIA SDK\" /vctoolsdir <dir>/VC/Tools/MSVC/<vctoolsversion> \"/winsdkdir <dir>/Windows Kits/10\"">, 6928 MetaVarName<"<dir>">; 6929def _SLASH_volatile_iso : Option<["/", "-"], "volatile:iso", KIND_FLAG>, 6930 Group<_SLASH_volatile_Group>, Flags<[CLOption, NoXarchOption]>, 6931 HelpText<"Volatile loads and stores have standard semantics">; 6932def _SLASH_vmb : CLFlag<"vmb">, 6933 HelpText<"Use a best-case representation method for member pointers">; 6934def _SLASH_vmg : CLFlag<"vmg">, 6935 HelpText<"Use a most-general representation for member pointers">; 6936def _SLASH_vms : CLFlag<"vms">, 6937 HelpText<"Set the default most-general representation to single inheritance">; 6938def _SLASH_vmm : CLFlag<"vmm">, 6939 HelpText<"Set the default most-general representation to " 6940 "multiple inheritance">; 6941def _SLASH_vmv : CLFlag<"vmv">, 6942 HelpText<"Set the default most-general representation to " 6943 "virtual inheritance">; 6944def _SLASH_volatile_ms : Option<["/", "-"], "volatile:ms", KIND_FLAG>, 6945 Group<_SLASH_volatile_Group>, Flags<[CLOption, NoXarchOption]>, 6946 HelpText<"Volatile loads and stores have acquire and release semantics">; 6947def _SLASH_clang : CLJoined<"clang:">, 6948 HelpText<"Pass <arg> to the clang driver">, MetaVarName<"<arg>">; 6949def _SLASH_Zl : CLFlag<"Zl">, Alias<fms_omit_default_lib>, 6950 HelpText<"Do not let object file auto-link default libraries">; 6951 6952def _SLASH_Yc : CLJoined<"Yc">, 6953 HelpText<"Generate a pch file for all code up to and including <filename>">, 6954 MetaVarName<"<filename>">; 6955def _SLASH_Yu : CLJoined<"Yu">, 6956 HelpText<"Load a pch file and use it instead of all code up to " 6957 "and including <filename>">, 6958 MetaVarName<"<filename>">; 6959def _SLASH_Y_ : CLFlag<"Y-">, 6960 HelpText<"Disable precompiled headers, overrides /Yc and /Yu">; 6961def _SLASH_Zc_dllexportInlines : CLFlag<"Zc:dllexportInlines">, 6962 HelpText<"dllexport/dllimport inline member functions of dllexport/import classes (default)">; 6963def _SLASH_Zc_dllexportInlines_ : CLFlag<"Zc:dllexportInlines-">, 6964 HelpText<"Do not dllexport/dllimport inline member functions of dllexport/import classes">; 6965def _SLASH_Fp : CLJoined<"Fp">, 6966 HelpText<"Set pch file name (with /Yc and /Yu)">, MetaVarName<"<file>">; 6967 6968def _SLASH_Gd : CLFlag<"Gd">, 6969 HelpText<"Set __cdecl as a default calling convention">; 6970def _SLASH_Gr : CLFlag<"Gr">, 6971 HelpText<"Set __fastcall as a default calling convention">; 6972def _SLASH_Gz : CLFlag<"Gz">, 6973 HelpText<"Set __stdcall as a default calling convention">; 6974def _SLASH_Gv : CLFlag<"Gv">, 6975 HelpText<"Set __vectorcall as a default calling convention">; 6976def _SLASH_Gregcall : CLFlag<"Gregcall">, 6977 HelpText<"Set __regcall as a default calling convention">; 6978 6979// Ignored: 6980 6981def _SLASH_analyze_ : CLIgnoredFlag<"analyze-">; 6982def _SLASH_bigobj : CLIgnoredFlag<"bigobj">; 6983def _SLASH_cgthreads : CLIgnoredJoined<"cgthreads">; 6984def _SLASH_d2FastFail : CLIgnoredFlag<"d2FastFail">; 6985def _SLASH_d2Zi_PLUS : CLIgnoredFlag<"d2Zi+">; 6986def _SLASH_errorReport : CLIgnoredJoined<"errorReport">; 6987def _SLASH_FC : CLIgnoredFlag<"FC">; 6988def _SLASH_Fd : CLIgnoredJoined<"Fd">; 6989def _SLASH_FS : CLIgnoredFlag<"FS">; 6990def _SLASH_kernel_ : CLIgnoredFlag<"kernel-">; 6991def _SLASH_nologo : CLIgnoredFlag<"nologo">; 6992def _SLASH_RTC : CLIgnoredJoined<"RTC">; 6993def _SLASH_sdl : CLIgnoredFlag<"sdl">; 6994def _SLASH_sdl_ : CLIgnoredFlag<"sdl-">; 6995def _SLASH_utf8 : CLIgnoredFlag<"utf-8">, 6996 HelpText<"Set source and runtime encoding to UTF-8 (default)">; 6997def _SLASH_w : CLIgnoredJoined<"w">; 6998def _SLASH_Wv_ : CLIgnoredJoined<"Wv">; 6999def _SLASH_Zc___cplusplus : CLIgnoredFlag<"Zc:__cplusplus">; 7000def _SLASH_Zc_auto : CLIgnoredFlag<"Zc:auto">; 7001def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">; 7002def _SLASH_Zc_inline : CLIgnoredFlag<"Zc:inline">; 7003def _SLASH_Zc_rvalueCast : CLIgnoredFlag<"Zc:rvalueCast">; 7004def _SLASH_Zc_ternary : CLIgnoredFlag<"Zc:ternary">; 7005def _SLASH_Zm : CLIgnoredJoined<"Zm">; 7006def _SLASH_Zo : CLIgnoredFlag<"Zo">; 7007def _SLASH_Zo_ : CLIgnoredFlag<"Zo-">; 7008 7009 7010// Unsupported: 7011 7012def _SLASH_await : CLFlag<"await">; 7013def _SLASH_await_COLON : CLJoined<"await:">; 7014def _SLASH_constexpr : CLJoined<"constexpr:">; 7015def _SLASH_AI : CLJoinedOrSeparate<"AI">; 7016def _SLASH_Bt : CLFlag<"Bt">; 7017def _SLASH_Bt_plus : CLFlag<"Bt+">; 7018def _SLASH_clr : CLJoined<"clr">; 7019def _SLASH_d1 : CLJoined<"d1">; 7020def _SLASH_d2 : CLJoined<"d2">; 7021def _SLASH_doc : CLJoined<"doc">; 7022def _SLASH_experimental : CLJoined<"experimental:">; 7023def _SLASH_exportHeader : CLFlag<"exportHeader">; 7024def _SLASH_external : CLJoined<"external:">; 7025def _SLASH_favor : CLJoined<"favor">; 7026def _SLASH_fsanitize_address_use_after_return : CLJoined<"fsanitize-address-use-after-return">; 7027def _SLASH_fno_sanitize_address_vcasan_lib : CLJoined<"fno-sanitize-address-vcasan-lib">; 7028def _SLASH_F : CLJoinedOrSeparate<"F">; 7029def _SLASH_Fm : CLJoined<"Fm">; 7030def _SLASH_Fr : CLJoined<"Fr">; 7031def _SLASH_FR : CLJoined<"FR">; 7032def _SLASH_FU : CLJoinedOrSeparate<"FU">; 7033def _SLASH_Fx : CLFlag<"Fx">; 7034def _SLASH_G1 : CLFlag<"G1">; 7035def _SLASH_G2 : CLFlag<"G2">; 7036def _SLASH_Ge : CLFlag<"Ge">; 7037def _SLASH_Gh : CLFlag<"Gh">; 7038def _SLASH_GH : CLFlag<"GH">; 7039def _SLASH_GL : CLFlag<"GL">; 7040def _SLASH_GL_ : CLFlag<"GL-">; 7041def _SLASH_Gm : CLFlag<"Gm">; 7042def _SLASH_Gm_ : CLFlag<"Gm-">; 7043def _SLASH_GT : CLFlag<"GT">; 7044def _SLASH_GZ : CLFlag<"GZ">; 7045def _SLASH_H : CLFlag<"H">; 7046def _SLASH_headername : CLJoined<"headerName:">; 7047def _SLASH_headerUnit : CLJoinedOrSeparate<"headerUnit">; 7048def _SLASH_headerUnitAngle : CLJoinedOrSeparate<"headerUnit:angle">; 7049def _SLASH_headerUnitQuote : CLJoinedOrSeparate<"headerUnit:quote">; 7050def _SLASH_homeparams : CLFlag<"homeparams">; 7051def _SLASH_kernel : CLFlag<"kernel">; 7052def _SLASH_LN : CLFlag<"LN">; 7053def _SLASH_MP : CLJoined<"MP">; 7054def _SLASH_Qfast_transcendentals : CLFlag<"Qfast_transcendentals">; 7055def _SLASH_QIfist : CLFlag<"QIfist">; 7056def _SLASH_Qimprecise_fwaits : CLFlag<"Qimprecise_fwaits">; 7057def _SLASH_Qpar : CLFlag<"Qpar">; 7058def _SLASH_Qpar_report : CLJoined<"Qpar-report">; 7059def _SLASH_Qsafe_fp_loads : CLFlag<"Qsafe_fp_loads">; 7060def _SLASH_Qspectre : CLFlag<"Qspectre">; 7061def _SLASH_Qspectre_load : CLFlag<"Qspectre-load">; 7062def _SLASH_Qspectre_load_cf : CLFlag<"Qspectre-load-cf">; 7063def _SLASH_Qvec_report : CLJoined<"Qvec-report">; 7064def _SLASH_reference : CLJoinedOrSeparate<"reference">; 7065def _SLASH_sourceDependencies : CLJoinedOrSeparate<"sourceDependencies">; 7066def _SLASH_sourceDependenciesDirectives : CLJoinedOrSeparate<"sourceDependencies:directives">; 7067def _SLASH_translateInclude : CLFlag<"translateInclude">; 7068def _SLASH_u : CLFlag<"u">; 7069def _SLASH_V : CLFlag<"V">; 7070def _SLASH_WL : CLFlag<"WL">; 7071def _SLASH_Wp64 : CLFlag<"Wp64">; 7072def _SLASH_Yd : CLFlag<"Yd">; 7073def _SLASH_Yl : CLJoined<"Yl">; 7074def _SLASH_Za : CLFlag<"Za">; 7075def _SLASH_Zc : CLJoined<"Zc:">; 7076def _SLASH_Ze : CLFlag<"Ze">; 7077def _SLASH_Zg : CLFlag<"Zg">; 7078def _SLASH_ZI : CLFlag<"ZI">; 7079def _SLASH_ZW : CLJoined<"ZW">; 7080 7081//===----------------------------------------------------------------------===// 7082// clang-dxc Options 7083//===----------------------------------------------------------------------===// 7084 7085def dxc_Group : OptionGroup<"<clang-dxc options>">, Flags<[DXCOption]>, 7086 HelpText<"dxc compatibility options">; 7087class DXCFlag<string name> : Option<["/", "-"], name, KIND_FLAG>, 7088 Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>; 7089class DXCJoinedOrSeparate<string name> : Option<["/", "-"], name, 7090 KIND_JOINED_OR_SEPARATE>, Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>; 7091 7092def dxc_help : Option<["/", "-", "--"], "help", KIND_JOINED>, 7093 Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>, Alias<help>, 7094 HelpText<"Display available options">; 7095def dxc_no_stdinc : DXCFlag<"hlsl-no-stdinc">, 7096 HelpText<"HLSL only. Disables all standard includes containing non-native compiler types and functions.">; 7097def Fo : DXCJoinedOrSeparate<"Fo">, Alias<o>, 7098 HelpText<"Output object file">; 7099def dxil_validator_version : Option<["/", "-"], "validator-version", KIND_SEPARATE>, 7100 Group<dxc_Group>, Flags<[DXCOption, NoXarchOption, CC1Option, HelpHidden]>, 7101 HelpText<"Override validator version for module. Format: <major.minor>;" 7102 "Default: DXIL.dll version or current internal version">, 7103 MarshallingInfoString<TargetOpts<"DxilValidatorVersion">>; 7104def target_profile : DXCJoinedOrSeparate<"T">, MetaVarName<"<profile>">, 7105 HelpText<"Set target profile">, 7106 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," 7107 "vs_6_0, vs_6_1, vs_6_2, vs_6_3, vs_6_4, vs_6_5, vs_6_6, vs_6_7," 7108 "gs_6_0, gs_6_1, gs_6_2, gs_6_3, gs_6_4, gs_6_5, gs_6_6, gs_6_7," 7109 "hs_6_0, hs_6_1, hs_6_2, hs_6_3, hs_6_4, hs_6_5, hs_6_6, hs_6_7," 7110 "ds_6_0, ds_6_1, ds_6_2, ds_6_3, ds_6_4, ds_6_5, ds_6_6, ds_6_7," 7111 "cs_6_0, cs_6_1, cs_6_2, cs_6_3, cs_6_4, cs_6_5, cs_6_6, cs_6_7," 7112 "lib_6_3, lib_6_4, lib_6_5, lib_6_6, lib_6_7, lib_6_x," 7113 "ms_6_5, ms_6_6, ms_6_7," 7114 "as_6_5, as_6_6, as_6_7">; 7115def dxc_D : Option<["--", "/", "-"], "D", KIND_JOINED_OR_SEPARATE>, 7116 Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>, Alias<D>; 7117def emit_pristine_llvm : DXCFlag<"emit-pristine-llvm">, 7118 HelpText<"Emit pristine LLVM IR from the frontend by not running any LLVM passes at all." 7119 "Same as -S + -emit-llvm + -disable-llvm-passes.">; 7120def fcgl : DXCFlag<"fcgl">, Alias<emit_pristine_llvm>; 7121def enable_16bit_types : DXCFlag<"enable-16bit-types">, Alias<fnative_half_type>, 7122 HelpText<"Enable 16-bit types and disable min precision types." 7123 "Available in HLSL 2018 and shader model 6.2.">; 7124def hlsl_entrypoint : Option<["-"], "hlsl-entry", KIND_SEPARATE>, 7125 Group<dxc_Group>, 7126 Flags<[CC1Option]>, 7127 MarshallingInfoString<TargetOpts<"HLSLEntry">, "\"main\"">, 7128 HelpText<"Entry point name for hlsl">; 7129def dxc_entrypoint : Option<["--", "/", "-"], "E", KIND_JOINED_OR_SEPARATE>, 7130 Group<dxc_Group>, 7131 Flags<[DXCOption, NoXarchOption]>, 7132 HelpText<"Entry point name">; 7133