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// When generating documentation, we expect there to be a GlobalDocumentation 17// def containing the program name that we are generating documentation for. 18// This object should only be used by things that are used in documentation, 19// such as the group descriptions. 20#ifndef GENERATING_DOCS 21// So that this file can still be parsed without such a def, define one if there 22// isn't one provided. 23def GlobalDocumentation { 24 // Sensible default in case of mistakes. 25 string Program = "Clang"; 26} 27#endif 28 29// Use this to generate program specific documentation, for example: 30// StringForProgram<"Control how %Program behaves.">.str 31class StringForProgram<string _str> { 32 string str = !subst("%Program", GlobalDocumentation.Program, _str); 33} 34 35///////// 36// Flags 37 38// The option is a "driver"-only option, and should not be forwarded to other 39// tools via `-Xarch` options. 40def NoXarchOption : OptionFlag; 41 42// LinkerInput - The option is a linker input. 43def LinkerInput : OptionFlag; 44 45// NoArgumentUnused - Don't report argument unused warnings for this option; this 46// is useful for options like -static or -dynamic which a user may always end up 47// passing, even if the platform defaults to (or only supports) that option. 48def NoArgumentUnused : OptionFlag; 49 50// Unsupported - The option is unsupported, and the driver will reject command 51// lines that use it. 52def Unsupported : OptionFlag; 53 54// Ignored - The option is unsupported, and the driver will silently ignore it. 55def Ignored : OptionFlag; 56 57// If an option affects linking, but has a primary group (so Link_Group cannot 58// be used), add this flag. 59def LinkOption : OptionFlag; 60 61// This is a target-specific option for compilation. Using it on an unsupported 62// target will lead to an err_drv_unsupported_opt_for_target error. 63def TargetSpecific : OptionFlag; 64 65// Indicates that this warning is ignored, but accepted with a warning for 66// GCC compatibility. 67class IgnoredGCCCompat : Flags<[HelpHidden]> {} 68 69class TargetSpecific : Flags<[TargetSpecific]> {} 70 71///////// 72// Visibility 73 74// We prefer the name "ClangOption" here rather than "Default" to make 75// it clear that these options will be visible in the clang driver (as 76// opposed to clang -cc1, the CL driver, or the flang driver). 77defvar ClangOption = DefaultVis; 78 79// CLOption - This is a cl.exe compatibility option. Options with this flag 80// are made available when the driver is running in CL compatibility mode. 81def CLOption : OptionVisibility; 82 83// CC1Option - This option should be accepted by clang -cc1. 84def CC1Option : OptionVisibility; 85 86// CC1AsOption - This option should be accepted by clang -cc1as. 87def CC1AsOption : OptionVisibility; 88 89// FlangOption - This is considered a "core" Flang option, available in 90// flang mode. 91def FlangOption : OptionVisibility; 92 93// FC1Option - This option should be accepted by flang -fc1. 94def FC1Option : OptionVisibility; 95 96// DXCOption - This is a dxc.exe compatibility option. Options with this flag 97// are made available when the driver is running in DXC compatibility mode. 98def DXCOption : OptionVisibility; 99 100///////// 101// Docs 102 103// A short name to show in documentation. The name will be interpreted as rST. 104class DocName<string name> { string DocName = name; } 105 106// A brief description to show in documentation, interpreted as rST. 107class DocBrief<code descr> { code DocBrief = descr; } 108 109// Indicates that this group should be flattened into its parent when generating 110// documentation. 111class DocFlatten { bit DocFlatten = 1; } 112 113///////// 114// Groups 115 116def Action_Group : OptionGroup<"<action group>">, DocName<"Actions">, 117 DocBrief<[{The action to perform on the input.}]>; 118 119// Meta-group for options which are only used for compilation, 120// and not linking etc. 121def CompileOnly_Group : OptionGroup<"<CompileOnly group>">, 122 DocName<"Compilation options">, 123 DocBrief<StringForProgram<[{ 124Flags controlling the behavior of %Program during compilation. These flags have 125no effect during actions that do not perform compilation.}]>.str>; 126 127def Preprocessor_Group : OptionGroup<"<Preprocessor group>">, 128 Group<CompileOnly_Group>, 129 DocName<"Preprocessor options">, 130 DocBrief<StringForProgram<[{ 131Flags controlling the behavior of the %Program preprocessor.}]>.str>; 132 133def IncludePath_Group : OptionGroup<"<I/i group>">, Group<Preprocessor_Group>, 134 DocName<"Include path management">, 135 DocBrief<[{ 136Flags controlling how ``#include``\s are resolved to files.}]>; 137 138def I_Group : OptionGroup<"<I group>">, Group<IncludePath_Group>, DocFlatten; 139def i_Group : OptionGroup<"<i group>">, Group<IncludePath_Group>, DocFlatten; 140def clang_i_Group : OptionGroup<"<clang i group>">, Group<i_Group>, DocFlatten; 141 142def M_Group : OptionGroup<"<M group>">, Group<Preprocessor_Group>, 143 DocName<"Dependency file generation">, DocBrief<[{ 144Flags controlling generation of a dependency file for ``make``-like build 145systems.}]>; 146 147def d_Group : OptionGroup<"<d group>">, Group<Preprocessor_Group>, 148 DocName<"Dumping preprocessor state">, DocBrief<[{ 149Flags allowing the state of the preprocessor to be dumped in various ways.}]>; 150 151def Diag_Group : OptionGroup<"<W/R group>">, Group<CompileOnly_Group>, 152 DocName<"Diagnostic options">, 153 DocBrief<!strconcat(StringForProgram< 154"Flags controlling which warnings, errors, and remarks %Program will generate. ">.str, 155 // When in clang link directly to the page. 156 !cond(!eq(GlobalDocumentation.Program, "Clang"): 157"See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.", 158 // When elsewhere the link will not work. 159 true: 160"See Clang's Diagnostic Reference for a full list of warning and remark flags."))>; 161 162def R_Group : OptionGroup<"<R group>">, Group<Diag_Group>, DocFlatten; 163def R_value_Group : OptionGroup<"<R (with value) group>">, Group<R_Group>, 164 DocFlatten; 165def W_Group : OptionGroup<"<W group>">, Group<Diag_Group>, DocFlatten; 166def W_value_Group : OptionGroup<"<W (with value) group>">, Group<W_Group>, 167 DocFlatten; 168 169def f_Group : OptionGroup<"<f group>">, Group<CompileOnly_Group>, 170 DocName<"Target-independent compilation options">; 171 172def f_clang_Group : OptionGroup<"<f (clang-only) group>">, 173 Group<CompileOnly_Group>, DocFlatten; 174def pedantic_Group : OptionGroup<"<pedantic group>">, Group<f_Group>, 175 DocFlatten; 176 177def offload_Group : OptionGroup<"<offload group>">, Group<f_Group>, 178 DocName<"Common Offloading options">, 179 Visibility<[ClangOption, CLOption]>; 180 181def opencl_Group : OptionGroup<"<opencl group>">, Group<f_Group>, 182 DocName<"OpenCL options">; 183 184def sycl_Group : OptionGroup<"<SYCL group>">, Group<f_Group>, 185 DocName<"SYCL options">; 186 187def cuda_Group : OptionGroup<"<CUDA group>">, Group<f_Group>, 188 DocName<"CUDA options">, 189 Visibility<[ClangOption, CLOption]>; 190 191def hip_Group : OptionGroup<"<HIP group>">, Group<f_Group>, 192 DocName<"HIP options">, 193 Visibility<[ClangOption, CLOption]>; 194 195def m_Group : OptionGroup<"<m group>">, Group<CompileOnly_Group>, 196 DocName<"Target-dependent compilation options">, 197 Visibility<[ClangOption, CLOption]>; 198 199def hlsl_Group : OptionGroup<"<HLSL group>">, Group<f_Group>, 200 DocName<"HLSL options">, 201 Visibility<[ClangOption]>; 202 203// Feature groups - these take command line options that correspond directly to 204// target specific features and can be translated directly from command line 205// options. 206def m_aarch64_Features_Group : OptionGroup<"<aarch64 features group>">, 207 Group<m_Group>, DocName<"AARCH64">; 208def m_amdgpu_Features_Group : OptionGroup<"<amdgpu features group>">, 209 Group<m_Group>, DocName<"AMDGPU">; 210def m_arm_Features_Group : OptionGroup<"<arm features group>">, 211 Group<m_Group>, DocName<"ARM">; 212def m_hexagon_Features_Group : OptionGroup<"<hexagon features group>">, 213 Group<m_Group>, DocName<"Hexagon">; 214def m_sparc_Features_Group : OptionGroup<"<sparc features group>">, 215 Group<m_Group>, DocName<"SPARC">; 216// The features added by this group will not be added to target features. 217// These are explicitly handled. 218def m_hexagon_Features_HVX_Group : OptionGroup<"<hexagon features group>">, 219 Group<m_Group>, DocName<"Hexagon">; 220def m_m68k_Features_Group: OptionGroup<"<m68k features group>">, 221 Group<m_Group>, DocName<"M68k">; 222def m_mips_Features_Group : OptionGroup<"<mips features group>">, 223 Group<m_Group>, DocName<"MIPS">; 224def m_ppc_Features_Group : OptionGroup<"<ppc features group>">, 225 Group<m_Group>, DocName<"PowerPC">; 226def m_wasm_Features_Group : OptionGroup<"<wasm features group>">, 227 Group<m_Group>, DocName<"WebAssembly">; 228// The features added by this group will not be added to target features. 229// These are explicitly handled. 230def m_wasm_Features_Driver_Group : OptionGroup<"<wasm driver features group>">, 231 Group<m_Group>, DocName<"WebAssembly Driver">; 232def m_x86_Features_Group : OptionGroup<"<x86 features group>">, 233 Group<m_Group>, Visibility<[ClangOption, CLOption]>, 234 DocName<"X86">; 235def m_x86_AVX10_Features_Group : OptionGroup<"<x86 AVX10 features group>">, 236 Group<m_Group>, Visibility<[ClangOption, CLOption]>, 237 DocName<"X86 AVX10">; 238def m_riscv_Features_Group : OptionGroup<"<riscv features group>">, 239 Group<m_Group>, DocName<"RISC-V">; 240def m_ve_Features_Group : OptionGroup<"<ve features group>">, 241 Group<m_Group>, DocName<"VE">; 242def m_loongarch_Features_Group : OptionGroup<"<loongarch features group>">, 243 Group<m_Group>, DocName<"LoongArch">; 244 245def m_libc_Group : OptionGroup<"<m libc group>">, Group<m_mips_Features_Group>, 246 Flags<[HelpHidden]>; 247 248def O_Group : OptionGroup<"<O group>">, Group<CompileOnly_Group>, 249 DocName<"Optimization level">, DocBrief<[{ 250Flags controlling how much optimization should be performed.}]>; 251 252def DebugInfo_Group : OptionGroup<"<g group>">, Group<CompileOnly_Group>, 253 DocName<"Debug information generation">, DocBrief<[{ 254Flags controlling how much and what kind of debug information should be 255generated.}]>; 256 257def g_Group : OptionGroup<"<g group>">, Group<DebugInfo_Group>, 258 DocName<"Kind and level of debug information">; 259def gN_Group : OptionGroup<"<gN group>">, Group<g_Group>, 260 DocName<"Debug level">; 261def ggdbN_Group : OptionGroup<"<ggdbN group>">, Group<gN_Group>, DocFlatten; 262def gTune_Group : OptionGroup<"<gTune group>">, Group<g_Group>, 263 DocName<"Debugger to tune debug information for">; 264def g_flags_Group : OptionGroup<"<g flags group>">, Group<DebugInfo_Group>, 265 DocName<"Debug information options">; 266 267def StaticAnalyzer_Group : OptionGroup<"<Static analyzer group>">, 268 DocName<"Static analyzer options">, DocBrief<[{ 269Flags controlling the behavior of the Clang Static Analyzer.}]>; 270 271// gfortran options that we recognize in the driver and pass along when 272// invoking GCC to compile Fortran code. 273def gfortran_Group : OptionGroup<"<gfortran group>">, 274 DocName<"Fortran compilation options">, DocBrief<[{ 275Flags that will be passed onto the ``gfortran`` compiler when Clang is given 276a Fortran input.}]>; 277 278def Link_Group : OptionGroup<"<T/e/s/t/u group>">, DocName<"Linker options">, 279 DocBrief<[{Flags that are passed on to the linker}]>; 280def T_Group : OptionGroup<"<T group>">, Group<Link_Group>, DocFlatten; 281def u_Group : OptionGroup<"<u group>">, Group<Link_Group>, DocFlatten; 282 283def reserved_lib_Group : OptionGroup<"<reserved libs group>">, 284 Flags<[Unsupported]>; 285 286// Temporary groups for clang options which we know we don't support, 287// but don't want to verbosely warn the user about. 288def clang_ignored_f_Group : OptionGroup<"<clang ignored f group>">, 289 Group<f_Group>, Flags<[Ignored]>; 290def clang_ignored_m_Group : OptionGroup<"<clang ignored m group>">, 291 Group<m_Group>, Flags<[Ignored]>; 292 293// Unsupported flang groups 294def flang_ignored_w_Group : OptionGroup<"<flang ignored W group>">, 295 Group<W_Group>, Flags<[Ignored]>, Visibility<[FlangOption]>; 296 297// Group for clang options in the process of deprecation. 298// Please include the version that deprecated the flag as comment to allow 299// easier garbage collection. 300def clang_ignored_legacy_options_Group : OptionGroup<"<clang legacy flags>">, 301 Group<f_Group>, Flags<[Ignored]>; 302 303def LongDouble_Group : OptionGroup<"<LongDouble group>">, Group<m_Group>, 304 DocName<"Long double options">, 305 DocBrief<[{Selects the long double implementation}]>; 306 307// Retired with clang-5.0 308def : Flag<["-"], "fslp-vectorize-aggressive">, Group<clang_ignored_legacy_options_Group>; 309def : Flag<["-"], "fno-slp-vectorize-aggressive">, Group<clang_ignored_legacy_options_Group>; 310 311// Retired with clang-10.0. Previously controlled X86 MPX ISA. 312def mmpx : Flag<["-"], "mmpx">, Group<clang_ignored_legacy_options_Group>; 313def mno_mpx : Flag<["-"], "mno-mpx">, Group<clang_ignored_legacy_options_Group>; 314 315// Group that ignores all gcc optimizations that won't be implemented 316def clang_ignored_gcc_optimization_f_Group : OptionGroup< 317 "<clang_ignored_gcc_optimization_f_Group>">, Group<f_Group>, Flags<[Ignored]>; 318 319class DiagnosticOpts<string base> 320 : KeyPathAndMacro<"DiagnosticOpts->", base, "DIAG_"> {} 321class LangOpts<string base> 322 : KeyPathAndMacro<"LangOpts->", base, "LANG_"> {} 323class TargetOpts<string base> 324 : KeyPathAndMacro<"TargetOpts->", base, "TARGET_"> {} 325class FrontendOpts<string base> 326 : KeyPathAndMacro<"FrontendOpts.", base, "FRONTEND_"> {} 327class PreprocessorOutputOpts<string base> 328 : KeyPathAndMacro<"PreprocessorOutputOpts.", base, "PREPROCESSOR_OUTPUT_"> {} 329class DependencyOutputOpts<string base> 330 : KeyPathAndMacro<"DependencyOutputOpts.", base, "DEPENDENCY_OUTPUT_"> {} 331class CodeGenOpts<string base> 332 : KeyPathAndMacro<"CodeGenOpts.", base, "CODEGEN_"> {} 333class HeaderSearchOpts<string base> 334 : KeyPathAndMacro<"HeaderSearchOpts->", base, "HEADER_SEARCH_"> {} 335class PreprocessorOpts<string base> 336 : KeyPathAndMacro<"PreprocessorOpts->", base, "PREPROCESSOR_"> {} 337class FileSystemOpts<string base> 338 : KeyPathAndMacro<"FileSystemOpts.", base, "FILE_SYSTEM_"> {} 339class AnalyzerOpts<string base> 340 : KeyPathAndMacro<"AnalyzerOpts->", base, "ANALYZER_"> {} 341class MigratorOpts<string base> 342 : KeyPathAndMacro<"MigratorOpts.", base, "MIGRATOR_"> {} 343 344// A boolean option which is opt-in in CC1. The positive option exists in CC1 and 345// Args.hasArg(OPT_ffoo) can be used to check that the flag is enabled. 346// This is useful if the option is usually disabled. 347// Use this only when the option cannot be declared via BoolFOption. 348multiclass OptInCC1FFlag<string name, string pos_prefix, string neg_prefix="", 349 string help="", 350 list<OptionVisibility> vis=[ClangOption]> { 351 def f#NAME : Flag<["-"], "f"#name>, Visibility<[CC1Option] # vis>, 352 Group<f_Group>, HelpText<pos_prefix # help>; 353 def fno_#NAME : Flag<["-"], "fno-"#name>, Visibility<vis>, 354 Group<f_Group>, HelpText<neg_prefix # help>; 355} 356 357// A boolean option which is opt-out in CC1. The negative option exists in CC1 and 358// Args.hasArg(OPT_fno_foo) can be used to check that the flag is disabled. 359// Use this only when the option cannot be declared via BoolFOption. 360multiclass OptOutCC1FFlag<string name, string pos_prefix, string neg_prefix, 361 string help="", 362 list<OptionVisibility> vis=[ClangOption]> { 363 def f#NAME : Flag<["-"], "f"#name>, Visibility<vis>, 364 Group<f_Group>, HelpText<pos_prefix # help>; 365 def fno_#NAME : Flag<["-"], "fno-"#name>, Visibility<[CC1Option] # vis>, 366 Group<f_Group>, HelpText<neg_prefix # help>; 367} 368 369// A boolean option which is opt-in in FC1. The positive option exists in FC1 and 370// Args.hasArg(OPT_ffoo) can be used to check that the flag is enabled. 371// This is useful if the option is usually disabled. 372multiclass OptInFC1FFlag<string name, string pos_prefix, string neg_prefix="", 373 string help="", 374 list<OptionVisibility> vis=[ClangOption]> { 375 def f#NAME : Flag<["-"], "f"#name>, Visibility<[FC1Option] # vis>, 376 Group<f_Group>, HelpText<pos_prefix # help>; 377 def fno_#NAME : Flag<["-"], "fno-"#name>, Visibility<vis>, 378 Group<f_Group>, HelpText<neg_prefix # help>; 379} 380 381// A boolean option which is opt-out in FC1. The negative option exists in FC1 and 382// Args.hasArg(OPT_fno_foo) can be used to check that the flag is disabled. 383multiclass OptOutFC1FFlag<string name, string pos_prefix, string neg_prefix, 384 string help="", 385 list<OptionVisibility> vis=[ClangOption]> { 386 def f#NAME : Flag<["-"], "f"#name>, Visibility<vis>, 387 Group<f_Group>, HelpText<pos_prefix # help>; 388 def fno_#NAME : Flag<["-"], "fno-"#name>, Visibility<[FC1Option] # vis>, 389 Group<f_Group>, HelpText<neg_prefix # help>; 390} 391 392// Creates a positive and negative flags where both of them are prefixed with 393// "m", have help text specified for positive and negative option, and a Group 394// optionally specified by the opt_group argument, otherwise Group<m_Group>. 395multiclass SimpleMFlag<string name, string pos_prefix, string neg_prefix, 396 string help, OptionGroup opt_group = m_Group> { 397 def m#NAME : Flag<["-"], "m"#name>, Group<opt_group>, 398 HelpText<pos_prefix # help>; 399 def mno_#NAME : Flag<["-"], "mno-"#name>, Group<opt_group>, 400 HelpText<neg_prefix # help>; 401} 402 403//===----------------------------------------------------------------------===// 404// BoolOption 405//===----------------------------------------------------------------------===// 406 407// The default value of a marshalled key path. 408class Default<code value> { code Value = value; } 409 410// Convenience variables for boolean defaults. 411def DefaultTrue : Default<"true"> {} 412def DefaultFalse : Default<"false"> {} 413 414// The value set to the key path when the flag is present on the command line. 415class Set<bit value> { bit Value = value; } 416def SetTrue : Set<true> {} 417def SetFalse : Set<false> {} 418 419// Definition of single command line flag. This is an implementation detail, use 420// SetTrueBy or SetFalseBy instead. 421class FlagDef<bit polarity, bit value, 422 list<OptionFlag> option_flags, list<OptionVisibility> option_vis, 423 string help, list<code> implied_by_expressions = []> { 424 // The polarity. Besides spelling, this also decides whether the TableGen 425 // record will be prefixed with "no_". 426 bit Polarity = polarity; 427 428 // The value assigned to key path when the flag is present on command line. 429 bit Value = value; 430 431 // OptionFlags in different tools. 432 list<OptionFlag> OptionFlags = option_flags; 433 434 // OptionVisibility flags for different tools. 435 list<OptionVisibility> OptionVisibility = option_vis; 436 437 // The help text associated with the flag. 438 string Help = help; 439 440 // List of expressions that, when true, imply this flag. 441 list<code> ImpliedBy = implied_by_expressions; 442} 443 444// Additional information to be appended to both positive and negative flag. 445class BothFlags<list<OptionFlag> option_flags, 446 list<OptionVisibility> option_vis = [ClangOption], 447 string help = ""> { 448 list<OptionFlag> OptionFlags = option_flags; 449 list<OptionVisibility> OptionVisibility = option_vis; 450 string Help = help; 451} 452 453// Functor that appends the suffix to the base flag definition. 454class ApplySuffix<FlagDef flag, BothFlags suffix> { 455 FlagDef Result 456 = FlagDef<flag.Polarity, flag.Value, 457 flag.OptionFlags # suffix.OptionFlags, 458 flag.OptionVisibility # suffix.OptionVisibility, 459 flag.Help # suffix.Help, flag.ImpliedBy>; 460} 461 462// Definition of the command line flag with positive spelling, e.g. "-ffoo". 463class PosFlag<Set value, 464 list<OptionFlag> flags = [], list<OptionVisibility> vis = [], 465 string help = "", list<code> implied_by_expressions = []> 466 : FlagDef<true, value.Value, flags, vis, help, implied_by_expressions> {} 467 468// Definition of the command line flag with negative spelling, e.g. "-fno-foo". 469class NegFlag<Set value, 470 list<OptionFlag> flags = [], list<OptionVisibility> vis = [], 471 string help = "", list<code> implied_by_expressions = []> 472 : FlagDef<false, value.Value, flags, vis, help, implied_by_expressions> {} 473 474// Expanded FlagDef that's convenient for creation of TableGen records. 475class FlagDefExpanded<FlagDef flag, string prefix, string name, string spelling> 476 : FlagDef<flag.Polarity, flag.Value, flag.OptionFlags, flag.OptionVisibility, 477 flag.Help, flag.ImpliedBy> { 478 // Name of the TableGen record. 479 string RecordName = prefix # !if(flag.Polarity, "", "no_") # name; 480 481 // Spelling of the flag. 482 string Spelling = prefix # !if(flag.Polarity, "", "no-") # spelling; 483 484 // Can the flag be implied by another flag? 485 bit CanBeImplied = !not(!empty(flag.ImpliedBy)); 486 487 // C++ code that will be assigned to the keypath when the flag is present. 488 code ValueAsCode = !if(flag.Value, "true", "false"); 489} 490 491// TableGen record for a single marshalled flag. 492class MarshalledFlagRec<FlagDefExpanded flag, FlagDefExpanded other, 493 FlagDefExpanded implied, KeyPathAndMacro kpm, 494 Default default> 495 : Flag<["-"], flag.Spelling>, Flags<flag.OptionFlags>, 496 Visibility<flag.OptionVisibility>, HelpText<flag.Help>, 497 MarshallingInfoBooleanFlag<kpm, default.Value, flag.ValueAsCode, 498 other.ValueAsCode, other.RecordName>, 499 ImpliedByAnyOf<implied.ImpliedBy, implied.ValueAsCode> {} 500 501// Generates TableGen records for two command line flags that control the same 502// key path via the marshalling infrastructure. 503// Names of the records consist of the specified prefix, "no_" for the negative 504// flag, and NAME. 505// Used for -cc1 frontend options. Driver-only options do not map to 506// CompilerInvocation. 507multiclass BoolOption<string prefix = "", string spelling_base, 508 KeyPathAndMacro kpm, Default default, 509 FlagDef flag1_base, FlagDef flag2_base, 510 BothFlags suffix = BothFlags<[]>> { 511 defvar flag1 = FlagDefExpanded<ApplySuffix<flag1_base, suffix>.Result, prefix, 512 NAME, spelling_base>; 513 514 defvar flag2 = FlagDefExpanded<ApplySuffix<flag2_base, suffix>.Result, prefix, 515 NAME, spelling_base>; 516 517 // The flags must have different polarity, different values, and only 518 // one can be implied. 519 assert !xor(flag1.Polarity, flag2.Polarity), 520 "the flags must have different polarity: flag1: " # 521 flag1.Polarity # ", flag2: " # flag2.Polarity; 522 assert !ne(flag1.Value, flag2.Value), 523 "the flags must have different values: flag1: " # 524 flag1.Value # ", flag2: " # flag2.Value; 525 assert !not(!and(flag1.CanBeImplied, flag2.CanBeImplied)), 526 "only one of the flags can be implied: flag1: " # 527 flag1.CanBeImplied # ", flag2: " # flag2.CanBeImplied; 528 529 defvar implied = !if(flag1.CanBeImplied, flag1, flag2); 530 531 def flag1.RecordName : MarshalledFlagRec<flag1, flag2, implied, kpm, default>; 532 def flag2.RecordName : MarshalledFlagRec<flag2, flag1, implied, kpm, default>; 533} 534 535/// Creates a BoolOption where both of the flags are prefixed with "f", are in 536/// the Group<f_Group>. 537/// Used for -cc1 frontend options. Driver-only options do not map to 538/// CompilerInvocation. 539multiclass BoolFOption<string flag_base, KeyPathAndMacro kpm, 540 Default default, FlagDef flag1, FlagDef flag2, 541 BothFlags both = BothFlags<[]>> { 542 defm NAME : BoolOption<"f", flag_base, kpm, default, flag1, flag2, both>, 543 Group<f_Group>; 544} 545 546// Creates a BoolOption where both of the flags are prefixed with "g" and have 547// the Group<g_Group>. 548// Used for -cc1 frontend options. Driver-only options do not map to 549// CompilerInvocation. 550multiclass BoolGOption<string flag_base, KeyPathAndMacro kpm, 551 Default default, FlagDef flag1, FlagDef flag2, 552 BothFlags both = BothFlags<[]>> { 553 defm NAME : BoolOption<"g", flag_base, kpm, default, flag1, flag2, both>, 554 Group<g_Group>; 555} 556 557multiclass BoolMOption<string flag_base, KeyPathAndMacro kpm, 558 Default default, FlagDef flag1, FlagDef flag2, 559 BothFlags both = BothFlags<[]>> { 560 defm NAME : BoolOption<"m", flag_base, kpm, default, flag1, flag2, both>, 561 Group<m_Group>; 562} 563 564/// Creates a BoolOption where both of the flags are prefixed with "W", are in 565/// the Group<W_Group>. 566/// Used for -cc1 frontend options. Driver-only options do not map to 567/// CompilerInvocation. 568multiclass BoolWOption<string flag_base, KeyPathAndMacro kpm, 569 Default default, FlagDef flag1, FlagDef flag2, 570 BothFlags both = BothFlags<[]>> { 571 defm NAME : BoolOption<"W", flag_base, kpm, default, flag1, flag2, both>, 572 Group<W_Group>; 573} 574 575// Works like BoolOption except without marshalling 576multiclass BoolOptionWithoutMarshalling<string prefix = "", string spelling_base, 577 FlagDef flag1_base, FlagDef flag2_base, 578 BothFlags suffix = BothFlags<[]>> { 579 defvar flag1 = FlagDefExpanded<ApplySuffix<flag1_base, suffix>.Result, prefix, 580 NAME, spelling_base>; 581 582 defvar flag2 = FlagDefExpanded<ApplySuffix<flag2_base, suffix>.Result, prefix, 583 NAME, spelling_base>; 584 585 // The flags must have different polarity, different values, and only 586 // one can be implied. 587 assert !xor(flag1.Polarity, flag2.Polarity), 588 "the flags must have different polarity: flag1: " # 589 flag1.Polarity # ", flag2: " # flag2.Polarity; 590 assert !ne(flag1.Value, flag2.Value), 591 "the flags must have different values: flag1: " # 592 flag1.Value # ", flag2: " # flag2.Value; 593 assert !not(!and(flag1.CanBeImplied, flag2.CanBeImplied)), 594 "only one of the flags can be implied: flag1: " # 595 flag1.CanBeImplied # ", flag2: " # flag2.CanBeImplied; 596 597 defvar implied = !if(flag1.CanBeImplied, flag1, flag2); 598 599 def flag1.RecordName : Flag<["-"], flag1.Spelling>, Flags<flag1.OptionFlags>, 600 Visibility<flag1.OptionVisibility>, 601 HelpText<flag1.Help>, 602 ImpliedByAnyOf<implied.ImpliedBy, implied.ValueAsCode> 603 {} 604 def flag2.RecordName : Flag<["-"], flag2.Spelling>, Flags<flag2.OptionFlags>, 605 Visibility<flag2.OptionVisibility>, 606 HelpText<flag2.Help>, 607 ImpliedByAnyOf<implied.ImpliedBy, implied.ValueAsCode> 608 {} 609} 610 611// FIXME: Diagnose if target does not support protected visibility. 612class MarshallingInfoVisibility<KeyPathAndMacro kpm, code default> 613 : MarshallingInfoEnum<kpm, default>, 614 Values<"default,hidden,internal,protected">, 615 NormalizedValues<["DefaultVisibility", "HiddenVisibility", 616 "HiddenVisibility", "ProtectedVisibility"]> {} 617 618// Key paths that are constant during parsing of options with the same key path prefix. 619defvar cplusplus = LangOpts<"CPlusPlus">; 620defvar cpp11 = LangOpts<"CPlusPlus11">; 621defvar cpp14 = LangOpts<"CPlusPlus14">; 622defvar cpp17 = LangOpts<"CPlusPlus17">; 623defvar cpp20 = LangOpts<"CPlusPlus20">; 624defvar cpp23 = LangOpts<"CPlusPlus23">; 625defvar c99 = LangOpts<"C99">; 626defvar c23 = LangOpts<"C23">; 627defvar lang_std = LangOpts<"LangStd">; 628defvar open_cl = LangOpts<"OpenCL">; 629defvar cuda = LangOpts<"CUDA">; 630defvar render_script = LangOpts<"RenderScript">; 631defvar hip = LangOpts<"HIP">; 632defvar gnu_mode = LangOpts<"GNUMode">; 633defvar asm_preprocessor = LangOpts<"AsmPreprocessor">; 634defvar hlsl = LangOpts<"HLSL">; 635 636defvar std = !strconcat("LangStandard::getLangStandardForKind(", lang_std.KeyPath, ")"); 637 638///////// 639// Options 640 641// The internal option ID must be a valid C++ identifier and results in a 642// clang::driver::options::OPT_XX enum constant for XX. 643// 644// We want to unambiguously be able to refer to options from the driver source 645// code, for this reason the option name is mangled into an ID. This mangling 646// isn't guaranteed to have an inverse, but for practical purposes it does. 647// 648// The mangling scheme is to ignore the leading '-', and perform the following 649// substitutions: 650// _ => __ 651// - => _ 652// / => _SLASH 653// # => _HASH 654// ? => _QUESTION 655// , => _COMMA 656// = => _EQ 657// C++ => CXX 658// . => _ 659 660// Developer Driver Options 661 662def internal_Group : OptionGroup<"<clang internal options>">, 663 Flags<[HelpHidden]>; 664def internal_driver_Group : OptionGroup<"<clang driver internal options>">, 665 Group<internal_Group>, HelpText<"DRIVER OPTIONS">; 666def internal_debug_Group : 667 OptionGroup<"<clang debug/development internal options>">, 668 Group<internal_Group>, HelpText<"DEBUG/DEVELOPMENT OPTIONS">; 669 670class InternalDriverOpt : Group<internal_driver_Group>, 671 Flags<[NoXarchOption, HelpHidden]>; 672def driver_mode : Joined<["--"], "driver-mode=">, Group<internal_driver_Group>, 673 Flags<[NoXarchOption, HelpHidden]>, 674 Visibility<[ClangOption, FlangOption, CLOption, DXCOption]>, 675 HelpText<"Set the driver mode to either 'gcc', 'g++', 'cpp', 'cl' or 'flang'">; 676def rsp_quoting : Joined<["--"], "rsp-quoting=">, Group<internal_driver_Group>, 677 Flags<[NoXarchOption, HelpHidden]>, 678 Visibility<[ClangOption, CLOption, DXCOption]>, 679 HelpText<"Set the rsp quoting to either 'posix', or 'windows'">; 680def ccc_gcc_name : Separate<["-"], "ccc-gcc-name">, InternalDriverOpt, 681 HelpText<"Name for native GCC compiler">, 682 MetaVarName<"<gcc-path>">; 683 684class InternalDebugOpt : Group<internal_debug_Group>, 685 Flags<[NoXarchOption, HelpHidden]>, 686 Visibility<[ClangOption, CLOption, DXCOption]>; 687def ccc_install_dir : Separate<["-"], "ccc-install-dir">, InternalDebugOpt, 688 HelpText<"Simulate installation in the given directory">; 689def ccc_print_phases : Flag<["-"], "ccc-print-phases">, 690 Flags<[NoXarchOption, HelpHidden]>, Visibility<[ClangOption, CLOption, DXCOption, 691 FlangOption]>, 692 HelpText<"Dump list of actions to perform">; 693def ccc_print_bindings : Flag<["-"], "ccc-print-bindings">, InternalDebugOpt, 694 HelpText<"Show bindings of tools to actions">; 695 696def ccc_arcmt_check : Flag<["-"], "ccc-arcmt-check">, InternalDriverOpt, 697 HelpText<"Check for ARC migration issues that need manual handling">; 698def ccc_arcmt_modify : Flag<["-"], "ccc-arcmt-modify">, InternalDriverOpt, 699 HelpText<"Apply modifications to files to conform to ARC">; 700def ccc_arcmt_migrate : Separate<["-"], "ccc-arcmt-migrate">, InternalDriverOpt, 701 HelpText<"Apply modifications and produces temporary files that conform to ARC">; 702def arcmt_migrate_report_output : Separate<["-"], "arcmt-migrate-report-output">, 703 HelpText<"Output path for the plist report">, 704 Visibility<[ClangOption, CC1Option]>, 705 MarshallingInfoString<FrontendOpts<"ARCMTMigrateReportOut">>; 706def arcmt_migrate_emit_arc_errors : Flag<["-"], "arcmt-migrate-emit-errors">, 707 HelpText<"Emit ARC errors even if the migrator can fix them">, 708 Visibility<[ClangOption, CC1Option]>, 709 MarshallingInfoFlag<FrontendOpts<"ARCMTMigrateEmitARCErrors">>; 710def gen_reproducer_eq: Joined<["-"], "gen-reproducer=">, 711 Flags<[NoArgumentUnused]>, Visibility<[ClangOption, CLOption, DXCOption]>, 712 HelpText<"Emit reproducer on (option: off, crash (default), error, always)">; 713def gen_reproducer: Flag<["-"], "gen-reproducer">, InternalDebugOpt, 714 Alias<gen_reproducer_eq>, AliasArgs<["always"]>, 715 HelpText<"Auto-generates preprocessed source files and a reproduction script">; 716def gen_cdb_fragment_path: Separate<["-"], "gen-cdb-fragment-path">, InternalDebugOpt, 717 HelpText<"Emit a compilation database fragment to the specified directory">; 718 719def round_trip_args : Flag<["-"], "round-trip-args">, Visibility<[CC1Option]>, 720 HelpText<"Enable command line arguments round-trip.">; 721def no_round_trip_args : Flag<["-"], "no-round-trip-args">, 722 Visibility<[CC1Option]>, 723 HelpText<"Disable command line arguments round-trip.">; 724 725def _migrate : Flag<["--"], "migrate">, Flags<[NoXarchOption]>, 726 HelpText<"Run the migrator">; 727def ccc_objcmt_migrate : Separate<["-"], "ccc-objcmt-migrate">, 728 InternalDriverOpt, 729 HelpText<"Apply modifications and produces temporary files to migrate to " 730 "modern ObjC syntax">; 731 732def objcmt_migrate_literals : Flag<["-"], "objcmt-migrate-literals">, 733 Visibility<[ClangOption, CC1Option]>, 734 HelpText<"Enable migration to modern ObjC literals">, 735 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Literals">; 736def objcmt_migrate_subscripting : Flag<["-"], "objcmt-migrate-subscripting">, 737 Visibility<[ClangOption, CC1Option]>, 738 HelpText<"Enable migration to modern ObjC subscripting">, 739 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Subscripting">; 740def objcmt_migrate_property : Flag<["-"], "objcmt-migrate-property">, 741 Visibility<[ClangOption, CC1Option]>, 742 HelpText<"Enable migration to modern ObjC property">, 743 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Property">; 744def objcmt_migrate_all : Flag<["-"], "objcmt-migrate-all">, 745 Visibility<[ClangOption, CC1Option]>, 746 HelpText<"Enable migration to modern ObjC">, 747 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_MigrateDecls">; 748def objcmt_migrate_readonly_property : Flag<["-"], "objcmt-migrate-readonly-property">, 749 Visibility<[ClangOption, CC1Option]>, 750 HelpText<"Enable migration to modern ObjC readonly property">, 751 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ReadonlyProperty">; 752def objcmt_migrate_readwrite_property : Flag<["-"], "objcmt-migrate-readwrite-property">, 753 Visibility<[ClangOption, CC1Option]>, 754 HelpText<"Enable migration to modern ObjC readwrite property">, 755 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ReadwriteProperty">; 756def objcmt_migrate_property_dot_syntax : Flag<["-"], "objcmt-migrate-property-dot-syntax">, 757 Visibility<[ClangOption, CC1Option]>, 758 HelpText<"Enable migration of setter/getter messages to property-dot syntax">, 759 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_PropertyDotSyntax">; 760def objcmt_migrate_annotation : Flag<["-"], "objcmt-migrate-annotation">, 761 Visibility<[ClangOption, CC1Option]>, 762 HelpText<"Enable migration to property and method annotations">, 763 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Annotation">; 764def objcmt_migrate_instancetype : Flag<["-"], "objcmt-migrate-instancetype">, 765 Visibility<[ClangOption, CC1Option]>, 766 HelpText<"Enable migration to infer instancetype for method result type">, 767 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Instancetype">; 768def objcmt_migrate_nsmacros : Flag<["-"], "objcmt-migrate-ns-macros">, 769 Visibility<[ClangOption, CC1Option]>, 770 HelpText<"Enable migration to NS_ENUM/NS_OPTIONS macros">, 771 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_NsMacros">; 772def objcmt_migrate_protocol_conformance : Flag<["-"], "objcmt-migrate-protocol-conformance">, 773 Visibility<[ClangOption, CC1Option]>, 774 HelpText<"Enable migration to add protocol conformance on classes">, 775 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ProtocolConformance">; 776def objcmt_atomic_property : Flag<["-"], "objcmt-atomic-property">, 777 Visibility<[ClangOption, CC1Option]>, 778 HelpText<"Make migration to 'atomic' properties">, 779 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_AtomicProperty">; 780def objcmt_returns_innerpointer_property : Flag<["-"], "objcmt-returns-innerpointer-property">, 781 Visibility<[ClangOption, CC1Option]>, 782 HelpText<"Enable migration to annotate property with NS_RETURNS_INNER_POINTER">, 783 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ReturnsInnerPointerProperty">; 784def objcmt_ns_nonatomic_iosonly: Flag<["-"], "objcmt-ns-nonatomic-iosonly">, 785 Visibility<[ClangOption, CC1Option]>, 786 HelpText<"Enable migration to use NS_NONATOMIC_IOSONLY macro for setting property's 'atomic' attribute">, 787 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_NsAtomicIOSOnlyProperty">; 788def objcmt_migrate_designated_init : Flag<["-"], "objcmt-migrate-designated-init">, 789 Visibility<[ClangOption, CC1Option]>, 790 HelpText<"Enable migration to infer NS_DESIGNATED_INITIALIZER for initializer methods">, 791 MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_DesignatedInitializer">; 792 793def objcmt_allowlist_dir_path: Joined<["-"], "objcmt-allowlist-dir-path=">, 794 Visibility<[ClangOption, CC1Option]>, 795 HelpText<"Only modify files with a filename contained in the provided directory path">, 796 MarshallingInfoString<FrontendOpts<"ObjCMTAllowListPath">>; 797def : Joined<["-"], "objcmt-whitelist-dir-path=">, 798 Visibility<[ClangOption, CC1Option]>, 799 HelpText<"Alias for -objcmt-allowlist-dir-path">, 800 Alias<objcmt_allowlist_dir_path>; 801// The misspelt "white-list" [sic] alias is due for removal. 802def : Joined<["-"], "objcmt-white-list-dir-path=">, 803 Visibility<[ClangOption, CC1Option]>, 804 Alias<objcmt_allowlist_dir_path>; 805 806// Make sure all other -ccc- options are rejected. 807def ccc_ : Joined<["-"], "ccc-">, Group<internal_Group>, Flags<[Unsupported]>; 808 809// Standard Options 810 811def _HASH_HASH_HASH : Flag<["-"], "###">, Flags<[NoXarchOption]>, 812 Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, 813 HelpText<"Print (but do not run) the commands to run for this compilation">; 814def _DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>, 815 Flags<[NoXarchOption]>, Visibility<[ClangOption, CLOption, DXCOption]>; 816def A : JoinedOrSeparate<["-"], "A">, Flags<[RenderJoined]>, 817 Group<gfortran_Group>; 818def B : JoinedOrSeparate<["-"], "B">, MetaVarName<"<prefix>">, 819 HelpText<"Search $prefix$file for executables, libraries, and data files. " 820 "If $prefix is a directory, search $prefix/$file">; 821def gcc_install_dir_EQ : Joined<["--"], "gcc-install-dir=">, 822 Visibility<[ClangOption, FlangOption]>, 823 HelpText<"Use GCC installation in the specified directory. The directory ends with path components like 'lib{,32,64}/gcc{,-cross}/$triple/$version'. " 824 "Note: executables (e.g. ld) used by the compiler are not overridden by the selected GCC installation">; 825def gcc_toolchain : Joined<["--"], "gcc-toolchain=">, Flags<[NoXarchOption]>, 826 Visibility<[ClangOption, FlangOption]>, 827 HelpText< 828 "Specify a directory where Clang can find 'include' and 'lib{,32,64}/gcc{,-cross}/$triple/$version'. " 829 "Clang will use the GCC installation with the largest version">, 830 HelpTextForVariants<[FlangOption], 831 "Specify a directory where Flang can find 'lib{,32,64}/gcc{,-cross}/$triple/$version'. " 832 "Flang will use the GCC installation with the largest version">; 833def gcc_triple_EQ : Joined<["--"], "gcc-triple=">, 834 HelpText<"Search for the GCC installation with the specified triple.">; 835def CC : Flag<["-"], "CC">, Visibility<[ClangOption, CC1Option]>, 836 Group<Preprocessor_Group>, 837 HelpText<"Include comments from within macros in preprocessed output">, 838 MarshallingInfoFlag<PreprocessorOutputOpts<"ShowMacroComments">>; 839def C : Flag<["-"], "C">, Visibility<[ClangOption, CC1Option]>, 840 Group<Preprocessor_Group>, 841 HelpText<"Include comments in preprocessed output">, 842 MarshallingInfoFlag<PreprocessorOutputOpts<"ShowComments">>; 843def D : JoinedOrSeparate<["-"], "D">, Group<Preprocessor_Group>, 844 Visibility<[ClangOption, CC1Option, FlangOption, FC1Option, DXCOption]>, 845 MetaVarName<"<macro>=<value>">, 846 HelpText<"Define <macro> to <value> (or 1 if <value> omitted)">; 847def E : Flag<["-"], "E">, Flags<[NoXarchOption]>, 848 Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, 849 Group<Action_Group>, 850 HelpText<"Only run the preprocessor">; 851def F : JoinedOrSeparate<["-"], "F">, Flags<[RenderJoined]>, 852 Visibility<[ClangOption, CC1Option]>, 853 HelpText<"Add directory to framework include search path">; 854def G : JoinedOrSeparate<["-"], "G">, Flags<[NoXarchOption, TargetSpecific]>, 855 Group<m_Group>, 856 MetaVarName<"<size>">, HelpText<"Put objects of at most <size> bytes " 857 "into small data section (MIPS / Hexagon)">; 858def G_EQ : Joined<["-"], "G=">, Flags<[NoXarchOption]>, 859 Group<m_Group>, Alias<G>; 860def H : Flag<["-"], "H">, Visibility<[ClangOption, CC1Option]>, 861 Group<Preprocessor_Group>, 862 HelpText<"Show header includes and nesting depth">, 863 MarshallingInfoFlag<DependencyOutputOpts<"ShowHeaderIncludes">>; 864def fshow_skipped_includes : Flag<["-"], "fshow-skipped-includes">, 865 Visibility<[ClangOption, CC1Option]>, 866 HelpText<"Show skipped includes in -H output.">, 867 DocBrief<[{#include files may be "skipped" due to include guard optimization 868 or #pragma once. This flag makes -H show also such includes.}]>, 869 MarshallingInfoFlag<DependencyOutputOpts<"ShowSkippedHeaderIncludes">>; 870 871def I_ : Flag<["-"], "I-">, Group<I_Group>, 872 HelpText<"Restrict all prior -I flags to double-quoted inclusion and " 873 "remove current directory from include path">; 874def I : JoinedOrSeparate<["-"], "I">, Group<I_Group>, 875 Visibility<[ClangOption, CC1Option, CC1AsOption, FlangOption, FC1Option]>, 876 MetaVarName<"<dir>">, 877 HelpText<"Add directory to the end of the list of include search paths">, 878 DocBrief<[{Add directory to include search path. For C++ inputs, if 879there are multiple -I options, these directories are searched 880in the order they are given before the standard system directories 881are searched. If the same directory is in the SYSTEM include search 882paths, for example if also specified with -isystem, the -I option 883will be ignored}]>; 884def L : JoinedOrSeparate<["-"], "L">, Flags<[RenderJoined]>, Group<Link_Group>, 885 Visibility<[ClangOption, FlangOption]>, 886 MetaVarName<"<dir>">, HelpText<"Add directory to library search path">; 887def embed_dir_EQ : Joined<["--"], "embed-dir=">, Group<Preprocessor_Group>, 888 Visibility<[ClangOption, CC1Option]>, MetaVarName<"<dir>">, 889 HelpText<"Add directory to embed search path">; 890def MD : Flag<["-"], "MD">, Group<M_Group>, 891 HelpText<"Write a depfile containing user and system headers">; 892def MMD : Flag<["-"], "MMD">, Group<M_Group>, 893 HelpText<"Write a depfile containing user headers">; 894def M : Flag<["-"], "M">, Group<M_Group>, 895 HelpText<"Like -MD, but also implies -E and writes to stdout by default">; 896def MM : Flag<["-"], "MM">, Group<M_Group>, 897 HelpText<"Like -MMD, but also implies -E and writes to stdout by default">; 898def MF : JoinedOrSeparate<["-"], "MF">, Group<M_Group>, 899 HelpText<"Write depfile output from -MMD, -MD, -MM, or -M to <file>">, 900 MetaVarName<"<file>">; 901def MG : Flag<["-"], "MG">, Group<M_Group>, Visibility<[ClangOption, CC1Option]>, 902 HelpText<"Add missing headers to depfile">, 903 MarshallingInfoFlag<DependencyOutputOpts<"AddMissingHeaderDeps">>; 904def MJ : JoinedOrSeparate<["-"], "MJ">, Group<M_Group>, 905 HelpText<"Write a compilation database entry per input">; 906def MP : Flag<["-"], "MP">, Group<M_Group>, Visibility<[ClangOption, CC1Option]>, 907 HelpText<"Create phony target for each dependency (other than main file)">, 908 MarshallingInfoFlag<DependencyOutputOpts<"UsePhonyTargets">>; 909def MQ : JoinedOrSeparate<["-"], "MQ">, Group<M_Group>, 910 Visibility<[ClangOption, CC1Option]>, 911 HelpText<"Specify name of main file output to quote in depfile">; 912def MT : JoinedOrSeparate<["-"], "MT">, Group<M_Group>, 913 Visibility<[ClangOption, CC1Option]>, 914 HelpText<"Specify name of main file output in depfile">, 915 MarshallingInfoStringVector<DependencyOutputOpts<"Targets">>; 916def MV : Flag<["-"], "MV">, Group<M_Group>, Visibility<[ClangOption, CC1Option]>, 917 HelpText<"Use NMake/Jom format for the depfile">, 918 MarshallingInfoFlag<DependencyOutputOpts<"OutputFormat">, "DependencyOutputFormat::Make">, 919 Normalizer<"makeFlagToValueNormalizer(DependencyOutputFormat::NMake)">; 920def Mach : Flag<["-"], "Mach">, Group<Link_Group>; 921def O0 : Flag<["-"], "O0">, Group<O_Group>, Flags<[HelpHidden]>, 922 Visibility<[ClangOption, CC1Option, FC1Option, FlangOption]>; 923def O4 : Flag<["-"], "O4">, Group<O_Group>, Flags<[HelpHidden]>, 924 Visibility<[ClangOption, CC1Option, FC1Option, FlangOption]>; 925def ObjCXX : Flag<["-"], "ObjC++">, Flags<[NoXarchOption]>, 926 HelpText<"Treat source input files as Objective-C++ inputs">; 927def ObjC : Flag<["-"], "ObjC">, Flags<[NoXarchOption]>, 928 HelpText<"Treat source input files as Objective-C inputs">; 929def O : Joined<["-"], "O">, Group<O_Group>, 930 Visibility<[ClangOption, CC1Option, FC1Option, FlangOption]>; 931def O_flag : Flag<["-"], "O">, Visibility<[ClangOption, CC1Option, FC1Option]>, 932 Alias<O>, AliasArgs<["1"]>; 933def Ofast : Joined<["-"], "Ofast">, Group<O_Group>, 934 Visibility<[ClangOption, CC1Option, FlangOption]>, 935 HelpTextForVariants<[ClangOption, CC1Option], 936 "Deprecated; use '-O3 -ffast-math' for the same behavior," 937 " or '-O3' to enable only conforming optimizations">; 938def P : Flag<["-"], "P">, 939 Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, 940 Group<Preprocessor_Group>, 941 HelpText<"Disable linemarker output in -E mode">, 942 MarshallingInfoNegativeFlag<PreprocessorOutputOpts<"ShowLineMarkers">>; 943def Qy : Flag<["-"], "Qy">, Visibility<[ClangOption, CC1Option]>, 944 HelpText<"Emit metadata containing compiler name and version">; 945def Qn : Flag<["-"], "Qn">, Visibility<[ClangOption, CC1Option]>, 946 HelpText<"Do not emit metadata containing compiler name and version">; 947def : Flag<["-"], "fident">, Group<f_Group>, Alias<Qy>, 948 Visibility<[ClangOption, CLOption, DXCOption, CC1Option]>; 949def : Flag<["-"], "fno-ident">, Group<f_Group>, Alias<Qn>, 950 Visibility<[ClangOption, CLOption, DXCOption, CC1Option]>; 951def Qunused_arguments : Flag<["-"], "Qunused-arguments">, 952 Flags<[NoXarchOption]>, Visibility<[ClangOption, CLOption, DXCOption]>, 953 HelpText<"Don't emit warning for unused driver arguments">; 954def Q : Flag<["-"], "Q">, IgnoredGCCCompat; 955def S : Flag<["-"], "S">, Flags<[NoXarchOption]>, 956 Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, 957 Group<Action_Group>, 958 HelpText<"Only run preprocess and compilation steps">; 959def T : JoinedOrSeparate<["-"], "T">, Group<T_Group>, 960 MetaVarName<"<script>">, HelpText<"Specify <script> as linker script">; 961def U : JoinedOrSeparate<["-"], "U">, Group<Preprocessor_Group>, 962 Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, 963 MetaVarName<"<macro>">, HelpText<"Undefine macro <macro>">; 964def V : JoinedOrSeparate<["-"], "V">, Flags<[NoXarchOption, Unsupported]>; 965def Wa_COMMA : CommaJoined<["-"], "Wa,">, 966 HelpText<"Pass the comma separated arguments in <arg> to the assembler">, 967 MetaVarName<"<arg>">; 968def Wall : Flag<["-"], "Wall">, Group<W_Group>, Flags<[HelpHidden]>, 969 Visibility<[ClangOption, CC1Option, FlangOption]>; 970def WCL4 : Flag<["-"], "WCL4">, Group<W_Group>, Flags<[HelpHidden]>, 971 Visibility<[ClangOption, CC1Option]>; 972def Wsystem_headers : Flag<["-"], "Wsystem-headers">, Group<W_Group>, 973 Flags<[HelpHidden]>, Visibility<[ClangOption, CC1Option]>; 974def Wno_system_headers : Flag<["-"], "Wno-system-headers">, Group<W_Group>, 975 Flags<[HelpHidden]>, Visibility<[ClangOption, CC1Option]>; 976def Wsystem_headers_in_module_EQ : Joined<["-"], "Wsystem-headers-in-module=">, 977 Flags<[HelpHidden]>, Visibility<[ClangOption, CC1Option]>, 978 MetaVarName<"<module>">, 979 HelpText<"Enable -Wsystem-headers when building <module>">, 980 MarshallingInfoStringVector<DiagnosticOpts<"SystemHeaderWarningsModules">>; 981def Wdeprecated : Flag<["-"], "Wdeprecated">, Group<W_Group>, 982 Visibility<[ClangOption, CC1Option]>, 983 HelpText<"Enable warnings for deprecated constructs and define __DEPRECATED">; 984def Wno_deprecated : Flag<["-"], "Wno-deprecated">, Group<W_Group>, 985 Visibility<[ClangOption, CC1Option]>; 986defm invalid_constexpr : BoolWOption<"invalid-constexpr", 987 LangOpts<"CheckConstexprFunctionBodies">, 988 Default<!strconcat("!", cpp23.KeyPath)>, 989 NegFlag<SetFalse, [], [ClangOption, CC1Option], "Disable">, 990 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Enable">, 991 BothFlags<[], [ClangOption, CC1Option], " checking of constexpr function bodies for validity within a constant expression context">>; 992def Wl_COMMA : CommaJoined<["-"], "Wl,">, Visibility<[ClangOption, FlangOption]>, 993 Flags<[LinkerInput, RenderAsInput]>, 994 HelpText<"Pass the comma separated arguments in <arg> to the linker">, 995 MetaVarName<"<arg>">, Group<Link_Group>; 996// FIXME: This is broken; these should not be Joined arguments. 997def Wno_nonportable_cfstrings : Joined<["-"], "Wno-nonportable-cfstrings">, Group<W_Group>, 998 Visibility<[ClangOption, CC1Option]>; 999def Wnonportable_cfstrings : Joined<["-"], "Wnonportable-cfstrings">, Group<W_Group>, 1000 Visibility<[ClangOption, CC1Option]>; 1001def Wp_COMMA : CommaJoined<["-"], "Wp,">, 1002 HelpText<"Pass the comma separated arguments in <arg> to the preprocessor">, 1003 MetaVarName<"<arg>">, Group<Preprocessor_Group>; 1004def Wundef_prefix_EQ : CommaJoined<["-"], "Wundef-prefix=">, Group<W_value_Group>, 1005 Flags<[HelpHidden]>, 1006 Visibility<[ClangOption, CC1Option, CLOption, DXCOption]>, 1007 MetaVarName<"<arg>">, 1008 HelpText<"Enable warnings for undefined macros with a prefix in the comma separated list <arg>">, 1009 MarshallingInfoStringVector<DiagnosticOpts<"UndefPrefixes">>; 1010def Wwrite_strings : Flag<["-"], "Wwrite-strings">, Group<W_Group>, 1011 Flags<[HelpHidden]>, Visibility<[ClangOption, CC1Option]>; 1012def Wno_write_strings : Flag<["-"], "Wno-write-strings">, Group<W_Group>, 1013 Flags<[HelpHidden]>, Visibility<[ClangOption, CC1Option]>; 1014def W_Joined : Joined<["-"], "W">, Group<W_Group>, 1015 Visibility<[ClangOption, CC1Option, CLOption, DXCOption, FC1Option, FlangOption]>, 1016 MetaVarName<"<warning>">, HelpText<"Enable the specified warning">; 1017def Xanalyzer : Separate<["-"], "Xanalyzer">, 1018 HelpText<"Pass <arg> to the static analyzer">, MetaVarName<"<arg>">, 1019 Group<StaticAnalyzer_Group>; 1020def Xarch__ : JoinedAndSeparate<["-"], "Xarch_">, Flags<[NoXarchOption]>; 1021def Xarch_host : Separate<["-"], "Xarch_host">, Flags<[NoXarchOption]>, 1022 HelpText<"Pass <arg> to the CUDA/HIP host compilation">, MetaVarName<"<arg>">; 1023def Xarch_device : Separate<["-"], "Xarch_device">, Flags<[NoXarchOption]>, 1024 HelpText<"Pass <arg> to the CUDA/HIP device compilation">, MetaVarName<"<arg>">; 1025def Xassembler : Separate<["-"], "Xassembler">, 1026 HelpText<"Pass <arg> to the assembler">, MetaVarName<"<arg>">, 1027 Group<CompileOnly_Group>; 1028def Xclang : Separate<["-"], "Xclang">, 1029 HelpText<"Pass <arg> to clang -cc1">, MetaVarName<"<arg>">, 1030 Flags<[NoXarchOption]>, Visibility<[ClangOption, CLOption, DXCOption]>, 1031 Group<CompileOnly_Group>; 1032def : Joined<["-"], "Xclang=">, Group<CompileOnly_Group>, 1033 Flags<[NoXarchOption]>, Visibility<[ClangOption, CLOption, DXCOption]>, 1034 Alias<Xclang>, 1035 HelpText<"Alias for -Xclang">, MetaVarName<"<arg>">; 1036def Xcuda_fatbinary : Separate<["-"], "Xcuda-fatbinary">, 1037 HelpText<"Pass <arg> to fatbinary invocation">, MetaVarName<"<arg>">; 1038def Xcuda_ptxas : Separate<["-"], "Xcuda-ptxas">, 1039 HelpText<"Pass <arg> to the ptxas assembler">, MetaVarName<"<arg>">, 1040 Visibility<[ClangOption, CLOption]>; 1041def Xopenmp_target : Separate<["-"], "Xopenmp-target">, Group<CompileOnly_Group>, 1042 HelpText<"Pass <arg> to the target offloading toolchain.">, MetaVarName<"<arg>">; 1043def Xopenmp_target_EQ : JoinedAndSeparate<["-"], "Xopenmp-target=">, Group<CompileOnly_Group>, 1044 HelpText<"Pass <arg> to the target offloading toolchain identified by <triple>.">, 1045 MetaVarName<"<triple> <arg>">; 1046def z : Separate<["-"], "z">, Flags<[LinkerInput]>, 1047 HelpText<"Pass -z <arg> to the linker">, MetaVarName<"<arg>">, 1048 Group<Link_Group>; 1049def offload_link : Flag<["--"], "offload-link">, Group<Link_Group>, 1050 HelpText<"Use the new offloading linker to perform the link job.">; 1051def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, RenderAsInput]>, 1052 HelpText<"Pass <arg> to the linker">, MetaVarName<"<arg>">, 1053 Group<Link_Group>; 1054def Xoffload_linker : JoinedAndSeparate<["-"], "Xoffload-linker">, 1055 HelpText<"Pass <arg> to the offload linkers or the ones idenfied by -<triple>">, 1056 MetaVarName<"<triple> <arg>">, Group<Link_Group>; 1057def Xpreprocessor : Separate<["-"], "Xpreprocessor">, Group<Preprocessor_Group>, 1058 HelpText<"Pass <arg> to the preprocessor">, MetaVarName<"<arg>">; 1059def X_Flag : Flag<["-"], "X">, Group<Link_Group>; 1060// Used by some macOS projects. IgnoredGCCCompat is a misnomer since GCC doesn't allow it. 1061def : Flag<["-"], "Xparser">, IgnoredGCCCompat; 1062// FIXME -Xcompiler is misused by some ChromeOS packages. Remove it after a while. 1063def : Flag<["-"], "Xcompiler">, IgnoredGCCCompat; 1064def Z_Flag : Flag<["-"], "Z">, Group<Link_Group>; 1065def all__load : Flag<["-"], "all_load">; 1066def allowable__client : Separate<["-"], "allowable_client">; 1067def ansi : Flag<["-", "--"], "ansi">, Group<CompileOnly_Group>; 1068def arch__errors__fatal : Flag<["-"], "arch_errors_fatal">; 1069def arch : Separate<["-"], "arch">, Flags<[NoXarchOption,TargetSpecific]>; 1070def arch__only : Separate<["-"], "arch_only">; 1071def autocomplete : Joined<["--"], "autocomplete=">; 1072def bind__at__load : Flag<["-"], "bind_at_load">; 1073def bundle__loader : Separate<["-"], "bundle_loader">; 1074def bundle : Flag<["-"], "bundle">; 1075def b : JoinedOrSeparate<["-"], "b">, Flags<[LinkerInput]>, 1076 HelpText<"Pass -b <arg> to the linker on AIX">, MetaVarName<"<arg>">, 1077 Group<Link_Group>; 1078 1079defm offload_uniform_block : BoolFOption<"offload-uniform-block", 1080 LangOpts<"OffloadUniformBlock">, Default<"LangOpts->CUDA">, 1081 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Assume">, 1082 NegFlag<SetFalse, [], [ClangOption, CC1Option], "Don't assume">, 1083 BothFlags<[], [ClangOption], " that kernels are launched with uniform block sizes (default true for CUDA/HIP and false otherwise)">>; 1084 1085def fcomplex_arithmetic_EQ : Joined<["-"], "fcomplex-arithmetic=">, Group<f_Group>, 1086 Visibility<[ClangOption, CC1Option]>, 1087 Values<"full,improved,promoted,basic">, NormalizedValuesScope<"LangOptions">, 1088 NormalizedValues<["CX_Full", "CX_Improved", "CX_Promoted", "CX_Basic"]>; 1089 1090def complex_range_EQ : Joined<["-"], "complex-range=">, Group<f_Group>, 1091 Visibility<[CC1Option]>, 1092 Values<"full,improved,promoted,basic">, NormalizedValuesScope<"LangOptions">, 1093 NormalizedValues<["CX_Full", "CX_Improved", "CX_Promoted", "CX_Basic"]>, 1094 MarshallingInfoEnum<LangOpts<"ComplexRange">, "CX_Full">; 1095 1096defm cx_limited_range: BoolOptionWithoutMarshalling<"f", "cx-limited-range", 1097 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Basic algebraic expansions of " 1098 "complex arithmetic operations involving are enabled.">, 1099 NegFlag<SetFalse, [], [ClangOption, CC1Option], "Basic algebraic expansions " 1100 "of complex arithmetic operations involving are disabled.">>; 1101 1102defm cx_fortran_rules: BoolOptionWithoutMarshalling<"f", "cx-fortran-rules", 1103 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Range reduction is enabled for " 1104 "complex arithmetic operations.">, 1105 NegFlag<SetFalse, [], [ClangOption, CC1Option], "Range reduction is disabled " 1106 "for complex arithmetic operations">>; 1107 1108// OpenCL-only Options 1109def cl_opt_disable : Flag<["-"], "cl-opt-disable">, Group<opencl_Group>, 1110 Visibility<[ClangOption, CC1Option]>, 1111 HelpText<"OpenCL only. This option disables all optimizations. By default optimizations are enabled.">; 1112def cl_strict_aliasing : Flag<["-"], "cl-strict-aliasing">, Group<opencl_Group>, 1113 Visibility<[ClangOption, CC1Option]>, 1114 HelpText<"OpenCL only. This option is added for compatibility with OpenCL 1.0.">; 1115def cl_single_precision_constant : Flag<["-"], "cl-single-precision-constant">, Group<opencl_Group>, 1116 Visibility<[ClangOption, CC1Option]>, 1117 HelpText<"OpenCL only. Treat double precision floating-point constant as single precision constant.">, 1118 MarshallingInfoFlag<LangOpts<"SinglePrecisionConstants">>; 1119def cl_finite_math_only : Flag<["-"], "cl-finite-math-only">, Group<opencl_Group>, 1120 Visibility<[ClangOption, CC1Option]>, 1121 HelpText<"OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.">, 1122 MarshallingInfoFlag<LangOpts<"CLFiniteMathOnly">>; 1123def cl_kernel_arg_info : Flag<["-"], "cl-kernel-arg-info">, Group<opencl_Group>, 1124 Visibility<[ClangOption, CC1Option]>, 1125 HelpText<"OpenCL only. Generate kernel argument metadata.">, 1126 MarshallingInfoFlag<CodeGenOpts<"EmitOpenCLArgMetadata">>; 1127def cl_unsafe_math_optimizations : Flag<["-"], "cl-unsafe-math-optimizations">, Group<opencl_Group>, 1128 Visibility<[ClangOption, CC1Option]>, 1129 HelpText<"OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable.">, 1130 MarshallingInfoFlag<LangOpts<"CLUnsafeMath">>; 1131def cl_fast_relaxed_math : Flag<["-"], "cl-fast-relaxed-math">, Group<opencl_Group>, 1132 Visibility<[ClangOption, CC1Option]>, 1133 HelpText<"OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines __FAST_RELAXED_MATH__.">, 1134 MarshallingInfoFlag<LangOpts<"FastRelaxedMath">>; 1135def cl_mad_enable : Flag<["-"], "cl-mad-enable">, Group<opencl_Group>, 1136 Visibility<[ClangOption, CC1Option]>, 1137 HelpText<"OpenCL only. Allow use of less precise MAD computations in the generated binary.">, 1138 MarshallingInfoFlag<CodeGenOpts<"LessPreciseFPMAD">>, 1139 ImpliedByAnyOf<[cl_unsafe_math_optimizations.KeyPath, cl_fast_relaxed_math.KeyPath]>; 1140def cl_no_signed_zeros : Flag<["-"], "cl-no-signed-zeros">, Group<opencl_Group>, 1141 Visibility<[ClangOption, CC1Option]>, 1142 HelpText<"OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.">, 1143 MarshallingInfoFlag<LangOpts<"CLNoSignedZero">>; 1144def cl_std_EQ : Joined<["-"], "cl-std=">, Group<opencl_Group>, 1145 Visibility<[ClangOption, CC1Option]>, 1146 HelpText<"OpenCL language standard to compile for.">, 1147 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">; 1148def cl_denorms_are_zero : Flag<["-"], "cl-denorms-are-zero">, Group<opencl_Group>, 1149 HelpText<"OpenCL only. Allow denormals to be flushed to zero.">; 1150def cl_fp32_correctly_rounded_divide_sqrt : Flag<["-"], "cl-fp32-correctly-rounded-divide-sqrt">, Group<opencl_Group>, 1151 Visibility<[ClangOption, CC1Option]>, 1152 HelpText<"OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.">, 1153 MarshallingInfoFlag<CodeGenOpts<"OpenCLCorrectlyRoundedDivSqrt">>; 1154def cl_uniform_work_group_size : Flag<["-"], "cl-uniform-work-group-size">, Group<opencl_Group>, 1155 Visibility<[ClangOption, CC1Option]>, Alias<foffload_uniform_block>, 1156 HelpText<"OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel">; 1157def cl_no_stdinc : Flag<["-"], "cl-no-stdinc">, Group<opencl_Group>, 1158 HelpText<"OpenCL only. Disables all standard includes containing non-native compiler types and functions.">; 1159def cl_ext_EQ : CommaJoined<["-"], "cl-ext=">, Group<opencl_Group>, 1160 Visibility<[ClangOption, CC1Option]>, 1161 HelpText<"OpenCL only. Enable or disable OpenCL extensions/optional features. The argument is a comma-separated " 1162 "sequence of one or more extension names, each prefixed by '+' or '-'.">, 1163 MarshallingInfoStringVector<TargetOpts<"OpenCLExtensionsAsWritten">>; 1164 1165def client__name : JoinedOrSeparate<["-"], "client_name">; 1166def combine : Flag<["-", "--"], "combine">, Flags<[NoXarchOption, Unsupported]>; 1167def compatibility__version : JoinedOrSeparate<["-"], "compatibility_version">; 1168def config : Joined<["--"], "config=">, Flags<[NoXarchOption]>, 1169 Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, MetaVarName<"<file>">, 1170 HelpText<"Specify configuration file">; 1171def : Separate<["--"], "config">, Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, Alias<config>; 1172def no_default_config : Flag<["--"], "no-default-config">, 1173 Flags<[NoXarchOption]>, Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, 1174 HelpText<"Disable loading default configuration files">; 1175def config_system_dir_EQ : Joined<["--"], "config-system-dir=">, 1176 Flags<[NoXarchOption, HelpHidden]>, 1177 Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, 1178 HelpText<"System directory for configuration files">; 1179def config_user_dir_EQ : Joined<["--"], "config-user-dir=">, 1180 Flags<[NoXarchOption, HelpHidden]>, 1181 Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, 1182 HelpText<"User directory for configuration files">; 1183def coverage : Flag<["-", "--"], "coverage">, Group<Link_Group>, 1184 Visibility<[ClangOption, CLOption]>; 1185def cpp_precomp : Flag<["-"], "cpp-precomp">, Group<clang_ignored_f_Group>; 1186def current__version : JoinedOrSeparate<["-"], "current_version">; 1187def cxx_isystem : JoinedOrSeparate<["-"], "cxx-isystem">, Group<clang_i_Group>, 1188 HelpText<"Add directory to the C++ SYSTEM include search path">, 1189 Visibility<[ClangOption, CC1Option]>, 1190 MetaVarName<"<directory>">; 1191def c : Flag<["-"], "c">, Flags<[NoXarchOption]>, 1192 Visibility<[ClangOption, FlangOption]>, Group<Action_Group>, 1193 HelpText<"Only run preprocess, compile, and assemble steps">; 1194defm convergent_functions : BoolFOption<"convergent-functions", 1195 LangOpts<"ConvergentFunctions">, DefaultFalse, 1196 NegFlag<SetFalse, [], [ClangOption], "Assume all functions may be convergent.">, 1197 PosFlag<SetTrue, [], [ClangOption, CC1Option]>>; 1198 1199// Common offloading options 1200let Group = offload_Group in { 1201def offload_arch_EQ : Joined<["--"], "offload-arch=">, Flags<[NoXarchOption]>, 1202 Visibility<[ClangOption, FlangOption]>, 1203 HelpText<"Specify an offloading device architecture for CUDA, HIP, or OpenMP. (e.g. sm_35). " 1204 "If 'native' is used the compiler will detect locally installed architectures. " 1205 "For HIP offloading, the device architecture can be followed by target ID features " 1206 "delimited by a colon (e.g. gfx908:xnack+:sramecc-). May be specified more than once.">; 1207def no_offload_arch_EQ : Joined<["--"], "no-offload-arch=">, 1208 Flags<[NoXarchOption]>, 1209 Visibility<[ClangOption, FlangOption]>, 1210 HelpText<"Remove CUDA/HIP offloading device architecture (e.g. sm_35, gfx906) from the list of devices to compile for. " 1211 "'all' resets the list to its default value.">; 1212 1213def offload_new_driver : Flag<["--"], "offload-new-driver">, 1214 Visibility<[ClangOption, CC1Option]>, Group<f_Group>, 1215 MarshallingInfoFlag<LangOpts<"OffloadingNewDriver">>, HelpText<"Use the new driver for offloading compilation.">; 1216def no_offload_new_driver : Flag<["--"], "no-offload-new-driver">, 1217 Visibility<[ClangOption, CC1Option]>, Group<f_Group>, 1218 HelpText<"Don't Use the new driver for offloading compilation.">; 1219 1220def offload_device_only : Flag<["--"], "offload-device-only">, 1221 Visibility<[ClangOption, FlangOption]>, 1222 HelpText<"Only compile for the offloading device.">; 1223def offload_host_only : Flag<["--"], "offload-host-only">, 1224 Visibility<[ClangOption, FlangOption]>, 1225 HelpText<"Only compile for the offloading host.">; 1226def offload_host_device : Flag<["--"], "offload-host-device">, 1227 Visibility<[ClangOption, FlangOption]>, 1228 HelpText<"Compile for both the offloading host and device (default).">; 1229 1230def gpu_use_aux_triple_only : Flag<["--"], "gpu-use-aux-triple-only">, 1231 InternalDriverOpt, HelpText<"Prepare '-aux-triple' only without populating " 1232 "'-aux-target-cpu' and '-aux-target-feature'.">; 1233def amdgpu_arch_tool_EQ : Joined<["--"], "amdgpu-arch-tool=">, 1234 HelpText<"Tool used for detecting AMD GPU arch in the system.">; 1235def nvptx_arch_tool_EQ : Joined<["--"], "nvptx-arch-tool=">, 1236 HelpText<"Tool used for detecting NVIDIA GPU arch in the system.">; 1237 1238defm gpu_rdc : BoolFOption<"gpu-rdc", 1239 LangOpts<"GPURelocatableDeviceCode">, DefaultFalse, 1240 PosFlag<SetTrue, [], [ClangOption, CC1Option], 1241 "Generate relocatable device code, also known as separate compilation mode">, 1242 NegFlag<SetFalse>>; 1243 1244defm offload_implicit_host_device_templates : 1245 BoolFOption<"offload-implicit-host-device-templates", 1246 LangOpts<"OffloadImplicitHostDeviceTemplates">, DefaultFalse, 1247 PosFlag<SetTrue, [], [ClangOption, CC1Option], 1248 "Template functions or specializations without host, device and " 1249 "global attributes have implicit host device attributes (CUDA/HIP only)">, 1250 NegFlag<SetFalse>>; 1251 1252def fgpu_default_stream_EQ : Joined<["-"], "fgpu-default-stream=">, 1253 HelpText<"Specify default stream. The default value is 'legacy'. (CUDA/HIP only)">, 1254 Visibility<[ClangOption, CC1Option]>, 1255 Values<"legacy,per-thread">, 1256 NormalizedValuesScope<"LangOptions::GPUDefaultStreamKind">, 1257 NormalizedValues<["Legacy", "PerThread"]>, 1258 MarshallingInfoEnum<LangOpts<"GPUDefaultStream">, "Legacy">; 1259 1260def fgpu_flush_denormals_to_zero : Flag<["-"], "fgpu-flush-denormals-to-zero">, 1261 HelpText<"Flush denormal floating point values to zero in CUDA/HIP device mode.">; 1262def fno_gpu_flush_denormals_to_zero : Flag<["-"], "fno-gpu-flush-denormals-to-zero">; 1263 1264defm gpu_defer_diag : BoolFOption<"gpu-defer-diag", 1265 LangOpts<"GPUDeferDiag">, DefaultFalse, 1266 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Defer">, 1267 NegFlag<SetFalse, [], [ClangOption], "Don't defer">, 1268 BothFlags<[], [ClangOption], " host/device related diagnostic messages for CUDA/HIP">>; 1269 1270defm gpu_exclude_wrong_side_overloads : BoolFOption<"gpu-exclude-wrong-side-overloads", 1271 LangOpts<"GPUExcludeWrongSideOverloads">, DefaultFalse, 1272 PosFlag<SetTrue, [], [ClangOption, CC1Option], 1273 "Always exclude wrong side overloads">, 1274 NegFlag<SetFalse, [], [ClangOption], "Exclude wrong side overloads only if there are same side overloads">, 1275 BothFlags<[HelpHidden], [], " in overloading resolution for CUDA/HIP">>; 1276 1277def cuid_EQ : Joined<["-"], "cuid=">, Visibility<[ClangOption, CC1Option]>, 1278 HelpText<"An ID for compilation unit, which should be the same for the same " 1279 "compilation unit but different for different compilation units. " 1280 "It is used to externalize device-side static variables for single " 1281 "source offloading languages CUDA and HIP so that they can be " 1282 "accessed by the host code of the same compilation unit.">, 1283 MarshallingInfoString<LangOpts<"CUID">>; 1284def fuse_cuid_EQ : Joined<["-"], "fuse-cuid=">, 1285 HelpText<"Method to generate ID's for compilation units for single source " 1286 "offloading languages CUDA and HIP: 'hash' (ID's generated by hashing " 1287 "file path and command line options) | 'random' (ID's generated as " 1288 "random numbers) | 'none' (disabled). Default is 'hash'. This option " 1289 "will be overridden by option '-cuid=[ID]' if it is specified." >; 1290 1291def fgpu_inline_threshold_EQ : Joined<["-"], "fgpu-inline-threshold=">, 1292 Flags<[HelpHidden]>, 1293 HelpText<"Inline threshold for device compilation for CUDA/HIP">; 1294 1295def fgpu_sanitize : Flag<["-"], "fgpu-sanitize">, Group<f_Group>, 1296 HelpText<"Enable sanitizer for supported offloading devices">; 1297def fno_gpu_sanitize : Flag<["-"], "fno-gpu-sanitize">, Group<f_Group>; 1298 1299def offload_compress : Flag<["--"], "offload-compress">, 1300 HelpText<"Compress offload device binaries (HIP only)">; 1301def no_offload_compress : Flag<["--"], "no-offload-compress">; 1302 1303def offload_compression_level_EQ : Joined<["--"], "offload-compression-level=">, 1304 Flags<[HelpHidden]>, 1305 HelpText<"Compression level for offload device binaries (HIP only)">; 1306} 1307 1308// CUDA options 1309let Group = cuda_Group in { 1310def cuda_include_ptx_EQ : Joined<["--"], "cuda-include-ptx=">, 1311 Flags<[NoXarchOption]>, 1312 HelpText<"Include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">; 1313def no_cuda_include_ptx_EQ : Joined<["--"], "no-cuda-include-ptx=">, 1314 Flags<[NoXarchOption]>, 1315 HelpText<"Do not include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">; 1316def cuda_gpu_arch_EQ : Joined<["--"], "cuda-gpu-arch=">, Flags<[NoXarchOption]>, 1317 Alias<offload_arch_EQ>; 1318def cuda_feature_EQ : Joined<["--"], "cuda-feature=">, HelpText<"Manually specify the CUDA feature to use">; 1319def no_cuda_gpu_arch_EQ : Joined<["--"], "no-cuda-gpu-arch=">, 1320 Flags<[NoXarchOption]>, 1321 Alias<no_offload_arch_EQ>; 1322 1323def cuda_device_only : Flag<["--"], "cuda-device-only">, Alias<offload_device_only>, 1324 HelpText<"Compile CUDA code for device only">; 1325def cuda_host_only : Flag<["--"], "cuda-host-only">, Alias<offload_host_only>, 1326 HelpText<"Compile CUDA code for host only. Has no effect on non-CUDA compilations.">; 1327def cuda_compile_host_device : Flag<["--"], "cuda-compile-host-device">, Alias<offload_host_device>, 1328 HelpText<"Compile CUDA code for both host and device (default). Has no " 1329 "effect on non-CUDA compilations.">; 1330 1331def cuda_noopt_device_debug : Flag<["--"], "cuda-noopt-device-debug">, 1332 HelpText<"Enable device-side debug info generation. Disables ptxas optimizations.">; 1333def no_cuda_version_check : Flag<["--"], "no-cuda-version-check">, 1334 HelpText<"Don't error out if the detected version of the CUDA install is " 1335 "too low for the requested CUDA gpu architecture.">; 1336def no_cuda_noopt_device_debug : Flag<["--"], "no-cuda-noopt-device-debug">; 1337def cuda_path_EQ : Joined<["--"], "cuda-path=">, Group<i_Group>, 1338 HelpText<"CUDA installation path">; 1339def cuda_path_ignore_env : Flag<["--"], "cuda-path-ignore-env">, Group<i_Group>, 1340 HelpText<"Ignore environment variables to detect CUDA installation">; 1341def ptxas_path_EQ : Joined<["--"], "ptxas-path=">, Group<i_Group>, 1342 HelpText<"Path to ptxas (used for compiling CUDA code)">; 1343def fcuda_flush_denormals_to_zero : Flag<["-"], "fcuda-flush-denormals-to-zero">, 1344 Alias<fgpu_flush_denormals_to_zero>; 1345def fno_cuda_flush_denormals_to_zero : Flag<["-"], "fno-cuda-flush-denormals-to-zero">, 1346 Alias<fno_gpu_flush_denormals_to_zero>; 1347def : Flag<["-"], "fcuda-rdc">, Alias<fgpu_rdc>; 1348def : Flag<["-"], "fno-cuda-rdc">, Alias<fno_gpu_rdc>; 1349defm cuda_short_ptr : BoolFOption<"cuda-short-ptr", 1350 TargetOpts<"NVPTXUseShortPointers">, DefaultFalse, 1351 PosFlag<SetTrue, [], [ClangOption, CC1Option], 1352 "Use 32-bit pointers for accessing const/local/shared address spaces">, 1353 NegFlag<SetFalse>>; 1354} 1355 1356def emit_static_lib : Flag<["--"], "emit-static-lib">, 1357 HelpText<"Enable linker job to emit a static library.">; 1358 1359def mprintf_kind_EQ : Joined<["-"], "mprintf-kind=">, Group<m_Group>, 1360 HelpText<"Specify the printf lowering scheme (AMDGPU only), allowed values are " 1361 "\"hostcall\"(printing happens during kernel execution, this scheme " 1362 "relies on hostcalls which require system to support pcie atomics) " 1363 "and \"buffered\"(printing happens after all kernel threads exit, " 1364 "this uses a printf buffer and does not rely on pcie atomic support)">, 1365 Visibility<[ClangOption, CC1Option]>, 1366 Values<"hostcall,buffered">, 1367 NormalizedValuesScope<"TargetOptions::AMDGPUPrintfKind">, 1368 NormalizedValues<["Hostcall", "Buffered"]>, 1369 MarshallingInfoEnum<TargetOpts<"AMDGPUPrintfKindVal">, "Hostcall">; 1370 1371// HIP options 1372let Group = hip_Group in { 1373def hip_link : Flag<["--"], "hip-link">, Group<opencl_Group>, 1374 HelpText<"Link clang-offload-bundler bundles for HIP">; 1375def no_hip_rt: Flag<["-"], "no-hip-rt">, Group<hip_Group>, 1376 HelpText<"Do not link against HIP runtime libraries">; 1377def rocm_path_EQ : Joined<["--"], "rocm-path=">, 1378 Visibility<[FlangOption]>, Group<hip_Group>, 1379 HelpText<"ROCm installation path, used for finding and automatically linking required bitcode libraries.">; 1380def hip_path_EQ : Joined<["--"], "hip-path=">, Group<hip_Group>, 1381 HelpText<"HIP runtime installation path, used for finding HIP version and adding HIP include path.">; 1382def hipstdpar : Flag<["--"], "hipstdpar">, 1383 Visibility<[ClangOption, CC1Option]>, 1384 Group<CompileOnly_Group>, 1385 HelpText<"Enable HIP acceleration for standard parallel algorithms">, 1386 MarshallingInfoFlag<LangOpts<"HIPStdPar">>; 1387def hipstdpar_interpose_alloc : Flag<["--"], "hipstdpar-interpose-alloc">, 1388 Visibility<[ClangOption, CC1Option]>, 1389 Group<CompileOnly_Group>, 1390 HelpText<"Replace all memory allocation / deallocation calls with " 1391 "hipManagedMalloc / hipFree equivalents">, 1392 MarshallingInfoFlag<LangOpts<"HIPStdParInterposeAlloc">>; 1393// TODO: use MarshallingInfo here 1394def hipstdpar_path_EQ : Joined<["--"], "hipstdpar-path=">, Group<i_Group>, 1395 HelpText< 1396 "HIP Standard Parallel Algorithm Acceleration library path, used for " 1397 "finding and implicitly including the library header">; 1398def hipstdpar_thrust_path_EQ : Joined<["--"], "hipstdpar-thrust-path=">, 1399 Group<i_Group>, 1400 HelpText< 1401 "rocThrust path, required by the HIP Standard Parallel Algorithm " 1402 "Acceleration library, used to implicitly include the rocThrust library">; 1403def hipstdpar_prim_path_EQ : Joined<["--"], "hipstdpar-prim-path=">, 1404 Group<i_Group>, 1405 HelpText< 1406 "rocPrim path, required by the HIP Standard Parallel Algorithm " 1407 "Acceleration library, used to implicitly include the rocPrim library">; 1408def rocm_device_lib_path_EQ : Joined<["--"], "rocm-device-lib-path=">, Group<hip_Group>, 1409 HelpText<"ROCm device library path. Alternative to rocm-path.">; 1410def : Joined<["--"], "hip-device-lib-path=">, Alias<rocm_device_lib_path_EQ>; 1411def hip_device_lib_EQ : Joined<["--"], "hip-device-lib=">, Group<hip_Group>, 1412 HelpText<"HIP device library">; 1413def hip_version_EQ : Joined<["--"], "hip-version=">, Group<hip_Group>, 1414 HelpText<"HIP version in the format of major.minor.patch">; 1415def fhip_dump_offload_linker_script : Flag<["-"], "fhip-dump-offload-linker-script">, 1416 Group<hip_Group>, Flags<[NoArgumentUnused, HelpHidden]>; 1417defm hip_new_launch_api : BoolFOption<"hip-new-launch-api", 1418 LangOpts<"HIPUseNewLaunchAPI">, DefaultFalse, 1419 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Use">, 1420 NegFlag<SetFalse, [], [ClangOption], "Don't use">, 1421 BothFlags<[], [ClangOption], " new kernel launching API for HIP">>; 1422defm hip_fp32_correctly_rounded_divide_sqrt : BoolFOption<"hip-fp32-correctly-rounded-divide-sqrt", 1423 CodeGenOpts<"HIPCorrectlyRoundedDivSqrt">, DefaultTrue, 1424 PosFlag<SetTrue, [], [ClangOption], "Specify">, 1425 NegFlag<SetFalse, [], [ClangOption, CC1Option], "Don't specify">, 1426 BothFlags<[], [ClangOption], " that single precision floating-point divide and sqrt used in " 1427 "the program source are correctly rounded (HIP device compilation only)">>, 1428 ShouldParseIf<hip.KeyPath>; 1429defm hip_kernel_arg_name : BoolFOption<"hip-kernel-arg-name", 1430 CodeGenOpts<"HIPSaveKernelArgName">, DefaultFalse, 1431 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Specify">, 1432 NegFlag<SetFalse, [], [ClangOption], "Don't specify">, 1433 BothFlags<[], [ClangOption], " that kernel argument names are preserved (HIP only)">>, 1434 ShouldParseIf<hip.KeyPath>; 1435def hipspv_pass_plugin_EQ : Joined<["--"], "hipspv-pass-plugin=">, 1436 Group<Link_Group>, MetaVarName<"<dsopath>">, 1437 HelpText<"path to a pass plugin for HIP to SPIR-V passes.">; 1438defm gpu_allow_device_init : BoolFOption<"gpu-allow-device-init", 1439 LangOpts<"GPUAllowDeviceInit">, DefaultFalse, 1440 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Allow">, 1441 NegFlag<SetFalse, [], [ClangOption], "Don't allow">, 1442 BothFlags<[], [ClangOption], " device side init function in HIP (experimental)">>, 1443 ShouldParseIf<hip.KeyPath>; 1444def gpu_max_threads_per_block_EQ : Joined<["--"], "gpu-max-threads-per-block=">, 1445 Visibility<[ClangOption, CC1Option]>, 1446 HelpText<"Default max threads per block for kernel launch bounds for HIP">, 1447 MarshallingInfoInt<LangOpts<"GPUMaxThreadsPerBlock">, "1024">, 1448 ShouldParseIf<hip.KeyPath>; 1449def gpu_instrument_lib_EQ : Joined<["--"], "gpu-instrument-lib=">, 1450 HelpText<"Instrument device library for HIP, which is a LLVM bitcode containing " 1451 "__cyg_profile_func_enter and __cyg_profile_func_exit">; 1452def gpu_bundle_output : Flag<["--"], "gpu-bundle-output">, 1453 HelpText<"Bundle output files of HIP device compilation">; 1454def no_gpu_bundle_output : Flag<["--"], "no-gpu-bundle-output">, 1455 Group<hip_Group>, HelpText<"Do not bundle output files of HIP device compilation">; 1456def fhip_emit_relocatable : Flag<["-"], "fhip-emit-relocatable">, 1457 HelpText<"Compile HIP source to relocatable">; 1458def fno_hip_emit_relocatable : Flag<["-"], "fno-hip-emit-relocatable">, 1459 HelpText<"Do not override toolchain to compile HIP source to relocatable">; 1460} 1461 1462// Clang specific/exclusive options for OpenACC. 1463def openacc_macro_override 1464 : Separate<["-"], "fexperimental-openacc-macro-override">, 1465 Visibility<[ClangOption, CC1Option]>, 1466 Group<f_Group>, 1467 HelpText<"Overrides the _OPENACC macro value for experimental testing " 1468 "during OpenACC support development">; 1469def openacc_macro_override_EQ 1470 : Joined<["-"], "fexperimental-openacc-macro-override=">, 1471 Alias<openacc_macro_override>; 1472 1473// End Clang specific/exclusive options for OpenACC. 1474 1475def libomptarget_amdgpu_bc_path_EQ : Joined<["--"], "libomptarget-amdgpu-bc-path=">, Group<i_Group>, 1476 HelpText<"Path to libomptarget-amdgcn bitcode library">; 1477def libomptarget_amdgcn_bc_path_EQ : Joined<["--"], "libomptarget-amdgcn-bc-path=">, Group<i_Group>, 1478 HelpText<"Path to libomptarget-amdgcn bitcode library">, Alias<libomptarget_amdgpu_bc_path_EQ>; 1479def libomptarget_nvptx_bc_path_EQ : Joined<["--"], "libomptarget-nvptx-bc-path=">, Group<i_Group>, 1480 HelpText<"Path to libomptarget-nvptx bitcode library">; 1481def dD : Flag<["-"], "dD">, Group<d_Group>, Visibility<[ClangOption, CC1Option]>, 1482 HelpText<"Print macro definitions in -E mode in addition to normal output">; 1483def dI : Flag<["-"], "dI">, Group<d_Group>, Visibility<[ClangOption, CC1Option]>, 1484 HelpText<"Print include directives in -E mode in addition to normal output">, 1485 MarshallingInfoFlag<PreprocessorOutputOpts<"ShowIncludeDirectives">>; 1486def dE : Flag<["-"], "dE">, Group<d_Group>, Visibility<[CC1Option]>, 1487 HelpText<"Print embed directives in -E mode in addition to normal output">, 1488 MarshallingInfoFlag<PreprocessorOutputOpts<"ShowEmbedDirectives">>; 1489def dM : Flag<["-"], "dM">, Group<d_Group>, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, 1490 HelpText<"Print macro definitions in -E mode instead of normal output">; 1491def dead__strip : Flag<["-"], "dead_strip">; 1492def dependency_file : Separate<["-"], "dependency-file">, 1493 Visibility<[ClangOption, CC1Option]>, 1494 HelpText<"Filename (or -) to write dependency output to">, 1495 MarshallingInfoString<DependencyOutputOpts<"OutputFile">>; 1496def dependency_dot : Separate<["-"], "dependency-dot">, 1497 Visibility<[ClangOption, CC1Option]>, 1498 HelpText<"Filename to write DOT-formatted header dependencies to">, 1499 MarshallingInfoString<DependencyOutputOpts<"DOTOutputFile">>; 1500def module_dependency_dir : Separate<["-"], "module-dependency-dir">, 1501 Visibility<[ClangOption, CC1Option]>, 1502 HelpText<"Directory to dump module dependencies to">, 1503 MarshallingInfoString<DependencyOutputOpts<"ModuleDependencyOutputDir">>; 1504def dsym_dir : JoinedOrSeparate<["-"], "dsym-dir">, 1505 Flags<[NoXarchOption, RenderAsInput]>, 1506 HelpText<"Directory to output dSYM's (if any) to">, MetaVarName<"<dir>">; 1507// GCC style -dumpdir. We intentionally don't implement the less useful -dumpbase{,-ext}. 1508def dumpdir : Separate<["-"], "dumpdir">, Visibility<[ClangOption, CC1Option]>, 1509 MetaVarName<"<dumppfx>">, 1510 HelpText<"Use <dumpfpx> as a prefix to form auxiliary and dump file names">; 1511def dumpmachine : Flag<["-"], "dumpmachine">, 1512 Visibility<[ClangOption, FlangOption]>, 1513 HelpText<"Display the compiler's target processor">; 1514def dumpversion : Flag<["-"], "dumpversion">, 1515 Visibility<[ClangOption, FlangOption]>, 1516 HelpText<"Display the version of the compiler">; 1517def dumpspecs : Flag<["-"], "dumpspecs">, Flags<[Unsupported]>; 1518def dylib__file : Separate<["-"], "dylib_file">; 1519def dylinker__install__name : JoinedOrSeparate<["-"], "dylinker_install_name">; 1520def dylinker : Flag<["-"], "dylinker">; 1521def dynamiclib : Flag<["-"], "dynamiclib">; 1522def dynamic : Flag<["-"], "dynamic">, Flags<[NoArgumentUnused]>; 1523def d_Flag : Flag<["-"], "d">, Group<d_Group>; 1524def d_Joined : Joined<["-"], "d">, Group<d_Group>; 1525def emit_ast : Flag<["-"], "emit-ast">, 1526 Visibility<[ClangOption, CLOption, DXCOption]>, 1527 HelpText<"Emit Clang AST files for source inputs">; 1528def emit_llvm : Flag<["-"], "emit-llvm">, 1529 Visibility<[ClangOption, CC1Option, FC1Option, FlangOption]>, 1530 Group<Action_Group>, 1531 HelpText<"Use the LLVM representation for assembler and object files">; 1532def emit_interface_stubs : Flag<["-"], "emit-interface-stubs">, 1533 Visibility<[ClangOption, CC1Option]>, Group<Action_Group>, 1534 HelpText<"Generate Interface Stub Files.">; 1535def emit_merged_ifs : Flag<["-"], "emit-merged-ifs">, 1536 Visibility<[ClangOption, CC1Option]>, Group<Action_Group>, 1537 HelpText<"Generate Interface Stub Files, emit merged text not binary.">; 1538def end_no_unused_arguments : Flag<["--"], "end-no-unused-arguments">, 1539 Visibility<[ClangOption, CLOption, DXCOption]>, 1540 HelpText<"Start emitting warnings for unused driver arguments">; 1541def interface_stub_version_EQ : JoinedOrSeparate<["-"], "interface-stub-version=">, 1542 Visibility<[ClangOption, CC1Option]>; 1543def exported__symbols__list : Separate<["-"], "exported_symbols_list">; 1544def alias_list : Separate<["-"], "alias_list">, Flags<[LinkerInput]>; 1545def extract_api : Flag<["-"], "extract-api">, 1546 Visibility<[ClangOption, CC1Option]>, Group<Action_Group>, 1547 HelpText<"Extract API information">; 1548def product_name_EQ: Joined<["--"], "product-name=">, 1549 Visibility<[ClangOption, CC1Option]>, 1550 MarshallingInfoString<FrontendOpts<"ProductName">>; 1551def emit_symbol_graph: Flag<["-"], "emit-symbol-graph">, 1552 Visibility<[ClangOption, CC1Option]>, 1553 HelpText<"Generate Extract API information as a side effect of compilation.">, 1554 MarshallingInfoFlag<FrontendOpts<"EmitSymbolGraph">>; 1555def emit_extension_symbol_graphs: Flag<["--"], "emit-extension-symbol-graphs">, 1556 Visibility<[ClangOption, CC1Option]>, 1557 HelpText<"Generate additional symbol graphs for extended modules.">, 1558 MarshallingInfoFlag<FrontendOpts<"EmitExtensionSymbolGraphs">>; 1559def extract_api_ignores_EQ: CommaJoined<["--"], "extract-api-ignores=">, 1560 Visibility<[ClangOption, CC1Option]>, 1561 HelpText<"Comma separated list of files containing a new line separated list of API symbols to ignore when extracting API information.">, 1562 MarshallingInfoStringVector<FrontendOpts<"ExtractAPIIgnoresFileList">>; 1563def symbol_graph_dir_EQ: Joined<["--"], "symbol-graph-dir=">, 1564 Visibility<[ClangOption, CC1Option]>, 1565 HelpText<"Directory in which to emit symbol graphs.">, 1566 MarshallingInfoString<FrontendOpts<"SymbolGraphOutputDir">>; 1567def emit_pretty_sgf: Flag<["--"], "pretty-sgf">, 1568 Visibility<[ClangOption, CC1Option]>, 1569 HelpText<"Emit pretty printed symbol graphs">, 1570 MarshallingInfoFlag<FrontendOpts<"EmitPrettySymbolGraphs">>; 1571def emit_sgf_symbol_labels_for_testing: Flag<["--"], "emit-sgf-symbol-labels-for-testing">, 1572 Visibility<[CC1Option]>, 1573 MarshallingInfoFlag<FrontendOpts<"EmitSymbolGraphSymbolLabelsForTesting">>; 1574def e : Separate<["-"], "e">, Flags<[LinkerInput]>, Group<Link_Group>; 1575def fmax_tokens_EQ : Joined<["-"], "fmax-tokens=">, Group<f_Group>, 1576 Visibility<[ClangOption, CC1Option]>, 1577 HelpText<"Max total number of preprocessed tokens for -Wmax-tokens.">, 1578 MarshallingInfoInt<LangOpts<"MaxTokens">>; 1579defm access_control : BoolFOption<"access-control", 1580 LangOpts<"AccessControl">, DefaultTrue, 1581 NegFlag<SetFalse, [], [ClangOption, CC1Option], 1582 "Disable C++ access control">, 1583 PosFlag<SetTrue>>; 1584def falign_functions : Flag<["-"], "falign-functions">, Group<f_Group>; 1585def falign_functions_EQ : Joined<["-"], "falign-functions=">, Group<f_Group>; 1586def falign_loops_EQ : Joined<["-"], "falign-loops=">, Group<f_Group>, 1587 Visibility<[ClangOption, CC1Option]>, MetaVarName<"<N>">, 1588 HelpText<"N must be a power of two. Align loops to the boundary">, 1589 MarshallingInfoInt<CodeGenOpts<"LoopAlignment">>; 1590def fno_align_functions: Flag<["-"], "fno-align-functions">, Group<f_Group>; 1591defm allow_editor_placeholders : BoolFOption<"allow-editor-placeholders", 1592 LangOpts<"AllowEditorPlaceholders">, DefaultFalse, 1593 PosFlag<SetTrue, [], [ClangOption, CC1Option], 1594 "Treat editor placeholders as valid source code">, 1595 NegFlag<SetFalse>>; 1596def fallow_unsupported : Flag<["-"], "fallow-unsupported">, Group<f_Group>; 1597def fapple_kext : Flag<["-"], "fapple-kext">, Group<f_Group>, 1598 Visibility<[ClangOption, CC1Option]>, 1599 HelpText<"Use Apple's kernel extensions ABI">, 1600 MarshallingInfoFlag<LangOpts<"AppleKext">>; 1601def fstrict_flex_arrays_EQ : Joined<["-"], "fstrict-flex-arrays=">, Group<f_Group>, 1602 MetaVarName<"<n>">, Values<"0,1,2,3">, 1603 LangOpts<"StrictFlexArraysLevel">, 1604 Visibility<[ClangOption, CC1Option]>, 1605 NormalizedValuesScope<"LangOptions::StrictFlexArraysLevelKind">, 1606 NormalizedValues<["Default", "OneZeroOrIncomplete", "ZeroOrIncomplete", "IncompleteOnly"]>, 1607 HelpText<"Enable optimizations based on the strict definition of flexible arrays">, 1608 MarshallingInfoEnum<LangOpts<"StrictFlexArraysLevel">, "Default">; 1609defm apple_pragma_pack : BoolFOption<"apple-pragma-pack", 1610 LangOpts<"ApplePragmaPack">, DefaultFalse, 1611 PosFlag<SetTrue, [], [ClangOption, CC1Option], 1612 "Enable Apple gcc-compatible #pragma pack handling">, 1613 NegFlag<SetFalse>>; 1614defm xl_pragma_pack : BoolFOption<"xl-pragma-pack", 1615 LangOpts<"XLPragmaPack">, DefaultFalse, 1616 PosFlag<SetTrue, [], [ClangOption, CC1Option], 1617 "Enable IBM XL #pragma pack handling">, 1618 NegFlag<SetFalse>>; 1619def shared_libsan : Flag<["-"], "shared-libsan">, 1620 HelpText<"Dynamically link the sanitizer runtime">; 1621def static_libsan : Flag<["-"], "static-libsan">, 1622 HelpText<"Statically link the sanitizer runtime (Not supported for ASan, TSan or UBSan on darwin)">; 1623def : Flag<["-"], "shared-libasan">, Alias<shared_libsan>; 1624def : Flag<["-"], "static-libasan">, Alias<static_libsan>; 1625def fasm : Flag<["-"], "fasm">, Group<f_Group>; 1626 1627defm assume_unique_vtables : BoolFOption<"assume-unique-vtables", 1628 CodeGenOpts<"AssumeUniqueVTables">, DefaultTrue, 1629 PosFlag<SetTrue>, 1630 NegFlag<SetFalse, [], [ClangOption, CC1Option], 1631 "Disable optimizations based on vtable pointer identity">, 1632 BothFlags<[], [ClangOption, CLOption]>>; 1633 1634def fassume_sane_operator_new : Flag<["-"], "fassume-sane-operator-new">, Group<f_Group>; 1635def fastcp : Flag<["-"], "fastcp">, Group<f_Group>; 1636def fastf : Flag<["-"], "fastf">, Group<f_Group>; 1637def fast : Flag<["-"], "fast">, Group<f_Group>; 1638def fasynchronous_unwind_tables : Flag<["-"], "fasynchronous-unwind-tables">, Group<f_Group>; 1639 1640defm double_square_bracket_attributes : BoolFOption<"double-square-bracket-attributes", 1641 LangOpts<"DoubleSquareBracketAttributes">, DefaultTrue, PosFlag<SetTrue>, 1642 NegFlag<SetFalse>>; 1643 1644defm experimental_late_parse_attributes : BoolFOption<"experimental-late-parse-attributes", 1645 LangOpts<"ExperimentalLateParseAttributes">, DefaultFalse, 1646 PosFlag<SetTrue, [], [ClangOption], "Enable">, 1647 NegFlag<SetFalse, [], [ClangOption], "Disable">, 1648 BothFlags<[], [ClangOption, CC1Option], 1649 " experimental late parsing of attributes">>; 1650 1651defm autolink : BoolFOption<"autolink", 1652 CodeGenOpts<"Autolink">, DefaultTrue, 1653 NegFlag<SetFalse, [], [ClangOption, CC1Option], 1654 "Disable generation of linker directives for automatic library linking">, 1655 PosFlag<SetTrue>>; 1656 1657let Flags = [TargetSpecific] in { 1658defm auto_import : BoolFOption<"auto-import", 1659 CodeGenOpts<"AutoImport">, DefaultTrue, 1660 NegFlag<SetFalse, [], [ClangOption, CC1Option], 1661 "MinGW specific. Disable support for automatic dllimport in code generation " 1662 "and linking">, 1663 PosFlag<SetTrue, [], [], "MinGW specific. Enable code generation support for " 1664 "automatic dllimport, and enable support for it in the linker. " 1665 "Enabled by default.">>; 1666} // let Flags = [TargetSpecific] 1667 1668// In the future this option will be supported by other offloading 1669// languages and accept other values such as CPU/GPU architectures, 1670// offload kinds and target aliases. 1671def offload_EQ : CommaJoined<["--"], "offload=">, Flags<[NoXarchOption]>, 1672 HelpText<"Specify comma-separated list of offloading target triples (CUDA and HIP only)">; 1673 1674// C++ Coroutines 1675defm coroutines : BoolFOption<"coroutines", 1676 LangOpts<"Coroutines">, Default<cpp20.KeyPath>, 1677 PosFlag<SetTrue, [], [ClangOption, CC1Option], 1678 "Enable support for the C++ Coroutines">, 1679 NegFlag<SetFalse>>; 1680 1681defm coro_aligned_allocation : BoolFOption<"coro-aligned-allocation", 1682 LangOpts<"CoroAlignedAllocation">, DefaultFalse, 1683 PosFlag<SetTrue, [], [ClangOption, CC1Option], 1684 "Prefer aligned allocation for C++ Coroutines">, 1685 NegFlag<SetFalse>>; 1686 1687defm experimental_library : BoolFOption<"experimental-library", 1688 LangOpts<"ExperimentalLibrary">, DefaultFalse, 1689 PosFlag<SetTrue, [], [ClangOption, CC1Option, CLOption], 1690 "Control whether unstable and experimental library features are enabled. " 1691 "This option enables various library features that are either experimental (also known as TSes), or have been " 1692 "but are not stable yet in the selected Standard Library implementation. It is not recommended to use this option " 1693 "in production code, since neither ABI nor API stability are guaranteed. This is intended to provide a preview " 1694 "of features that will ship in the future for experimentation purposes">, 1695 NegFlag<SetFalse>>; 1696 1697def fembed_offload_object_EQ : Joined<["-"], "fembed-offload-object=">, 1698 Group<f_Group>, Flags<[NoXarchOption]>, 1699 Visibility<[ClangOption, CC1Option, FC1Option]>, 1700 HelpText<"Embed Offloading device-side binary into host object file as a section.">, 1701 MarshallingInfoStringVector<CodeGenOpts<"OffloadObjects">>; 1702def fembed_bitcode_EQ : Joined<["-"], "fembed-bitcode=">, 1703 Group<f_Group>, Flags<[NoXarchOption]>, 1704 Visibility<[ClangOption, CC1Option, CC1AsOption]>, MetaVarName<"<option>">, 1705 HelpText<"Embed LLVM bitcode">, 1706 Values<"off,all,bitcode,marker">, NormalizedValuesScope<"CodeGenOptions">, 1707 NormalizedValues<["Embed_Off", "Embed_All", "Embed_Bitcode", "Embed_Marker"]>, 1708 MarshallingInfoEnum<CodeGenOpts<"EmbedBitcode">, "Embed_Off">; 1709def fembed_bitcode : Flag<["-"], "fembed-bitcode">, Group<f_Group>, 1710 Alias<fembed_bitcode_EQ>, AliasArgs<["all"]>, 1711 HelpText<"Embed LLVM IR bitcode as data">; 1712def fembed_bitcode_marker : Flag<["-"], "fembed-bitcode-marker">, 1713 Alias<fembed_bitcode_EQ>, AliasArgs<["marker"]>, 1714 HelpText<"Embed placeholder LLVM IR data as a marker">; 1715defm gnu_inline_asm : BoolFOption<"gnu-inline-asm", 1716 LangOpts<"GNUAsm">, DefaultTrue, 1717 NegFlag<SetFalse, [], [ClangOption, CC1Option], 1718 "Disable GNU style inline asm">, 1719 PosFlag<SetTrue>>; 1720 1721def fprofile_sample_use : Flag<["-"], "fprofile-sample-use">, Group<f_Group>, 1722 Visibility<[ClangOption, CLOption]>; 1723def fno_profile_sample_use : Flag<["-"], "fno-profile-sample-use">, Group<f_Group>, 1724 Visibility<[ClangOption, CLOption]>; 1725def fprofile_sample_use_EQ : Joined<["-"], "fprofile-sample-use=">, 1726 Group<f_Group>, 1727 Visibility<[ClangOption, CC1Option]>, 1728 HelpText<"Enable sample-based profile guided optimizations">, 1729 MarshallingInfoString<CodeGenOpts<"SampleProfileFile">>; 1730def fprofile_sample_accurate : Flag<["-"], "fprofile-sample-accurate">, 1731 Group<f_Group>, 1732 Visibility<[ClangOption, CC1Option]>, 1733 HelpText<"Specifies that the sample profile is accurate">, 1734 DocBrief<[{Specifies that the sample profile is accurate. If the sample 1735 profile is accurate, callsites without profile samples are marked 1736 as cold. Otherwise, treat callsites without profile samples as if 1737 we have no profile}]>, 1738 MarshallingInfoFlag<CodeGenOpts<"ProfileSampleAccurate">>; 1739def fsample_profile_use_profi : Flag<["-"], "fsample-profile-use-profi">, 1740 Visibility<[ClangOption, CC1Option]>, 1741 Group<f_Group>, 1742 HelpText<"Use profi to infer block and edge counts">, 1743 DocBrief<[{Infer block and edge counts. If the profiles have errors or missing 1744 blocks caused by sampling, profile inference (profi) can convert 1745 basic block counts to branch probabilites to fix them by extended 1746 and re-engineered classic MCMF (min-cost max-flow) approach.}]>; 1747def fno_profile_sample_accurate : Flag<["-"], "fno-profile-sample-accurate">, Group<f_Group>; 1748def fauto_profile : Flag<["-"], "fauto-profile">, Group<f_Group>, 1749 Alias<fprofile_sample_use>; 1750def fno_auto_profile : Flag<["-"], "fno-auto-profile">, Group<f_Group>, 1751 Alias<fno_profile_sample_use>; 1752def fauto_profile_EQ : Joined<["-"], "fauto-profile=">, 1753 Alias<fprofile_sample_use_EQ>; 1754def fauto_profile_accurate : Flag<["-"], "fauto-profile-accurate">, 1755 Group<f_Group>, Alias<fprofile_sample_accurate>; 1756def fno_auto_profile_accurate : Flag<["-"], "fno-auto-profile-accurate">, 1757 Group<f_Group>, Alias<fno_profile_sample_accurate>; 1758def fdebug_compilation_dir_EQ : Joined<["-"], "fdebug-compilation-dir=">, 1759 Group<f_Group>, 1760 Visibility<[ClangOption, CC1Option, CC1AsOption, CLOption, DXCOption]>, 1761 HelpText<"The compilation directory to embed in the debug info">, 1762 MarshallingInfoString<CodeGenOpts<"DebugCompilationDir">>; 1763def fdebug_compilation_dir : Separate<["-"], "fdebug-compilation-dir">, 1764 Group<f_Group>, 1765 Visibility<[ClangOption, CC1Option, CC1AsOption, CLOption, DXCOption]>, 1766 Alias<fdebug_compilation_dir_EQ>; 1767def fcoverage_compilation_dir_EQ : Joined<["-"], "fcoverage-compilation-dir=">, 1768 Group<f_Group>, Visibility<[ClangOption, CC1Option, CC1AsOption, CLOption]>, 1769 HelpText<"The compilation directory to embed in the coverage mapping.">, 1770 MarshallingInfoString<CodeGenOpts<"CoverageCompilationDir">>; 1771def ffile_compilation_dir_EQ : Joined<["-"], "ffile-compilation-dir=">, Group<f_Group>, 1772 Visibility<[ClangOption, CLOption, DXCOption]>, 1773 HelpText<"The compilation directory to embed in the debug info and coverage mapping.">; 1774defm debug_info_for_profiling : BoolFOption<"debug-info-for-profiling", 1775 CodeGenOpts<"DebugInfoForProfiling">, DefaultFalse, 1776 PosFlag<SetTrue, [], [ClangOption, CC1Option], 1777 "Emit extra debug info to make sample profile more accurate">, 1778 NegFlag<SetFalse>>; 1779def fprofile_instr_generate : Flag<["-"], "fprofile-instr-generate">, 1780 Group<f_Group>, Visibility<[ClangOption, CLOption]>, 1781 HelpText<"Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">; 1782def fprofile_instr_generate_EQ : Joined<["-"], "fprofile-instr-generate=">, 1783 Group<f_Group>, Visibility<[ClangOption, CLOption]>, MetaVarName<"<file>">, 1784 HelpText<"Generate instrumented code to collect execution counts into <file> (overridden by LLVM_PROFILE_FILE env var)">; 1785def fprofile_instr_use : Flag<["-"], "fprofile-instr-use">, Group<f_Group>, 1786 Visibility<[ClangOption, CLOption]>; 1787def fprofile_instr_use_EQ : Joined<["-"], "fprofile-instr-use=">, 1788 Group<f_Group>, Visibility<[ClangOption, CLOption]>, 1789 HelpText<"Use instrumentation data for profile-guided optimization">; 1790def fprofile_remapping_file_EQ : Joined<["-"], "fprofile-remapping-file=">, 1791 Group<f_Group>, Visibility<[ClangOption, CC1Option, CLOption]>, 1792 MetaVarName<"<file>">, 1793 HelpText<"Use the remappings described in <file> to match the profile data against names in the program">, 1794 MarshallingInfoString<CodeGenOpts<"ProfileRemappingFile">>; 1795defm coverage_mapping : BoolFOption<"coverage-mapping", 1796 CodeGenOpts<"CoverageMapping">, DefaultFalse, 1797 PosFlag<SetTrue, [], [ClangOption, CC1Option], 1798 "Generate coverage mapping to enable code coverage analysis">, 1799 NegFlag<SetFalse, [], [ClangOption], "Disable code coverage analysis">, BothFlags< 1800 [], [ClangOption, CLOption]>>; 1801defm mcdc_coverage : BoolFOption<"coverage-mcdc", 1802 CodeGenOpts<"MCDCCoverage">, DefaultFalse, 1803 PosFlag<SetTrue, [], [ClangOption, CC1Option], 1804 "Enable MC/DC criteria when generating code coverage">, 1805 NegFlag<SetFalse, [], [ClangOption], "Disable MC/DC coverage criteria">, 1806 BothFlags<[], [ClangOption, CLOption]>>; 1807def fmcdc_max_conditions_EQ : Joined<["-"], "fmcdc-max-conditions=">, 1808 Group<f_Group>, Visibility<[CC1Option]>, 1809 HelpText<"Maximum number of conditions in MC/DC coverage">, 1810 MarshallingInfoInt<CodeGenOpts<"MCDCMaxConds">, "32767">; 1811def fmcdc_max_test_vectors_EQ : Joined<["-"], "fmcdc-max-test-vectors=">, 1812 Group<f_Group>, Visibility<[CC1Option]>, 1813 HelpText<"Maximum number of test vectors in MC/DC coverage">, 1814 MarshallingInfoInt<CodeGenOpts<"MCDCMaxTVs">, "0x7FFFFFFE">; 1815def fprofile_generate : Flag<["-"], "fprofile-generate">, 1816 Group<f_Group>, Visibility<[ClangOption, CLOption]>, 1817 HelpText<"Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">; 1818def fprofile_generate_EQ : Joined<["-"], "fprofile-generate=">, 1819 Group<f_Group>, Visibility<[ClangOption, CLOption]>, 1820 MetaVarName<"<directory>">, 1821 HelpText<"Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">; 1822def fcs_profile_generate : Flag<["-"], "fcs-profile-generate">, 1823 Group<f_Group>, Visibility<[ClangOption, CLOption]>, 1824 HelpText<"Generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">; 1825def fcs_profile_generate_EQ : Joined<["-"], "fcs-profile-generate=">, 1826 Group<f_Group>, Visibility<[ClangOption, CLOption]>, 1827 MetaVarName<"<directory>">, 1828 HelpText<"Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">; 1829def fprofile_use : Flag<["-"], "fprofile-use">, Group<f_Group>, 1830 Visibility<[ClangOption, CLOption]>, Alias<fprofile_instr_use>; 1831def fprofile_use_EQ : Joined<["-"], "fprofile-use=">, 1832 Group<f_Group>, 1833 Visibility<[ClangOption, CLOption]>, 1834 MetaVarName<"<pathname>">, 1835 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>.">; 1836def fno_profile_instr_generate : Flag<["-"], "fno-profile-instr-generate">, 1837 Group<f_Group>, Visibility<[ClangOption, CLOption]>, 1838 HelpText<"Disable generation of profile instrumentation.">; 1839def fno_profile_generate : Flag<["-"], "fno-profile-generate">, 1840 Group<f_Group>, Visibility<[ClangOption, CLOption]>, 1841 HelpText<"Disable generation of profile instrumentation.">; 1842def fno_profile_instr_use : Flag<["-"], "fno-profile-instr-use">, 1843 Group<f_Group>, Visibility<[ClangOption, CLOption]>, 1844 HelpText<"Disable using instrumentation data for profile-guided optimization">; 1845def fno_profile_use : Flag<["-"], "fno-profile-use">, 1846 Alias<fno_profile_instr_use>; 1847def ftest_coverage : Flag<["-"], "ftest-coverage">, Group<f_Group>, 1848 HelpText<"Produce gcov notes files (*.gcno)">; 1849def fno_test_coverage : Flag<["-"], "fno-test-coverage">, Group<f_Group>; 1850def fprofile_arcs : Flag<["-"], "fprofile-arcs">, Group<f_Group>, 1851 HelpText<"Instrument code to produce gcov data files (*.gcda)">; 1852def fno_profile_arcs : Flag<["-"], "fno-profile-arcs">, Group<f_Group>; 1853def fprofile_filter_files_EQ : Joined<["-"], "fprofile-filter-files=">, 1854 Group<f_Group>, Visibility<[ClangOption, CC1Option, CLOption]>, 1855 HelpText<"Instrument only functions from files where names match any regex separated by a semi-colon">, 1856 MarshallingInfoString<CodeGenOpts<"ProfileFilterFiles">>; 1857def fprofile_exclude_files_EQ : Joined<["-"], "fprofile-exclude-files=">, 1858 Group<f_Group>, Visibility<[ClangOption, CC1Option, CLOption]>, 1859 HelpText<"Instrument only functions from files where names don't match all the regexes separated by a semi-colon">, 1860 MarshallingInfoString<CodeGenOpts<"ProfileExcludeFiles">>; 1861def fprofile_update_EQ : Joined<["-"], "fprofile-update=">, 1862 Group<f_Group>, Visibility<[ClangOption, CC1Option, CLOption]>, 1863 Values<"atomic,prefer-atomic,single">, 1864 MetaVarName<"<method>">, HelpText<"Set update method of profile counters">, 1865 MarshallingInfoFlag<CodeGenOpts<"AtomicProfileUpdate">>; 1866defm pseudo_probe_for_profiling : BoolFOption<"pseudo-probe-for-profiling", 1867 CodeGenOpts<"PseudoProbeForProfiling">, DefaultFalse, 1868 PosFlag<SetTrue, [], [ClangOption], "Emit">, 1869 NegFlag<SetFalse, [], [ClangOption], "Do not emit">, 1870 BothFlags<[], [ClangOption, CC1Option], 1871 " pseudo probes for sample profiling">>; 1872def forder_file_instrumentation : Flag<["-"], "forder-file-instrumentation">, 1873 Group<f_Group>, Visibility<[ClangOption, CC1Option, CLOption]>, 1874 HelpText<"Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">; 1875def fprofile_list_EQ : Joined<["-"], "fprofile-list=">, 1876 Group<f_Group>, Visibility<[ClangOption, CC1Option, CLOption]>, 1877 HelpText<"Filename defining the list of functions/files to instrument. " 1878 "The file uses the sanitizer special case list format.">, 1879 MarshallingInfoStringVector<LangOpts<"ProfileListFiles">>; 1880def fprofile_function_groups : Joined<["-"], "fprofile-function-groups=">, 1881 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, MetaVarName<"<N>">, 1882 HelpText<"Partition functions into N groups and select only functions in group i to be instrumented using -fprofile-selected-function-group">, 1883 MarshallingInfoInt<CodeGenOpts<"ProfileTotalFunctionGroups">, "1">; 1884def fprofile_selected_function_group : 1885 Joined<["-"], "fprofile-selected-function-group=">, Group<f_Group>, 1886 Visibility<[ClangOption, CC1Option]>, MetaVarName<"<i>">, 1887 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">, 1888 MarshallingInfoInt<CodeGenOpts<"ProfileSelectedFunctionGroup">>; 1889def fswift_async_fp_EQ : Joined<["-"], "fswift-async-fp=">, 1890 Group<f_Group>, 1891 Visibility<[ClangOption, CC1Option, CC1AsOption, CLOption]>, 1892 MetaVarName<"<option>">, 1893 HelpText<"Control emission of Swift async extended frame info">, 1894 Values<"auto,always,never">, 1895 NormalizedValuesScope<"CodeGenOptions::SwiftAsyncFramePointerKind">, 1896 NormalizedValues<["Auto", "Always", "Never"]>, 1897 MarshallingInfoEnum<CodeGenOpts<"SwiftAsyncFramePointer">, "Always">; 1898defm apinotes : BoolOption<"f", "apinotes", 1899 LangOpts<"APINotes">, DefaultFalse, 1900 PosFlag<SetTrue, [], [ClangOption], "Enable">, 1901 NegFlag<SetFalse, [], [ClangOption], "Disable">, 1902 BothFlags<[], [ClangOption, CC1Option], " external API notes support">>, 1903 Group<f_clang_Group>; 1904defm apinotes_modules : BoolOption<"f", "apinotes-modules", 1905 LangOpts<"APINotesModules">, DefaultFalse, 1906 PosFlag<SetTrue, [], [ClangOption], "Enable">, 1907 NegFlag<SetFalse, [], [ClangOption], "Disable">, 1908 BothFlags<[], [ClangOption, CC1Option], " module-based external API notes support">>, 1909 Group<f_clang_Group>; 1910def fapinotes_swift_version : Joined<["-"], "fapinotes-swift-version=">, 1911 Group<f_clang_Group>, Visibility<[ClangOption, CC1Option]>, 1912 MetaVarName<"<version>">, 1913 HelpText<"Specify the Swift version to use when filtering API notes">; 1914 1915defm bounds_safety : BoolFOption< 1916 "experimental-bounds-safety", 1917 LangOpts<"BoundsSafety">, DefaultFalse, 1918 PosFlag<SetTrue, [], [CC1Option], "Enable">, 1919 NegFlag<SetFalse, [], [CC1Option], "Disable">, 1920 BothFlags<[], [CC1Option], 1921 " experimental bounds safety extension for C">>; 1922 1923defm addrsig : BoolFOption<"addrsig", 1924 CodeGenOpts<"Addrsig">, DefaultFalse, 1925 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Emit">, 1926 NegFlag<SetFalse, [], [ClangOption], "Don't emit">, 1927 BothFlags<[], [ClangOption, CLOption], 1928 " an address-significance table">>; 1929defm blocks : OptInCC1FFlag<"blocks", "Enable the 'blocks' language feature", 1930 "", "", [ClangOption, CLOption]>; 1931def fbootclasspath_EQ : Joined<["-"], "fbootclasspath=">, Group<f_Group>; 1932defm borland_extensions : BoolFOption<"borland-extensions", 1933 LangOpts<"Borland">, DefaultFalse, 1934 PosFlag<SetTrue, [], [ClangOption, CC1Option], 1935 "Accept non-standard constructs supported by the Borland compiler">, 1936 NegFlag<SetFalse>>; 1937def fbuiltin : Flag<["-"], "fbuiltin">, Group<f_Group>, 1938 Visibility<[ClangOption, CLOption, DXCOption]>; 1939def fbuiltin_module_map : Flag <["-"], "fbuiltin-module-map">, Group<f_Group>, 1940 Flags<[]>, HelpText<"Load the clang builtins module map file.">; 1941defm caret_diagnostics : BoolFOption<"caret-diagnostics", 1942 DiagnosticOpts<"ShowCarets">, DefaultTrue, 1943 NegFlag<SetFalse, [], [ClangOption, CC1Option]>, 1944 PosFlag<SetTrue>>; 1945def fclang_abi_compat_EQ : Joined<["-"], "fclang-abi-compat=">, Group<f_clang_Group>, 1946 Visibility<[ClangOption, CC1Option]>, 1947 MetaVarName<"<version>">, Values<"<major>.<minor>,latest">, 1948 HelpText<"Attempt to match the ABI of Clang <version>">; 1949def fclasspath_EQ : Joined<["-"], "fclasspath=">, Group<f_Group>; 1950def fcolor_diagnostics : Flag<["-"], "fcolor-diagnostics">, Group<f_Group>, 1951 1952 Visibility<[ClangOption, CLOption, DXCOption, CC1Option, FlangOption, FC1Option]>, 1953 HelpText<"Enable colors in diagnostics">; 1954def fno_color_diagnostics : Flag<["-"], "fno-color-diagnostics">, Group<f_Group>, 1955 Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, 1956 HelpText<"Disable colors in diagnostics">; 1957def : Flag<["-"], "fdiagnostics-color">, Group<f_Group>, 1958 Visibility<[ClangOption, CLOption, DXCOption]>, Alias<fcolor_diagnostics>; 1959def : Flag<["-"], "fno-diagnostics-color">, Group<f_Group>, 1960 Visibility<[ClangOption, CLOption, DXCOption]>, Alias<fno_color_diagnostics>; 1961def fdiagnostics_color_EQ : Joined<["-"], "fdiagnostics-color=">, Group<f_Group>; 1962def fansi_escape_codes : Flag<["-"], "fansi-escape-codes">, Group<f_Group>, 1963 Visibility<[ClangOption, CLOption, DXCOption, CC1Option]>, 1964 HelpText<"Use ANSI escape codes for diagnostics">, 1965 MarshallingInfoFlag<DiagnosticOpts<"UseANSIEscapeCodes">>; 1966def fcomment_block_commands : CommaJoined<["-"], "fcomment-block-commands=">, Group<f_clang_Group>, 1967 Visibility<[ClangOption, CC1Option]>, 1968 HelpText<"Treat each comma separated argument in <arg> as a documentation comment block command">, 1969 MetaVarName<"<arg>">, MarshallingInfoStringVector<LangOpts<"CommentOpts.BlockCommandNames">>; 1970defm define_target_os_macros : OptInCC1FFlag<"define-target-os-macros", 1971 "Enable", "Disable", " predefined target OS macros", 1972 [ClangOption, CC1Option]>; 1973def fparse_all_comments : Flag<["-"], "fparse-all-comments">, Group<f_clang_Group>, 1974 Visibility<[ClangOption, CC1Option]>, 1975 MarshallingInfoFlag<LangOpts<"CommentOpts.ParseAllComments">>; 1976def frecord_command_line : Flag<["-"], "frecord-command-line">, 1977 DocBrief<[{Generate a section named ".GCC.command.line" containing the clang 1978driver command-line. After linking, the section may contain multiple command 1979lines, which will be individually terminated by null bytes. Separate arguments 1980within a command line are combined with spaces; spaces and backslashes within an 1981argument are escaped with backslashes. This format differs from the format of 1982the equivalent section produced by GCC with the -frecord-gcc-switches flag. 1983This option is currently only supported on ELF targets.}]>, 1984 Group<f_clang_Group>; 1985def fno_record_command_line : Flag<["-"], "fno-record-command-line">, 1986 Group<f_clang_Group>; 1987def : Flag<["-"], "frecord-gcc-switches">, Alias<frecord_command_line>; 1988def : Flag<["-"], "fno-record-gcc-switches">, Alias<fno_record_command_line>; 1989def fcommon : Flag<["-"], "fcommon">, Group<f_Group>, 1990 Visibility<[ClangOption, CLOption, CC1Option]>, 1991 HelpText<"Place uninitialized global variables in a common block">, 1992 MarshallingInfoNegativeFlag<CodeGenOpts<"NoCommon">>, 1993 DocBrief<[{Place definitions of variables with no storage class and no initializer 1994(tentative definitions) in a common block, instead of generating individual 1995zero-initialized definitions (default -fno-common).}]>; 1996def fcompile_resource_EQ : Joined<["-"], "fcompile-resource=">, Group<f_Group>; 1997defm complete_member_pointers : BoolOption<"f", "complete-member-pointers", 1998 LangOpts<"CompleteMemberPointers">, DefaultFalse, 1999 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Require">, 2000 NegFlag<SetFalse, [], [ClangOption], "Do not require">, 2001 BothFlags<[], [ClangOption, CLOption], 2002 " member pointer base types to be complete if they" 2003 " would be significant under the Microsoft ABI">>, 2004 Group<f_clang_Group>; 2005def fcf_runtime_abi_EQ : Joined<["-"], "fcf-runtime-abi=">, Group<f_Group>, 2006 Visibility<[ClangOption, CC1Option]>, 2007 Values<"unspecified,standalone,objc,swift,swift-5.0,swift-4.2,swift-4.1">, 2008 NormalizedValuesScope<"LangOptions::CoreFoundationABI">, 2009 NormalizedValues<["ObjectiveC", "ObjectiveC", "ObjectiveC", "Swift5_0", "Swift5_0", "Swift4_2", "Swift4_1"]>, 2010 MarshallingInfoEnum<LangOpts<"CFRuntime">, "ObjectiveC">; 2011defm constant_cfstrings : BoolFOption<"constant-cfstrings", 2012 LangOpts<"NoConstantCFStrings">, DefaultFalse, 2013 NegFlag<SetTrue, [], [ClangOption, CC1Option], 2014 "Disable creation of CodeFoundation-type constant strings">, 2015 PosFlag<SetFalse>>; 2016def fconstant_string_class_EQ : Joined<["-"], "fconstant-string-class=">, Group<f_Group>; 2017def fconstexpr_depth_EQ : Joined<["-"], "fconstexpr-depth=">, Group<f_Group>, 2018 Visibility<[ClangOption, CC1Option]>, 2019 HelpText<"Set the maximum depth of recursive constexpr function calls">, 2020 MarshallingInfoInt<LangOpts<"ConstexprCallDepth">, "512">; 2021def fconstexpr_steps_EQ : Joined<["-"], "fconstexpr-steps=">, Group<f_Group>, 2022 Visibility<[ClangOption, CC1Option]>, 2023 HelpText<"Set the maximum number of steps in constexpr function evaluation">, 2024 MarshallingInfoInt<LangOpts<"ConstexprStepLimit">, "1048576">; 2025def fexperimental_new_constant_interpreter : Flag<["-"], "fexperimental-new-constant-interpreter">, Group<f_Group>, 2026 HelpText<"Enable the experimental new constant interpreter">, 2027 Visibility<[ClangOption, CC1Option]>, 2028 MarshallingInfoFlag<LangOpts<"EnableNewConstInterp">>; 2029def fconstexpr_backtrace_limit_EQ : Joined<["-"], "fconstexpr-backtrace-limit=">, Group<f_Group>, 2030 Visibility<[ClangOption, CC1Option]>, 2031 HelpText<"Set the maximum number of entries to print in a constexpr evaluation backtrace (0 = no limit)">, 2032 MarshallingInfoInt<DiagnosticOpts<"ConstexprBacktraceLimit">, "DiagnosticOptions::DefaultConstexprBacktraceLimit">; 2033def fcrash_diagnostics_EQ : Joined<["-"], "fcrash-diagnostics=">, Group<f_clang_Group>, 2034 Flags<[NoArgumentUnused]>, Visibility<[ClangOption, CLOption, DXCOption]>, 2035 HelpText<"Set level of crash diagnostic reporting, (option: off, compiler, all)">; 2036def fcrash_diagnostics : Flag<["-"], "fcrash-diagnostics">, Group<f_clang_Group>, 2037 Flags<[NoArgumentUnused]>, Visibility<[ClangOption, CLOption, DXCOption]>, 2038 HelpText<"Enable crash diagnostic reporting (default)">, Alias<fcrash_diagnostics_EQ>, AliasArgs<["compiler"]>; 2039def fno_crash_diagnostics : Flag<["-"], "fno-crash-diagnostics">, Group<f_clang_Group>, 2040 Flags<[NoArgumentUnused]>, Visibility<[ClangOption, CLOption, DXCOption]>, 2041 Alias<gen_reproducer_eq>, AliasArgs<["off"]>, 2042 HelpText<"Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash">; 2043def fcrash_diagnostics_dir : Joined<["-"], "fcrash-diagnostics-dir=">, 2044 Group<f_clang_Group>, Flags<[NoArgumentUnused]>, 2045 Visibility<[ClangOption, CLOption, DXCOption]>, 2046 HelpText<"Put crash-report files in <dir>">, MetaVarName<"<dir>">; 2047def fcreate_profile : Flag<["-"], "fcreate-profile">, Group<f_Group>; 2048defm cxx_exceptions: BoolFOption<"cxx-exceptions", 2049 LangOpts<"CXXExceptions">, DefaultFalse, 2050 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Enable C++ exceptions">, 2051 NegFlag<SetFalse>>; 2052defm async_exceptions: BoolFOption<"async-exceptions", 2053 LangOpts<"EHAsynch">, DefaultFalse, 2054 PosFlag<SetTrue, [], [ClangOption, CC1Option], 2055 "Enable EH Asynchronous exceptions">, 2056 NegFlag<SetFalse>>; 2057defm cxx_modules : BoolFOption<"cxx-modules", 2058 LangOpts<"CPlusPlusModules">, Default<cpp20.KeyPath>, 2059 NegFlag<SetFalse, [], [ClangOption, CC1Option], "Disable">, 2060 PosFlag<SetTrue, [], [ClangOption], "Enable">, 2061 BothFlags<[], [], " modules for C++">>, 2062 ShouldParseIf<cplusplus.KeyPath>; 2063def fdebug_pass_arguments : Flag<["-"], "fdebug-pass-arguments">, Group<f_Group>; 2064def fdebug_pass_structure : Flag<["-"], "fdebug-pass-structure">, Group<f_Group>; 2065def fdepfile_entry : Joined<["-"], "fdepfile-entry=">, 2066 Group<f_clang_Group>, Visibility<[ClangOption, CC1Option]>; 2067def fdiagnostics_fixit_info : Flag<["-"], "fdiagnostics-fixit-info">, Group<f_clang_Group>; 2068def fno_diagnostics_fixit_info : Flag<["-"], "fno-diagnostics-fixit-info">, Group<f_Group>, 2069 Visibility<[ClangOption, CC1Option]>, 2070 HelpText<"Do not include fixit information in diagnostics">, 2071 MarshallingInfoNegativeFlag<DiagnosticOpts<"ShowFixits">>; 2072def fdiagnostics_parseable_fixits : Flag<["-"], "fdiagnostics-parseable-fixits">, Group<f_clang_Group>, 2073 Visibility<[ClangOption, CLOption, DXCOption, CC1Option]>, 2074 HelpText<"Print fix-its in machine parseable form">, 2075 MarshallingInfoFlag<DiagnosticOpts<"ShowParseableFixits">>; 2076def fdiagnostics_print_source_range_info : Flag<["-"], "fdiagnostics-print-source-range-info">, 2077 Group<f_clang_Group>, Visibility<[ClangOption, CC1Option]>, 2078 HelpText<"Print source range spans in numeric form">, 2079 MarshallingInfoFlag<DiagnosticOpts<"ShowSourceRanges">>; 2080defm diagnostics_show_hotness : BoolFOption<"diagnostics-show-hotness", 2081 CodeGenOpts<"DiagnosticsWithHotness">, DefaultFalse, 2082 PosFlag<SetTrue, [], [ClangOption, CC1Option], 2083 "Enable profile hotness information in diagnostic line">, 2084 NegFlag<SetFalse>>; 2085def fdiagnostics_hotness_threshold_EQ : Joined<["-"], "fdiagnostics-hotness-threshold=">, 2086 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 2087 MetaVarName<"<value>">, 2088 HelpText<"Prevent optimization remarks from being output if they do not have at least this profile count. " 2089 "Use 'auto' to apply the threshold from profile summary">; 2090def fdiagnostics_misexpect_tolerance_EQ : Joined<["-"], "fdiagnostics-misexpect-tolerance=">, 2091 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 2092 MetaVarName<"<value>">, 2093 HelpText<"Prevent misexpect diagnostics from being output if the profile counts are within N% of the expected. ">; 2094defm diagnostics_show_option : BoolFOption<"diagnostics-show-option", 2095 DiagnosticOpts<"ShowOptionNames">, DefaultTrue, 2096 NegFlag<SetFalse, [], [ClangOption, CC1Option]>, 2097 PosFlag<SetTrue, [], [ClangOption], "Print option name with mappable diagnostics">>; 2098defm diagnostics_show_note_include_stack : BoolFOption<"diagnostics-show-note-include-stack", 2099 DiagnosticOpts<"ShowNoteIncludeStack">, DefaultFalse, 2100 PosFlag<SetTrue, [], [ClangOption], "Display include stacks for diagnostic notes">, 2101 NegFlag<SetFalse>, BothFlags<[], [ClangOption, CC1Option]>>; 2102def fdiagnostics_format_EQ : Joined<["-"], "fdiagnostics-format=">, Group<f_clang_Group>; 2103def fdiagnostics_show_category_EQ : Joined<["-"], "fdiagnostics-show-category=">, Group<f_clang_Group>; 2104def fdiagnostics_show_template_tree : Flag<["-"], "fdiagnostics-show-template-tree">, 2105 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 2106 HelpText<"Print a template comparison tree for differing templates">, 2107 MarshallingInfoFlag<DiagnosticOpts<"ShowTemplateTree">>; 2108defm safe_buffer_usage_suggestions : BoolFOption<"safe-buffer-usage-suggestions", 2109 DiagnosticOpts<"ShowSafeBufferUsageSuggestions">, DefaultFalse, 2110 PosFlag<SetTrue, [], [ClangOption, CC1Option], 2111 "Display suggestions to update code associated with -Wunsafe-buffer-usage warnings">, 2112 NegFlag<SetFalse>>; 2113def fverify_intermediate_code : Flag<["-"], "fverify-intermediate-code">, 2114 Group<f_clang_Group>, Visibility<[ClangOption, CLOption, DXCOption]>, 2115 HelpText<"Enable verification of LLVM IR">; 2116def fno_verify_intermediate_code : Flag<["-"], "fno-verify-intermediate-code">, 2117 Group<f_clang_Group>, Visibility<[ClangOption, CLOption, DXCOption]>, 2118 HelpText<"Disable verification of LLVM IR">; 2119def fdiscard_value_names : Flag<["-"], "fdiscard-value-names">, 2120 Group<f_clang_Group>, Visibility<[ClangOption, DXCOption]>, 2121 HelpText<"Discard value names in LLVM IR">; 2122def fno_discard_value_names : Flag<["-"], "fno-discard-value-names">, 2123 Group<f_clang_Group>, Visibility<[ClangOption, DXCOption]>, 2124 HelpText<"Do not discard value names in LLVM IR">; 2125defm dollars_in_identifiers : BoolFOption<"dollars-in-identifiers", 2126 LangOpts<"DollarIdents">, Default<!strconcat("!", asm_preprocessor.KeyPath)>, 2127 PosFlag<SetTrue, [], [ClangOption], "Allow">, 2128 NegFlag<SetFalse, [], [ClangOption], "Disallow">, 2129 BothFlags<[], [ClangOption, CC1Option], " '$' in identifiers">>; 2130def fdwarf2_cfi_asm : Flag<["-"], "fdwarf2-cfi-asm">, Group<clang_ignored_f_Group>; 2131def fno_dwarf2_cfi_asm : Flag<["-"], "fno-dwarf2-cfi-asm">, Group<clang_ignored_f_Group>; 2132defm dwarf_directory_asm : BoolFOption<"dwarf-directory-asm", 2133 CodeGenOpts<"NoDwarfDirectoryAsm">, DefaultFalse, 2134 NegFlag<SetTrue, [], [ClangOption, CC1Option]>, 2135 PosFlag<SetFalse>>; 2136defm elide_constructors : BoolFOption<"elide-constructors", 2137 LangOpts<"ElideConstructors">, DefaultTrue, 2138 NegFlag<SetFalse, [], [ClangOption, CC1Option], 2139 "Disable C++ copy constructor elision">, 2140 PosFlag<SetTrue>>; 2141def fno_elide_type : Flag<["-"], "fno-elide-type">, Group<f_Group>, 2142 Visibility<[ClangOption, CC1Option]>, 2143 HelpText<"Do not elide types when printing diagnostics">, 2144 MarshallingInfoNegativeFlag<DiagnosticOpts<"ElideType">>; 2145def feliminate_unused_debug_symbols : Flag<["-"], "feliminate-unused-debug-symbols">, Group<f_Group>; 2146defm eliminate_unused_debug_types : OptOutCC1FFlag<"eliminate-unused-debug-types", 2147 "Do not emit ", "Emit ", " debug info for defined but unused types", [ClangOption, CLOption]>; 2148def femit_all_decls : Flag<["-"], "femit-all-decls">, Group<f_Group>, 2149 Visibility<[ClangOption, CC1Option]>, 2150 HelpText<"Emit all declarations, even if unused">, 2151 MarshallingInfoFlag<LangOpts<"EmitAllDecls">>; 2152defm emulated_tls : BoolFOption<"emulated-tls", 2153 CodeGenOpts<"EmulatedTLS">, DefaultFalse, 2154 PosFlag<SetTrue, [], [ClangOption, CC1Option], 2155 "Use emutls functions to access thread_local variables">, 2156 NegFlag<SetFalse>>; 2157def fencoding_EQ : Joined<["-"], "fencoding=">, Group<f_Group>; 2158def ferror_limit_EQ : Joined<["-"], "ferror-limit=">, Group<f_Group>, 2159 Visibility<[ClangOption, CLOption, DXCOption]>; 2160defm exceptions : BoolFOption<"exceptions", 2161 LangOpts<"Exceptions">, DefaultFalse, 2162 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Enable">, 2163 NegFlag<SetFalse, [], [ClangOption], "Disable">, 2164 BothFlags<[], [ClangOption], " support for exception handling">>; 2165def fdwarf_exceptions : Flag<["-"], "fdwarf-exceptions">, Group<f_Group>, 2166 HelpText<"Use DWARF style exceptions">; 2167def fsjlj_exceptions : Flag<["-"], "fsjlj-exceptions">, Group<f_Group>, 2168 HelpText<"Use SjLj style exceptions">; 2169def fseh_exceptions : Flag<["-"], "fseh-exceptions">, Group<f_Group>, 2170 HelpText<"Use SEH style exceptions">; 2171def fwasm_exceptions : Flag<["-"], "fwasm-exceptions">, Group<f_Group>, 2172 HelpText<"Use WebAssembly style exceptions">; 2173def exception_model : Separate<["-"], "exception-model">, 2174 Visibility<[CC1Option]>, HelpText<"The exception model">, 2175 Values<"dwarf,sjlj,seh,wasm">, 2176 NormalizedValuesScope<"LangOptions::ExceptionHandlingKind">, 2177 NormalizedValues<["DwarfCFI", "SjLj", "WinEH", "Wasm"]>, 2178 MarshallingInfoEnum<LangOpts<"ExceptionHandling">, "None">; 2179def exception_model_EQ : Joined<["-"], "exception-model=">, 2180 Visibility<[CC1Option]>, Alias<exception_model>; 2181def fignore_exceptions : Flag<["-"], "fignore-exceptions">, Group<f_Group>, 2182 Visibility<[ClangOption, CC1Option]>, 2183 HelpText<"Enable support for ignoring exception handling constructs">, 2184 MarshallingInfoFlag<LangOpts<"IgnoreExceptions">>; 2185defm assume_nothrow_exception_dtor: BoolFOption<"assume-nothrow-exception-dtor", 2186 LangOpts<"AssumeNothrowExceptionDtor">, DefaultFalse, 2187 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Assume that exception objects' destructors are non-throwing">, 2188 NegFlag<SetFalse>>; 2189def fexcess_precision_EQ : Joined<["-"], "fexcess-precision=">, Group<f_Group>, 2190 Visibility<[ClangOption, CLOption]>, 2191 HelpText<"Allows control over excess precision on targets where native " 2192 "support for the precision types is not available. By default, excess " 2193 "precision is used to calculate intermediate results following the " 2194 "rules specified in ISO C99.">, 2195 Values<"standard,fast,none">, NormalizedValuesScope<"LangOptions">, 2196 NormalizedValues<["FPP_Standard", "FPP_Fast", "FPP_None"]>; 2197def ffloat16_excess_precision_EQ : Joined<["-"], "ffloat16-excess-precision=">, 2198 Group<f_Group>, Visibility<[CC1Option]>, 2199 HelpText<"Allows control over excess precision on targets where native " 2200 "support for Float16 precision types is not available. By default, excess " 2201 "precision is used to calculate intermediate results following the " 2202 "rules specified in ISO C99.">, 2203 Values<"standard,fast,none">, NormalizedValuesScope<"LangOptions">, 2204 NormalizedValues<["FPP_Standard", "FPP_Fast", "FPP_None"]>, 2205 MarshallingInfoEnum<LangOpts<"Float16ExcessPrecision">, "FPP_Standard">; 2206def fbfloat16_excess_precision_EQ : Joined<["-"], "fbfloat16-excess-precision=">, 2207 Group<f_Group>, Visibility<[CC1Option]>, 2208 HelpText<"Allows control over excess precision on targets where native " 2209 "support for BFloat16 precision types is not available. By default, excess " 2210 "precision is used to calculate intermediate results following the " 2211 "rules specified in ISO C99.">, 2212 Values<"standard,fast,none">, NormalizedValuesScope<"LangOptions">, 2213 NormalizedValues<["FPP_Standard", "FPP_Fast", "FPP_None"]>, 2214 MarshallingInfoEnum<LangOpts<"BFloat16ExcessPrecision">, "FPP_Standard">; 2215def : Flag<["-"], "fexpensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>; 2216def : Flag<["-"], "fno-expensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>; 2217def fextdirs_EQ : Joined<["-"], "fextdirs=">, Group<f_Group>; 2218def : Flag<["-"], "fdefer-pop">, Group<clang_ignored_gcc_optimization_f_Group>; 2219def : Flag<["-"], "fno-defer-pop">, Group<clang_ignored_gcc_optimization_f_Group>; 2220def : Flag<["-"], "fextended-identifiers">, Group<clang_ignored_f_Group>; 2221def : Flag<["-"], "fno-extended-identifiers">, Group<f_Group>, 2222 Flags<[Unsupported]>; 2223def fhosted : Flag<["-"], "fhosted">, Group<f_Group>; 2224def fdenormal_fp_math_EQ : Joined<["-"], "fdenormal-fp-math=">, Group<f_Group>, 2225 Visibility<[ClangOption, CC1Option]>; 2226def ffile_reproducible : Flag<["-"], "ffile-reproducible">, Group<f_Group>, 2227 Visibility<[ClangOption, CLOption, CC1Option]>, 2228 HelpText<"Use the target's platform-specific path separator character when " 2229 "expanding the __FILE__ macro">; 2230def fno_file_reproducible : Flag<["-"], "fno-file-reproducible">, 2231 Group<f_Group>, Visibility<[ClangOption, CLOption, CC1Option]>, 2232 HelpText<"Use the host's platform-specific path separator character when " 2233 "expanding the __FILE__ macro">; 2234def ffp_eval_method_EQ : Joined<["-"], "ffp-eval-method=">, Group<f_Group>, 2235 Visibility<[ClangOption, CC1Option]>, 2236 HelpText<"Specifies the evaluation method to use for floating-point arithmetic.">, 2237 Values<"source,double,extended">, NormalizedValuesScope<"LangOptions">, 2238 NormalizedValues<["FEM_Source", "FEM_Double", "FEM_Extended"]>, 2239 MarshallingInfoEnum<LangOpts<"FPEvalMethod">, "FEM_UnsetOnCommandLine">; 2240def ffp_model_EQ : Joined<["-"], "ffp-model=">, Group<f_Group>, 2241 HelpText<"Controls the semantics of floating-point calculations.">; 2242def ffp_exception_behavior_EQ : Joined<["-"], "ffp-exception-behavior=">, Group<f_Group>, 2243 Visibility<[ClangOption, CC1Option]>, 2244 HelpText<"Specifies the exception behavior of floating-point operations.">, 2245 Values<"ignore,maytrap,strict">, NormalizedValuesScope<"LangOptions">, 2246 NormalizedValues<["FPE_Ignore", "FPE_MayTrap", "FPE_Strict"]>, 2247 MarshallingInfoEnum<LangOpts<"FPExceptionMode">, "FPE_Default">; 2248defm fast_math : BoolFOption<"fast-math", 2249 LangOpts<"FastMath">, DefaultFalse, 2250 PosFlag<SetTrue, [], [ClangOption, CC1Option, FC1Option, FlangOption], 2251 "Allow aggressive, lossy floating-point optimizations", 2252 [cl_fast_relaxed_math.KeyPath]>, 2253 NegFlag<SetFalse, [], [ClangOption, CC1Option, FC1Option, FlangOption]>>; 2254defm math_errno : BoolFOption<"math-errno", 2255 LangOpts<"MathErrno">, DefaultFalse, 2256 PosFlag<SetTrue, [], [ClangOption, CC1Option], 2257 "Require math functions to indicate errors by setting errno">, 2258 NegFlag<SetFalse>>, 2259 ShouldParseIf<!strconcat("!", open_cl.KeyPath)>; 2260def fextend_args_EQ : Joined<["-"], "fextend-arguments=">, Group<f_Group>, 2261 Flags<[NoArgumentUnused]>, Visibility<[ClangOption, CC1Option]>, 2262 HelpText<"Controls how scalar integer arguments are extended in calls " 2263 "to unprototyped and varargs functions">, 2264 Values<"32,64">, 2265 NormalizedValues<["ExtendTo32", "ExtendTo64"]>, 2266 NormalizedValuesScope<"LangOptions::ExtendArgsKind">, 2267 MarshallingInfoEnum<LangOpts<"ExtendIntArgs">,"ExtendTo32">; 2268def fbracket_depth_EQ : Joined<["-"], "fbracket-depth=">, Group<f_Group>, 2269 Visibility<[ClangOption, CLOption]>; 2270def fsignaling_math : Flag<["-"], "fsignaling-math">, Group<f_Group>; 2271def fno_signaling_math : Flag<["-"], "fno-signaling-math">, Group<f_Group>; 2272defm jump_tables : BoolFOption<"jump-tables", 2273 CodeGenOpts<"NoUseJumpTables">, DefaultFalse, 2274 NegFlag<SetTrue, [], [ClangOption, CC1Option], "Do not use">, 2275 PosFlag<SetFalse, [], [ClangOption], "Use">, 2276 BothFlags<[], [ClangOption], " jump tables for lowering switches">>; 2277defm force_enable_int128 : BoolFOption<"force-enable-int128", 2278 TargetOpts<"ForceEnableInt128">, DefaultFalse, 2279 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Enable">, 2280 NegFlag<SetFalse, [], [ClangOption], "Disable">, 2281 BothFlags<[], [ClangOption], " support for int128_t type">>; 2282defm keep_static_consts : BoolFOption<"keep-static-consts", 2283 CodeGenOpts<"KeepStaticConsts">, DefaultFalse, 2284 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Keep">, 2285 NegFlag<SetFalse, [], [ClangOption], "Don't keep">, 2286 BothFlags<[], [], " static const variables even if unused">>; 2287defm keep_persistent_storage_variables : BoolFOption<"keep-persistent-storage-variables", 2288 CodeGenOpts<"KeepPersistentStorageVariables">, DefaultFalse, 2289 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Enable">, 2290 NegFlag<SetFalse, [], [ClangOption], "Disable">, 2291 BothFlags<[], [], 2292 " keeping all variables that have a persistent storage duration, including global, static and thread-local variables, to guarantee that they can be directly addressed">>; 2293defm fixed_point : BoolFOption<"fixed-point", 2294 LangOpts<"FixedPoint">, DefaultFalse, 2295 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Enable">, 2296 NegFlag<SetFalse, [], [ClangOption], "Disable">, 2297 BothFlags<[], [ClangOption], " fixed point types">>; 2298defm cxx_static_destructors : BoolFOption<"c++-static-destructors", 2299 LangOpts<"RegisterStaticDestructors">, DefaultTrue, 2300 NegFlag<SetFalse, [], [ClangOption, CC1Option], 2301 "Disable C++ static destructor registration">, 2302 PosFlag<SetTrue>>; 2303def fsymbol_partition_EQ : Joined<["-"], "fsymbol-partition=">, Group<f_Group>, 2304 Visibility<[ClangOption, CC1Option]>, 2305 MarshallingInfoString<CodeGenOpts<"SymbolPartition">>; 2306 2307defm memory_profile : OptInCC1FFlag<"memory-profile", "Enable", "Disable", " heap memory profiling">; 2308def fmemory_profile_EQ : Joined<["-"], "fmemory-profile=">, 2309 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 2310 MetaVarName<"<directory>">, 2311 HelpText<"Enable heap memory profiling and dump results into <directory>">; 2312def fmemory_profile_use_EQ : Joined<["-"], "fmemory-profile-use=">, 2313 Group<f_Group>, Visibility<[ClangOption, CC1Option, CLOption]>, 2314 MetaVarName<"<pathname>">, 2315 HelpText<"Use memory profile for profile-guided memory optimization">, 2316 MarshallingInfoString<CodeGenOpts<"MemoryProfileUsePath">>; 2317 2318// Begin sanitizer flags. These should all be core options exposed in all driver 2319// modes. 2320let Visibility = [ClangOption, CC1Option, CLOption] in { 2321 2322def fsanitize_EQ : CommaJoined<["-"], "fsanitize=">, Group<f_clang_Group>, 2323 MetaVarName<"<check>">, 2324 HelpText<"Turn on runtime checks for various forms of undefined " 2325 "or suspicious behavior. See user manual for available checks">; 2326def fno_sanitize_EQ : CommaJoined<["-"], "fno-sanitize=">, Group<f_clang_Group>, 2327 Visibility<[ClangOption, CLOption]>; 2328 2329def fsanitize_ignorelist_EQ : Joined<["-"], "fsanitize-ignorelist=">, 2330 Group<f_clang_Group>, HelpText<"Path to ignorelist file for sanitizers">; 2331def : Joined<["-"], "fsanitize-blacklist=">, 2332 Group<f_clang_Group>, Flags<[HelpHidden]>, Alias<fsanitize_ignorelist_EQ>, 2333 HelpText<"Alias for -fsanitize-ignorelist=">; 2334 2335def fsanitize_system_ignorelist_EQ : Joined<["-"], "fsanitize-system-ignorelist=">, 2336 HelpText<"Path to system ignorelist file for sanitizers">, 2337 Visibility<[ClangOption, CC1Option]>; 2338 2339def fno_sanitize_ignorelist : Flag<["-"], "fno-sanitize-ignorelist">, 2340 Group<f_clang_Group>, HelpText<"Don't use ignorelist file for sanitizers">; 2341def : Flag<["-"], "fno-sanitize-blacklist">, 2342 Group<f_clang_Group>, Flags<[HelpHidden]>, Alias<fno_sanitize_ignorelist>; 2343 2344def fsanitize_coverage : CommaJoined<["-"], "fsanitize-coverage=">, 2345 Group<f_clang_Group>, 2346 HelpText<"Specify the type of coverage instrumentation for Sanitizers">; 2347def fno_sanitize_coverage : CommaJoined<["-"], "fno-sanitize-coverage=">, 2348 Group<f_clang_Group>, Visibility<[ClangOption, CLOption]>, 2349 HelpText<"Disable features of coverage instrumentation for Sanitizers">, 2350 Values<"func,bb,edge,indirect-calls,trace-bb,trace-cmp,trace-div,trace-gep," 2351 "8bit-counters,trace-pc,trace-pc-guard,no-prune,inline-8bit-counters," 2352 "inline-bool-flag">; 2353def fsanitize_coverage_allowlist : Joined<["-"], "fsanitize-coverage-allowlist=">, 2354 Group<f_clang_Group>, Visibility<[ClangOption, CLOption]>, 2355 HelpText<"Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones">, 2356 MarshallingInfoStringVector<CodeGenOpts<"SanitizeCoverageAllowlistFiles">>; 2357def fsanitize_coverage_ignorelist : Joined<["-"], "fsanitize-coverage-ignorelist=">, 2358 Group<f_clang_Group>, Visibility<[ClangOption, CLOption]>, 2359 HelpText<"Disable sanitizer coverage instrumentation for modules and functions " 2360 "that match the provided special case list, even the allowed ones">, 2361 MarshallingInfoStringVector<CodeGenOpts<"SanitizeCoverageIgnorelistFiles">>; 2362def fexperimental_sanitize_metadata_EQ : CommaJoined<["-"], "fexperimental-sanitize-metadata=">, 2363 Group<f_Group>, 2364 HelpText<"Specify the type of metadata to emit for binary analysis sanitizers">; 2365def fno_experimental_sanitize_metadata_EQ : CommaJoined<["-"], "fno-experimental-sanitize-metadata=">, 2366 Group<f_Group>, Visibility<[ClangOption, CLOption]>, 2367 HelpText<"Disable emitting metadata for binary analysis sanitizers">; 2368def fexperimental_sanitize_metadata_ignorelist_EQ : Joined<["-"], "fexperimental-sanitize-metadata-ignorelist=">, 2369 Group<f_Group>, Visibility<[ClangOption, CLOption]>, 2370 HelpText<"Disable sanitizer metadata for modules and functions that match the provided special case list">, 2371 MarshallingInfoStringVector<CodeGenOpts<"SanitizeMetadataIgnorelistFiles">>; 2372def fsanitize_memory_track_origins_EQ : Joined<["-"], "fsanitize-memory-track-origins=">, 2373 Group<f_clang_Group>, 2374 HelpText<"Enable origins tracking in MemorySanitizer">, 2375 MarshallingInfoInt<CodeGenOpts<"SanitizeMemoryTrackOrigins">>; 2376def fsanitize_memory_track_origins : Flag<["-"], "fsanitize-memory-track-origins">, 2377 Group<f_clang_Group>, 2378 Alias<fsanitize_memory_track_origins_EQ>, AliasArgs<["2"]>, 2379 HelpText<"Enable origins tracking in MemorySanitizer">; 2380def fno_sanitize_memory_track_origins : Flag<["-"], "fno-sanitize-memory-track-origins">, 2381 Group<f_clang_Group>, 2382 Visibility<[ClangOption, CLOption]>, 2383 HelpText<"Disable origins tracking in MemorySanitizer">; 2384def fsanitize_address_outline_instrumentation : Flag<["-"], "fsanitize-address-outline-instrumentation">, 2385 Group<f_clang_Group>, 2386 HelpText<"Always generate function calls for address sanitizer instrumentation">; 2387def fno_sanitize_address_outline_instrumentation : Flag<["-"], "fno-sanitize-address-outline-instrumentation">, 2388 Group<f_clang_Group>, 2389 HelpText<"Use default code inlining logic for the address sanitizer">; 2390defm sanitize_stable_abi 2391 : OptInCC1FFlag<"sanitize-stable-abi", "Stable ", "Conventional ", 2392 "ABI instrumentation for sanitizer runtime. Default: Conventional">; 2393 2394def fsanitize_memtag_mode_EQ : Joined<["-"], "fsanitize-memtag-mode=">, 2395 Group<f_clang_Group>, 2396 HelpText<"Set default MTE mode to 'sync' (default) or 'async'">; 2397def fsanitize_hwaddress_experimental_aliasing 2398 : Flag<["-"], "fsanitize-hwaddress-experimental-aliasing">, 2399 Group<f_clang_Group>, 2400 HelpText<"Enable aliasing mode in HWAddressSanitizer">; 2401def fno_sanitize_hwaddress_experimental_aliasing 2402 : Flag<["-"], "fno-sanitize-hwaddress-experimental-aliasing">, 2403 Group<f_clang_Group>, 2404 Visibility<[ClangOption, CLOption]>, 2405 HelpText<"Disable aliasing mode in HWAddressSanitizer">; 2406defm sanitize_memory_use_after_dtor : BoolOption<"f", "sanitize-memory-use-after-dtor", 2407 CodeGenOpts<"SanitizeMemoryUseAfterDtor">, DefaultFalse, 2408 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Enable">, 2409 NegFlag<SetFalse, [], [ClangOption], "Disable">, 2410 BothFlags<[], [ClangOption], " use-after-destroy detection in MemorySanitizer">>, 2411 Group<f_clang_Group>; 2412def fsanitize_address_field_padding : Joined<["-"], "fsanitize-address-field-padding=">, 2413 Group<f_clang_Group>, 2414 HelpText<"Level of field padding for AddressSanitizer">, 2415 MarshallingInfoInt<LangOpts<"SanitizeAddressFieldPadding">>; 2416defm sanitize_address_use_after_scope : BoolOption<"f", "sanitize-address-use-after-scope", 2417 CodeGenOpts<"SanitizeAddressUseAfterScope">, DefaultFalse, 2418 PosFlag<SetTrue, [], [ClangOption], "Enable">, 2419 NegFlag<SetFalse, [], [ClangOption, CLOption], 2420 "Disable">, 2421 BothFlags<[], [ClangOption], " use-after-scope detection in AddressSanitizer">>, 2422 Group<f_clang_Group>; 2423def sanitize_address_use_after_return_EQ 2424 : Joined<["-"], "fsanitize-address-use-after-return=">, 2425 MetaVarName<"<mode>">, 2426 Visibility<[ClangOption, CC1Option]>, 2427 HelpText<"Select the mode of detecting stack use-after-return in AddressSanitizer">, 2428 Group<f_clang_Group>, 2429 Values<"never,runtime,always">, 2430 NormalizedValuesScope<"llvm::AsanDetectStackUseAfterReturnMode">, 2431 NormalizedValues<["Never", "Runtime", "Always"]>, 2432 MarshallingInfoEnum<CodeGenOpts<"SanitizeAddressUseAfterReturn">, "Runtime">; 2433defm sanitize_address_poison_custom_array_cookie : BoolOption<"f", "sanitize-address-poison-custom-array-cookie", 2434 CodeGenOpts<"SanitizeAddressPoisonCustomArrayCookie">, DefaultFalse, 2435 PosFlag<SetTrue, [], [ClangOption], "Enable">, 2436 NegFlag<SetFalse, [], [ClangOption], "Disable">, 2437 BothFlags<[], [ClangOption], " poisoning array cookies when using custom operator new[] in AddressSanitizer">>, 2438 DocBrief<[{Enable "poisoning" array cookies when allocating arrays with a 2439custom operator new\[\] in Address Sanitizer, preventing accesses to the 2440cookies from user code. An array cookie is a small implementation-defined 2441header added to certain array allocations to record metadata such as the 2442length of the array. Accesses to array cookies from user code are technically 2443allowed by the standard but are more likely to be the result of an 2444out-of-bounds array access. 2445 2446An operator new\[\] is "custom" if it is not one of the allocation functions 2447provided by the C++ standard library. Array cookies from non-custom allocation 2448functions are always poisoned.}]>, 2449 Group<f_clang_Group>; 2450defm sanitize_address_globals_dead_stripping : BoolOption<"f", "sanitize-address-globals-dead-stripping", 2451 CodeGenOpts<"SanitizeAddressGlobalsDeadStripping">, DefaultFalse, 2452 PosFlag<SetTrue, [], [ClangOption], "Enable linker dead stripping of globals in AddressSanitizer">, 2453 NegFlag<SetFalse, [], [ClangOption], "Disable linker dead stripping of globals in AddressSanitizer">>, 2454 Group<f_clang_Group>; 2455defm sanitize_address_use_odr_indicator : BoolOption<"f", "sanitize-address-use-odr-indicator", 2456 CodeGenOpts<"SanitizeAddressUseOdrIndicator">, DefaultTrue, 2457 PosFlag<SetTrue, [], [ClangOption], "Enable ODR indicator globals to avoid false ODR violation" 2458 " reports in partially sanitized programs at the cost of an increase in binary size">, 2459 NegFlag<SetFalse, [], [ClangOption], "Disable ODR indicator globals">>, 2460 Group<f_clang_Group>; 2461def sanitize_address_destructor_EQ 2462 : Joined<["-"], "fsanitize-address-destructor=">, 2463 Visibility<[ClangOption, CC1Option]>, 2464 HelpText<"Set the kind of module destructors emitted by " 2465 "AddressSanitizer instrumentation. These destructors are " 2466 "emitted to unregister instrumented global variables when " 2467 "code is unloaded (e.g. via `dlclose()`).">, 2468 Group<f_clang_Group>, 2469 Values<"none,global">, 2470 NormalizedValuesScope<"llvm::AsanDtorKind">, 2471 NormalizedValues<["None", "Global"]>, 2472 MarshallingInfoEnum<CodeGenOpts<"SanitizeAddressDtor">, "Global">; 2473defm sanitize_memory_param_retval 2474 : BoolFOption<"sanitize-memory-param-retval", 2475 CodeGenOpts<"SanitizeMemoryParamRetval">, 2476 DefaultTrue, 2477 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Enable">, 2478 NegFlag<SetFalse, [], [ClangOption], "Disable">, 2479 BothFlags<[], [ClangOption], " detection of uninitialized parameters and return values">>; 2480//// Note: This flag was introduced when it was necessary to distinguish between 2481// ABI for correct codegen. This is no longer needed, but the flag is 2482// not removed since targeting either ABI will behave the same. 2483// This way we cause no disturbance to existing scripts & code, and if we 2484// want to use this flag in the future we will cause no disturbance then 2485// either. 2486def fsanitize_hwaddress_abi_EQ 2487 : Joined<["-"], "fsanitize-hwaddress-abi=">, 2488 Group<f_clang_Group>, 2489 HelpText<"Select the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor). This option is currently unused.">; 2490def fsanitize_recover_EQ : CommaJoined<["-"], "fsanitize-recover=">, 2491 Group<f_clang_Group>, 2492 HelpText<"Enable recovery for specified sanitizers">; 2493def fno_sanitize_recover_EQ : CommaJoined<["-"], "fno-sanitize-recover=">, 2494 Group<f_clang_Group>, 2495 Visibility<[ClangOption, CLOption]>, 2496 HelpText<"Disable recovery for specified sanitizers">; 2497def fsanitize_recover : Flag<["-"], "fsanitize-recover">, Group<f_clang_Group>, 2498 Alias<fsanitize_recover_EQ>, AliasArgs<["all"]>; 2499def fno_sanitize_recover : Flag<["-"], "fno-sanitize-recover">, 2500 Visibility<[ClangOption, CLOption]>, 2501 Group<f_clang_Group>, 2502 Alias<fno_sanitize_recover_EQ>, AliasArgs<["all"]>; 2503def fsanitize_trap_EQ : CommaJoined<["-"], "fsanitize-trap=">, Group<f_clang_Group>, 2504 HelpText<"Enable trapping for specified sanitizers">; 2505def fno_sanitize_trap_EQ : CommaJoined<["-"], "fno-sanitize-trap=">, Group<f_clang_Group>, 2506 Visibility<[ClangOption, CLOption]>, 2507 HelpText<"Disable trapping for specified sanitizers">; 2508def fsanitize_trap : Flag<["-"], "fsanitize-trap">, Group<f_clang_Group>, 2509 Alias<fsanitize_trap_EQ>, AliasArgs<["all"]>, 2510 HelpText<"Enable trapping for all sanitizers">; 2511def fno_sanitize_trap : Flag<["-"], "fno-sanitize-trap">, Group<f_clang_Group>, 2512 Alias<fno_sanitize_trap_EQ>, AliasArgs<["all"]>, 2513 Visibility<[ClangOption, CLOption]>, 2514 HelpText<"Disable trapping for all sanitizers">; 2515def fsanitize_undefined_trap_on_error 2516 : Flag<["-"], "fsanitize-undefined-trap-on-error">, Group<f_clang_Group>, 2517 Alias<fsanitize_trap_EQ>, AliasArgs<["undefined"]>; 2518def fno_sanitize_undefined_trap_on_error 2519 : Flag<["-"], "fno-sanitize-undefined-trap-on-error">, Group<f_clang_Group>, 2520 Alias<fno_sanitize_trap_EQ>, AliasArgs<["undefined"]>; 2521defm sanitize_minimal_runtime : BoolOption<"f", "sanitize-minimal-runtime", 2522 CodeGenOpts<"SanitizeMinimalRuntime">, DefaultFalse, 2523 PosFlag<SetTrue>, 2524 NegFlag<SetFalse>>, 2525 Group<f_clang_Group>; 2526def fsanitize_link_runtime : Flag<["-"], "fsanitize-link-runtime">, 2527 Group<f_clang_Group>; 2528def fno_sanitize_link_runtime : Flag<["-"], "fno-sanitize-link-runtime">, 2529 Group<f_clang_Group>; 2530def fsanitize_link_cxx_runtime : Flag<["-"], "fsanitize-link-c++-runtime">, 2531 Group<f_clang_Group>; 2532def fno_sanitize_link_cxx_runtime : Flag<["-"], "fno-sanitize-link-c++-runtime">, 2533 Group<f_clang_Group>; 2534defm sanitize_cfi_cross_dso : BoolOption<"f", "sanitize-cfi-cross-dso", 2535 CodeGenOpts<"SanitizeCfiCrossDso">, DefaultFalse, 2536 PosFlag<SetTrue, [], [ClangOption], "Enable">, 2537 NegFlag<SetFalse, [], [ClangOption, CLOption], 2538 "Disable">, 2539 BothFlags<[], [ClangOption], " control flow integrity (CFI) checks for cross-DSO calls.">>, 2540 Group<f_clang_Group>; 2541def fsanitize_cfi_icall_generalize_pointers : Flag<["-"], "fsanitize-cfi-icall-generalize-pointers">, 2542 Group<f_clang_Group>, 2543 HelpText<"Generalize pointers in CFI indirect call type signature checks">, 2544 MarshallingInfoFlag<CodeGenOpts<"SanitizeCfiICallGeneralizePointers">>; 2545def fsanitize_cfi_icall_normalize_integers : Flag<["-"], "fsanitize-cfi-icall-experimental-normalize-integers">, 2546 Group<f_clang_Group>, 2547 HelpText<"Normalize integers in CFI indirect call type signature checks">, 2548 MarshallingInfoFlag<CodeGenOpts<"SanitizeCfiICallNormalizeIntegers">>; 2549defm sanitize_cfi_canonical_jump_tables : BoolOption<"f", "sanitize-cfi-canonical-jump-tables", 2550 CodeGenOpts<"SanitizeCfiCanonicalJumpTables">, DefaultFalse, 2551 PosFlag<SetTrue, [], [ClangOption], "Make">, 2552 NegFlag<SetFalse, [], [ClangOption, CLOption], 2553 "Do not make">, 2554 BothFlags<[], [ClangOption], " the jump table addresses canonical in the symbol table">>, 2555 Group<f_clang_Group>; 2556defm sanitize_stats : BoolOption<"f", "sanitize-stats", 2557 CodeGenOpts<"SanitizeStats">, DefaultFalse, 2558 PosFlag<SetTrue, [], [ClangOption], "Enable">, 2559 NegFlag<SetFalse, [], [ClangOption, CLOption], 2560 "Disable">, 2561 BothFlags<[], [ClangOption], " sanitizer statistics gathering.">>, 2562 Group<f_clang_Group>; 2563def fsanitize_thread_memory_access : Flag<["-"], "fsanitize-thread-memory-access">, 2564 Group<f_clang_Group>, 2565 HelpText<"Enable memory access instrumentation in ThreadSanitizer (default)">; 2566def fno_sanitize_thread_memory_access : Flag<["-"], "fno-sanitize-thread-memory-access">, 2567 Group<f_clang_Group>, 2568 Visibility<[ClangOption, CLOption]>, 2569 HelpText<"Disable memory access instrumentation in ThreadSanitizer">; 2570def fsanitize_thread_func_entry_exit : Flag<["-"], "fsanitize-thread-func-entry-exit">, 2571 Group<f_clang_Group>, 2572 HelpText<"Enable function entry/exit instrumentation in ThreadSanitizer (default)">; 2573def fno_sanitize_thread_func_entry_exit : Flag<["-"], "fno-sanitize-thread-func-entry-exit">, 2574 Group<f_clang_Group>, 2575 Visibility<[ClangOption, CLOption]>, 2576 HelpText<"Disable function entry/exit instrumentation in ThreadSanitizer">; 2577def fsanitize_thread_atomics : Flag<["-"], "fsanitize-thread-atomics">, 2578 Group<f_clang_Group>, 2579 HelpText<"Enable atomic operations instrumentation in ThreadSanitizer (default)">; 2580def fno_sanitize_thread_atomics : Flag<["-"], "fno-sanitize-thread-atomics">, 2581 Group<f_clang_Group>, 2582 Visibility<[ClangOption, CLOption]>, 2583 HelpText<"Disable atomic operations instrumentation in ThreadSanitizer">; 2584def fsanitize_undefined_strip_path_components_EQ : Joined<["-"], "fsanitize-undefined-strip-path-components=">, 2585 Group<f_clang_Group>, MetaVarName<"<number>">, 2586 HelpText<"Strip (or keep only, if negative) a given number of path components " 2587 "when emitting check metadata.">, 2588 MarshallingInfoInt<CodeGenOpts<"EmitCheckPathComponentsToStrip">, "0", "int">; 2589 2590} // end -f[no-]sanitize* flags 2591 2592def funsafe_math_optimizations : Flag<["-"], "funsafe-math-optimizations">, 2593 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 2594 HelpText<"Allow unsafe floating-point math optimizations which may decrease precision">, 2595 MarshallingInfoFlag<LangOpts<"UnsafeFPMath">>, 2596 ImpliedByAnyOf<[cl_unsafe_math_optimizations.KeyPath, ffast_math.KeyPath]>; 2597def fno_unsafe_math_optimizations : Flag<["-"], "fno-unsafe-math-optimizations">, 2598 Group<f_Group>; 2599def fassociative_math : Flag<["-"], "fassociative-math">, Visibility<[ClangOption, FlangOption]>, Group<f_Group>; 2600def fno_associative_math : Flag<["-"], "fno-associative-math">, Visibility<[ClangOption, FlangOption]>, Group<f_Group>; 2601defm reciprocal_math : BoolFOption<"reciprocal-math", 2602 LangOpts<"AllowRecip">, DefaultFalse, 2603 PosFlag<SetTrue, [], [ClangOption, CC1Option, FC1Option, FlangOption], 2604 "Allow division operations to be reassociated", 2605 [funsafe_math_optimizations.KeyPath]>, 2606 NegFlag<SetFalse, [], [ClangOption, CC1Option, FC1Option, FlangOption]>>; 2607defm approx_func : BoolFOption<"approx-func", LangOpts<"ApproxFunc">, DefaultFalse, 2608 PosFlag<SetTrue, [], [ClangOption, CC1Option, FC1Option, FlangOption], 2609 "Allow certain math function calls to be replaced " 2610 "with an approximately equivalent calculation", 2611 [funsafe_math_optimizations.KeyPath]>, 2612 NegFlag<SetFalse, [], [ClangOption, CC1Option, FC1Option, FlangOption]>>; 2613defm finite_math_only : BoolFOption<"finite-math-only", 2614 LangOpts<"FiniteMathOnly">, DefaultFalse, 2615 PosFlag<SetTrue, [], [ClangOption, CC1Option], 2616 "Allow floating-point optimizations that " 2617 "assume arguments and results are not NaNs or +-inf. This defines " 2618 "the \\_\\_FINITE\\_MATH\\_ONLY\\_\\_ preprocessor macro.", 2619 [cl_finite_math_only.KeyPath, ffast_math.KeyPath]>, 2620 NegFlag<SetFalse>>; 2621defm signed_zeros : BoolFOption<"signed-zeros", 2622 LangOpts<"NoSignedZero">, DefaultFalse, 2623 NegFlag<SetTrue, [], [ClangOption, CC1Option, FC1Option, FlangOption], 2624 "Allow optimizations that ignore the sign of floating point zeros", 2625 [cl_no_signed_zeros.KeyPath, funsafe_math_optimizations.KeyPath]>, 2626 PosFlag<SetFalse, [], [ClangOption, CC1Option, FC1Option, FlangOption]>>; 2627def fhonor_nans : Flag<["-"], "fhonor-nans">, Group<f_Group>, 2628 Visibility<[ClangOption, FlangOption]>, 2629 HelpText<"Specify that floating-point optimizations are not allowed that " 2630 "assume arguments and results are not NANs.">; 2631def fno_honor_nans : Flag<["-"], "fno-honor-nans">, Visibility<[ClangOption, FlangOption]>, Group<f_Group>; 2632def fhonor_infinities : Flag<["-"], "fhonor-infinities">, 2633 Group<f_Group>, Visibility<[ClangOption, FlangOption]>, 2634 HelpText<"Specify that floating-point optimizations are not allowed that " 2635 "assume arguments and results are not +-inf.">; 2636def fno_honor_infinities : Flag<["-"], "fno-honor-infinities">, 2637 Visibility<[ClangOption, FlangOption]>, Group<f_Group>; 2638// This option was originally misspelt "infinites" [sic]. 2639def : Flag<["-"], "fhonor-infinites">, Alias<fhonor_infinities>; 2640def : Flag<["-"], "fno-honor-infinites">, Alias<fno_honor_infinities>; 2641def frounding_math : Flag<["-"], "frounding-math">, Group<f_Group>, 2642 Visibility<[ClangOption, CC1Option]>, 2643 MarshallingInfoFlag<LangOpts<"RoundingMath">>, 2644 Normalizer<"makeFlagToValueNormalizer(llvm::RoundingMode::Dynamic)">; 2645def fno_rounding_math : Flag<["-"], "fno-rounding-math">, Group<f_Group>, 2646 Visibility<[ClangOption, CC1Option]>; 2647def ftrapping_math : Flag<["-"], "ftrapping-math">, Group<f_Group>; 2648def fno_trapping_math : Flag<["-"], "fno-trapping-math">, Group<f_Group>; 2649def ffp_contract : Joined<["-"], "ffp-contract=">, Group<f_Group>, 2650 Visibility<[ClangOption, CC1Option, FC1Option, FlangOption]>, 2651 DocBrief<"Form fused FP ops (e.g. FMAs):" 2652 " fast (fuses across statements disregarding pragmas)" 2653 " | on (only fuses in the same statement unless dictated by pragmas)" 2654 " | off (never fuses)" 2655 " | fast-honor-pragmas (fuses across statements unless dictated by pragmas)." 2656 " Default is 'fast' for CUDA, 'fast-honor-pragmas' for HIP, and 'on' otherwise.">, 2657 HelpText<"Form fused FP ops (e.g. FMAs)">, 2658 Values<"fast,on,off,fast-honor-pragmas">; 2659 2660defm strict_float_cast_overflow : BoolFOption<"strict-float-cast-overflow", 2661 CodeGenOpts<"StrictFloatCastOverflow">, DefaultTrue, 2662 NegFlag<SetFalse, [], [ClangOption, CC1Option], 2663 "Relax language rules and try to match the behavior" 2664 " of the target's native float-to-int conversion instructions">, 2665 PosFlag<SetTrue, [], [ClangOption], "Assume that overflowing float-to-int casts are undefined (default)">>; 2666 2667defm protect_parens : BoolFOption<"protect-parens", 2668 LangOpts<"ProtectParens">, DefaultFalse, 2669 PosFlag<SetTrue, [], [ClangOption, CLOption, CC1Option], 2670 "Determines whether the optimizer honors parentheses when " 2671 "floating-point expressions are evaluated">, 2672 NegFlag<SetFalse>>; 2673 2674defm daz_ftz : SimpleMFlag<"daz-ftz", 2675 "Globally set", "Do not globally set", 2676 " the denormals-are-zero (DAZ) and flush-to-zero (FTZ) bits in the " 2677 "floating-point control register on program startup">; 2678 2679def ffor_scope : Flag<["-"], "ffor-scope">, Group<f_Group>; 2680def fno_for_scope : Flag<["-"], "fno-for-scope">, Group<f_Group>; 2681 2682defm rewrite_imports : BoolFOption<"rewrite-imports", 2683 PreprocessorOutputOpts<"RewriteImports">, DefaultFalse, 2684 PosFlag<SetTrue, [], [ClangOption, CC1Option]>, 2685 NegFlag<SetFalse>>; 2686defm rewrite_includes : BoolFOption<"rewrite-includes", 2687 PreprocessorOutputOpts<"RewriteIncludes">, DefaultFalse, 2688 PosFlag<SetTrue, [], [ClangOption, CC1Option]>, 2689 NegFlag<SetFalse>>; 2690 2691defm directives_only : OptInCC1FFlag<"directives-only", "">; 2692 2693defm delete_null_pointer_checks : BoolFOption<"delete-null-pointer-checks", 2694 CodeGenOpts<"NullPointerIsValid">, DefaultFalse, 2695 NegFlag<SetTrue, [], [ClangOption, CC1Option], 2696 "Do not treat usage of null pointers as undefined behavior">, 2697 PosFlag<SetFalse, [], [ClangOption], "Treat usage of null pointers as undefined behavior (default)">, 2698 BothFlags<[], [ClangOption, CLOption]>>, 2699 DocBrief<[{When enabled, treat null pointer dereference, creation of a reference to null, 2700or passing a null pointer to a function parameter annotated with the "nonnull" 2701attribute as undefined behavior. (And, thus the optimizer may assume that any 2702pointer used in such a way must not have been null and optimize away the 2703branches accordingly.) On by default.}]>; 2704 2705defm use_line_directives : BoolFOption<"use-line-directives", 2706 PreprocessorOutputOpts<"UseLineDirectives">, DefaultFalse, 2707 PosFlag<SetTrue, [], [ClangOption, CC1Option], 2708 "Use #line in preprocessed output">, 2709 NegFlag<SetFalse>>; 2710defm minimize_whitespace : BoolFOption<"minimize-whitespace", 2711 PreprocessorOutputOpts<"MinimizeWhitespace">, DefaultFalse, 2712 PosFlag<SetTrue, [], [ClangOption, CC1Option], 2713 "Ignore the whitespace from the input file " 2714 "when emitting preprocessor output. It will only contain whitespace " 2715 "when necessary, e.g. to keep two minus signs from merging into to " 2716 "an increment operator. Useful with the -P option to normalize " 2717 "whitespace such that two files with only formatting changes are " 2718 "equal.\n\nOnly valid with -E on C-like inputs and incompatible " 2719 "with -traditional-cpp.">, NegFlag<SetFalse>>; 2720defm keep_system_includes : BoolFOption<"keep-system-includes", 2721 PreprocessorOutputOpts<"KeepSystemIncludes">, DefaultFalse, 2722 PosFlag<SetTrue, [], [ClangOption, CC1Option], 2723 "Instead of expanding system headers when emitting preprocessor " 2724 "output, preserve the #include directive. Useful when producing " 2725 "preprocessed output for test case reduction. May produce incorrect " 2726 "output if preprocessor symbols that control the included content " 2727 "(e.g. _XOPEN_SOURCE) are defined in the including source file. The " 2728 "portability of the resulting source to other compilation environments " 2729 "is not guaranteed.\n\nOnly valid with -E.">, 2730 NegFlag<SetFalse>>; 2731 2732def ffreestanding : Flag<["-"], "ffreestanding">, Group<f_Group>, 2733 Visibility<[ClangOption, CC1Option]>, 2734 HelpText<"Assert that the compilation takes place in a freestanding environment">, 2735 MarshallingInfoFlag<LangOpts<"Freestanding">>; 2736def fgnuc_version_EQ : Joined<["-"], "fgnuc-version=">, Group<f_Group>, 2737 HelpText<"Sets various macros to claim compatibility with the given GCC version (default is 4.2.1)">, 2738 Visibility<[ClangOption, CC1Option, CLOption]>; 2739// We abuse '-f[no-]gnu-keywords' to force overriding all GNU-extension 2740// keywords. This behavior is provided by GCC's poorly named '-fasm' flag, 2741// while a subset (the non-C++ GNU keywords) is provided by GCC's 2742// '-fgnu-keywords'. Clang conflates the two for simplicity under the single 2743// name, as it doesn't seem a useful distinction. 2744defm gnu_keywords : BoolFOption<"gnu-keywords", 2745 LangOpts<"GNUKeywords">, Default<gnu_mode.KeyPath>, 2746 PosFlag<SetTrue, [], [ClangOption], "Allow GNU-extension keywords regardless of language standard">, 2747 NegFlag<SetFalse>, BothFlags<[], [ClangOption, CC1Option]>>; 2748defm gnu89_inline : BoolFOption<"gnu89-inline", 2749 LangOpts<"GNUInline">, Default<!strconcat("!", c99.KeyPath, " && !", cplusplus.KeyPath)>, 2750 PosFlag<SetTrue, [], [ClangOption, CC1Option], 2751 "Use the gnu89 inline semantics">, 2752 NegFlag<SetFalse>>, ShouldParseIf<!strconcat("!", cplusplus.KeyPath)>; 2753def fgnu_runtime : Flag<["-"], "fgnu-runtime">, Group<f_Group>, 2754 HelpText<"Generate output compatible with the standard GNU Objective-C runtime">; 2755def fheinous_gnu_extensions : Flag<["-"], "fheinous-gnu-extensions">, 2756 Visibility<[ClangOption, CC1Option]>, 2757 MarshallingInfoFlag<LangOpts<"HeinousExtensions">>; 2758def filelist : Separate<["-"], "filelist">, Flags<[LinkerInput]>, 2759 Group<Link_Group>; 2760def : Flag<["-"], "findirect-virtual-calls">, Alias<fapple_kext>; 2761def finline_functions : Flag<["-"], "finline-functions">, Group<f_clang_Group>, 2762 Visibility<[ClangOption, CC1Option]>, 2763 HelpText<"Inline suitable functions">; 2764def finline_hint_functions: Flag<["-"], "finline-hint-functions">, Group<f_clang_Group>, 2765 Visibility<[ClangOption, CC1Option]>, 2766 HelpText<"Inline functions which are (explicitly or implicitly) marked inline">; 2767def finline : Flag<["-"], "finline">, Group<clang_ignored_f_Group>; 2768def finline_max_stacksize_EQ 2769 : Joined<["-"], "finline-max-stacksize=">, 2770 Group<f_Group>, Visibility<[ClangOption, CLOption, CC1Option]>, 2771 HelpText<"Suppress inlining of functions whose stack size exceeds the given value">, 2772 MarshallingInfoInt<CodeGenOpts<"InlineMaxStackSize">, "UINT_MAX">; 2773defm jmc : BoolFOption<"jmc", 2774 CodeGenOpts<"JMCInstrument">, DefaultFalse, 2775 PosFlag<SetTrue, [], [ClangOption, CC1Option], 2776 "Enable just-my-code debugging">, 2777 NegFlag<SetFalse>>; 2778def fglobal_isel : Flag<["-"], "fglobal-isel">, Group<f_clang_Group>, 2779 HelpText<"Enables the global instruction selector">; 2780def fexperimental_isel : Flag<["-"], "fexperimental-isel">, Group<f_clang_Group>, 2781 Alias<fglobal_isel>; 2782def fexperimental_strict_floating_point : Flag<["-"], "fexperimental-strict-floating-point">, 2783 Group<f_clang_Group>, Visibility<[ClangOption, CC1Option]>, 2784 HelpText<"Enables the use of non-default rounding modes and non-default exception handling on targets that are not currently ready.">, 2785 MarshallingInfoFlag<LangOpts<"ExpStrictFP">>; 2786def finput_charset_EQ : Joined<["-"], "finput-charset=">, 2787 Visibility<[ClangOption, FlangOption, FC1Option]>, Group<f_Group>, 2788 HelpText<"Specify the default character set for source files">; 2789def fexec_charset_EQ : Joined<["-"], "fexec-charset=">, Group<f_Group>; 2790def finstrument_functions : Flag<["-"], "finstrument-functions">, Group<f_Group>, 2791 Visibility<[ClangOption, CC1Option]>, 2792 HelpText<"Generate calls to instrument function entry and exit">, 2793 MarshallingInfoFlag<CodeGenOpts<"InstrumentFunctions">>; 2794def finstrument_functions_after_inlining : Flag<["-"], "finstrument-functions-after-inlining">, Group<f_Group>, 2795 Visibility<[ClangOption, CC1Option]>, 2796 HelpText<"Like -finstrument-functions, but insert the calls after inlining">, 2797 MarshallingInfoFlag<CodeGenOpts<"InstrumentFunctionsAfterInlining">>; 2798def finstrument_function_entry_bare : Flag<["-"], "finstrument-function-entry-bare">, Group<f_Group>, 2799 Visibility<[ClangOption, CC1Option]>, 2800 HelpText<"Instrument function entry only, after inlining, without arguments to the instrumentation call">, 2801 MarshallingInfoFlag<CodeGenOpts<"InstrumentFunctionEntryBare">>; 2802def fcf_protection_EQ : Joined<["-"], "fcf-protection=">, 2803 Visibility<[ClangOption, CLOption, CC1Option]>, Group<f_Group>, 2804 HelpText<"Instrument control-flow architecture protection">, Values<"return,branch,full,none">; 2805def fcf_protection : Flag<["-"], "fcf-protection">, Group<f_Group>, 2806 Visibility<[ClangOption, CLOption, CC1Option]>, 2807 Alias<fcf_protection_EQ>, AliasArgs<["full"]>, 2808 HelpText<"Enable cf-protection in 'full' mode">; 2809def mfunction_return_EQ : Joined<["-"], "mfunction-return=">, 2810 Group<m_Group>, Visibility<[ClangOption, CLOption, CC1Option]>, 2811 HelpText<"Replace returns with jumps to ``__x86_return_thunk`` (x86 only, error otherwise)">, 2812 Values<"keep,thunk-extern">, 2813 NormalizedValues<["Keep", "Extern"]>, 2814 NormalizedValuesScope<"llvm::FunctionReturnThunksKind">, 2815 MarshallingInfoEnum<CodeGenOpts<"FunctionReturnThunks">, "Keep">; 2816def mindirect_branch_cs_prefix : Flag<["-"], "mindirect-branch-cs-prefix">, 2817 Group<m_Group>, Visibility<[ClangOption, CLOption, CC1Option]>, 2818 HelpText<"Add cs prefix to call and jmp to indirect thunk">, 2819 MarshallingInfoFlag<CodeGenOpts<"IndirectBranchCSPrefix">>; 2820 2821defm xray_instrument : BoolFOption<"xray-instrument", 2822 LangOpts<"XRayInstrument">, DefaultFalse, 2823 PosFlag<SetTrue, [], [ClangOption, CC1Option], 2824 "Generate XRay instrumentation sleds on function entry and exit">, 2825 NegFlag<SetFalse>>; 2826 2827def fxray_instruction_threshold_EQ : 2828 Joined<["-"], "fxray-instruction-threshold=">, 2829 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 2830 HelpText<"Sets the minimum function size to instrument with XRay">, 2831 MarshallingInfoInt<CodeGenOpts<"XRayInstructionThreshold">, "200">; 2832 2833def fxray_always_instrument : 2834 Joined<["-"], "fxray-always-instrument=">, 2835 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 2836 HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.">, 2837 MarshallingInfoStringVector<LangOpts<"XRayAlwaysInstrumentFiles">>; 2838def fxray_never_instrument : 2839 Joined<["-"], "fxray-never-instrument=">, 2840 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 2841 HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.">, 2842 MarshallingInfoStringVector<LangOpts<"XRayNeverInstrumentFiles">>; 2843def fxray_attr_list : 2844 Joined<["-"], "fxray-attr-list=">, 2845 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 2846 HelpText<"Filename defining the list of functions/types for imbuing XRay attributes.">, 2847 MarshallingInfoStringVector<LangOpts<"XRayAttrListFiles">>; 2848def fxray_modes : 2849 Joined<["-"], "fxray-modes=">, 2850 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 2851 HelpText<"List of modes to link in by default into XRay instrumented binaries.">; 2852 2853defm xray_always_emit_customevents : BoolFOption<"xray-always-emit-customevents", 2854 LangOpts<"XRayAlwaysEmitCustomEvents">, DefaultFalse, 2855 PosFlag<SetTrue, [], [ClangOption, CC1Option], 2856 "Always emit __xray_customevent(...) calls" 2857 " even if the containing function is not always instrumented">, 2858 NegFlag<SetFalse>>; 2859 2860defm xray_always_emit_typedevents : BoolFOption<"xray-always-emit-typedevents", 2861 LangOpts<"XRayAlwaysEmitTypedEvents">, DefaultFalse, 2862 PosFlag<SetTrue, [], [ClangOption, CC1Option], 2863 "Always emit __xray_typedevent(...) calls" 2864 " even if the containing function is not always instrumented">, 2865 NegFlag<SetFalse>>; 2866 2867defm xray_ignore_loops : BoolFOption<"xray-ignore-loops", 2868 CodeGenOpts<"XRayIgnoreLoops">, DefaultFalse, 2869 PosFlag<SetTrue, [], [ClangOption, CC1Option], 2870 "Don't instrument functions with loops" 2871 " unless they also meet the minimum function size">, 2872 NegFlag<SetFalse>>; 2873 2874defm xray_function_index : BoolFOption<"xray-function-index", 2875 CodeGenOpts<"XRayFunctionIndex">, DefaultTrue, 2876 PosFlag<SetTrue, [], [ClangOption]>, 2877 NegFlag<SetFalse, [], [ClangOption, CC1Option], 2878 "Omit function index section at the" 2879 " expense of single-function patching performance">>; 2880 2881def fxray_link_deps : Flag<["-"], "fxray-link-deps">, Group<f_Group>, 2882 HelpText<"Link XRay runtime library when -fxray-instrument is specified (default)">; 2883def fno_xray_link_deps : Flag<["-"], "fno-xray-link-deps">, Group<f_Group>; 2884 2885def fxray_instrumentation_bundle : 2886 Joined<["-"], "fxray-instrumentation-bundle=">, 2887 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 2888 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'.">; 2889 2890def fxray_function_groups : 2891 Joined<["-"], "fxray-function-groups=">, 2892 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 2893 HelpText<"Only instrument 1 of N groups">, 2894 MarshallingInfoInt<CodeGenOpts<"XRayTotalFunctionGroups">, "1">; 2895 2896def fxray_selected_function_group : 2897 Joined<["-"], "fxray-selected-function-group=">, 2898 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 2899 HelpText<"When using -fxray-function-groups, select which group of functions to instrument. Valid range is 0 to fxray-function-groups - 1">, 2900 MarshallingInfoInt<CodeGenOpts<"XRaySelectedFunctionGroup">, "0">; 2901 2902 2903defm fine_grained_bitfield_accesses : BoolOption<"f", "fine-grained-bitfield-accesses", 2904 CodeGenOpts<"FineGrainedBitfieldAccesses">, DefaultFalse, 2905 PosFlag<SetTrue, [], [ClangOption], "Use separate accesses for consecutive bitfield runs with legal widths and alignments.">, 2906 NegFlag<SetFalse, [], [ClangOption], "Use large-integer access for consecutive bitfield runs.">, 2907 BothFlags<[], [ClangOption, CC1Option]>>, 2908 Group<f_clang_Group>; 2909 2910def fexperimental_relative_cxx_abi_vtables : 2911 Flag<["-"], "fexperimental-relative-c++-abi-vtables">, 2912 Group<f_clang_Group>, Visibility<[ClangOption, CC1Option]>, 2913 HelpText<"Use the experimental C++ class ABI for classes with virtual tables">; 2914def fno_experimental_relative_cxx_abi_vtables : 2915 Flag<["-"], "fno-experimental-relative-c++-abi-vtables">, 2916 Group<f_clang_Group>, Visibility<[ClangOption, CC1Option]>, 2917 HelpText<"Do not use the experimental C++ class ABI for classes with virtual tables">; 2918 2919defm experimental_omit_vtable_rtti : BoolFOption<"experimental-omit-vtable-rtti", 2920 LangOpts<"OmitVTableRTTI">, DefaultFalse, 2921 PosFlag<SetTrue, [], [CC1Option], "Omit">, 2922 NegFlag<SetFalse, [], [CC1Option], "Do not omit">, 2923 BothFlags<[], [CC1Option], " the RTTI component from virtual tables">>; 2924 2925def fcxx_abi_EQ : Joined<["-"], "fc++-abi=">, 2926 Group<f_clang_Group>, Visibility<[ClangOption, CC1Option]>, 2927 HelpText<"C++ ABI to use. This will override the target C++ ABI.">; 2928 2929def flat__namespace : Flag<["-"], "flat_namespace">; 2930def flax_vector_conversions_EQ : Joined<["-"], "flax-vector-conversions=">, Group<f_Group>, 2931 HelpText<"Enable implicit vector bit-casts">, Values<"none,integer,all">, 2932 Visibility<[ClangOption, CC1Option]>, 2933 NormalizedValues<["LangOptions::LaxVectorConversionKind::None", 2934 "LangOptions::LaxVectorConversionKind::Integer", 2935 "LangOptions::LaxVectorConversionKind::All"]>, 2936 MarshallingInfoEnum<LangOpts<"LaxVectorConversions">, 2937 open_cl.KeyPath # 2938 " ? LangOptions::LaxVectorConversionKind::None" # 2939 " : LangOptions::LaxVectorConversionKind::All">; 2940def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group<f_Group>, 2941 Alias<flax_vector_conversions_EQ>, AliasArgs<["integer"]>; 2942def flimited_precision_EQ : Joined<["-"], "flimited-precision=">, Group<f_Group>; 2943def fapple_link_rtlib : Flag<["-"], "fapple-link-rtlib">, Group<f_Group>, 2944 HelpText<"Force linking the clang builtins runtime library">; 2945 2946/// ClangIR-specific options - BEGIN 2947defm clangir : BoolFOption<"clangir", 2948 FrontendOpts<"UseClangIRPipeline">, DefaultFalse, 2949 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Use the ClangIR pipeline to compile">, 2950 NegFlag<SetFalse, [], [ClangOption, CC1Option], "Use the AST -> LLVM pipeline to compile">, 2951 BothFlags<[], [ClangOption, CC1Option], "">>; 2952def emit_cir : Flag<["-"], "emit-cir">, Visibility<[CC1Option]>, 2953 Group<Action_Group>, HelpText<"Build ASTs and then lower to ClangIR">; 2954/// ClangIR-specific options - END 2955 2956def flto_EQ : Joined<["-"], "flto=">, 2957 Visibility<[ClangOption, CLOption, CC1Option, FC1Option, FlangOption]>, 2958 Group<f_Group>, 2959 HelpText<"Set LTO mode">, Values<"thin,full">; 2960def flto_EQ_jobserver : Flag<["-"], "flto=jobserver">, Visibility<[ClangOption, FlangOption]>, Group<f_Group>, 2961 Alias<flto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode">; 2962def flto_EQ_auto : Flag<["-"], "flto=auto">, Visibility<[ClangOption, FlangOption]>, Group<f_Group>, 2963 Alias<flto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode">; 2964def flto : Flag<["-"], "flto">, 2965 Visibility<[ClangOption, CLOption, CC1Option, FC1Option, FlangOption]>, 2966 Group<f_Group>, 2967 Alias<flto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode">; 2968defm unified_lto : BoolFOption<"unified-lto", 2969 CodeGenOpts<"UnifiedLTO">, DefaultFalse, 2970 PosFlag<SetTrue, [], [ClangOption], "Use the unified LTO pipeline">, 2971 NegFlag<SetFalse, [], [ClangOption], "Use distinct LTO pipelines">, 2972 BothFlags<[], [ClangOption, CC1Option], "">>; 2973def fno_lto : Flag<["-"], "fno-lto">, 2974 Visibility<[ClangOption, CLOption, DXCOption, CC1Option, FlangOption]>, Group<f_Group>, 2975 HelpText<"Disable LTO mode (default)">; 2976def foffload_lto_EQ : Joined<["-"], "foffload-lto=">, 2977 Visibility<[ClangOption, CLOption]>, Group<f_Group>, 2978 HelpText<"Set LTO mode for offload compilation">, Values<"thin,full">; 2979def foffload_lto : Flag<["-"], "foffload-lto">, 2980 Visibility<[ClangOption, CLOption]>, Group<f_Group>, 2981 Alias<foffload_lto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode for offload compilation">; 2982def fno_offload_lto : Flag<["-"], "fno-offload-lto">, 2983 Visibility<[ClangOption, CLOption]>, Group<f_Group>, 2984 HelpText<"Disable LTO mode (default) for offload compilation">; 2985def flto_jobs_EQ : Joined<["-"], "flto-jobs=">, 2986 Visibility<[ClangOption, CC1Option]>, Group<f_Group>, 2987 HelpText<"Controls the backend parallelism of -flto=thin (default " 2988 "of 0 means the number of threads will be derived from " 2989 "the number of CPUs detected)">; 2990def fthinlto_index_EQ : Joined<["-"], "fthinlto-index=">, 2991 Visibility<[ClangOption, CLOption, CC1Option]>, Group<f_Group>, 2992 HelpText<"Perform ThinLTO importing using provided function summary index">; 2993def fthin_link_bitcode_EQ : Joined<["-"], "fthin-link-bitcode=">, 2994 Visibility<[ClangOption, CLOption, CC1Option]>, Group<f_Group>, 2995 HelpText<"Write minimized bitcode to <file> for the ThinLTO thin link only">, 2996 MarshallingInfoString<CodeGenOpts<"ThinLinkBitcodeFile">>; 2997defm fat_lto_objects : BoolFOption<"fat-lto-objects", 2998 CodeGenOpts<"FatLTO">, DefaultFalse, 2999 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Enable">, 3000 NegFlag<SetFalse, [], [ClangOption, CC1Option], "Disable">, 3001 BothFlags<[], [ClangOption, CC1Option], " fat LTO object support">>; 3002def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">, 3003 Group<f_Group>, Visibility<[ClangOption, CC1Option, CLOption]>, 3004 HelpText<"Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit)">, 3005 MarshallingInfoInt<DiagnosticOpts<"MacroBacktraceLimit">, "DiagnosticOptions::DefaultMacroBacktraceLimit">; 3006def fcaret_diagnostics_max_lines_EQ : 3007 Joined<["-"], "fcaret-diagnostics-max-lines=">, 3008 Group<f_Group>, Visibility<[ClangOption, CC1Option, CLOption, DXCOption]>, 3009 HelpText<"Set the maximum number of source lines to show in a caret diagnostic (0 = no limit).">, 3010 MarshallingInfoInt<DiagnosticOpts<"SnippetLineLimit">, "DiagnosticOptions::DefaultSnippetLineLimit">; 3011defm merge_all_constants : BoolFOption<"merge-all-constants", 3012 CodeGenOpts<"MergeAllConstants">, DefaultFalse, 3013 PosFlag<SetTrue, [], [ClangOption, CC1Option, CLOption], "Allow">, 3014 NegFlag<SetFalse, [], [ClangOption], "Disallow">, 3015 BothFlags<[], [ClangOption], " merging of constants">>; 3016def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group<f_Group>, 3017 Visibility<[ClangOption, CC1Option]>, 3018 HelpText<"Format message diagnostics so that they fit within N columns">, 3019 MarshallingInfoInt<DiagnosticOpts<"MessageLength">>; 3020def frandomize_layout_seed_EQ : Joined<["-"], "frandomize-layout-seed=">, 3021 MetaVarName<"<seed>">, Group<f_clang_Group>, 3022 Visibility<[ClangOption, CC1Option]>, 3023 HelpText<"The seed used by the randomize structure layout feature">; 3024def frandomize_layout_seed_file_EQ : Joined<["-"], "frandomize-layout-seed-file=">, 3025 MetaVarName<"<file>">, Group<f_clang_Group>, 3026 Visibility<[ClangOption, CC1Option]>, 3027 HelpText<"File holding the seed used by the randomize structure layout feature">; 3028def fms_compatibility : Flag<["-"], "fms-compatibility">, Group<f_Group>, 3029 Visibility<[ClangOption, CC1Option, CLOption]>, 3030 HelpText<"Enable full Microsoft Visual C++ compatibility">, 3031 MarshallingInfoFlag<LangOpts<"MSVCCompat">>; 3032def fms_define_stdc : Flag<["-"], "fms-define-stdc">, Group<f_Group>, 3033 Visibility<[ClangOption, CC1Option, CLOption]>, 3034 HelpText<"Define '__STDC__' to '1' in MSVC Compatibility mode">, 3035 MarshallingInfoFlag<LangOpts<"MSVCEnableStdcMacro">>; 3036def fms_extensions : Flag<["-"], "fms-extensions">, Group<f_Group>, 3037 Visibility<[ClangOption, CC1Option, CLOption]>, 3038 HelpText<"Accept some non-standard constructs supported by the Microsoft compiler">, 3039 MarshallingInfoFlag<LangOpts<"MicrosoftExt">>, ImpliedByAnyOf<[fms_compatibility.KeyPath]>; 3040defm asm_blocks : BoolFOption<"asm-blocks", 3041 LangOpts<"AsmBlocks">, Default<fms_extensions.KeyPath>, 3042 PosFlag<SetTrue, [], [ClangOption, CC1Option]>, 3043 NegFlag<SetFalse>>; 3044defm ms_volatile : BoolFOption<"ms-volatile", 3045 LangOpts<"MSVolatile">, DefaultFalse, 3046 PosFlag<SetTrue, [], [ClangOption, CC1Option], 3047 "Volatile loads and stores have acquire and release semantics">, 3048 NegFlag<SetFalse>>; 3049def fmsc_version : Joined<["-"], "fmsc-version=">, Group<f_Group>, 3050 Visibility<[ClangOption, CLOption]>, 3051 HelpText<"Microsoft compiler version number to report in _MSC_VER (0 = don't define it (default))">; 3052def fms_compatibility_version 3053 : Joined<["-"], "fms-compatibility-version=">, 3054 Group<f_Group>, 3055 Visibility<[ClangOption, CC1Option, CLOption]>, 3056 HelpText<"Dot-separated value representing the Microsoft compiler " 3057 "version number to report in _MSC_VER (0 = don't define it " 3058 "(default))">; 3059def fms_runtime_lib_EQ : Joined<["-"], "fms-runtime-lib=">, Group<f_Group>, 3060 Flags<[]>, Visibility<[ClangOption, CLOption, FlangOption]>, 3061 Values<"static,static_dbg,dll,dll_dbg">, 3062 HelpText<"Select Windows run-time library">, 3063 DocBrief<[{ 3064Specify Visual Studio C runtime library. "static" and "static_dbg" correspond 3065to the cl flags /MT and /MTd which use the multithread, static version. "dll" 3066and "dll_dbg" correspond to the cl flags /MD and /MDd which use the multithread, 3067dll version.}]>; 3068def fms_omit_default_lib : Joined<["-"], "fms-omit-default-lib">, 3069 Group<f_Group>, Flags<[]>, 3070 Visibility<[ClangOption, CLOption]>; 3071defm delayed_template_parsing : BoolFOption<"delayed-template-parsing", 3072 LangOpts<"DelayedTemplateParsing">, DefaultFalse, 3073 PosFlag<SetTrue, [], [ClangOption, CC1Option], 3074 "Parse templated function definitions at the end of the translation unit">, 3075 NegFlag<SetFalse, [], [], "Disable delayed template parsing">, 3076 BothFlags<[], [ClangOption, CLOption]>>; 3077def fms_memptr_rep_EQ : Joined<["-"], "fms-memptr-rep=">, Group<f_Group>, 3078 Visibility<[ClangOption, CC1Option]>, 3079 Values<"single,multiple,virtual">, NormalizedValuesScope<"LangOptions">, 3080 NormalizedValues<["PPTMK_FullGeneralitySingleInheritance", "PPTMK_FullGeneralityMultipleInheritance", 3081 "PPTMK_FullGeneralityVirtualInheritance"]>, 3082 MarshallingInfoEnum<LangOpts<"MSPointerToMemberRepresentationMethod">, "PPTMK_BestCase">; 3083def fms_kernel : Flag<["-"], "fms-kernel">, Group<f_Group>, 3084 Visibility<[CC1Option]>, 3085 MarshallingInfoFlag<LangOpts<"Kernel">>; 3086// __declspec is enabled by default for the PS4 by the driver, and also 3087// enabled for Microsoft Extensions or Borland Extensions, here. 3088// 3089// FIXME: __declspec is also currently enabled for CUDA, but isn't really a 3090// CUDA extension. However, it is required for supporting 3091// __clang_cuda_builtin_vars.h, which uses __declspec(property). Once that has 3092// been rewritten in terms of something more generic, remove the Opts.CUDA 3093// term here. 3094defm declspec : BoolOption<"f", "declspec", 3095 LangOpts<"DeclSpecKeyword">, DefaultFalse, 3096 PosFlag<SetTrue, [], [ClangOption], "Allow", [fms_extensions.KeyPath, fborland_extensions.KeyPath, cuda.KeyPath]>, 3097 NegFlag<SetFalse, [], [ClangOption], "Disallow">, 3098 BothFlags<[], [ClangOption, CC1Option], 3099 " __declspec as a keyword">>, Group<f_clang_Group>; 3100def fmodules_cache_path : Joined<["-"], "fmodules-cache-path=">, Group<i_Group>, 3101 Flags<[]>, Visibility<[ClangOption, CC1Option]>, 3102 MetaVarName<"<directory>">, 3103 HelpText<"Specify the module cache path">; 3104def fmodules_user_build_path : Separate<["-"], "fmodules-user-build-path">, Group<i_Group>, 3105 Flags<[]>, Visibility<[ClangOption, CC1Option]>, 3106 MetaVarName<"<directory>">, 3107 HelpText<"Specify the module user build path">, 3108 MarshallingInfoString<HeaderSearchOpts<"ModuleUserBuildPath">>; 3109def fprebuilt_module_path : Joined<["-"], "fprebuilt-module-path=">, Group<i_Group>, 3110 Flags<[]>, Visibility<[ClangOption, CLOption, CC1Option]>, 3111 MetaVarName<"<directory>">, 3112 HelpText<"Specify the prebuilt module path">; 3113defm prebuilt_implicit_modules : BoolFOption<"prebuilt-implicit-modules", 3114 HeaderSearchOpts<"EnablePrebuiltImplicitModules">, DefaultFalse, 3115 PosFlag<SetTrue, [], [ClangOption], "Look up implicit modules in the prebuilt module path">, 3116 NegFlag<SetFalse>, BothFlags<[], [ClangOption, CC1Option]>>; 3117 3118def fmodule_output_EQ : Joined<["-"], "fmodule-output=">, 3119 Flags<[NoXarchOption]>, Visibility<[ClangOption, CLOption, CC1Option]>, 3120 MarshallingInfoString<FrontendOpts<"ModuleOutputPath">>, 3121 HelpText<"Save intermediate module file results when compiling a standard C++ module unit.">; 3122def fmodule_output : Flag<["-"], "fmodule-output">, Flags<[NoXarchOption]>, 3123 Visibility<[ClangOption, CLOption, CC1Option]>, 3124 HelpText<"Save intermediate module file results when compiling a standard C++ module unit.">; 3125 3126defm skip_odr_check_in_gmf : BoolOption<"f", "skip-odr-check-in-gmf", 3127 LangOpts<"SkipODRCheckInGMF">, DefaultFalse, 3128 PosFlag<SetTrue, [], [CC1Option], 3129 "Skip ODR checks for decls in the global module fragment.">, 3130 NegFlag<SetFalse, [], [CC1Option], 3131 "Perform ODR checks for decls in the global module fragment.">>, 3132 Group<f_Group>; 3133 3134def modules_reduced_bmi : Flag<["-"], "fexperimental-modules-reduced-bmi">, 3135 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 3136 HelpText<"Generate the reduced BMI">, 3137 MarshallingInfoFlag<FrontendOpts<"GenReducedBMI">>; 3138 3139def fmodules_prune_interval : Joined<["-"], "fmodules-prune-interval=">, Group<i_Group>, 3140 Visibility<[ClangOption, CC1Option]>, MetaVarName<"<seconds>">, 3141 HelpText<"Specify the interval (in seconds) between attempts to prune the module cache">, 3142 MarshallingInfoInt<HeaderSearchOpts<"ModuleCachePruneInterval">, "7 * 24 * 60 * 60">; 3143def fmodules_prune_after : Joined<["-"], "fmodules-prune-after=">, Group<i_Group>, 3144 Visibility<[ClangOption, CC1Option]>, MetaVarName<"<seconds>">, 3145 HelpText<"Specify the interval (in seconds) after which a module file will be considered unused">, 3146 MarshallingInfoInt<HeaderSearchOpts<"ModuleCachePruneAfter">, "31 * 24 * 60 * 60">; 3147def fbuild_session_timestamp : Joined<["-"], "fbuild-session-timestamp=">, 3148 Group<i_Group>, Visibility<[ClangOption, CC1Option]>, 3149 MetaVarName<"<time since Epoch in seconds>">, 3150 HelpText<"Time when the current build session started">, 3151 MarshallingInfoInt<HeaderSearchOpts<"BuildSessionTimestamp">, "0", "uint64_t">; 3152def fbuild_session_file : Joined<["-"], "fbuild-session-file=">, 3153 Group<i_Group>, MetaVarName<"<file>">, 3154 HelpText<"Use the last modification time of <file> as the build session timestamp">; 3155def fmodules_validate_once_per_build_session : Flag<["-"], "fmodules-validate-once-per-build-session">, 3156 Group<i_Group>, Visibility<[ClangOption, CC1Option]>, 3157 HelpText<"Don't verify input files for the modules if the module has been " 3158 "successfully validated or loaded during this build session">, 3159 MarshallingInfoFlag<HeaderSearchOpts<"ModulesValidateOncePerBuildSession">>; 3160def fmodules_disable_diagnostic_validation : Flag<["-"], "fmodules-disable-diagnostic-validation">, 3161 Group<i_Group>, Visibility<[ClangOption, CC1Option]>, 3162 HelpText<"Disable validation of the diagnostic options when loading the module">, 3163 MarshallingInfoNegativeFlag<HeaderSearchOpts<"ModulesValidateDiagnosticOptions">>; 3164defm modules_validate_system_headers : BoolOption<"f", "modules-validate-system-headers", 3165 HeaderSearchOpts<"ModulesValidateSystemHeaders">, DefaultFalse, 3166 PosFlag<SetTrue, [], [ClangOption, CC1Option], 3167 "Validate the system headers that a module depends on when loading the module">, 3168 NegFlag<SetFalse, [], []>>, Group<i_Group>; 3169def fno_modules_validate_textual_header_includes : 3170 Flag<["-"], "fno-modules-validate-textual-header-includes">, 3171 Group<f_Group>, Flags<[]>, Visibility<[ClangOption, CC1Option]>, 3172 MarshallingInfoNegativeFlag<LangOpts<"ModulesValidateTextualHeaderIncludes">>, 3173 HelpText<"Do not enforce -fmodules-decluse and private header restrictions for textual headers. " 3174 "This flag will be removed in a future Clang release.">; 3175defm modules_skip_diagnostic_options : BoolFOption<"modules-skip-diagnostic-options", 3176 HeaderSearchOpts<"ModulesSkipDiagnosticOptions">, DefaultFalse, 3177 PosFlag<SetTrue, [], [], "Disable writing diagnostic options">, 3178 NegFlag<SetFalse>, BothFlags<[], [CC1Option]>>; 3179defm modules_skip_header_search_paths : BoolFOption<"modules-skip-header-search-paths", 3180 HeaderSearchOpts<"ModulesSkipHeaderSearchPaths">, DefaultFalse, 3181 PosFlag<SetTrue, [], [], "Disable writing header search paths">, 3182 NegFlag<SetFalse>, BothFlags<[], [CC1Option]>>; 3183def fno_modules_prune_non_affecting_module_map_files : 3184 Flag<["-"], "fno-modules-prune-non-affecting-module-map-files">, 3185 Group<f_Group>, Flags<[]>, Visibility<[CC1Option]>, 3186 MarshallingInfoNegativeFlag<HeaderSearchOpts<"ModulesPruneNonAffectingModuleMaps">>, 3187 HelpText<"Do not prune non-affecting module map files when writing module files">; 3188 3189def fincremental_extensions : 3190 Flag<["-"], "fincremental-extensions">, 3191 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 3192 HelpText<"Enable incremental processing extensions such as processing" 3193 "statements on the global scope.">, 3194 MarshallingInfoFlag<LangOpts<"IncrementalExtensions">>; 3195 3196def fvalidate_ast_input_files_content: 3197 Flag <["-"], "fvalidate-ast-input-files-content">, 3198 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 3199 HelpText<"Compute and store the hash of input files used to build an AST." 3200 " Files with mismatching mtime's are considered valid" 3201 " if both contents is identical">, 3202 MarshallingInfoFlag<HeaderSearchOpts<"ValidateASTInputFilesContent">>; 3203def fforce_check_cxx20_modules_input_files: 3204 Flag <["-"], "fforce-check-cxx20-modules-input-files">, 3205 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 3206 HelpText<"Check the input source files from C++20 modules explicitly">, 3207 MarshallingInfoFlag<HeaderSearchOpts<"ForceCheckCXX20ModulesInputFiles">>; 3208def fmodules_validate_input_files_content: 3209 Flag <["-"], "fmodules-validate-input-files-content">, 3210 Group<f_Group>, 3211 HelpText<"Validate PCM input files based on content if mtime differs">; 3212def fno_modules_validate_input_files_content: 3213 Flag <["-"], "fno_modules-validate-input-files-content">, 3214 Group<f_Group>; 3215def fpch_validate_input_files_content: 3216 Flag <["-"], "fpch-validate-input-files-content">, 3217 Group<f_Group>, 3218 HelpText<"Validate PCH input files based on content if mtime differs">; 3219def fno_pch_validate_input_files_content: 3220 Flag <["-"], "fno_pch-validate-input-files-content">, 3221 Group<f_Group>; 3222defm pch_instantiate_templates : BoolFOption<"pch-instantiate-templates", 3223 LangOpts<"PCHInstantiateTemplates">, DefaultFalse, 3224 PosFlag<SetTrue, [], [ClangOption], "Instantiate templates already while building a PCH">, 3225 NegFlag<SetFalse>, BothFlags<[], [ClangOption, CC1Option, CLOption] 3226 >>; 3227defm pch_codegen: OptInCC1FFlag<"pch-codegen", "Generate ", "Do not generate ", 3228 "code for uses of this PCH that assumes an explicit object file will be built for the PCH">; 3229defm pch_debuginfo: OptInCC1FFlag<"pch-debuginfo", "Generate ", "Do not generate ", 3230 "debug info for types in an object file built from this PCH and do not generate them elsewhere">; 3231 3232def fimplicit_module_maps : Flag <["-"], "fimplicit-module-maps">, Group<f_Group>, 3233 Visibility<[ClangOption, CC1Option, CLOption]>, 3234 HelpText<"Implicitly search the file system for module map files.">, 3235 MarshallingInfoFlag<HeaderSearchOpts<"ImplicitModuleMaps">>; 3236defm modules : BoolFOption<"modules", 3237 LangOpts<"Modules">, Default<fcxx_modules.KeyPath>, 3238 PosFlag<SetTrue, [], [ClangOption, CC1Option], 3239 "Enable the 'modules' language feature">, 3240 NegFlag<SetFalse>, BothFlags< 3241 [NoXarchOption], [ClangOption, CLOption]>>; 3242def fbuiltin_headers_in_system_modules : Flag <["-"], "fbuiltin-headers-in-system-modules">, 3243 Group<f_Group>, 3244 Visibility<[CC1Option]>, 3245 ShouldParseIf<fmodules.KeyPath>, 3246 HelpText<"builtin headers belong to system modules, and _Builtin_ modules are ignored for cstdlib headers">, 3247 MarshallingInfoFlag<LangOpts<"BuiltinHeadersInSystemModules">>; 3248def fmodule_maps : Flag <["-"], "fmodule-maps">, 3249 Visibility<[ClangOption, CLOption]>, Alias<fimplicit_module_maps>; 3250def fmodule_name_EQ : Joined<["-"], "fmodule-name=">, Group<f_Group>, 3251 Visibility<[ClangOption, CC1Option, CLOption]>, 3252 MetaVarName<"<name>">, 3253 HelpText<"Specify the name of the module to build">, 3254 MarshallingInfoString<LangOpts<"ModuleName">>; 3255def fmodule_implementation_of : Separate<["-"], "fmodule-implementation-of">, 3256 Visibility<[ClangOption, CC1Option, CLOption]>, 3257 Alias<fmodule_name_EQ>; 3258def fsystem_module : Flag<["-"], "fsystem-module">, 3259 Visibility<[ClangOption, CC1Option, CLOption]>, 3260 HelpText<"Build this module as a system module. Only used with -emit-module">, 3261 MarshallingInfoFlag<FrontendOpts<"IsSystemModule">>; 3262def fmodule_map_file : Joined<["-"], "fmodule-map-file=">, 3263 Group<f_Group>, 3264 Visibility<[ClangOption, CC1Option, CLOption]>, 3265 MetaVarName<"<file>">, 3266 HelpText<"Load this module map file">, 3267 MarshallingInfoStringVector<FrontendOpts<"ModuleMapFiles">>; 3268def fmodule_file : Joined<["-"], "fmodule-file=">, 3269 Group<i_Group>, 3270 Visibility<[ClangOption, CC1Option, CLOption]>, 3271 MetaVarName<"[<name>=]<file>">, 3272 HelpText<"Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.">; 3273def fmodules_ignore_macro : Joined<["-"], "fmodules-ignore-macro=">, Group<f_Group>, 3274 Visibility<[ClangOption, CC1Option, CLOption]>, 3275 HelpText<"Ignore the definition of the given macro when building and loading modules">; 3276def fmodules_strict_decluse : Flag <["-"], "fmodules-strict-decluse">, Group<f_Group>, 3277 Visibility<[ClangOption, CC1Option, CLOption]>, 3278 HelpText<"Like -fmodules-decluse but requires all headers to be in modules">, 3279 MarshallingInfoFlag<LangOpts<"ModulesStrictDeclUse">>; 3280defm modules_decluse : BoolFOption<"modules-decluse", 3281 LangOpts<"ModulesDeclUse">, Default<fmodules_strict_decluse.KeyPath>, 3282 PosFlag<SetTrue, [], [ClangOption, CC1Option], 3283 "Require declaration of modules used within a module">, 3284 NegFlag<SetFalse>, BothFlags<[], [ClangOption, CLOption]>>; 3285defm modules_search_all : BoolFOption<"modules-search-all", 3286 LangOpts<"ModulesSearchAll">, DefaultFalse, 3287 PosFlag<SetTrue, [], [ClangOption], "Search even non-imported modules to resolve references">, 3288 NegFlag<SetFalse>, BothFlags<[], [ClangOption, CC1Option, CLOption]>>, 3289 ShouldParseIf<fmodules.KeyPath>; 3290defm implicit_modules : BoolFOption<"implicit-modules", 3291 LangOpts<"ImplicitModules">, DefaultTrue, 3292 NegFlag<SetFalse, [], [ClangOption, CC1Option]>, 3293 PosFlag<SetTrue>, BothFlags< 3294 [NoXarchOption], [ClangOption, CLOption]>>; 3295def fno_modules_check_relocated : Joined<["-"], "fno-modules-check-relocated">, 3296 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 3297 HelpText<"Skip checks for relocated modules when loading PCM files">, 3298 MarshallingInfoNegativeFlag<PreprocessorOpts<"ModulesCheckRelocated">>; 3299def fretain_comments_from_system_headers : Flag<["-"], "fretain-comments-from-system-headers">, Group<f_Group>, 3300 Visibility<[ClangOption, CC1Option]>, 3301 MarshallingInfoFlag<LangOpts<"RetainCommentsFromSystemHeaders">>; 3302def fmodule_header : Flag <["-"], "fmodule-header">, Group<f_Group>, 3303 Visibility<[ClangOption, CLOption]>, 3304 HelpText<"Build a C++20 Header Unit from a header">; 3305def fmodule_header_EQ : Joined<["-"], "fmodule-header=">, Group<f_Group>, 3306 Visibility<[ClangOption, CLOption]>, 3307 MetaVarName<"<kind>">, 3308 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.">; 3309 3310def fno_knr_functions : Flag<["-"], "fno-knr-functions">, Group<f_Group>, 3311 MarshallingInfoFlag<LangOpts<"DisableKNRFunctions">>, 3312 HelpText<"Disable support for K&R C function declarations">, 3313 Visibility<[ClangOption, CC1Option, CLOption]>; 3314 3315def fmudflapth : Flag<["-"], "fmudflapth">, Group<f_Group>; 3316def fmudflap : Flag<["-"], "fmudflap">, Group<f_Group>; 3317def fnested_functions : Flag<["-"], "fnested-functions">, Group<f_Group>; 3318def fnext_runtime : Flag<["-"], "fnext-runtime">, Group<f_Group>; 3319def fno_asm : Flag<["-"], "fno-asm">, Group<f_Group>; 3320def fno_asynchronous_unwind_tables : Flag<["-"], "fno-asynchronous-unwind-tables">, Group<f_Group>; 3321def fno_assume_sane_operator_new : Flag<["-"], "fno-assume-sane-operator-new">, Group<f_Group>, 3322 HelpText<"Don't assume that C++'s global operator new can't alias any pointer">, 3323 Visibility<[ClangOption, CC1Option]>, 3324 MarshallingInfoNegativeFlag<CodeGenOpts<"AssumeSaneOperatorNew">>; 3325def fno_builtin : Flag<["-"], "fno-builtin">, Group<f_Group>, 3326 Visibility<[ClangOption, CC1Option, CLOption, DXCOption]>, 3327 HelpText<"Disable implicit builtin knowledge of functions">; 3328def fno_builtin_ : Joined<["-"], "fno-builtin-">, Group<f_Group>, 3329 Visibility<[ClangOption, CC1Option, CLOption, DXCOption]>, 3330 HelpText<"Disable implicit builtin knowledge of a specific function">; 3331def fno_common : Flag<["-"], "fno-common">, Group<f_Group>, 3332 Visibility<[ClangOption, CC1Option]>, 3333 HelpText<"Compile common globals like normal definitions">; 3334defm digraphs : BoolFOption<"digraphs", 3335 LangOpts<"Digraphs">, Default<std#".hasDigraphs()">, 3336 PosFlag<SetTrue, [], [ClangOption], "Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default)">, 3337 NegFlag<SetFalse, [], [ClangOption], "Disallow alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:'">, 3338 BothFlags<[], [ClangOption, CC1Option]>>; 3339def fno_eliminate_unused_debug_symbols : Flag<["-"], "fno-eliminate-unused-debug-symbols">, Group<f_Group>; 3340def fno_inline_functions : Flag<["-"], "fno-inline-functions">, Group<f_clang_Group>, 3341 Visibility<[ClangOption, CC1Option]>; 3342def fno_inline : Flag<["-"], "fno-inline">, Group<f_clang_Group>, 3343 Visibility<[ClangOption, CC1Option]>; 3344def fno_global_isel : Flag<["-"], "fno-global-isel">, Group<f_clang_Group>, 3345 HelpText<"Disables the global instruction selector">; 3346def fno_experimental_isel : Flag<["-"], "fno-experimental-isel">, Group<f_clang_Group>, 3347 Alias<fno_global_isel>; 3348def fveclib : Joined<["-"], "fveclib=">, Group<f_Group>, 3349 Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, 3350 HelpText<"Use the given vector functions library">, 3351 Values<"Accelerate,libmvec,MASSV,SVML,SLEEF,Darwin_libsystem_m,ArmPL,AMDLIBM,none">, 3352 NormalizedValuesScope<"llvm::driver::VectorLibrary">, 3353 NormalizedValues<["Accelerate", "LIBMVEC", "MASSV", "SVML", "SLEEF", 3354 "Darwin_libsystem_m", "ArmPL", "AMDLIBM", "NoLibrary"]>, 3355 MarshallingInfoEnum<CodeGenOpts<"VecLib">, "NoLibrary">; 3356def fno_lax_vector_conversions : Flag<["-"], "fno-lax-vector-conversions">, Group<f_Group>, 3357 Alias<flax_vector_conversions_EQ>, AliasArgs<["none"]>; 3358def fno_implicit_module_maps : Flag <["-"], "fno-implicit-module-maps">, Group<f_Group>; 3359def fno_module_maps : Flag <["-"], "fno-module-maps">, Alias<fno_implicit_module_maps>; 3360def fno_modules_strict_decluse : Flag <["-"], "fno-strict-modules-decluse">, Group<f_Group>; 3361def fmodule_file_deps : Flag <["-"], "fmodule-file-deps">, Group<f_Group>; 3362def fno_module_file_deps : Flag <["-"], "fno-module-file-deps">, Group<f_Group>; 3363def fno_ms_extensions : Flag<["-"], "fno-ms-extensions">, Group<f_Group>, 3364 Visibility<[ClangOption, CLOption]>; 3365def fno_ms_compatibility : Flag<["-"], "fno-ms-compatibility">, Group<f_Group>, 3366 Visibility<[ClangOption, CLOption]>; 3367def fno_objc_legacy_dispatch : Flag<["-"], "fno-objc-legacy-dispatch">, Group<f_Group>; 3368def fno_objc_weak : Flag<["-"], "fno-objc-weak">, Group<f_Group>, 3369 Visibility<[ClangOption, CC1Option]>; 3370def fno_omit_frame_pointer : Flag<["-"], "fno-omit-frame-pointer">, Group<f_Group>, 3371 Visibility<[ClangOption, FlangOption]>; 3372defm operator_names : BoolFOption<"operator-names", 3373 LangOpts<"CXXOperatorNames">, Default<cplusplus.KeyPath>, 3374 NegFlag<SetFalse, [], [ClangOption, CC1Option], 3375 "Do not treat C++ operator name keywords as synonyms for operators">, 3376 PosFlag<SetTrue>>; 3377def fdiagnostics_absolute_paths : Flag<["-"], "fdiagnostics-absolute-paths">, Group<f_Group>, 3378 Visibility<[ClangOption, CC1Option, CLOption, DXCOption]>, 3379 HelpText<"Print absolute paths in diagnostics">, 3380 MarshallingInfoFlag<DiagnosticOpts<"AbsolutePath">>; 3381defm diagnostics_show_line_numbers : BoolFOption<"diagnostics-show-line-numbers", 3382 DiagnosticOpts<"ShowLineNumbers">, DefaultTrue, 3383 NegFlag<SetFalse, [], [ClangOption, CC1Option], 3384 "Show line numbers in diagnostic code snippets">, 3385 PosFlag<SetTrue>>; 3386def fno_stack_protector : Flag<["-"], "fno-stack-protector">, Group<f_Group>, 3387 HelpText<"Disable the use of stack protectors">; 3388def fno_strict_aliasing : Flag<["-"], "fno-strict-aliasing">, Group<f_Group>, 3389 Visibility<[ClangOption, CLOption, DXCOption]>, 3390 HelpText<"Disable optimizations based on strict aliasing rules">; 3391def fstruct_path_tbaa : Flag<["-"], "fstruct-path-tbaa">, Group<f_Group>; 3392def fno_struct_path_tbaa : Flag<["-"], "fno-struct-path-tbaa">, Group<f_Group>; 3393def fno_strict_enums : Flag<["-"], "fno-strict-enums">, Group<f_Group>; 3394def fno_strict_overflow : Flag<["-"], "fno-strict-overflow">, Group<f_Group>; 3395def fno_pointer_tbaa : Flag<["-"], "fno-pointer-tbaa">, Group<f_Group>; 3396def fno_temp_file : Flag<["-"], "fno-temp-file">, Group<f_Group>, 3397 Visibility<[ClangOption, CC1Option, CLOption, DXCOption]>, HelpText< 3398 "Directly create compilation output files. This may lead to incorrect incremental builds if the compiler crashes">, 3399 MarshallingInfoNegativeFlag<FrontendOpts<"UseTemporary">>; 3400defm use_cxa_atexit : BoolFOption<"use-cxa-atexit", 3401 CodeGenOpts<"CXAAtExit">, DefaultTrue, 3402 NegFlag<SetFalse, [], [ClangOption, CC1Option], 3403 "Don't use __cxa_atexit for calling destructors">, 3404 PosFlag<SetTrue>>; 3405def fno_unwind_tables : Flag<["-"], "fno-unwind-tables">, Group<f_Group>; 3406def fno_verbose_asm : Flag<["-"], "fno-verbose-asm">, Group<f_Group>, 3407 Visibility<[ClangOption, CC1Option]>, 3408 MarshallingInfoNegativeFlag<CodeGenOpts<"AsmVerbose">>; 3409def fno_working_directory : Flag<["-"], "fno-working-directory">, Group<f_Group>; 3410def fno_wrapv : Flag<["-"], "fno-wrapv">, Group<f_Group>; 3411def fobjc_arc : Flag<["-"], "fobjc-arc">, Group<f_Group>, 3412 Visibility<[ClangOption, CC1Option]>, 3413 HelpText<"Synthesize retain and release calls for Objective-C pointers">; 3414def fno_objc_arc : Flag<["-"], "fno-objc-arc">, Group<f_Group>; 3415defm objc_encode_cxx_class_template_spec : BoolFOption<"objc-encode-cxx-class-template-spec", 3416 LangOpts<"EncodeCXXClassTemplateSpec">, DefaultFalse, 3417 PosFlag<SetTrue, [], [ClangOption, CC1Option], 3418 "Fully encode c++ class template specialization">, 3419 NegFlag<SetFalse>>; 3420defm objc_convert_messages_to_runtime_calls : BoolFOption<"objc-convert-messages-to-runtime-calls", 3421 CodeGenOpts<"ObjCConvertMessagesToRuntimeCalls">, DefaultTrue, 3422 NegFlag<SetFalse, [], [ClangOption, CC1Option]>, 3423 PosFlag<SetTrue>>; 3424defm objc_arc_exceptions : BoolFOption<"objc-arc-exceptions", 3425 CodeGenOpts<"ObjCAutoRefCountExceptions">, DefaultFalse, 3426 PosFlag<SetTrue, [], [ClangOption, CC1Option], 3427 "Use EH-safe code when synthesizing retains and releases in -fobjc-arc">, 3428 NegFlag<SetFalse>>; 3429def fobjc_atdefs : Flag<["-"], "fobjc-atdefs">, Group<clang_ignored_f_Group>; 3430def fobjc_call_cxx_cdtors : Flag<["-"], "fobjc-call-cxx-cdtors">, Group<clang_ignored_f_Group>; 3431defm objc_exceptions : BoolFOption<"objc-exceptions", 3432 LangOpts<"ObjCExceptions">, DefaultFalse, 3433 PosFlag<SetTrue, [], [ClangOption, CC1Option], 3434 "Enable Objective-C exceptions">, 3435 NegFlag<SetFalse>>; 3436defm application_extension : BoolFOption<"application-extension", 3437 LangOpts<"AppExt">, DefaultFalse, 3438 PosFlag<SetTrue, [], [ClangOption, CC1Option], 3439 "Restrict code to those available for App Extensions">, 3440 NegFlag<SetFalse>>; 3441defm relaxed_template_template_args : BoolFOption<"relaxed-template-template-args", 3442 LangOpts<"RelaxedTemplateTemplateArgs">, DefaultTrue, 3443 PosFlag<SetTrue, [], [], "Enable">, 3444 NegFlag<SetFalse, [], [CC1Option], "Disable">, 3445 BothFlags<[], [ClangOption], " C++17 relaxed template template argument matching">>; 3446defm sized_deallocation : BoolFOption<"sized-deallocation", 3447 LangOpts<"SizedDeallocation">, Default<cpp14.KeyPath>, 3448 PosFlag<SetTrue, [], [], "Enable C++14 sized global deallocation functions">, 3449 NegFlag<SetFalse>, BothFlags<[], [ClangOption, CC1Option]>>; 3450defm aligned_allocation : BoolFOption<"aligned-allocation", 3451 LangOpts<"AlignedAllocation">, Default<cpp17.KeyPath>, 3452 PosFlag<SetTrue, [], [ClangOption], "Enable C++17 aligned allocation functions">, 3453 NegFlag<SetFalse>, BothFlags<[], [ClangOption, CC1Option]>>; 3454def fnew_alignment_EQ : Joined<["-"], "fnew-alignment=">, 3455 HelpText<"Specifies the largest alignment guaranteed by '::operator new(size_t)'">, 3456 MetaVarName<"<align>">, Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 3457 MarshallingInfoInt<LangOpts<"NewAlignOverride">>; 3458def : Separate<["-"], "fnew-alignment">, Alias<fnew_alignment_EQ>; 3459def : Flag<["-"], "faligned-new">, Alias<faligned_allocation>; 3460def : Flag<["-"], "fno-aligned-new">, Alias<fno_aligned_allocation>; 3461def faligned_new_EQ : Joined<["-"], "faligned-new=">; 3462 3463def fobjc_legacy_dispatch : Flag<["-"], "fobjc-legacy-dispatch">, Group<f_Group>; 3464def fobjc_new_property : Flag<["-"], "fobjc-new-property">, Group<clang_ignored_f_Group>; 3465defm objc_infer_related_result_type : BoolFOption<"objc-infer-related-result-type", 3466 LangOpts<"ObjCInferRelatedResultType">, DefaultTrue, 3467 NegFlag<SetFalse, [], [ClangOption, CC1Option], 3468 "do not infer Objective-C related result type based on method family">, 3469 PosFlag<SetTrue>>; 3470def fobjc_link_runtime: Flag<["-"], "fobjc-link-runtime">, Group<f_Group>; 3471def fobjc_weak : Flag<["-"], "fobjc-weak">, Group<f_Group>, 3472 Visibility<[ClangOption, CC1Option]>, 3473 HelpText<"Enable ARC-style weak references in Objective-C">; 3474 3475// Objective-C ABI options. 3476def fobjc_runtime_EQ : Joined<["-"], "fobjc-runtime=">, Group<f_Group>, 3477 Visibility<[ClangOption, CC1Option, CLOption]>, 3478 HelpText<"Specify the target Objective-C runtime kind and version">; 3479def fobjc_abi_version_EQ : Joined<["-"], "fobjc-abi-version=">, Group<f_Group>; 3480def fobjc_nonfragile_abi_version_EQ : Joined<["-"], "fobjc-nonfragile-abi-version=">, Group<f_Group>; 3481def fobjc_nonfragile_abi : Flag<["-"], "fobjc-nonfragile-abi">, Group<f_Group>; 3482def fno_objc_nonfragile_abi : Flag<["-"], "fno-objc-nonfragile-abi">, Group<f_Group>; 3483 3484def fobjc_sender_dependent_dispatch : Flag<["-"], "fobjc-sender-dependent-dispatch">, Group<f_Group>; 3485def fobjc_disable_direct_methods_for_testing : 3486 Flag<["-"], "fobjc-disable-direct-methods-for-testing">, 3487 Group<f_Group>, Visibility<[ClangOption, CC1Option]>, 3488 HelpText<"Ignore attribute objc_direct so that direct methods can be tested">, 3489 MarshallingInfoFlag<LangOpts<"ObjCDisableDirectMethodsForTesting">>; 3490defm objc_avoid_heapify_local_blocks : BoolFOption<"objc-avoid-heapify-local-blocks", 3491 CodeGenOpts<"ObjCAvoidHeapifyLocalBlocks">, DefaultFalse, 3492 PosFlag<SetTrue, [], [ClangOption], "Try">, 3493 NegFlag<SetFalse, [], [ClangOption], "Don't try">, 3494 BothFlags<[], [CC1Option], " to avoid heapifying local blocks">>; 3495defm disable_block_signature_string : BoolFOption<"disable-block-signature-string", 3496 CodeGenOpts<"DisableBlockSignatureString">, DefaultFalse, 3497 PosFlag<SetTrue, [], [ClangOption], "Disable">, 3498 NegFlag<SetFalse, [], [ClangOption], "Don't disable">, 3499 BothFlags<[], [CC1Option], " block signature string)">>; 3500 3501def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group<f_Group>, 3502 Visibility<[ClangOption, FlangOption]>, 3503 HelpText<"Omit the frame pointer from functions that don't need it. " 3504 "Some stack unwinding cases, such as profilers and sanitizers, may prefer specifying -fno-omit-frame-pointer. " 3505 "On many targets, -O1 and higher omit the frame pointer by default. " 3506 "-m[no-]omit-leaf-frame-pointer takes precedence for leaf functions">; 3507def fopenmp : Flag<["-"], "fopenmp">, Group<f_Group>, 3508 Flags<[NoArgumentUnused]>, 3509 Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, 3510 HelpText<"Parse OpenMP pragmas and generate parallel code.">; 3511def fno_openmp : Flag<["-"], "fno-openmp">, Group<f_Group>, 3512 Flags<[NoArgumentUnused]>; 3513class OpenMPVersionHelp<string program, string default> { 3514 string str = !strconcat( 3515 "Set OpenMP version (e.g. 45 for OpenMP 4.5, 51 for OpenMP 5.1). Default value is ", 3516 default, " for ", program); 3517} 3518def fopenmp_version_EQ : Joined<["-"], "fopenmp-version=">, Group<f_Group>, 3519 Flags<[NoArgumentUnused]>, 3520 Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, 3521 HelpText<OpenMPVersionHelp<"Clang", "51">.str>, 3522 HelpTextForVariants<[FlangOption, FC1Option], OpenMPVersionHelp<"Flang", "11">.str>; 3523defm openmp_extensions: BoolFOption<"openmp-extensions", 3524 LangOpts<"OpenMPExtensions">, DefaultTrue, 3525 PosFlag<SetTrue, [NoArgumentUnused], [ClangOption, CC1Option], 3526 "Enable all Clang extensions for OpenMP directives and clauses">, 3527 NegFlag<SetFalse, [NoArgumentUnused], [ClangOption, CC1Option], 3528 "Disable all Clang extensions for OpenMP directives and clauses">>; 3529def fopenmp_EQ : Joined<["-"], "fopenmp=">, Group<f_Group>, 3530 Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>; 3531def fopenmp_use_tls : Flag<["-"], "fopenmp-use-tls">, Group<f_Group>, 3532 Flags<[NoArgumentUnused, HelpHidden]>; 3533def fnoopenmp_use_tls : Flag<["-"], "fnoopenmp-use-tls">, Group<f_Group>, 3534 Flags<[NoArgumentUnused, HelpHidden]>, Visibility<[ClangOption, CC1Option]>; 3535def fopenmp_targets_EQ : CommaJoined<["-"], "fopenmp-targets=">, 3536 Flags<[NoXarchOption]>, Visibility<[ClangOption, CC1Option, FlangOption]>, 3537 HelpText<"Specify comma-separated list of triples OpenMP offloading targets to be supported">; 3538def fopenmp_relocatable_target : Flag<["-"], "fopenmp-relocatable-target">, 3539 Group<f_Group>, Flags<[NoArgumentUnused, HelpHidden]>, 3540 Visibility<[ClangOption, CC1Option]>; 3541def fnoopenmp_relocatable_target : Flag<["-"], "fnoopenmp-relocatable-target">, 3542 Group<f_Group>, Flags<[NoArgumentUnused, HelpHidden]>, 3543 Visibility<[ClangOption, CC1Option]>; 3544def fopenmp_simd : Flag<["-"], "fopenmp-simd">, Group<f_Group>, 3545 Flags<[NoArgumentUnused]>, Visibility<[ClangOption, CC1Option]>, 3546 HelpText<"Emit OpenMP code only for SIMD-based constructs.">; 3547def fopenmp_enable_irbuilder : Flag<["-"], "fopenmp-enable-irbuilder">, Group<f_Group>, 3548 Flags<[NoArgumentUnused, HelpHidden]>, Visibility<[ClangOption, CC1Option]>, 3549 HelpText<"Use the experimental OpenMP-IR-Builder codegen path.">; 3550def fno_openmp_simd : Flag<["-"], "fno-openmp-simd">, Group<f_Group>, 3551 Flags<[NoArgumentUnused]>, Visibility<[ClangOption, CC1Option]>; 3552def fopenmp_cuda_mode : Flag<["-"], "fopenmp-cuda-mode">, Group<f_Group>, 3553 Flags<[NoArgumentUnused, HelpHidden]>, Visibility<[ClangOption, CC1Option]>; 3554def fno_openmp_cuda_mode : Flag<["-"], "fno-openmp-cuda-mode">, Group<f_Group>, 3555 Flags<[NoArgumentUnused, HelpHidden]>; 3556def fopenmp_cuda_number_of_sm_EQ : Joined<["-"], "fopenmp-cuda-number-of-sm=">, Group<f_Group>, 3557 Flags<[NoArgumentUnused, HelpHidden]>, Visibility<[ClangOption, CC1Option]>; 3558def fopenmp_cuda_blocks_per_sm_EQ : Joined<["-"], "fopenmp-cuda-blocks-per-sm=">, Group<f_Group>, 3559 Flags<[NoArgumentUnused, HelpHidden]>, Visibility<[ClangOption, CC1Option]>; 3560def fopenmp_cuda_teams_reduction_recs_num_EQ : Joined<["-"], "fopenmp-cuda-teams-reduction-recs-num=">, Group<f_Group>, 3561 Flags<[NoArgumentUnused, HelpHidden]>, Visibility<[ClangOption, CC1Option]>; 3562 3563//===----------------------------------------------------------------------===// 3564// Shared cc1 + fc1 OpenMP Target Options 3565//===----------------------------------------------------------------------===// 3566 3567let Flags = [NoArgumentUnused] in { 3568let Visibility = [ClangOption, CC1Option, FC1Option, FlangOption] in { 3569let Group = f_Group in { 3570 3571def fopenmp_target_debug : Flag<["-"], "fopenmp-target-debug">, 3572 HelpText<"Enable debugging in the OpenMP offloading device RTL">; 3573def fno_openmp_target_debug : Flag<["-"], "fno-openmp-target-debug">; 3574 3575} // let Group = f_Group 3576} // let Visibility = [ClangOption, CC1Option, FC1Option] 3577} // let Flags = [NoArgumentUnused] 3578 3579//===----------------------------------------------------------------------===// 3580// FlangOption + FC1 + ClangOption + CC1Option 3581//===----------------------------------------------------------------------===// 3582let Visibility = [FC1Option, FlangOption, CC1Option, ClangOption] in { 3583def fopenacc : Flag<["-"], "fopenacc">, Group<f_Group>, 3584 HelpText<"Enable OpenACC">; 3585} // let Visibility = [FC1Option, FlangOption, CC1Option, ClangOption] 3586 3587//===----------------------------------------------------------------------===// 3588// Optimisation remark options 3589//===----------------------------------------------------------------------===// 3590 3591let Visibility = [ClangOption, CC1Option, FC1Option, FlangOption] in { 3592 3593def Rpass_EQ : Joined<["-"], "Rpass=">, Group<R_value_Group>, 3594 HelpText<"Report transformations performed by optimization passes whose " 3595 "name matches the given POSIX regular expression">; 3596def Rpass_missed_EQ : Joined<["-"], "Rpass-missed=">, Group<R_value_Group>, 3597 HelpText<"Report missed transformations by optimization passes whose " 3598 "name matches the given POSIX regular expression">; 3599def Rpass_analysis_EQ : Joined<["-"], "Rpass-analysis=">, Group<R_value_Group>, 3600 HelpText<"Report transformation analysis from optimization passes whose " 3601 "name matches the given POSIX regular expression">; 3602def R_Joined : Joined<["-"], "R">, Group<R_Group>, 3603 Visibility<[ClangOption, CLOption, DXCOption]>, 3604 MetaVarName<"<remark>">, HelpText<"Enable the specified remark">; 3605 3606} // let Visibility = [ClangOption, CC1Option, FC1Option, FlangOption] 3607 3608let Flags = [NoArgumentUnused, HelpHidden] in { 3609let Visibility = [ClangOption, CC1Option, FC1Option, FlangOption] in { 3610let Group = f_Group in { 3611 3612def fopenmp_target_debug_EQ : Joined<["-"], "fopenmp-target-debug=">; 3613def fopenmp_assume_teams_oversubscription : Flag<["-"], "fopenmp-assume-teams-oversubscription">; 3614def fopenmp_assume_threads_oversubscription : Flag<["-"], "fopenmp-assume-threads-oversubscription">; 3615def fno_openmp_assume_teams_oversubscription : Flag<["-"], "fno-openmp-assume-teams-oversubscription">; 3616def fno_openmp_assume_threads_oversubscription : Flag<["-"], "fno-openmp-assume-threads-oversubscription">; 3617def fopenmp_assume_no_thread_state : Flag<["-"], "fopenmp-assume-no-thread-state">, 3618 HelpText<"Assert no thread in a parallel region modifies an ICV">, 3619 MarshallingInfoFlag<LangOpts<"OpenMPNoThreadState">>; 3620def fopenmp_assume_no_nested_parallelism : Flag<["-"], "fopenmp-assume-no-nested-parallelism">, 3621 HelpText<"Assert no nested parallel regions in the GPU">, 3622 MarshallingInfoFlag<LangOpts<"OpenMPNoNestedParallelism">>; 3623 3624} // let Group = f_Group 3625} // let Visibility = [ClangOption, CC1Option, FC1Option] 3626} // let Flags = [NoArgumentUnused, HelpHidden] 3627 3628def fopenmp_offload_mandatory : Flag<["-"], "fopenmp-offload-mandatory">, Group<f_Group>, 3629 Flags<[NoArgumentUnused]>, Visibility<[ClangOption, CC1Option]>, 3630 HelpText<"Do not create a host fallback if offloading to the device fails.">, 3631 MarshallingInfoFlag<LangOpts<"OpenMPOffloadMandatory">>; 3632def fopenmp_force_usm : Flag<["-"], "fopenmp-force-usm">, Group<f_Group>, 3633 Flags<[NoArgumentUnused]>, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, 3634 HelpText<"Force behvaior as if the user specified pragma omp requires unified_shared_memory.">, 3635 MarshallingInfoFlag<LangOpts<"OpenMPForceUSM">>; 3636def fopenmp_target_jit : Flag<["-"], "fopenmp-target-jit">, Group<f_Group>, 3637 Flags<[NoArgumentUnused]>, Visibility<[ClangOption, CLOption]>, 3638 HelpText<"Emit code that can be JIT compiled for OpenMP offloading. Implies -foffload-lto=full">; 3639def fno_openmp_target_jit : Flag<["-"], "fno-openmp-target-jit">, Group<f_Group>, 3640 Flags<[NoArgumentUnused, HelpHidden]>, 3641 Visibility<[ClangOption, CLOption]>; 3642def fopenmp_target_new_runtime : Flag<["-"], "fopenmp-target-new-runtime">, 3643 Group<f_Group>, Flags<[HelpHidden]>, Visibility<[ClangOption, CC1Option]>; 3644def fno_openmp_target_new_runtime : Flag<["-"], "fno-openmp-target-new-runtime">, 3645 Group<f_Group>, Flags<[HelpHidden]>, Visibility<[ClangOption, CC1Option]>; 3646defm openmp_optimistic_collapse : BoolFOption<"openmp-optimistic-collapse", 3647 LangOpts<"OpenMPOptimisticCollapse">, DefaultFalse, 3648 PosFlag<SetTrue, [], [ClangOption, CC1Option]>, 3649 NegFlag<SetFalse>, BothFlags<[NoArgumentUnused, HelpHidden], []>>; 3650def static_openmp: Flag<["-"], "static-openmp">, 3651 HelpText<"Use the static host OpenMP runtime while linking.">; 3652def fopenmp_new_driver : Flag<["-"], "fopenmp-new-driver">, Flags<[HelpHidden]>, 3653 HelpText<"Use the new driver for OpenMP offloading.">; 3654def fno_openmp_new_driver : Flag<["-"], "fno-openmp-new-driver">, 3655 Flags<[HelpHidden]>, 3656 HelpText<"Don't use the new driver for OpenMP offloading.">; 3657def fno_optimize_sibling_calls : Flag<["-"], "fno-optimize-sibling-calls">, Group<f_Group>, 3658 Visibility<[ClangOption, CC1Option]>, 3659 HelpText<"Disable tail call optimization, keeping the call stack accurate">, 3660 MarshallingInfoFlag<CodeGenOpts<"DisableTailCalls">>; 3661def foptimize_sibling_calls : Flag<["-"], "foptimize-sibling-calls">, Group<f_Group>; 3662defm escaping_block_tail_calls : BoolFOption<"escaping-block-tail-calls", 3663 CodeGenOpts<"NoEscapingBlockTailCalls">, DefaultFalse, 3664 NegFlag<SetTrue, [], [ClangOption, CC1Option]>, 3665 PosFlag<SetFalse>>; 3666def force__cpusubtype__ALL : Flag<["-"], "force_cpusubtype_ALL">; 3667def force__flat__namespace : Flag<["-"], "force_flat_namespace">; 3668def force__load : Separate<["-"], "force_load">; 3669def force_addr : Joined<["-"], "fforce-addr">, Group<clang_ignored_f_Group>; 3670def foutput_class_dir_EQ : Joined<["-"], "foutput-class-dir=">, Group<f_Group>; 3671def fpack_struct : Flag<["-"], "fpack-struct">, Group<f_Group>; 3672def fno_pack_struct : Flag<["-"], "fno-pack-struct">, Group<f_Group>; 3673def fpack_struct_EQ : Joined<["-"], "fpack-struct=">, Group<f_Group>, 3674 Visibility<[ClangOption, CC1Option]>, 3675 HelpText<"Specify the default maximum struct packing alignment">, 3676 MarshallingInfoInt<LangOpts<"PackStruct">>; 3677def fmax_type_align_EQ : Joined<["-"], "fmax-type-align=">, Group<f_Group>, 3678 Visibility<[ClangOption, CC1Option]>, 3679 HelpText<"Specify the maximum alignment to enforce on pointers lacking an explicit alignment">, 3680 MarshallingInfoInt<LangOpts<"MaxTypeAlign">>; 3681def fno_max_type_align : Flag<["-"], "fno-max-type-align">, Group<f_Group>; 3682defm pascal_strings : BoolFOption<"pascal-strings", 3683 LangOpts<"PascalStrings">, DefaultFalse, 3684 PosFlag<SetTrue, [], [ClangOption, CC1Option], 3685 "Recognize and construct Pascal-style string literals">, 3686 NegFlag<SetFalse>>; 3687// Note: This flag has different semantics in the driver and in -cc1. The driver accepts -fpatchable-function-entry=M,N 3688// and forwards it to -cc1 as -fpatchable-function-entry=M and -fpatchable-function-entry-offset=N. In -cc1, both flags 3689// are treated as a single integer. 3690def fpatchable_function_entry_EQ : Joined<["-"], "fpatchable-function-entry=">, Group<f_Group>, 3691 Visibility<[ClangOption, CC1Option]>, 3692 MetaVarName<"<N,M>">, HelpText<"Generate M NOPs before function entry and N-M NOPs after function entry">, 3693 MarshallingInfoInt<CodeGenOpts<"PatchableFunctionEntryCount">>; 3694def fms_hotpatch : Flag<["-"], "fms-hotpatch">, Group<f_Group>, 3695 Visibility<[ClangOption, CC1Option, CLOption]>, 3696 HelpText<"Ensure that all functions can be hotpatched at runtime">, 3697 MarshallingInfoFlag<CodeGenOpts<"HotPatch">>; 3698def fpcc_struct_return : Flag<["-"], "fpcc-struct-return">, Group<f_Group>, 3699 Visibility<[ClangOption, CC1Option]>, 3700 HelpText<"Override the default ABI to return all structs on the stack">; 3701def fpch_preprocess : Flag<["-"], "fpch-preprocess">, Group<f_Group>; 3702defm pic_data_is_text_relative : SimpleMFlag<"pic-data-is-text-relative", 3703 "Assume", "Don't assume", " data segments are relative to text segment">; 3704def fdirect_access_external_data : Flag<["-"], "fdirect-access-external-data">, Group<f_Group>, 3705 Visibility<[ClangOption, CC1Option]>, 3706 HelpText<"Don't use GOT indirection to reference external data symbols">; 3707def fno_direct_access_external_data : Flag<["-"], "fno-direct-access-external-data">, Group<f_Group>, 3708 Visibility<[ClangOption, CC1Option]>, 3709 HelpText<"Use GOT indirection to reference external data symbols">; 3710defm plt : BoolFOption<"plt", 3711 CodeGenOpts<"NoPLT">, DefaultFalse, 3712 NegFlag<SetTrue, [], [ClangOption, CC1Option], 3713 "Use GOT indirection instead of PLT to make external function calls (x86 only)">, 3714 PosFlag<SetFalse>>; 3715defm ropi : BoolFOption<"ropi", 3716 LangOpts<"ROPI">, DefaultFalse, 3717 PosFlag<SetTrue, [], [ClangOption, FlangOption, CC1Option], 3718 "Generate read-only position independent code (ARM only)">, 3719 NegFlag<SetFalse, [], [ClangOption, FlangOption, CC1Option]>>; 3720defm rwpi : BoolFOption<"rwpi", 3721 LangOpts<"RWPI">, DefaultFalse, 3722 PosFlag<SetTrue, [], [ClangOption, FlangOption, CC1Option], 3723 "Generate read-write position independent code (ARM only)">, 3724 NegFlag<SetFalse, [], [ClangOption, FlangOption, CC1Option]>>; 3725def fplugin_EQ : Joined<["-"], "fplugin=">, Group<f_Group>, 3726 Flags<[NoXarchOption, NoArgumentUnused]>, MetaVarName<"<dsopath>">, 3727 HelpText<"Load the named plugin (dynamic shared object)">; 3728def fplugin_arg : Joined<["-"], "fplugin-arg-">, 3729 MetaVarName<"<name>-<arg>">, Flags<[NoArgumentUnused]>, 3730 HelpText<"Pass <arg> to plugin <name>">; 3731def fpass_plugin_EQ : Joined<["-"], "fpass-plugin=">, 3732 Group<f_Group>, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, 3733 MetaVarName<"<dsopath>">, Flags<[NoArgumentUnused]>, 3734 HelpText<"Load pass plugin from a dynamic shared object file (only with new pass manager).">, 3735 MarshallingInfoStringVector<CodeGenOpts<"PassPlugins">>; 3736defm tocdata : BoolOption<"m","tocdata", 3737 CodeGenOpts<"AllTocData">, DefaultFalse, 3738 PosFlag<SetTrue, [], [ClangOption, CC1Option], 3739 "All suitable variables will have the TOC data transformation applied">, 3740 NegFlag<SetFalse, [], [ClangOption, CC1Option], 3741 "This is the default. TOC data transformation is not applied to any" 3742 "variables. Only variables specified explicitly in -mtocdata= will" 3743 "have the TOC data transformation.">, 3744 BothFlags<[TargetSpecific], [ClangOption, CLOption]>>, Group<m_Group>; 3745def mtocdata_EQ : CommaJoined<["-"], "mtocdata=">, 3746 Visibility<[ClangOption, CC1Option]>, 3747 Flags<[TargetSpecific]>, Group<m_Group>, 3748 HelpText<"Specifies a list of variables to which the TOC data transformation" 3749 "will be applied.">, 3750 MarshallingInfoStringVector<CodeGenOpts<"TocDataVarsUserSpecified">>; 3751def mno_tocdata_EQ : CommaJoined<["-"], "mno-tocdata=">, 3752 Visibility<[ClangOption, CC1Option]>, 3753 Flags<[TargetSpecific]>, Group<m_Group>, 3754 HelpText<"Specifies a list of variables to be exempt from the TOC data" 3755 "transformation.">, 3756 MarshallingInfoStringVector<CodeGenOpts<"NoTocDataVars">>; 3757defm preserve_as_comments : BoolFOption<"preserve-as-comments", 3758 CodeGenOpts<"PreserveAsmComments">, DefaultTrue, 3759 NegFlag<SetFalse, [], [ClangOption, CC1Option], 3760 "Do not preserve comments in inline assembly">, 3761 PosFlag<SetTrue>>; 3762def framework : Separate<["-"], "framework">, Flags<[LinkerInput]>; 3763def reexport_framework : Separate<["-"], "reexport_framework">, Flags<[LinkerInput]>; 3764def reexport_l : Joined<["-"], "reexport-l">, Flags<[LinkerInput]>; 3765def reexport_library : JoinedOrSeparate<["-"], "reexport_library">, Flags<[LinkerInput]>; 3766def frandom_seed_EQ : Joined<["-"], "frandom-seed=">, Group<clang_ignored_f_Group>; 3767def freg_struct_return : Flag<["-"], "freg-struct-return">, Group<f_Group>, 3768 Visibility<[ClangOption, CC1Option]>, 3769 HelpText<"Override the default ABI to return small structs in registers">; 3770defm rtti : BoolFOption<"rtti", 3771 LangOpts<"RTTI">, Default<cplusplus.KeyPath>, 3772 NegFlag<SetFalse, [], [ClangOption, CC1Option], 3773 "Disable generation of rtti information">, 3774 PosFlag<SetTrue>>, ShouldParseIf<cplusplus.KeyPath>; 3775defm rtti_data : BoolFOption<"rtti-data", 3776 LangOpts<"RTTIData">, Default<frtti.KeyPath>, 3777 NegFlag<SetFalse, [], [ClangOption, CC1Option], 3778 "Disable generation of RTTI data">, 3779 PosFlag<SetTrue>>, ShouldParseIf<frtti.KeyPath>; 3780def : Flag<["-"], "fsched-interblock">, Group<clang_ignored_f_Group>; 3781defm short_enums : BoolFOption<"short-enums", 3782 LangOpts<"ShortEnums">, DefaultFalse, 3783 PosFlag<SetTrue, [], [ClangOption, CC1Option], 3784 "Allocate to an enum type only as many bytes as it" 3785 " needs for the declared range of possible values">, 3786 NegFlag<SetFalse>>; 3787defm char8__t : BoolFOption<"char8_t", 3788 LangOpts<"Char8">, Default<cpp20.KeyPath>, 3789 PosFlag<SetTrue, [], [ClangOption], "Enable">, 3790 NegFlag<SetFalse, [], [ClangOption], "Disable">, 3791 BothFlags<[], [ClangOption, CC1Option], " C++ builtin type char8_t">>; 3792def fshort_wchar : Flag<["-"], "fshort-wchar">, Group<f_Group>, 3793 HelpText<"Force wchar_t to be a short unsigned int">; 3794def fno_short_wchar : Flag<["-"], "fno-short-wchar">, Group<f_Group>, 3795 HelpText<"Force wchar_t to be an unsigned int">; 3796def fshow_overloads_EQ : Joined<["-"], "fshow-overloads=">, Group<f_Group>, 3797 Visibility<[ClangOption, CC1Option]>, 3798 HelpText<"Which overload candidates to show when overload resolution fails. Defaults to 'all'">, 3799 Values<"best,all">, 3800 NormalizedValues<["Ovl_Best", "Ovl_All"]>, 3801 MarshallingInfoEnum<DiagnosticOpts<"ShowOverloads">, "Ovl_All">; 3802defm show_column : BoolFOption<"show-column", 3803 DiagnosticOpts<"ShowColumn">, DefaultTrue, 3804 NegFlag<SetFalse, [], [ClangOption, CC1Option], 3805 "Do not include column number on diagnostics">, 3806 PosFlag<SetTrue>>; 3807defm show_source_location : BoolFOption<"show-source-location", 3808 DiagnosticOpts<"ShowLocation">, DefaultTrue, 3809 NegFlag<SetFalse, [], [ClangOption, CC1Option], 3810 "Do not include source location information with diagnostics">, 3811 PosFlag<SetTrue>>; 3812defm spell_checking : BoolFOption<"spell-checking", 3813 LangOpts<"SpellChecking">, DefaultTrue, 3814 NegFlag<SetFalse, [], [ClangOption, CC1Option], "Disable spell-checking">, 3815 PosFlag<SetTrue>>; 3816def fspell_checking_limit_EQ : Joined<["-"], "fspell-checking-limit=">, Group<f_Group>, 3817 Visibility<[ClangOption, CC1Option]>, 3818 HelpText<"Set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit)">, 3819 MarshallingInfoInt<DiagnosticOpts<"SpellCheckingLimit">, "DiagnosticOptions::DefaultSpellCheckingLimit">; 3820def fsigned_bitfields : Flag<["-"], "fsigned-bitfields">, Group<f_Group>; 3821defm signed_char : BoolFOption<"signed-char", 3822 LangOpts<"CharIsSigned">, DefaultTrue, 3823 NegFlag<SetFalse, [], [ClangOption, CC1Option], "char is unsigned">, 3824 PosFlag<SetTrue, [], [ClangOption], "char is signed">>, 3825 ShouldParseIf<!strconcat("!", open_cl.KeyPath)>; 3826defm split_stack : BoolFOption<"split-stack", 3827 CodeGenOpts<"EnableSegmentedStacks">, DefaultFalse, 3828 NegFlag<SetFalse, [], [ClangOption], "Wouldn't use segmented stack">, 3829 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Use segmented stack">>; 3830def fstack_protector_all : Flag<["-"], "fstack-protector-all">, Group<f_Group>, 3831 HelpText<"Enable stack protectors for all functions">; 3832defm stack_clash_protection : BoolFOption<"stack-clash-protection", 3833 CodeGenOpts<"StackClashProtector">, DefaultFalse, 3834 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Enable">, 3835 NegFlag<SetFalse, [], [ClangOption], "Disable">, 3836 BothFlags<[], [ClangOption], " stack clash protection">>, 3837 DocBrief<"Instrument stack allocation to prevent stack clash attacks">; 3838def fstack_protector_strong : Flag<["-"], "fstack-protector-strong">, Group<f_Group>, 3839 HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. " 3840 "Compared to -fstack-protector, this uses a stronger heuristic " 3841 "that includes functions containing arrays of any size (and any type), " 3842 "as well as any calls to alloca or the taking of an address from a local variable">; 3843def fstack_protector : Flag<["-"], "fstack-protector">, Group<f_Group>, 3844 HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. " 3845 "This uses a loose heuristic which considers functions vulnerable if they " 3846 "contain a char (or 8bit integer) array or constant sized calls to alloca " 3847 ", which are of greater size than ssp-buffer-size (default: 8 bytes). All " 3848 "variable sized calls to alloca are considered vulnerable. A function with " 3849 "a stack protector has a guard value added to the stack frame that is " 3850 "checked on function exit. The guard value must be positioned in the " 3851 "stack frame such that a buffer overflow from a vulnerable variable will " 3852 "overwrite the guard value before overwriting the function's return " 3853 "address. The reference stack guard value is stored in a global variable.">; 3854def ftrivial_auto_var_init : Joined<["-"], "ftrivial-auto-var-init=">, Group<f_Group>, 3855 Visibility<[ClangOption, CC1Option, CLOption, DXCOption]>, 3856 HelpText<"Initialize trivial automatic stack variables. Defaults to 'uninitialized'">, 3857 Values<"uninitialized,zero,pattern">, 3858 NormalizedValuesScope<"LangOptions::TrivialAutoVarInitKind">, 3859 NormalizedValues<["Uninitialized", "Zero", "Pattern"]>, 3860 MarshallingInfoEnum<LangOpts<"TrivialAutoVarInit">, "Uninitialized">; 3861def ftrivial_auto_var_init_stop_after : Joined<["-"], "ftrivial-auto-var-init-stop-after=">, Group<f_Group>, 3862 Visibility<[ClangOption, CC1Option, CLOption, DXCOption]>, 3863 HelpText<"Stop initializing trivial automatic stack variables after the specified number of instances">, 3864 MarshallingInfoInt<LangOpts<"TrivialAutoVarInitStopAfter">>; 3865def ftrivial_auto_var_init_max_size : Joined<["-"], "ftrivial-auto-var-init-max-size=">, Group<f_Group>, 3866 Visibility<[ClangOption, CC1Option, CLOption, DXCOption]>, 3867 HelpText<"Stop initializing trivial automatic stack variables if var size exceeds the specified number of instances (in bytes)">, 3868 MarshallingInfoInt<LangOpts<"TrivialAutoVarInitMaxSize">>; 3869def fstandalone_debug : Flag<["-"], "fstandalone-debug">, Group<f_Group>, 3870 Visibility<[ClangOption, CLOption, DXCOption]>, 3871 HelpText<"Emit full debug info for all types used by the program">; 3872def fno_standalone_debug : Flag<["-"], "fno-standalone-debug">, Group<f_Group>, 3873 Visibility<[ClangOption, CLOption, DXCOption]>, 3874 HelpText<"Limit debug information produced to reduce size of debug binary">; 3875def flimit_debug_info : Flag<["-"], "flimit-debug-info">, 3876 Visibility<[ClangOption, CLOption, DXCOption]>, Alias<fno_standalone_debug>; 3877def fno_limit_debug_info : Flag<["-"], "fno-limit-debug-info">, 3878 Visibility<[ClangOption, CLOption, DXCOption]>, Alias<fstandalone_debug>; 3879def fdebug_macro : Flag<["-"], "fdebug-macro">, Group<f_Group>, 3880 Visibility<[ClangOption, CLOption, DXCOption]>, 3881 HelpText<"Emit macro debug information">; 3882def fno_debug_macro : Flag<["-"], "fno-debug-macro">, Group<f_Group>, 3883 Visibility<[ClangOption, CLOption, DXCOption]>, 3884 HelpText<"Do not emit macro debug information">; 3885def fstrict_aliasing : Flag<["-"], "fstrict-aliasing">, Group<f_Group>, 3886 Visibility<[ClangOption, CLOption, DXCOption]>, 3887 HelpText<"Enable optimizations based on strict aliasing rules">; 3888def fstrict_enums : Flag<["-"], "fstrict-enums">, Group<f_Group>, 3889 Visibility<[ClangOption, CC1Option]>, 3890 HelpText<"Enable optimizations based on the strict definition of an enum's " 3891 "value range">, 3892 MarshallingInfoFlag<CodeGenOpts<"StrictEnums">>; 3893defm strict_vtable_pointers : BoolFOption<"strict-vtable-pointers", 3894 CodeGenOpts<"StrictVTablePointers">, DefaultFalse, 3895 PosFlag<SetTrue, [], [ClangOption, CC1Option], 3896 "Enable optimizations based on the strict rules for" 3897 " overwriting polymorphic C++ objects">, 3898 NegFlag<SetFalse>>; 3899def fstrict_overflow : Flag<["-"], "fstrict-overflow">, Group<f_Group>; 3900def fpointer_tbaa : Flag<["-"], "fpointer-tbaa">, Group<f_Group>; 3901def fdriver_only : Flag<["-"], "fdriver-only">, Flags<[NoXarchOption]>, 3902 Visibility<[ClangOption, CLOption, DXCOption]>, 3903 Group<Action_Group>, HelpText<"Only run the driver.">; 3904def fsyntax_only : Flag<["-"], "fsyntax-only">, 3905 Flags<[NoXarchOption]>, 3906 Visibility<[ClangOption, CLOption, DXCOption, CC1Option, FC1Option, FlangOption]>, 3907 Group<Action_Group>, 3908 HelpText<"Run the preprocessor, parser and semantic analysis stages">; 3909def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group<f_Group>; 3910def ftemplate_depth_EQ : Joined<["-"], "ftemplate-depth=">, Group<f_Group>, 3911 Visibility<[ClangOption, CC1Option]>, 3912 HelpText<"Set the maximum depth of recursive template instantiation">, 3913 MarshallingInfoInt<LangOpts<"InstantiationDepth">, "1024">; 3914def : Joined<["-"], "ftemplate-depth-">, Group<f_Group>, Alias<ftemplate_depth_EQ>; 3915def ftemplate_backtrace_limit_EQ : Joined<["-"], "ftemplate-backtrace-limit=">, Group<f_Group>, 3916 Visibility<[ClangOption, CC1Option]>, 3917 HelpText<"Set the maximum number of entries to print in a template instantiation backtrace (0 = no limit)">, 3918 MarshallingInfoInt<DiagnosticOpts<"TemplateBacktraceLimit">, "DiagnosticOptions::DefaultTemplateBacktraceLimit">; 3919def foperator_arrow_depth_EQ : Joined<["-"], "foperator-arrow-depth=">, Group<f_Group>, 3920 Visibility<[ClangOption, CC1Option]>, 3921 HelpText<"Maximum number of 'operator->'s to call for a member access">, 3922 MarshallingInfoInt<LangOpts<"ArrowDepth">, "256">; 3923 3924def fsave_optimization_record : Flag<["-"], "fsave-optimization-record">, 3925 Visibility<[ClangOption, FlangOption]>, 3926 Group<f_Group>, HelpText<"Generate a YAML optimization record file">; 3927def fsave_optimization_record_EQ : Joined<["-"], "fsave-optimization-record=">, 3928 Visibility<[ClangOption, FlangOption]>, 3929 Group<f_Group>, HelpText<"Generate an optimization record file in a specific format">, 3930 MetaVarName<"<format>">; 3931def fno_save_optimization_record : Flag<["-"], "fno-save-optimization-record">, 3932 Group<f_Group>, Flags<[NoArgumentUnused]>, 3933 Visibility<[ClangOption, FlangOption]>; 3934def foptimization_record_file_EQ : Joined<["-"], "foptimization-record-file=">, 3935 Visibility<[ClangOption, FlangOption]>, 3936 Group<f_Group>, 3937 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.">, 3938 MetaVarName<"<file>">; 3939def foptimization_record_passes_EQ : Joined<["-"], "foptimization-record-passes=">, 3940 Visibility<[ClangOption, FlangOption]>, 3941 Group<f_Group>, 3942 HelpText<"Only include passes which match a specified regular expression in the generated optimization record (by default, include all passes)">, 3943 MetaVarName<"<regex>">; 3944 3945defm assumptions : BoolFOption<"assumptions", 3946 LangOpts<"CXXAssumptions">, DefaultTrue, 3947 NegFlag<SetFalse, [], [ClangOption, CC1Option], 3948 "Disable codegen and compile-time checks for C++23's [[assume]] attribute">, 3949 PosFlag<SetTrue>>; 3950 3951def fvectorize : Flag<["-"], "fvectorize">, Group<f_Group>, 3952 HelpText<"Enable the loop vectorization passes">; 3953def fno_vectorize : Flag<["-"], "fno-vectorize">, Group<f_Group>; 3954def : Flag<["-"], "ftree-vectorize">, Alias<fvectorize>; 3955def : Flag<["-"], "fno-tree-vectorize">, Alias<fno_vectorize>; 3956def fslp_vectorize : Flag<["-"], "fslp-vectorize">, Group<f_Group>, 3957 HelpText<"Enable the superword-level parallelism vectorization passes">; 3958def fno_slp_vectorize : Flag<["-"], "fno-slp-vectorize">, Group<f_Group>; 3959def : Flag<["-"], "ftree-slp-vectorize">, Alias<fslp_vectorize>; 3960def : Flag<["-"], "fno-tree-slp-vectorize">, Alias<fno_slp_vectorize>; 3961def Wlarge_by_value_copy_def : Flag<["-"], "Wlarge-by-value-copy">, 3962 HelpText<"Warn if a function definition returns or accepts an object larger " 3963 "in bytes than a given value">, Flags<[HelpHidden]>; 3964def Wlarge_by_value_copy_EQ : Joined<["-"], "Wlarge-by-value-copy=">, 3965 Visibility<[ClangOption, CC1Option]>, 3966 MarshallingInfoInt<LangOpts<"NumLargeByValueCopy">>; 3967 3968// These "special" warning flags are effectively processed as f_Group flags by the driver: 3969// Just silence warnings about -Wlarger-than for now. 3970def Wlarger_than_EQ : Joined<["-"], "Wlarger-than=">, Group<clang_ignored_f_Group>; 3971def Wlarger_than_ : Joined<["-"], "Wlarger-than-">, Alias<Wlarger_than_EQ>; 3972 3973// This is converted to -fwarn-stack-size=N and also passed through by the driver. 3974// FIXME: The driver should strip out the =<value> when passing W_value_Group through. 3975def Wframe_larger_than_EQ : Joined<["-"], "Wframe-larger-than=">, Group<W_value_Group>, 3976 Visibility<[ClangOption, CC1Option]>; 3977def Wframe_larger_than : Flag<["-"], "Wframe-larger-than">, Alias<Wframe_larger_than_EQ>; 3978 3979def : Flag<["-"], "fterminated-vtables">, Alias<fapple_kext>; 3980defm threadsafe_statics : BoolFOption<"threadsafe-statics", 3981 LangOpts<"ThreadsafeStatics">, DefaultTrue, 3982 NegFlag<SetFalse, [], [ClangOption, CC1Option], 3983 "Do not emit code to make initialization of local statics thread safe">, 3984 PosFlag<SetTrue>>; 3985def ftime_report : Flag<["-"], "ftime-report">, Group<f_Group>, 3986 Visibility<[ClangOption, CC1Option]>, 3987 MarshallingInfoFlag<CodeGenOpts<"TimePasses">>; 3988def ftime_report_EQ: Joined<["-"], "ftime-report=">, Group<f_Group>, 3989 Visibility<[ClangOption, CC1Option]>, Values<"per-pass,per-pass-run">, 3990 MarshallingInfoFlag<CodeGenOpts<"TimePassesPerRun">>, 3991 HelpText<"(For new pass manager) 'per-pass': one report for each pass; " 3992 "'per-pass-run': one report for each pass invocation">; 3993def ftime_trace : Flag<["-"], "ftime-trace">, Group<f_Group>, 3994 HelpText<"Turn on time profiler. Generates JSON file based on output filename.">, 3995 DocBrief<[{ 3996Turn on time profiler. Generates JSON file based on output filename. Results 3997can be analyzed with chrome://tracing or `Speedscope App 3998<https://www.speedscope.app>`_ for flamegraph visualization.}]>, 3999 Visibility<[ClangOption, CLOption, DXCOption]>; 4000def ftime_trace_granularity_EQ : Joined<["-"], "ftime-trace-granularity=">, Group<f_Group>, 4001 HelpText<"Minimum time granularity (in microseconds) traced by time profiler">, 4002 Visibility<[ClangOption, CC1Option, CLOption, DXCOption]>, 4003 MarshallingInfoInt<FrontendOpts<"TimeTraceGranularity">, "500u">; 4004def ftime_trace_verbose : Joined<["-"], "ftime-trace-verbose">, Group<f_Group>, 4005 HelpText<"Make time trace capture verbose event details (e.g. source filenames). This can increase the size of the output by 2-3 times">, 4006 Visibility<[ClangOption, CC1Option, CLOption, DXCOption]>, 4007 MarshallingInfoFlag<FrontendOpts<"TimeTraceVerbose">>; 4008def ftime_trace_EQ : Joined<["-"], "ftime-trace=">, Group<f_Group>, 4009 HelpText<"Similar to -ftime-trace. Specify the JSON file or a directory which will contain the JSON file">, 4010 Visibility<[ClangOption, CC1Option, CLOption, DXCOption]>, 4011 MarshallingInfoString<FrontendOpts<"TimeTracePath">>; 4012def fproc_stat_report : Joined<["-"], "fproc-stat-report">, Group<f_Group>, 4013 HelpText<"Print subprocess statistics">; 4014def fproc_stat_report_EQ : Joined<["-"], "fproc-stat-report=">, Group<f_Group>, 4015 HelpText<"Save subprocess statistics to the given file">; 4016def ftlsmodel_EQ : Joined<["-"], "ftls-model=">, Group<f_Group>, 4017 Visibility<[ClangOption, CC1Option]>, 4018 Values<"global-dynamic,local-dynamic,initial-exec,local-exec">, 4019 NormalizedValuesScope<"CodeGenOptions">, 4020 NormalizedValues<["GeneralDynamicTLSModel", "LocalDynamicTLSModel", "InitialExecTLSModel", "LocalExecTLSModel"]>, 4021 MarshallingInfoEnum<CodeGenOpts<"DefaultTLSModel">, "GeneralDynamicTLSModel">; 4022def ftrapv : Flag<["-"], "ftrapv">, Group<f_Group>, 4023 Visibility<[ClangOption, CC1Option]>, 4024 HelpText<"Trap on integer overflow">; 4025def ftrapv_handler_EQ : Joined<["-"], "ftrapv-handler=">, Group<f_Group>, 4026 MetaVarName<"<function name>">, 4027 HelpText<"Specify the function to be called on overflow">; 4028def ftrapv_handler : Separate<["-"], "ftrapv-handler">, Group<f_Group>, 4029 Visibility<[ClangOption, CC1Option]>; 4030def ftrap_function_EQ : Joined<["-"], "ftrap-function=">, Group<f_Group>, 4031 Visibility<[ClangOption, CC1Option]>, 4032 HelpText<"Issue call to specified function rather than a trap instruction">, 4033 MarshallingInfoString<CodeGenOpts<"TrapFuncName">>; 4034def funroll_loops : Flag<["-"], "funroll-loops">, Group<f_Group>, 4035 HelpText<"Turn on loop unroller">, Visibility<[ClangOption, CC1Option]>; 4036def fno_unroll_loops : Flag<["-"], "fno-unroll-loops">, Group<f_Group>, 4037 HelpText<"Turn off loop unroller">, Visibility<[ClangOption, CC1Option]>; 4038def ffinite_loops: Flag<["-"], "ffinite-loops">, Group<f_Group>, 4039 HelpText<"Assume all non-trivial loops are finite.">, Visibility<[ClangOption, CC1Option]>; 4040def fno_finite_loops: Flag<["-"], "fno-finite-loops">, Group<f_Group>, 4041 HelpText<"Do not assume that any loop is finite.">, 4042 Visibility<[ClangOption, CC1Option]>; 4043 4044def ftrigraphs : Flag<["-"], "ftrigraphs">, Group<f_Group>, 4045 HelpText<"Process trigraph sequences">, Visibility<[ClangOption, CC1Option]>; 4046def fno_trigraphs : Flag<["-"], "fno-trigraphs">, Group<f_Group>, 4047 HelpText<"Do not process trigraph sequences">, 4048 Visibility<[ClangOption, CC1Option]>; 4049def funsigned_bitfields : Flag<["-"], "funsigned-bitfields">, Group<f_Group>; 4050def funsigned_char : Flag<["-"], "funsigned-char">, Group<f_Group>; 4051def fno_unsigned_char : Flag<["-"], "fno-unsigned-char">; 4052def funwind_tables : Flag<["-"], "funwind-tables">, Group<f_Group>; 4053defm register_global_dtors_with_atexit : BoolFOption<"register-global-dtors-with-atexit", 4054 CodeGenOpts<"RegisterGlobalDtorsWithAtExit">, DefaultFalse, 4055 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Use">, 4056 NegFlag<SetFalse, [], [ClangOption], "Don't use">, 4057 BothFlags<[], [ClangOption], " atexit or __cxa_atexit to register global destructors">>; 4058defm use_init_array : BoolFOption<"use-init-array", 4059 CodeGenOpts<"UseInitArray">, DefaultTrue, 4060 NegFlag<SetFalse, [], [ClangOption, CC1Option], 4061 "Use .ctors/.dtors instead of .init_array/.fini_array">, 4062 PosFlag<SetTrue>>; 4063def fno_var_tracking : Flag<["-"], "fno-var-tracking">, Group<clang_ignored_f_Group>; 4064def fverbose_asm : Flag<["-"], "fverbose-asm">, Group<f_Group>, 4065 HelpText<"Generate verbose assembly output">; 4066def dA : Flag<["-"], "dA">, Alias<fverbose_asm>; 4067defm visibility_from_dllstorageclass : BoolFOption<"visibility-from-dllstorageclass", 4068 LangOpts<"VisibilityFromDLLStorageClass">, DefaultFalse, 4069 PosFlag<SetTrue, [], [ClangOption, CC1Option], 4070 "Override the visibility of globals based on their final DLL storage class.">, 4071 NegFlag<SetFalse>>; 4072class MarshallingInfoVisibilityFromDLLStorage<KeyPathAndMacro kpm, code default> 4073 : MarshallingInfoEnum<kpm, default>, 4074 Values<"keep,hidden,protected,default">, 4075 NormalizedValuesScope<"LangOptions::VisibilityFromDLLStorageClassKinds">, 4076 NormalizedValues<["Keep", "Hidden", "Protected", "Default"]> {} 4077def fvisibility_dllexport_EQ : Joined<["-"], "fvisibility-dllexport=">, Group<f_Group>, 4078 Visibility<[ClangOption, CC1Option]>, 4079 HelpText<"The visibility for dllexport definitions. If Keep is specified the visibility is not adjusted [-fvisibility-from-dllstorageclass]">, 4080 MarshallingInfoVisibilityFromDLLStorage<LangOpts<"DLLExportVisibility">, "Default">, 4081 ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>; 4082def fvisibility_nodllstorageclass_EQ : Joined<["-"], "fvisibility-nodllstorageclass=">, Group<f_Group>, 4083 Visibility<[ClangOption, CC1Option]>, 4084 HelpText<"The visibility for definitions without an explicit DLL storage class. If Keep is specified the visibility is not adjusted [-fvisibility-from-dllstorageclass]">, 4085 MarshallingInfoVisibilityFromDLLStorage<LangOpts<"NoDLLStorageClassVisibility">, "Hidden">, 4086 ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>; 4087def fvisibility_externs_dllimport_EQ : Joined<["-"], "fvisibility-externs-dllimport=">, Group<f_Group>, 4088 Visibility<[ClangOption, CC1Option]>, 4089 HelpText<"The visibility for dllimport external declarations. If Keep is specified the visibility is not adjusted [-fvisibility-from-dllstorageclass]">, 4090 MarshallingInfoVisibilityFromDLLStorage<LangOpts<"ExternDeclDLLImportVisibility">, "Default">, 4091 ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>; 4092def fvisibility_externs_nodllstorageclass_EQ : Joined<["-"], "fvisibility-externs-nodllstorageclass=">, Group<f_Group>, 4093 Visibility<[ClangOption, CC1Option]>, 4094 HelpText<"The visibility for external declarations without an explicit DLL storage class. If Keep is specified the visibility is not adjusted [-fvisibility-from-dllstorageclass]">, 4095 MarshallingInfoVisibilityFromDLLStorage<LangOpts<"ExternDeclNoDLLStorageClassVisibility">, "Hidden">, 4096 ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>; 4097def fvisibility_EQ : Joined<["-"], "fvisibility=">, Group<f_Group>, 4098 Visibility<[ClangOption, CC1Option]>, 4099 HelpText<"Set the default symbol visibility for all global definitions">, 4100 MarshallingInfoVisibility<LangOpts<"ValueVisibilityMode">, "DefaultVisibility">; 4101defm visibility_inlines_hidden : BoolFOption<"visibility-inlines-hidden", 4102 LangOpts<"InlineVisibilityHidden">, DefaultFalse, 4103 PosFlag<SetTrue, [], [ClangOption, CC1Option], 4104 "Give inline C++ member functions hidden visibility by default">, 4105 NegFlag<SetFalse>>; 4106defm visibility_inlines_hidden_static_local_var : BoolFOption<"visibility-inlines-hidden-static-local-var", 4107 LangOpts<"VisibilityInlinesHiddenStaticLocalVar">, DefaultFalse, 4108 PosFlag<SetTrue, [], [ClangOption, CC1Option], 4109 "When -fvisibility-inlines-hidden is enabled, static variables in" 4110 " inline C++ member functions will also be given hidden visibility by default">, 4111 NegFlag<SetFalse, [], [ClangOption], "Disables -fvisibility-inlines-hidden-static-local-var" 4112 " (this is the default on non-darwin targets)">, BothFlags< 4113 [], [ClangOption, CC1Option]>>; 4114def fvisibility_ms_compat : Flag<["-"], "fvisibility-ms-compat">, Group<f_Group>, 4115 HelpText<"Give global types 'default' visibility and global functions and " 4116 "variables 'hidden' visibility by default">; 4117def fvisibility_global_new_delete_hidden : Flag<["-"], "fvisibility-global-new-delete-hidden">, Group<f_Group>, 4118 HelpText<"Give global C++ operator new and delete declarations hidden visibility">; 4119class MarshallingInfoVisibilityGlobalNewDelete<KeyPathAndMacro kpm, code default> 4120 : MarshallingInfoEnum<kpm, default>, 4121 Values<"force-default,force-protected,force-hidden,source">, 4122 NormalizedValuesScope<"LangOptions::VisibilityForcedKinds">, 4123 NormalizedValues<["ForceDefault", "ForceProtected", "ForceHidden", "Source"]> {} 4124def fvisibility_global_new_delete_EQ : Joined<["-"], "fvisibility-global-new-delete=">, Group<f_Group>, 4125 Visibility<[ClangOption, CC1Option]>, 4126 HelpText<"The visibility for global C++ operator new and delete declarations. If 'source' is specified the visibility is not adjusted">, 4127 MarshallingInfoVisibilityGlobalNewDelete<LangOpts<"GlobalAllocationFunctionVisibility">, "ForceDefault">; 4128def mdefault_visibility_export_mapping_EQ : Joined<["-"], "mdefault-visibility-export-mapping=">, 4129 Values<"none,explicit,all">, 4130 NormalizedValuesScope<"LangOptions::DefaultVisiblityExportMapping">, 4131 NormalizedValues<["None", "Explicit", "All"]>, 4132 HelpText<"Mapping between default visibility and export">, 4133 Group<m_Group>, Flags<[TargetSpecific]>, 4134 Visibility<[ClangOption, CC1Option]>, 4135 MarshallingInfoEnum<LangOpts<"DefaultVisibilityExportMapping">,"None">; 4136defm new_infallible : BoolFOption<"new-infallible", 4137 LangOpts<"NewInfallible">, DefaultFalse, 4138 PosFlag<SetTrue, [], [ClangOption], "Enable">, 4139 NegFlag<SetFalse, [], [ClangOption], "Disable">, 4140 BothFlags<[], [ClangOption, CC1Option], 4141 " treating throwing global C++ operator new as always returning valid memory " 4142 "(annotates with __attribute__((returns_nonnull)) and throw()). This is detectable in source.">>; 4143defm whole_program_vtables : BoolFOption<"whole-program-vtables", 4144 CodeGenOpts<"WholeProgramVTables">, DefaultFalse, 4145 PosFlag<SetTrue, [], [ClangOption, CC1Option], 4146 "Enables whole-program vtable optimization. Requires -flto">, 4147 NegFlag<SetFalse>, BothFlags<[], [ClangOption, CLOption]>>; 4148defm split_lto_unit : BoolFOption<"split-lto-unit", 4149 CodeGenOpts<"EnableSplitLTOUnit">, DefaultFalse, 4150 PosFlag<SetTrue, [], [ClangOption, CC1Option], 4151 "Enables splitting of the LTO unit">, 4152 NegFlag<SetFalse>, BothFlags<[], [ClangOption, CLOption]>>; 4153defm force_emit_vtables : BoolFOption<"force-emit-vtables", 4154 CodeGenOpts<"ForceEmitVTables">, DefaultFalse, 4155 PosFlag<SetTrue, [], [ClangOption, CC1Option], 4156 "Emits more virtual tables to improve devirtualization">, 4157 NegFlag<SetFalse>, BothFlags<[], [ClangOption, CLOption]>>, 4158 DocBrief<[{In order to improve devirtualization, forces emitting of vtables even in 4159modules where it isn't necessary. It causes more inline virtual functions 4160to be emitted.}]>; 4161defm virtual_function_elimination : BoolFOption<"virtual-function-elimination", 4162 CodeGenOpts<"VirtualFunctionElimination">, DefaultFalse, 4163 PosFlag<SetTrue, [], [ClangOption, CC1Option], 4164 "Enables dead virtual function elimination optimization. Requires -flto=full">, 4165 NegFlag<SetFalse>, BothFlags<[], [ClangOption, CLOption]>>; 4166 4167def fwrapv : Flag<["-"], "fwrapv">, Group<f_Group>, 4168 Visibility<[ClangOption, CC1Option]>, 4169 HelpText<"Treat signed integer overflow as two's complement">; 4170def fwritable_strings : Flag<["-"], "fwritable-strings">, Group<f_Group>, 4171 Visibility<[ClangOption, CC1Option]>, 4172 HelpText<"Store string literals as writable data">, 4173 MarshallingInfoFlag<LangOpts<"WritableStrings">>; 4174defm zero_initialized_in_bss : BoolFOption<"zero-initialized-in-bss", 4175 CodeGenOpts<"NoZeroInitializedInBSS">, DefaultFalse, 4176 NegFlag<SetTrue, [], [ClangOption, CC1Option], 4177 "Don't place zero initialized data in BSS">, 4178 PosFlag<SetFalse>>; 4179defm function_sections : BoolFOption<"function-sections", 4180 CodeGenOpts<"FunctionSections">, DefaultFalse, 4181 PosFlag<SetTrue, [], [ClangOption, CC1Option], 4182 "Place each function in its own section">, 4183 NegFlag<SetFalse>>; 4184defm basic_block_address_map : BoolFOption<"basic-block-address-map", 4185 CodeGenOpts<"BBAddrMap">, DefaultFalse, 4186 PosFlag<SetTrue, [], [CC1Option], "Emit the basic block address map section.">, 4187 NegFlag<SetFalse>>; 4188def fbasic_block_sections_EQ : Joined<["-"], "fbasic-block-sections=">, Group<f_Group>, 4189 Visibility<[ClangOption, CC1Option, CC1AsOption]>, 4190 HelpText<"Place each function's basic blocks in unique sections (ELF Only)">, 4191 DocBrief<[{Generate labels for each basic block or place each basic block or a subset of basic blocks in its own section.}]>, 4192 Values<"all,labels,none,list=">, 4193 MarshallingInfoString<CodeGenOpts<"BBSections">, [{"none"}]>; 4194defm data_sections : BoolFOption<"data-sections", 4195 CodeGenOpts<"DataSections">, DefaultFalse, 4196 PosFlag<SetTrue, [], [ClangOption, CC1Option], 4197 "Place each data in its own section">, 4198 NegFlag<SetFalse>>; 4199defm stack_size_section : BoolFOption<"stack-size-section", 4200 CodeGenOpts<"StackSizeSection">, DefaultFalse, 4201 PosFlag<SetTrue, [], [ClangOption, CC1Option], 4202 "Emit section containing metadata on function stack sizes">, 4203 NegFlag<SetFalse>>; 4204def fstack_usage : Flag<["-"], "fstack-usage">, Group<f_Group>, 4205 HelpText<"Emit .su file containing information on function stack sizes">; 4206def stack_usage_file : Separate<["-"], "stack-usage-file">, 4207 Visibility<[CC1Option]>, 4208 HelpText<"Filename (or -) to write stack usage output to">, 4209 MarshallingInfoString<CodeGenOpts<"StackUsageOutput">>; 4210 4211defm unique_basic_block_section_names : BoolFOption<"unique-basic-block-section-names", 4212 CodeGenOpts<"UniqueBasicBlockSectionNames">, DefaultFalse, 4213 PosFlag<SetTrue, [], [ClangOption, CC1Option], 4214 "Use unique names for basic block sections (ELF Only)">, 4215 NegFlag<SetFalse>>; 4216defm unique_internal_linkage_names : BoolFOption<"unique-internal-linkage-names", 4217 CodeGenOpts<"UniqueInternalLinkageNames">, DefaultFalse, 4218 PosFlag<SetTrue, [], [ClangOption, CC1Option], 4219 "Uniqueify Internal Linkage Symbol Names by appending" 4220 " the MD5 hash of the module path">, 4221 NegFlag<SetFalse>>; 4222defm unique_section_names : BoolFOption<"unique-section-names", 4223 CodeGenOpts<"UniqueSectionNames">, DefaultTrue, 4224 NegFlag<SetFalse, [], [ClangOption, CC1Option], 4225 "Don't use unique names for text and data sections">, 4226 PosFlag<SetTrue>>; 4227defm separate_named_sections : BoolFOption<"separate-named-sections", 4228 CodeGenOpts<"SeparateNamedSections">, DefaultFalse, 4229 PosFlag<SetTrue, [], [ClangOption, CC1Option], 4230 "Use separate unique sections for named sections (ELF Only)">, 4231 NegFlag<SetFalse>>; 4232 4233defm split_machine_functions: BoolFOption<"split-machine-functions", 4234 CodeGenOpts<"SplitMachineFunctions">, DefaultFalse, 4235 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Enable">, 4236 NegFlag<SetFalse, [], [ClangOption], "Disable">, 4237 BothFlags<[], [ClangOption], " late function splitting using profile information (x86 ELF)">>; 4238 4239defm strict_return : BoolFOption<"strict-return", 4240 CodeGenOpts<"StrictReturn">, DefaultTrue, 4241 NegFlag<SetFalse, [], [ClangOption, CC1Option], 4242 "Don't treat control flow paths that fall off the end" 4243 " of a non-void function as unreachable">, 4244 PosFlag<SetTrue>>; 4245 4246let Flags = [TargetSpecific] in { 4247defm ptrauth_intrinsics : OptInCC1FFlag<"ptrauth-intrinsics", "Enable pointer authentication intrinsics">; 4248defm ptrauth_calls : OptInCC1FFlag<"ptrauth-calls", "Enable signing and authentication of all indirect calls">; 4249defm ptrauth_returns : OptInCC1FFlag<"ptrauth-returns", "Enable signing and authentication of return addresses">; 4250defm ptrauth_auth_traps : OptInCC1FFlag<"ptrauth-auth-traps", "Enable traps on authentication failures">; 4251defm ptrauth_vtable_pointer_address_discrimination : 4252 OptInCC1FFlag<"ptrauth-vtable-pointer-address-discrimination", "Enable address discrimination of vtable pointers">; 4253defm ptrauth_vtable_pointer_type_discrimination : 4254 OptInCC1FFlag<"ptrauth-vtable-pointer-type-discrimination", "Enable type discrimination of vtable pointers">; 4255defm ptrauth_type_info_vtable_pointer_discrimination : 4256 OptInCC1FFlag<"ptrauth-type-info-vtable-pointer-discrimination", "Enable type and address discrimination of vtable pointer of std::type_info">; 4257defm ptrauth_init_fini : OptInCC1FFlag<"ptrauth-init-fini", "Enable signing of function pointers in init/fini arrays">; 4258defm ptrauth_function_pointer_type_discrimination : OptInCC1FFlag<"ptrauth-function-pointer-type-discrimination", 4259 "Enable type discrimination on C function pointers">; 4260defm ptrauth_indirect_gotos : OptInCC1FFlag<"ptrauth-indirect-gotos", 4261 "Enable signing and authentication of indirect goto targets">; 4262} 4263 4264def fenable_matrix : Flag<["-"], "fenable-matrix">, Group<f_Group>, 4265 Visibility<[ClangOption, CC1Option]>, 4266 HelpText<"Enable matrix data type and related builtin functions">, 4267 MarshallingInfoFlag<LangOpts<"MatrixTypes">>; 4268 4269defm raw_string_literals : BoolFOption<"raw-string-literals", 4270 LangOpts<"RawStringLiterals">, Default<std#".hasRawStringLiterals()">, 4271 PosFlag<SetTrue, [], [], "Enable">, 4272 NegFlag<SetFalse, [], [], "Disable">, 4273 BothFlags<[], [ClangOption, CC1Option], " raw string literals">>; 4274 4275def fzero_call_used_regs_EQ 4276 : Joined<["-"], "fzero-call-used-regs=">, Group<f_Group>, 4277 Visibility<[ClangOption, CC1Option]>, 4278 HelpText<"Clear call-used registers upon function return (AArch64/x86 only)">, 4279 Values<"skip,used-gpr-arg,used-gpr,used-arg,used,all-gpr-arg,all-gpr,all-arg,all">, 4280 NormalizedValues<["Skip", "UsedGPRArg", "UsedGPR", "UsedArg", "Used", 4281 "AllGPRArg", "AllGPR", "AllArg", "All"]>, 4282 NormalizedValuesScope<"llvm::ZeroCallUsedRegs::ZeroCallUsedRegsKind">, 4283 MarshallingInfoEnum<CodeGenOpts<"ZeroCallUsedRegs">, "Skip">; 4284 4285def fdebug_types_section: Flag <["-"], "fdebug-types-section">, Group<f_Group>, 4286 HelpText<"Place debug types in their own section (ELF Only)">; 4287def fno_debug_types_section: Flag<["-"], "fno-debug-types-section">, Group<f_Group>; 4288defm debug_ranges_base_address : BoolFOption<"debug-ranges-base-address", 4289 CodeGenOpts<"DebugRangesBaseAddress">, DefaultFalse, 4290 PosFlag<SetTrue, [], [ClangOption, CC1Option], 4291 "Use DWARF base address selection entries in .debug_ranges">, 4292 NegFlag<SetFalse>>; 4293defm split_dwarf_inlining : BoolFOption<"split-dwarf-inlining", 4294 CodeGenOpts<"SplitDwarfInlining">, DefaultFalse, 4295 NegFlag<SetFalse, [], [ClangOption]>, 4296 PosFlag<SetTrue, [], [ClangOption, CC1Option], 4297 "Provide minimal debug info in the object/executable" 4298 " to facilitate online symbolication/stack traces in the absence of" 4299 " .dwo/.dwp files when using Split DWARF">>; 4300def fdebug_default_version: Joined<["-"], "fdebug-default-version=">, Group<f_Group>, 4301 HelpText<"Default DWARF version to use, if a -g option caused DWARF debug info to be produced">; 4302def fdebug_prefix_map_EQ 4303 : Joined<["-"], "fdebug-prefix-map=">, Group<f_Group>, 4304 Visibility<[ClangOption, CC1Option, CC1AsOption]>, 4305 MetaVarName<"<old>=<new>">, 4306 HelpText<"For paths in debug info, remap directory <old> to <new>. If multiple options match a path, the last option wins">; 4307def fcoverage_prefix_map_EQ 4308 : Joined<["-"], "fcoverage-prefix-map=">, Group<f_Group>, 4309 Visibility<[ClangOption, CC1Option]>, 4310 MetaVarName<"<old>=<new>">, 4311 HelpText<"remap file source paths <old> to <new> in coverage mapping. If there are multiple options, prefix replacement is applied in reverse order starting from the last one">; 4312def ffile_prefix_map_EQ 4313 : Joined<["-"], "ffile-prefix-map=">, Group<f_Group>, 4314 HelpText<"remap file source paths in debug info, predefined preprocessor " 4315 "macros and __builtin_FILE(). Implies -ffile-reproducible.">; 4316def fmacro_prefix_map_EQ 4317 : Joined<["-"], "fmacro-prefix-map=">, Group<f_Group>, 4318 Visibility<[ClangOption, CC1Option]>, 4319 HelpText<"remap file source paths in predefined preprocessor macros and " 4320 "__builtin_FILE(). Implies -ffile-reproducible.">; 4321defm force_dwarf_frame : BoolFOption<"force-dwarf-frame", 4322 CodeGenOpts<"ForceDwarfFrameSection">, DefaultFalse, 4323 PosFlag<SetTrue, [], [ClangOption, CC1Option], 4324 "Always emit a debug frame section">, 4325 NegFlag<SetFalse>>; 4326def femit_dwarf_unwind_EQ : Joined<["-"], "femit-dwarf-unwind=">, 4327 Group<f_Group>, Visibility<[ClangOption, CC1Option, CC1AsOption]>, 4328 HelpText<"When to emit DWARF unwind (EH frame) info">, 4329 Values<"always,no-compact-unwind,default">, 4330 NormalizedValues<["Always", "NoCompactUnwind", "Default"]>, 4331 NormalizedValuesScope<"llvm::EmitDwarfUnwindType">, 4332 MarshallingInfoEnum<CodeGenOpts<"EmitDwarfUnwind">, "Default">; 4333defm emit_compact_unwind_non_canonical : BoolFOption<"emit-compact-unwind-non-canonical", 4334 CodeGenOpts<"EmitCompactUnwindNonCanonical">, DefaultFalse, 4335 PosFlag<SetTrue, [], [ClangOption, CC1Option, CC1AsOption], 4336 "Try emitting Compact-Unwind for non-canonical entries. Maybe overriden by other constraints">, 4337 NegFlag<SetFalse>>; 4338def g_Flag : Flag<["-"], "g">, Group<g_Group>, 4339 Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, 4340 HelpText<"Generate source-level debug information">; 4341def gline_tables_only : Flag<["-"], "gline-tables-only">, Group<gN_Group>, 4342 Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, 4343 HelpText<"Emit debug line number tables only">; 4344def gline_directives_only : Flag<["-"], "gline-directives-only">, Group<gN_Group>, 4345 Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, 4346 HelpText<"Emit debug line info directives only">; 4347def gmlt : Flag<["-"], "gmlt">, Alias<gline_tables_only>; 4348def g0 : Flag<["-"], "g0">, Group<gN_Group>, Visibility<[ClangOption, FlangOption]>; 4349def g1 : Flag<["-"], "g1">, Group<gN_Group>, Visibility<[ClangOption, FlangOption]>, Alias<gline_tables_only>; 4350def g2 : Flag<["-"], "g2">, Group<gN_Group>, Visibility<[ClangOption, FlangOption]>; 4351def g3 : Flag<["-"], "g3">, Group<gN_Group>, Visibility<[ClangOption, FlangOption]>; 4352def ggdb : Flag<["-"], "ggdb">, Group<gTune_Group>; 4353def ggdb0 : Flag<["-"], "ggdb0">, Group<ggdbN_Group>; 4354def ggdb1 : Flag<["-"], "ggdb1">, Group<ggdbN_Group>; 4355def ggdb2 : Flag<["-"], "ggdb2">, Group<ggdbN_Group>; 4356def ggdb3 : Flag<["-"], "ggdb3">, Group<ggdbN_Group>; 4357def glldb : Flag<["-"], "glldb">, Group<gTune_Group>; 4358def gsce : Flag<["-"], "gsce">, Group<gTune_Group>; 4359def gdbx : Flag<["-"], "gdbx">, Group<gTune_Group>; 4360// Equivalent to our default dwarf version. Forces usual dwarf emission when 4361// CodeView is enabled. 4362def gdwarf : Flag<["-"], "gdwarf">, Group<g_Group>, 4363 Visibility<[ClangOption, CLOption, DXCOption]>, 4364 HelpText<"Generate source-level debug information with the default dwarf version">; 4365def gdwarf_2 : Flag<["-"], "gdwarf-2">, Group<g_Group>, 4366 HelpText<"Generate source-level debug information with dwarf version 2">; 4367def gdwarf_3 : Flag<["-"], "gdwarf-3">, Group<g_Group>, 4368 HelpText<"Generate source-level debug information with dwarf version 3">; 4369def gdwarf_4 : Flag<["-"], "gdwarf-4">, Group<g_Group>, 4370 HelpText<"Generate source-level debug information with dwarf version 4">; 4371def gdwarf_5 : Flag<["-"], "gdwarf-5">, Group<g_Group>, 4372 HelpText<"Generate source-level debug information with dwarf version 5">; 4373def gdwarf64 : Flag<["-"], "gdwarf64">, Group<g_Group>, 4374 Visibility<[ClangOption, CC1Option, CC1AsOption]>, 4375 HelpText<"Enables DWARF64 format for ELF binaries, if debug information emission is enabled.">, 4376 MarshallingInfoFlag<CodeGenOpts<"Dwarf64">>; 4377def gdwarf32 : Flag<["-"], "gdwarf32">, Group<g_Group>, 4378 Visibility<[ClangOption, CC1Option, CC1AsOption]>, 4379 HelpText<"Enables DWARF32 format for ELF binaries, if debug information emission is enabled.">; 4380 4381def gcodeview : Flag<["-"], "gcodeview">, 4382 HelpText<"Generate CodeView debug information">, 4383 Visibility<[ClangOption, CC1Option, CC1AsOption, CLOption, DXCOption]>, 4384 MarshallingInfoFlag<CodeGenOpts<"EmitCodeView">>; 4385defm codeview_ghash : BoolOption<"g", "codeview-ghash", 4386 CodeGenOpts<"CodeViewGHash">, DefaultFalse, 4387 PosFlag<SetTrue, [], [ClangOption, CC1Option], 4388 "Emit type record hashes in a .debug$H section">, 4389 NegFlag<SetFalse>, BothFlags<[], [ClangOption, CLOption, DXCOption]>>; 4390defm codeview_command_line : BoolOption<"g", "codeview-command-line", 4391 CodeGenOpts<"CodeViewCommandLine">, DefaultTrue, 4392 PosFlag<SetTrue, [], [ClangOption], "Emit compiler path and command line into CodeView debug information">, 4393 NegFlag<SetFalse, [], [ClangOption], "Don't emit compiler path and command line into CodeView debug information">, 4394 BothFlags<[], [ClangOption, CLOption, DXCOption, CC1Option]>>; 4395defm inline_line_tables : BoolGOption<"inline-line-tables", 4396 CodeGenOpts<"NoInlineLineTables">, DefaultFalse, 4397 NegFlag<SetTrue, [], [ClangOption, CC1Option], 4398 "Don't emit inline line tables.">, 4399 PosFlag<SetFalse>, BothFlags<[], [ClangOption, CLOption, DXCOption]>>; 4400 4401def gfull : Flag<["-"], "gfull">, Group<g_Group>; 4402def gused : Flag<["-"], "gused">, Group<g_Group>; 4403def gstabs : Joined<["-"], "gstabs">, Group<g_Group>, Flags<[Unsupported]>; 4404def gcoff : Joined<["-"], "gcoff">, Group<g_Group>, Flags<[Unsupported]>; 4405def gxcoff : Joined<["-"], "gxcoff">, Group<g_Group>, Flags<[Unsupported]>; 4406def gvms : Joined<["-"], "gvms">, Group<g_Group>, Flags<[Unsupported]>; 4407def gtoggle : Flag<["-"], "gtoggle">, Group<g_flags_Group>, Flags<[Unsupported]>; 4408def grecord_command_line : Flag<["-"], "grecord-command-line">, 4409 Group<g_flags_Group>; 4410def gno_record_command_line : Flag<["-"], "gno-record-command-line">, 4411 Group<g_flags_Group>; 4412def : Flag<["-"], "grecord-gcc-switches">, Alias<grecord_command_line>; 4413def : Flag<["-"], "gno-record-gcc-switches">, Alias<gno_record_command_line>; 4414defm strict_dwarf : BoolOption<"g", "strict-dwarf", 4415 CodeGenOpts<"DebugStrictDwarf">, DefaultFalse, 4416 PosFlag<SetTrue, [], [ClangOption, CC1Option], 4417 "Restrict DWARF features to those defined in " 4418 "the specified version, avoiding features from later versions.">, 4419 NegFlag<SetFalse>, BothFlags<[], [ClangOption, CLOption, DXCOption]>>, 4420 Group<g_flags_Group>; 4421defm omit_unreferenced_methods : BoolGOption<"omit-unreferenced-methods", 4422 CodeGenOpts<"DebugOmitUnreferencedMethods">, DefaultFalse, 4423 NegFlag<SetFalse>, 4424 PosFlag<SetTrue, [], [CC1Option]>, BothFlags<[], [ClangOption, CLOption, DXCOption]>>; 4425defm column_info : BoolOption<"g", "column-info", 4426 CodeGenOpts<"DebugColumnInfo">, DefaultTrue, 4427 NegFlag<SetFalse, [], [ClangOption, CC1Option]>, 4428 PosFlag<SetTrue>, BothFlags<[], [ClangOption, CLOption, DXCOption]>>, 4429 Group<g_flags_Group>; 4430def gsplit_dwarf : Flag<["-"], "gsplit-dwarf">, Group<g_flags_Group>, 4431 Visibility<[ClangOption, CLOption, DXCOption]>; 4432def gsplit_dwarf_EQ : Joined<["-"], "gsplit-dwarf=">, Group<g_flags_Group>, 4433 Visibility<[ClangOption, CLOption, DXCOption]>, 4434 HelpText<"Set DWARF fission mode">, 4435 Values<"split,single">; 4436def gno_split_dwarf : Flag<["-"], "gno-split-dwarf">, Group<g_flags_Group>, 4437 Visibility<[ClangOption, CLOption, DXCOption]>; 4438def gtemplate_alias : Flag<["-"], "gtemplate-alias">, Group<g_flags_Group>, Visibility<[ClangOption, CC1Option]>; 4439def gno_template_alias : Flag<["-"], "gno-template-alias">, Group<g_flags_Group>, Visibility<[ClangOption]>; 4440def gsimple_template_names : Flag<["-"], "gsimple-template-names">, Group<g_flags_Group>; 4441def gsimple_template_names_EQ 4442 : Joined<["-"], "gsimple-template-names=">, 4443 HelpText<"Use simple template names in DWARF, or include the full " 4444 "template name with a modified prefix for validation">, 4445 Values<"simple,mangled">, Visibility<[CC1Option]>; 4446def gsrc_hash_EQ : Joined<["-"], "gsrc-hash=">, 4447 Group<g_flags_Group>, Visibility<[CC1Option]>, 4448 Values<"md5,sha1,sha256">, 4449 NormalizedValues<["DSH_MD5", "DSH_SHA1", "DSH_SHA256"]>, 4450 NormalizedValuesScope<"CodeGenOptions">, 4451 MarshallingInfoEnum<CodeGenOpts<"DebugSrcHash">, "DSH_MD5">; 4452def gno_simple_template_names : Flag<["-"], "gno-simple-template-names">, 4453 Group<g_flags_Group>; 4454def ggnu_pubnames : Flag<["-"], "ggnu-pubnames">, Group<g_flags_Group>, 4455 Visibility<[ClangOption, CC1Option]>; 4456def gno_gnu_pubnames : Flag<["-"], "gno-gnu-pubnames">, Group<g_flags_Group>; 4457def gpubnames : Flag<["-"], "gpubnames">, Group<g_flags_Group>, 4458 Visibility<[ClangOption, CC1Option]>; 4459def gno_pubnames : Flag<["-"], "gno-pubnames">, Group<g_flags_Group>; 4460def gdwarf_aranges : Flag<["-"], "gdwarf-aranges">, Group<g_flags_Group>; 4461def gmodules : Flag <["-"], "gmodules">, Group<gN_Group>, 4462 HelpText<"Generate debug info with external references to clang modules" 4463 " or precompiled headers">; 4464def gno_modules : Flag <["-"], "gno-modules">, Group<g_flags_Group>; 4465def gz_EQ : Joined<["-"], "gz=">, Group<g_flags_Group>, 4466 HelpText<"DWARF debug sections compression type">; 4467def gz : Flag<["-"], "gz">, Alias<gz_EQ>, AliasArgs<["zlib"]>, Group<g_flags_Group>; 4468def gembed_source : Flag<["-"], "gembed-source">, Group<g_flags_Group>, 4469 Visibility<[ClangOption, CC1Option]>, 4470 HelpText<"Embed source text in DWARF debug sections">, 4471 MarshallingInfoFlag<CodeGenOpts<"EmbedSource">>; 4472def gno_embed_source : Flag<["-"], "gno-embed-source">, Group<g_flags_Group>, 4473 Flags<[NoXarchOption]>, 4474 HelpText<"Restore the default behavior of not embedding source text in DWARF debug sections">; 4475def headerpad__max__install__names : Joined<["-"], "headerpad_max_install_names">; 4476def help : Flag<["-", "--"], "help">, 4477 Visibility<[ClangOption, CC1Option, CC1AsOption, 4478 FC1Option, FlangOption, DXCOption]>, 4479 HelpText<"Display available options">, 4480 MarshallingInfoFlag<FrontendOpts<"ShowHelp">>; 4481def ibuiltininc : Flag<["-"], "ibuiltininc">, Group<clang_i_Group>, 4482 HelpText<"Enable builtin #include directories even when -nostdinc is used " 4483 "before or after -ibuiltininc. " 4484 "Using -nobuiltininc after the option disables it">; 4485def index_header_map : Flag<["-"], "index-header-map">, 4486 Visibility<[ClangOption, CC1Option]>, 4487 HelpText<"Make the next included directory (-I or -F) an indexer header map">; 4488def iapinotes_modules : JoinedOrSeparate<["-"], "iapinotes-modules">, Group<clang_i_Group>, 4489 Visibility<[ClangOption, CC1Option]>, 4490 HelpText<"Add directory to the API notes search path referenced by module name">, MetaVarName<"<directory>">; 4491def idirafter : JoinedOrSeparate<["-"], "idirafter">, Group<clang_i_Group>, 4492 Visibility<[ClangOption, CC1Option]>, 4493 HelpText<"Add directory to AFTER include search path">; 4494def iframework : JoinedOrSeparate<["-"], "iframework">, Group<clang_i_Group>, 4495 Visibility<[ClangOption, CC1Option]>, 4496 HelpText<"Add directory to SYSTEM framework search path">; 4497def iframeworkwithsysroot : JoinedOrSeparate<["-"], "iframeworkwithsysroot">, 4498 Group<clang_i_Group>, 4499 HelpText<"Add directory to SYSTEM framework search path, " 4500 "absolute paths are relative to -isysroot">, 4501 MetaVarName<"<directory>">, Visibility<[ClangOption, CC1Option]>; 4502def imacros : JoinedOrSeparate<["-", "--"], "imacros">, Group<clang_i_Group>, 4503 Visibility<[ClangOption, CC1Option]>, 4504 HelpText<"Include macros from file before parsing">, MetaVarName<"<file>">, 4505 MarshallingInfoStringVector<PreprocessorOpts<"MacroIncludes">>; 4506def image__base : Separate<["-"], "image_base">; 4507def include_ : JoinedOrSeparate<["-", "--"], "include">, Group<clang_i_Group>, EnumName<"include">, 4508 MetaVarName<"<file>">, HelpText<"Include file before parsing">, 4509 Visibility<[ClangOption, CC1Option]>; 4510def include_pch : Separate<["-"], "include-pch">, Group<clang_i_Group>, 4511 Visibility<[ClangOption, CC1Option]>, 4512 HelpText<"Include precompiled header file">, MetaVarName<"<file>">, 4513 MarshallingInfoString<PreprocessorOpts<"ImplicitPCHInclude">>; 4514def relocatable_pch : Flag<["-", "--"], "relocatable-pch">, 4515 Visibility<[ClangOption, CC1Option]>, 4516 HelpText<"Whether to build a relocatable precompiled header">, 4517 MarshallingInfoFlag<FrontendOpts<"RelocatablePCH">>; 4518def verify_pch : Flag<["-"], "verify-pch">, Group<Action_Group>, 4519 Visibility<[ClangOption, CC1Option]>, 4520 HelpText<"Load and verify that a pre-compiled header file is not stale">; 4521def init : Separate<["-"], "init">; 4522def install__name : Separate<["-"], "install_name">; 4523def iprefix : JoinedOrSeparate<["-"], "iprefix">, Group<clang_i_Group>, 4524 Visibility<[ClangOption, CC1Option]>, 4525 HelpText<"Set the -iwithprefix/-iwithprefixbefore prefix">, MetaVarName<"<dir>">; 4526def iquote : JoinedOrSeparate<["-"], "iquote">, Group<clang_i_Group>, 4527 Visibility<[ClangOption, CC1Option]>, 4528 HelpText<"Add directory to QUOTE include search path">, MetaVarName<"<directory>">; 4529def isysroot : JoinedOrSeparate<["-"], "isysroot">, Group<clang_i_Group>, 4530 Visibility<[ClangOption, CC1Option, FlangOption]>, 4531 HelpText<"Set the system root directory (usually /)">, MetaVarName<"<dir>">, 4532 MarshallingInfoString<HeaderSearchOpts<"Sysroot">, [{"/"}]>; 4533def isystem : JoinedOrSeparate<["-"], "isystem">, Group<clang_i_Group>, 4534 Visibility<[ClangOption, CC1Option]>, 4535 HelpText<"Add directory to SYSTEM include search path">, MetaVarName<"<directory>">; 4536def isystem_after : JoinedOrSeparate<["-"], "isystem-after">, 4537 Group<clang_i_Group>, Flags<[NoXarchOption]>, MetaVarName<"<directory>">, 4538 HelpText<"Add directory to end of the SYSTEM include search path">; 4539def iwithprefixbefore : JoinedOrSeparate<["-"], "iwithprefixbefore">, Group<clang_i_Group>, 4540 HelpText<"Set directory to include search path with prefix">, MetaVarName<"<dir>">, 4541 Visibility<[ClangOption, CC1Option]>; 4542def iwithprefix : JoinedOrSeparate<["-"], "iwithprefix">, Group<clang_i_Group>, 4543 Visibility<[ClangOption, CC1Option]>, 4544 HelpText<"Set directory to SYSTEM include search path with prefix">, MetaVarName<"<dir>">; 4545def iwithsysroot : JoinedOrSeparate<["-"], "iwithsysroot">, Group<clang_i_Group>, 4546 HelpText<"Add directory to SYSTEM include search path, " 4547 "absolute paths are relative to -isysroot">, MetaVarName<"<directory>">, 4548 Visibility<[ClangOption, CC1Option]>; 4549def ivfsoverlay : JoinedOrSeparate<["-"], "ivfsoverlay">, Group<clang_i_Group>, 4550 Visibility<[ClangOption, CC1Option]>, 4551 HelpText<"Overlay the virtual filesystem described by file over the real file system">; 4552def vfsoverlay : JoinedOrSeparate<["-", "--"], "vfsoverlay">, 4553 Visibility<[ClangOption, CC1Option, CLOption, DXCOption]>, 4554 HelpText<"Overlay the virtual filesystem described by file over the real file system. " 4555 "Additionally, pass this overlay file to the linker if it supports it">; 4556def imultilib : Separate<["-"], "imultilib">, Group<gfortran_Group>; 4557def K : Flag<["-"], "K">, Flags<[LinkerInput]>; 4558def keep__private__externs : Flag<["-"], "keep_private_externs">; 4559def l : JoinedOrSeparate<["-"], "l">, Flags<[LinkerInput, RenderJoined]>, 4560 Visibility<[ClangOption, FlangOption]>, Group<Link_Group>; 4561def lazy__framework : Separate<["-"], "lazy_framework">, Flags<[LinkerInput]>; 4562def lazy__library : Separate<["-"], "lazy_library">, Flags<[LinkerInput]>; 4563def mlittle_endian : Flag<["-"], "mlittle-endian">, Group<m_Group>, 4564 Flags<[NoXarchOption, TargetSpecific]>; 4565def EL : Flag<["-"], "EL">, Alias<mlittle_endian>; 4566def mbig_endian : Flag<["-"], "mbig-endian">, Group<m_Group>, 4567 Flags<[NoXarchOption, TargetSpecific]>; 4568def EB : Flag<["-"], "EB">, Alias<mbig_endian>; 4569def m16 : Flag<["-"], "m16">, Group<m_Group>, Flags<[NoXarchOption]>, 4570 Visibility<[ClangOption, CLOption, DXCOption]>; 4571def m32 : Flag<["-"], "m32">, Group<m_Group>, Flags<[NoXarchOption]>, 4572 Visibility<[ClangOption, CLOption, DXCOption]>; 4573def maix32 : Flag<["-"], "maix32">, Group<m_Group>, Flags<[NoXarchOption]>; 4574def mqdsp6_compat : Flag<["-"], "mqdsp6-compat">, Group<m_Group>, 4575 Flags<[NoXarchOption]>, Visibility<[ClangOption, CC1Option]>, 4576 HelpText<"Enable hexagon-qdsp6 backward compatibility">, 4577 MarshallingInfoFlag<LangOpts<"HexagonQdsp6Compat">>; 4578def m64 : Flag<["-"], "m64">, Group<m_Group>, Flags<[NoXarchOption]>, 4579 Visibility<[ClangOption, CLOption, DXCOption]>; 4580def maix64 : Flag<["-"], "maix64">, Group<m_Group>, Flags<[NoXarchOption]>; 4581def mx32 : Flag<["-"], "mx32">, Group<m_Group>, Flags<[NoXarchOption]>, 4582 Visibility<[ClangOption, CLOption, DXCOption]>; 4583def miamcu : Flag<["-"], "miamcu">, Group<m_Group>, Flags<[NoXarchOption]>, 4584 Visibility<[ClangOption, CLOption]>, 4585 HelpText<"Use Intel MCU ABI">; 4586def mno_iamcu : Flag<["-"], "mno-iamcu">, Group<m_Group>, 4587 Flags<[NoXarchOption]>, Visibility<[ClangOption, CLOption]>; 4588def malign_functions_EQ : Joined<["-"], "malign-functions=">, Group<clang_ignored_m_Group>; 4589def malign_loops_EQ : Joined<["-"], "malign-loops=">, Group<clang_ignored_m_Group>; 4590def malign_jumps_EQ : Joined<["-"], "malign-jumps=">, Group<clang_ignored_m_Group>; 4591 4592let Flags = [TargetSpecific] in { 4593def mabi_EQ : Joined<["-"], "mabi=">, Group<m_Group>; 4594def malign_branch_EQ : CommaJoined<["-"], "malign-branch=">, Group<m_Group>, 4595 HelpText<"Specify types of branches to align">; 4596def malign_branch_boundary_EQ : Joined<["-"], "malign-branch-boundary=">, Group<m_Group>, 4597 HelpText<"Specify the boundary's size to align branches">; 4598def mpad_max_prefix_size_EQ : Joined<["-"], "mpad-max-prefix-size=">, Group<m_Group>, 4599 HelpText<"Specify maximum number of prefixes to use for padding">; 4600def mbranches_within_32B_boundaries : Flag<["-"], "mbranches-within-32B-boundaries">, Group<m_Group>, 4601 HelpText<"Align selected branches (fused, jcc, jmp) within 32-byte boundary">; 4602def mfancy_math_387 : Flag<["-"], "mfancy-math-387">, Group<clang_ignored_m_Group>; 4603def mlong_calls : Flag<["-"], "mlong-calls">, Group<m_Group>, 4604 HelpText<"Generate branches with extended addressability, usually via indirect jumps.">; 4605} // let Flags = [TargetSpecific] 4606def mdouble_EQ : Joined<["-"], "mdouble=">, Group<m_Group>, 4607 MetaVarName<"<n">, Values<"32,64">, Visibility<[ClangOption, CC1Option]>, 4608 HelpText<"Force double to be <n> bits">, 4609 MarshallingInfoInt<LangOpts<"DoubleSize">, "0">; 4610def mlong_double_64 : Flag<["-"], "mlong-double-64">, Group<LongDouble_Group>, 4611 Visibility<[ClangOption, CC1Option]>, 4612 HelpText<"Force long double to be 64 bits">; 4613def mlong_double_80 : Flag<["-"], "mlong-double-80">, Group<LongDouble_Group>, 4614 Visibility<[ClangOption, CC1Option]>, 4615 HelpText<"Force long double to be 80 bits, padded to 128 bits for storage">; 4616def mlong_double_128 : Flag<["-"], "mlong-double-128">, Group<LongDouble_Group>, 4617 Visibility<[ClangOption, CC1Option]>, 4618 HelpText<"Force long double to be 128 bits">; 4619let Flags = [TargetSpecific] in { 4620def mno_long_calls : Flag<["-"], "mno-long-calls">, Group<m_Group>, 4621 HelpText<"Restore the default behaviour of not generating long calls">; 4622} // let Flags = [TargetSpecific] 4623def mexecute_only : Flag<["-"], "mexecute-only">, Group<m_arm_Features_Group>, 4624 HelpText<"Disallow generation of data access to code sections (ARM only)">; 4625def mno_execute_only : Flag<["-"], "mno-execute-only">, Group<m_arm_Features_Group>, 4626 HelpText<"Allow generation of data access to code sections (ARM only)">; 4627let Flags = [TargetSpecific] in { 4628def mtp_mode_EQ : Joined<["-"], "mtp=">, Group<m_arm_Features_Group>, Values<"soft,cp15,tpidrurw,tpidruro,tpidrprw,el0,el1,el2,el3,tpidr_el0,tpidr_el1,tpidr_el2,tpidr_el3,tpidrro_el0">, 4629 HelpText<"Thread pointer access method. " 4630 "For AArch32: 'soft' uses a function call, or 'tpidrurw', 'tpidruro' or 'tpidrprw' use the three CP15 registers. 'cp15' is an alias for 'tpidruro'. " 4631 "For AArch64: 'tpidr_el0', 'tpidr_el1', 'tpidr_el2', 'tpidr_el3' or 'tpidrro_el0' use the five system registers. 'elN' is an alias for 'tpidr_elN'.">; 4632def mpure_code : Flag<["-"], "mpure-code">, Alias<mexecute_only>; // Alias for GCC compatibility 4633def mno_pure_code : Flag<["-"], "mno-pure-code">, Alias<mno_execute_only>; 4634def mtvos_version_min_EQ : Joined<["-"], "mtvos-version-min=">, Group<m_Group>; 4635def mappletvos_version_min_EQ : Joined<["-"], "mappletvos-version-min=">, Alias<mtvos_version_min_EQ>; 4636def mtvos_simulator_version_min_EQ : Joined<["-"], "mtvos-simulator-version-min=">; 4637def mappletvsimulator_version_min_EQ : Joined<["-"], "mappletvsimulator-version-min=">, Alias<mtvos_simulator_version_min_EQ>; 4638def mwatchos_version_min_EQ : Joined<["-"], "mwatchos-version-min=">, Group<m_Group>; 4639def mwatchos_simulator_version_min_EQ : Joined<["-"], "mwatchos-simulator-version-min=">, Group<m_Group>; 4640def mwatchsimulator_version_min_EQ : Joined<["-"], "mwatchsimulator-version-min=">, Alias<mwatchos_simulator_version_min_EQ>; 4641} // let Flags = [TargetSpecific] 4642def march_EQ : Joined<["-"], "march=">, Group<m_Group>, 4643 Flags<[TargetSpecific]>, Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, 4644 HelpText<"For a list of available architectures for the target use '-mcpu=help'">; 4645def masm_EQ : Joined<["-"], "masm=">, Group<m_Group>, Visibility<[ClangOption, FlangOption]>; 4646def inline_asm_EQ : Joined<["-"], "inline-asm=">, Group<m_Group>, 4647 Visibility<[ClangOption, CC1Option]>, 4648 Values<"att,intel">, 4649 NormalizedValuesScope<"CodeGenOptions">, NormalizedValues<["IAD_ATT", "IAD_Intel"]>, 4650 MarshallingInfoEnum<CodeGenOpts<"InlineAsmDialect">, "IAD_ATT">; 4651def mcmodel_EQ : Joined<["-"], "mcmodel=">, Group<m_Group>, 4652 Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, 4653 MarshallingInfoString<TargetOpts<"CodeModel">, [{"default"}]>; 4654def mlarge_data_threshold_EQ : Joined<["-"], "mlarge-data-threshold=">, Group<m_Group>, 4655 Flags<[TargetSpecific]>, Visibility<[ClangOption, CC1Option,FlangOption, FC1Option]>, 4656 MarshallingInfoInt<TargetOpts<"LargeDataThreshold">, "0">; 4657def mtls_size_EQ : Joined<["-"], "mtls-size=">, Group<m_Group>, 4658 Visibility<[ClangOption, CC1Option]>, 4659 HelpText<"Specify bit size of immediate TLS offsets (AArch64 ELF only): " 4660 "12 (for 4KB) | 24 (for 16MB, default) | 32 (for 4GB) | 48 (for 256TB, needs -mcmodel=large)">, 4661 MarshallingInfoInt<CodeGenOpts<"TLSSize">>; 4662def mtls_dialect_EQ : Joined<["-"], "mtls-dialect=">, Group<m_Group>, 4663 Flags<[TargetSpecific]>, HelpText<"Which thread-local storage dialect to use for dynamic accesses of TLS variables">; 4664def mimplicit_it_EQ : Joined<["-"], "mimplicit-it=">, Group<m_Group>; 4665def mdefault_build_attributes : Joined<["-"], "mdefault-build-attributes">, Group<m_Group>; 4666def mno_default_build_attributes : Joined<["-"], "mno-default-build-attributes">, Group<m_Group>; 4667let Flags = [TargetSpecific] in { 4668def mconstant_cfstrings : Flag<["-"], "mconstant-cfstrings">, Group<clang_ignored_m_Group>; 4669def mconsole : Joined<["-"], "mconsole">, Group<m_Group>; 4670def mwindows : Joined<["-"], "mwindows">, Group<m_Group>; 4671def mdll : Joined<["-"], "mdll">, Group<m_Group>; 4672def municode : Joined<["-"], "municode">, Group<m_Group>; 4673def mthreads : Joined<["-"], "mthreads">, Group<m_Group>; 4674def marm64x : Joined<["-"], "marm64x">, Group<m_Group>, 4675 Visibility<[ClangOption, CLOption]>, 4676 HelpText<"Link as a hybrid ARM64X image">; 4677def mguard_EQ : Joined<["-"], "mguard=">, Group<m_Group>, 4678 HelpText<"Enable or disable Control Flow Guard checks and guard tables emission">, 4679 Values<"none,cf,cf-nochecks">; 4680def mmcu_EQ : Joined<["-"], "mmcu=">, Group<m_Group>; 4681def msim : Flag<["-"], "msim">, Group<m_Group>; 4682def mfix_and_continue : Flag<["-"], "mfix-and-continue">, Group<clang_ignored_m_Group>; 4683def mieee_fp : Flag<["-"], "mieee-fp">, Group<clang_ignored_m_Group>; 4684def minline_all_stringops : Flag<["-"], "minline-all-stringops">, Group<clang_ignored_m_Group>; 4685def mno_inline_all_stringops : Flag<["-"], "mno-inline-all-stringops">, Group<clang_ignored_m_Group>; 4686} // let Flags = [TargetSpecific] 4687def malign_double : Flag<["-"], "malign-double">, Group<m_Group>, 4688 Visibility<[ClangOption, CC1Option]>, 4689 HelpText<"Align doubles to two words in structs (x86 only)">, 4690 MarshallingInfoFlag<LangOpts<"AlignDouble">>; 4691let Flags = [TargetSpecific] in { 4692def mfloat_abi_EQ : Joined<["-"], "mfloat-abi=">, Group<m_Group>, Values<"soft,softfp,hard">; 4693def mfpmath_EQ : Joined<["-"], "mfpmath=">, Group<m_Group>; 4694def mfpu_EQ : Joined<["-"], "mfpu=">, Group<m_Group>; 4695def mhwdiv_EQ : Joined<["-"], "mhwdiv=">, Group<m_Group>; 4696def mhwmult_EQ : Joined<["-"], "mhwmult=">, Group<m_Group>; 4697} // let Flags = [TargetSpecific] 4698def mglobal_merge : Flag<["-"], "mglobal-merge">, Group<m_Group>, 4699 Visibility<[ClangOption, CC1Option]>, 4700 HelpText<"Enable merging of globals">; 4701let Flags = [TargetSpecific] in { 4702def mhard_float : Flag<["-"], "mhard-float">, Group<m_Group>; 4703def mios_version_min_EQ : Joined<["-"], "mios-version-min=">, 4704 Group<m_Group>, HelpText<"Set iOS deployment target">; 4705def : Joined<["-"], "miphoneos-version-min=">, 4706 Group<m_Group>, Alias<mios_version_min_EQ>; 4707def mios_simulator_version_min_EQ : Joined<["-"], "mios-simulator-version-min=">, Group<m_Group>; 4708def : Joined<["-"], "miphonesimulator-version-min=">, Alias<mios_simulator_version_min_EQ>; 4709def mkernel : Flag<["-"], "mkernel">, Group<m_Group>; 4710def mlinker_version_EQ : Joined<["-"], "mlinker-version=">, Group<m_Group>, 4711 Flags<[NoXarchOption]>; 4712} // let Flags = [TargetSpecific] 4713def mllvm : Separate<["-"], "mllvm">, 4714 Visibility<[ClangOption, CC1Option, CC1AsOption, CLOption, DXCOption, FC1Option, FlangOption]>, 4715 HelpText<"Additional arguments to forward to LLVM's option processing">, 4716 MarshallingInfoStringVector<FrontendOpts<"LLVMArgs">>; 4717def : Joined<["-"], "mllvm=">, 4718 Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, Alias<mllvm>, 4719 HelpText<"Alias for -mllvm">, MetaVarName<"<arg>">; 4720def mmlir : Separate<["-"], "mmlir">, 4721 Visibility<[ClangOption, CLOption, FC1Option, FlangOption]>, 4722 HelpText<"Additional arguments to forward to MLIR's option processing">; 4723def ffuchsia_api_level_EQ : Joined<["-"], "ffuchsia-api-level=">, 4724 Group<m_Group>, Visibility<[ClangOption, CC1Option]>, 4725 HelpText<"Set Fuchsia API level">, 4726 MarshallingInfoInt<LangOpts<"FuchsiaAPILevel">>; 4727def mmacos_version_min_EQ : Joined<["-"], "mmacos-version-min=">, 4728 Group<m_Group>, HelpText<"Set macOS deployment target">; 4729def : Joined<["-"], "mmacosx-version-min=">, 4730 Group<m_Group>, Alias<mmacos_version_min_EQ>; 4731def mms_bitfields : Flag<["-"], "mms-bitfields">, Group<m_Group>, 4732 Visibility<[ClangOption, CC1Option]>, 4733 HelpText<"Set the default structure layout to be compatible with the Microsoft compiler standard">, 4734 MarshallingInfoFlag<LangOpts<"MSBitfields">>; 4735def moutline : Flag<["-"], "moutline">, Group<f_clang_Group>, 4736 Visibility<[ClangOption, CC1Option]>, 4737 HelpText<"Enable function outlining (AArch64 only)">; 4738def mno_outline : Flag<["-"], "mno-outline">, Group<f_clang_Group>, 4739 Visibility<[ClangOption, CC1Option]>, 4740 HelpText<"Disable function outlining (AArch64 only)">; 4741def mno_ms_bitfields : Flag<["-"], "mno-ms-bitfields">, Group<m_Group>, 4742 HelpText<"Do not set the default structure layout to be compatible with the Microsoft compiler standard">; 4743def mskip_rax_setup : Flag<["-"], "mskip-rax-setup">, Group<m_Group>, 4744 Visibility<[ClangOption, CC1Option]>, 4745 HelpText<"Skip setting up RAX register when passing variable arguments (x86 only)">, 4746 MarshallingInfoFlag<CodeGenOpts<"SkipRaxSetup">>; 4747def mno_skip_rax_setup : Flag<["-"], "mno-skip-rax-setup">, Group<m_Group>, 4748 Visibility<[ClangOption, CC1Option]>; 4749def mstackrealign : Flag<["-"], "mstackrealign">, Group<m_Group>, 4750 Visibility<[ClangOption, CC1Option]>, 4751 HelpText<"Force realign the stack at entry to every function">, 4752 MarshallingInfoFlag<CodeGenOpts<"StackRealignment">>; 4753def mstack_alignment : Joined<["-"], "mstack-alignment=">, Group<m_Group>, 4754 Visibility<[ClangOption, CC1Option]>, 4755 HelpText<"Set the stack alignment">, 4756 MarshallingInfoInt<CodeGenOpts<"StackAlignment">>; 4757def mstack_probe_size : Joined<["-"], "mstack-probe-size=">, Group<m_Group>, 4758 Visibility<[ClangOption, CC1Option]>, 4759 HelpText<"Set the stack probe size">, 4760 MarshallingInfoInt<CodeGenOpts<"StackProbeSize">, "4096">; 4761def mstack_arg_probe : Flag<["-"], "mstack-arg-probe">, Group<m_Group>, 4762 HelpText<"Enable stack probes">; 4763def mzos_sys_include_EQ : Joined<["-"], "mzos-sys-include=">, MetaVarName<"<SysInclude>">, 4764 HelpText<"Path to system headers on z/OS">; 4765def mno_stack_arg_probe : Flag<["-"], "mno-stack-arg-probe">, Group<m_Group>, 4766 Visibility<[ClangOption, CC1Option]>, 4767 HelpText<"Disable stack probes which are enabled by default">, 4768 MarshallingInfoFlag<CodeGenOpts<"NoStackArgProbe">>; 4769def mthread_model : Separate<["-"], "mthread-model">, Group<m_Group>, 4770 Visibility<[ClangOption, CC1Option]>, 4771 HelpText<"The thread model to use. Defaults to 'posix')">, Values<"posix,single">, 4772 NormalizedValues<["POSIX", "Single"]>, NormalizedValuesScope<"LangOptions::ThreadModelKind">, 4773 MarshallingInfoEnum<LangOpts<"ThreadModel">, "POSIX">; 4774def meabi : Separate<["-"], "meabi">, Group<m_Group>, 4775 Visibility<[ClangOption, CC1Option]>, 4776 HelpText<"Set EABI type. Default depends on triple)">, Values<"default,4,5,gnu">, 4777 MarshallingInfoEnum<TargetOpts<"EABIVersion">, "Default">, 4778 NormalizedValuesScope<"llvm::EABI">, 4779 NormalizedValues<["Default", "EABI4", "EABI5", "GNU"]>; 4780def mtargetos_EQ : Joined<["-"], "mtargetos=">, Group<m_Group>, 4781 HelpText<"Set the deployment target to be the specified OS and OS version">; 4782def mzos_hlq_le_EQ : Joined<["-"], "mzos-hlq-le=">, MetaVarName<"<LeHLQ>">, 4783 HelpText<"High level qualifier for z/OS Language Environment datasets">; 4784def mzos_hlq_clang_EQ : Joined<["-"], "mzos-hlq-clang=">, MetaVarName<"<ClangHLQ>">, 4785 HelpText<"High level qualifier for z/OS C++RT side deck datasets">; 4786def mzos_hlq_csslib_EQ : Joined<["-"], "mzos-hlq-csslib=">, MetaVarName<"<CsslibHLQ>">, 4787 HelpText<"High level qualifier for z/OS CSSLIB dataset">; 4788 4789def mno_constant_cfstrings : Flag<["-"], "mno-constant-cfstrings">, Group<m_Group>; 4790def mno_global_merge : Flag<["-"], "mno-global-merge">, Group<m_Group>, 4791 Visibility<[ClangOption, CC1Option]>, 4792 HelpText<"Disable merging of globals">; 4793def mno_pascal_strings : Flag<["-"], "mno-pascal-strings">, 4794 Alias<fno_pascal_strings>; 4795def mno_red_zone : Flag<["-"], "mno-red-zone">, Group<m_Group>; 4796def mno_tls_direct_seg_refs : Flag<["-"], "mno-tls-direct-seg-refs">, Group<m_Group>, 4797 Visibility<[ClangOption, CC1Option]>, 4798 HelpText<"Disable direct TLS access through segment registers">, 4799 MarshallingInfoFlag<CodeGenOpts<"IndirectTlsSegRefs">>; 4800def mno_relax_all : Flag<["-"], "mno-relax-all">, Group<m_Group>; 4801let Flags = [TargetSpecific] in { 4802def mno_rtd: Flag<["-"], "mno-rtd">, Group<m_Group>; 4803def mno_soft_float : Flag<["-"], "mno-soft-float">, Group<m_Group>; 4804def mno_stackrealign : Flag<["-"], "mno-stackrealign">, Group<m_Group>; 4805} // let Flags = [TargetSpecific] 4806 4807def mretpoline : Flag<["-"], "mretpoline">, Group<m_Group>, 4808 Visibility<[ClangOption, CLOption]>; 4809def mno_retpoline : Flag<["-"], "mno-retpoline">, Group<m_Group>, 4810 Visibility<[ClangOption, CLOption]>; 4811defm speculative_load_hardening : BoolMOption<"speculative-load-hardening", 4812 CodeGenOpts<"SpeculativeLoadHardening">, DefaultFalse, 4813 PosFlag<SetTrue, [], [ClangOption, CC1Option]>, 4814 NegFlag<SetFalse>, BothFlags<[], [ClangOption, CLOption]>>; 4815def mlvi_hardening : Flag<["-"], "mlvi-hardening">, Group<m_Group>, 4816 Visibility<[ClangOption, CLOption]>, 4817 HelpText<"Enable all mitigations for Load Value Injection (LVI)">; 4818def mno_lvi_hardening : Flag<["-"], "mno-lvi-hardening">, Group<m_Group>, 4819 Visibility<[ClangOption, CLOption]>, 4820 HelpText<"Disable mitigations for Load Value Injection (LVI)">; 4821def mlvi_cfi : Flag<["-"], "mlvi-cfi">, Group<m_Group>, Flags<[NoXarchOption]>, 4822 Visibility<[ClangOption, CLOption]>, 4823 HelpText<"Enable only control-flow mitigations for Load Value Injection (LVI)">; 4824def mno_lvi_cfi : Flag<["-"], "mno-lvi-cfi">, Group<m_Group>, 4825 Visibility<[ClangOption, CLOption]>, 4826 HelpText<"Disable control-flow mitigations for Load Value Injection (LVI)">; 4827def m_seses : Flag<["-"], "mseses">, Group<m_Group>, Flags<[NoXarchOption]>, 4828 Visibility<[ClangOption, CLOption]>, 4829 HelpText<"Enable speculative execution side effect suppression (SESES). " 4830 "Includes LVI control flow integrity mitigations">; 4831def mno_seses : Flag<["-"], "mno-seses">, Group<m_Group>, 4832 Visibility<[ClangOption, CLOption]>, 4833 HelpText<"Disable speculative execution side effect suppression (SESES)">; 4834 4835def mrelax : Flag<["-"], "mrelax">, Group<m_Group>, 4836 HelpText<"Enable linker relaxation">; 4837def mno_relax : Flag<["-"], "mno-relax">, Group<m_Group>, 4838 HelpText<"Disable linker relaxation">; 4839def msmall_data_limit_EQ : Joined<["-"], "msmall-data-limit=">, Group<m_Group>, 4840 Alias<G>, 4841 HelpText<"Put global and static data smaller than the limit into a special section">; 4842let Flags = [TargetSpecific] in { 4843def msave_restore : Flag<["-"], "msave-restore">, Group<m_riscv_Features_Group>, 4844 HelpText<"Enable using library calls for save and restore">; 4845def mno_save_restore : Flag<["-"], "mno-save-restore">, Group<m_riscv_Features_Group>, 4846 HelpText<"Disable using library calls for save and restore">; 4847def mforced_sw_shadow_stack : Flag<["-"], "mforced-sw-shadow-stack">, Group<m_riscv_Features_Group>, 4848 HelpText<"Force using software shadow stack when shadow-stack enabled">; 4849def mno_forced_sw_shadow_stack : Flag<["-"], "mno-forced-sw-shadow-stack">, Group<m_riscv_Features_Group>, 4850 HelpText<"Not force using software shadow stack when shadow-stack enabled">; 4851} // let Flags = [TargetSpecific] 4852let Flags = [TargetSpecific] in { 4853def menable_experimental_extensions : Flag<["-"], "menable-experimental-extensions">, Group<m_Group>, 4854 HelpText<"Enable use of experimental RISC-V extensions.">; 4855def mrvv_vector_bits_EQ : Joined<["-"], "mrvv-vector-bits=">, Group<m_Group>, 4856 Visibility<[ClangOption, FlangOption]>, 4857 HelpText<"Specify the size in bits of an RVV vector register">, 4858 DocBrief<!strconcat( 4859 "Defaults to the vector length agnostic value of \"scalable\". " 4860 "Accepts power of 2 values between 64 and 65536. Also accepts " 4861 "\"zvl\" to use the value implied by -march/-mcpu.", 4862 !cond( 4863 // Flang does not set the preprocessor define. 4864 !eq(GlobalDocumentation.Program, "Flang") : "", 4865 true: " The value will be reflected in __riscv_v_fixed_vlen preprocessor define"), 4866 " (RISC-V only)")>; 4867 4868def munaligned_access : Flag<["-"], "munaligned-access">, Group<m_Group>, 4869 HelpText<"Allow memory accesses to be unaligned (AArch32/MIPSr6 only)">; 4870def mno_unaligned_access : Flag<["-"], "mno-unaligned-access">, Group<m_Group>, 4871 HelpText<"Force all memory accesses to be aligned (AArch32/MIPSr6 only)">; 4872def munaligned_symbols : Flag<["-"], "munaligned-symbols">, Group<m_Group>, 4873 HelpText<"Expect external char-aligned symbols to be without ABI alignment (SystemZ only)">; 4874def mno_unaligned_symbols : Flag<["-"], "mno-unaligned-symbols">, Group<m_Group>, 4875 HelpText<"Expect external char-aligned symbols to be without ABI alignment (SystemZ only)">; 4876def mstrict_align : Flag<["-"], "mstrict-align">, Group<m_Group>, 4877 HelpText<"Force all memory accesses to be aligned (AArch64/LoongArch/RISC-V only)">; 4878def mno_strict_align : Flag<["-"], "mno-strict-align">, Group<m_Group>, 4879 HelpText<"Allow memory accesses to be unaligned (AArch64/LoongArch/RISC-V only)">; 4880def mscalar_strict_align : Flag<["-"], "mscalar-strict-align">, Group<m_Group>, 4881 HelpText<"Force all scalar memory accesses to be aligned (RISC-V only)">; 4882def mno_scalar_strict_align : Flag<["-"], "mno-scalar-strict-align">, Group<m_Group>, 4883 HelpText<"Allow scalar memory accesses to be unaligned (RISC-V only)">; 4884def mvector_strict_align : Flag<["-"], "mvector-strict-align">, Group<m_Group>, 4885 HelpText<"Force all vector memory accesses to be aligned (RISC-V only)">; 4886def mno_vector_strict_align : Flag<["-"], "mno-vector-strict-align">, Group<m_Group>, 4887 HelpText<"Allow vector memory accesses to be unaligned (RISC-V only)">; 4888def mno_thumb : Flag<["-"], "mno-thumb">, Group<m_arm_Features_Group>; 4889def mrestrict_it: Flag<["-"], "mrestrict-it">, Group<m_arm_Features_Group>, 4890 HelpText<"Disallow generation of complex IT blocks. It is off by default.">; 4891def mno_restrict_it: Flag<["-"], "mno-restrict-it">, Group<m_arm_Features_Group>, 4892 HelpText<"Allow generation of complex IT blocks.">; 4893def marm : Flag<["-"], "marm">, Alias<mno_thumb>; 4894def ffixed_r9 : Flag<["-"], "ffixed-r9">, Group<m_arm_Features_Group>, 4895 HelpText<"Reserve the r9 register (ARM only)">; 4896def mno_movt : Flag<["-"], "mno-movt">, Group<m_arm_Features_Group>, 4897 HelpText<"Disallow use of movt/movw pairs (ARM only)">; 4898def mcrc : Flag<["-"], "mcrc">, Group<m_Group>, 4899 HelpText<"Allow use of CRC instructions (ARM/Mips only)">; 4900def mnocrc : Flag<["-"], "mnocrc">, Group<m_arm_Features_Group>, 4901 HelpText<"Disallow use of CRC instructions (ARM only)">; 4902def mno_neg_immediates: Flag<["-"], "mno-neg-immediates">, Group<m_arm_Features_Group>, 4903 HelpText<"Disallow converting instructions with negative immediates to their negation or inversion.">; 4904} // let Flags = [TargetSpecific] 4905def mcmse : Flag<["-"], "mcmse">, Group<m_arm_Features_Group>, 4906 Visibility<[ClangOption, CC1Option]>, 4907 HelpText<"Allow use of CMSE (Armv8-M Security Extensions)">, 4908 MarshallingInfoFlag<LangOpts<"Cmse">>; 4909def ForceAAPCSBitfieldLoad : Flag<["-"], "faapcs-bitfield-load">, Group<m_arm_Features_Group>, 4910 Visibility<[ClangOption, CC1Option]>, 4911 HelpText<"Follows the AAPCS standard that all volatile bit-field write generates at least one load. (ARM only).">, 4912 MarshallingInfoFlag<CodeGenOpts<"ForceAAPCSBitfieldLoad">>; 4913defm aapcs_bitfield_width : BoolOption<"f", "aapcs-bitfield-width", 4914 CodeGenOpts<"AAPCSBitfieldWidth">, DefaultTrue, 4915 NegFlag<SetFalse, [], [ClangOption], "Do not follow">, 4916 PosFlag<SetTrue, [], [ClangOption], "Follow">, 4917 BothFlags<[], [ClangOption, CC1Option], 4918 " the AAPCS standard requirement stating that" 4919 " volatile bit-field width is dictated by the field container type. (ARM only).">>, 4920 Group<m_arm_Features_Group>; 4921let Flags = [TargetSpecific] in { 4922def mframe_chain : Joined<["-"], "mframe-chain=">, 4923 Group<m_arm_Features_Group>, Values<"none,aapcs,aapcs+leaf">, 4924 HelpText<"Select the frame chain model used to emit frame records (Arm only).">; 4925def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group<m_Group>, 4926 HelpText<"Generate code which only uses the general purpose registers (AArch64/x86 only)">; 4927def mfix_cmse_cve_2021_35465 : Flag<["-"], "mfix-cmse-cve-2021-35465">, 4928 Group<m_arm_Features_Group>, 4929 HelpText<"Work around VLLDM erratum CVE-2021-35465 (ARM only)">; 4930def mno_fix_cmse_cve_2021_35465 : Flag<["-"], "mno-fix-cmse-cve-2021-35465">, 4931 Group<m_arm_Features_Group>, 4932 HelpText<"Don't work around VLLDM erratum CVE-2021-35465 (ARM only)">; 4933def mfix_cortex_a57_aes_1742098 : Flag<["-"], "mfix-cortex-a57-aes-1742098">, 4934 Group<m_arm_Features_Group>, 4935 HelpText<"Work around Cortex-A57 Erratum 1742098 (ARM only)">; 4936def mno_fix_cortex_a57_aes_1742098 : Flag<["-"], "mno-fix-cortex-a57-aes-1742098">, 4937 Group<m_arm_Features_Group>, 4938 HelpText<"Don't work around Cortex-A57 Erratum 1742098 (ARM only)">; 4939def mfix_cortex_a72_aes_1655431 : Flag<["-"], "mfix-cortex-a72-aes-1655431">, 4940 Group<m_arm_Features_Group>, 4941 HelpText<"Work around Cortex-A72 Erratum 1655431 (ARM only)">, 4942 Alias<mfix_cortex_a57_aes_1742098>; 4943def mno_fix_cortex_a72_aes_1655431 : Flag<["-"], "mno-fix-cortex-a72-aes-1655431">, 4944 Group<m_arm_Features_Group>, 4945 HelpText<"Don't work around Cortex-A72 Erratum 1655431 (ARM only)">, 4946 Alias<mno_fix_cortex_a57_aes_1742098>; 4947def mfix_cortex_a53_835769 : Flag<["-"], "mfix-cortex-a53-835769">, 4948 Group<m_aarch64_Features_Group>, 4949 HelpText<"Workaround Cortex-A53 erratum 835769 (AArch64 only)">; 4950def mno_fix_cortex_a53_835769 : Flag<["-"], "mno-fix-cortex-a53-835769">, 4951 Group<m_aarch64_Features_Group>, 4952 HelpText<"Don't workaround Cortex-A53 erratum 835769 (AArch64 only)">; 4953def mmark_bti_property : Flag<["-"], "mmark-bti-property">, 4954 Group<m_aarch64_Features_Group>, 4955 HelpText<"Add .note.gnu.property with BTI to assembly files (AArch64 only)">; 4956def mno_bti_at_return_twice : Flag<["-"], "mno-bti-at-return-twice">, 4957 Group<m_arm_Features_Group>, 4958 HelpText<"Do not add a BTI instruction after a setjmp or other" 4959 " return-twice construct (Arm/AArch64 only)">; 4960 4961foreach i = {1-31} in 4962 def ffixed_x#i : Flag<["-"], "ffixed-x"#i>, Group<m_Group>, 4963 HelpText<"Reserve the x"#i#" register (AArch64/RISC-V only)">; 4964 4965def mlr_for_calls_only : Flag<["-"], "mlr-for-calls-only">, Group<m_aarch64_Features_Group>, 4966 HelpText<"Do not allocate the LR register for general purpose usage, only for calls. (AArch64 only)">; 4967 4968foreach i = {8-15,18} in 4969 def fcall_saved_x#i : Flag<["-"], "fcall-saved-x"#i>, Group<m_aarch64_Features_Group>, 4970 HelpText<"Make the x"#i#" register call-saved (AArch64 only)">; 4971 4972def msve_vector_bits_EQ : Joined<["-"], "msve-vector-bits=">, Group<m_aarch64_Features_Group>, 4973 Visibility<[ClangOption, FlangOption]>, 4974 HelpText<"Specify the size in bits of an SVE vector register. Defaults to the" 4975 " vector length agnostic value of \"scalable\". (AArch64 only)">; 4976} // let Flags = [TargetSpecific] 4977 4978def mvscale_min_EQ : Joined<["-"], "mvscale-min=">, 4979 Visibility<[CC1Option, FC1Option]>, 4980 HelpText<"Specify the vscale minimum. Defaults to \"1\". (AArch64/RISC-V only)">, 4981 MarshallingInfoInt<LangOpts<"VScaleMin">>; 4982def mvscale_max_EQ : Joined<["-"], "mvscale-max=">, 4983 Visibility<[CC1Option, FC1Option]>, 4984 HelpText<"Specify the vscale maximum. Defaults to the" 4985 " vector length agnostic value of \"0\". (AArch64/RISC-V only)">, 4986 MarshallingInfoInt<LangOpts<"VScaleMax">>; 4987 4988def msign_return_address_EQ : Joined<["-"], "msign-return-address=">, 4989 Visibility<[ClangOption, CC1Option]>, 4990 Group<m_Group>, Values<"none,all,non-leaf">, 4991 HelpText<"Select return address signing scope">; 4992let Flags = [TargetSpecific] in { 4993def mbranch_protection_EQ : Joined<["-"], "mbranch-protection=">, 4994 Group<m_Group>, 4995 HelpText<"Enforce targets of indirect branches and function returns">; 4996 4997def mharden_sls_EQ : Joined<["-"], "mharden-sls=">, Group<m_Group>, 4998 HelpText<"Select straight-line speculation hardening scope (ARM/AArch64/X86" 4999 " only). <arg> must be: all, none, retbr(ARM/AArch64)," 5000 " blr(ARM/AArch64), comdat(ARM/AArch64), nocomdat(ARM/AArch64)," 5001 " return(X86), indirect-jmp(X86)">; 5002 5003def matomics : Flag<["-"], "matomics">, Group<m_wasm_Features_Group>; 5004def mno_atomics : Flag<["-"], "mno-atomics">, Group<m_wasm_Features_Group>; 5005def mbulk_memory : Flag<["-"], "mbulk-memory">, Group<m_wasm_Features_Group>; 5006def mno_bulk_memory : Flag<["-"], "mno-bulk-memory">, Group<m_wasm_Features_Group>; 5007def mexception_handing : Flag<["-"], "mexception-handling">, Group<m_wasm_Features_Group>; 5008def mno_exception_handing : Flag<["-"], "mno-exception-handling">, Group<m_wasm_Features_Group>; 5009def mextended_const : Flag<["-"], "mextended-const">, Group<m_wasm_Features_Group>; 5010def mno_extended_const : Flag<["-"], "mno-extended-const">, Group<m_wasm_Features_Group>; 5011def mhalf_precision : Flag<["-"], "mhalf-precision">, Group<m_wasm_Features_Group>; 5012def mno_half_precision : Flag<["-"], "mno-half-precision">, Group<m_wasm_Features_Group>; 5013def mmultimemory : Flag<["-"], "mmultimemory">, Group<m_wasm_Features_Group>; 5014def mno_multimemory : Flag<["-"], "mno-multimemory">, Group<m_wasm_Features_Group>; 5015def mmultivalue : Flag<["-"], "mmultivalue">, Group<m_wasm_Features_Group>; 5016def mno_multivalue : Flag<["-"], "mno-multivalue">, Group<m_wasm_Features_Group>; 5017def mmutable_globals : Flag<["-"], "mmutable-globals">, Group<m_wasm_Features_Group>; 5018def mno_mutable_globals : Flag<["-"], "mno-mutable-globals">, Group<m_wasm_Features_Group>; 5019def mnontrapping_fptoint : Flag<["-"], "mnontrapping-fptoint">, Group<m_wasm_Features_Group>; 5020def mno_nontrapping_fptoint : Flag<["-"], "mno-nontrapping-fptoint">, Group<m_wasm_Features_Group>; 5021def mreference_types : Flag<["-"], "mreference-types">, Group<m_wasm_Features_Group>; 5022def mno_reference_types : Flag<["-"], "mno-reference-types">, Group<m_wasm_Features_Group>; 5023def mrelaxed_simd : Flag<["-"], "mrelaxed-simd">, Group<m_wasm_Features_Group>; 5024def mno_relaxed_simd : Flag<["-"], "mno-relaxed-simd">, Group<m_wasm_Features_Group>; 5025def msign_ext : Flag<["-"], "msign-ext">, Group<m_wasm_Features_Group>; 5026def mno_sign_ext : Flag<["-"], "mno-sign-ext">, Group<m_wasm_Features_Group>; 5027def msimd128 : Flag<["-"], "msimd128">, Group<m_wasm_Features_Group>; 5028def mno_simd128 : Flag<["-"], "mno-simd128">, Group<m_wasm_Features_Group>; 5029def mtail_call : Flag<["-"], "mtail-call">, Group<m_wasm_Features_Group>; 5030def mno_tail_call : Flag<["-"], "mno-tail-call">, Group<m_wasm_Features_Group>; 5031def mexec_model_EQ : Joined<["-"], "mexec-model=">, Group<m_wasm_Features_Driver_Group>, 5032 Values<"command,reactor">, 5033 HelpText<"Execution model (WebAssembly only)">, 5034 DocBrief<"Select between \"command\" and \"reactor\" executable models. " 5035 "Commands have a main-function which scopes the lifetime of the " 5036 "program. Reactors are activated and remain active until " 5037 "explicitly terminated.">; 5038} // let Flags = [TargetSpecific] 5039 5040defm amdgpu_ieee : BoolMOption<"amdgpu-ieee", 5041 CodeGenOpts<"EmitIEEENaNCompliantInsts">, DefaultTrue, 5042 PosFlag<SetTrue, [], [ClangOption], "Sets the IEEE bit in the expected default floating point " 5043 " mode register. Floating point opcodes that support exception flag " 5044 "gathering quiet and propagate signaling NaN inputs per IEEE 754-2008. " 5045 "This option changes the ABI. (AMDGPU only)">, 5046 NegFlag<SetFalse, [], [ClangOption, CC1Option]>>; 5047 5048def mcode_object_version_EQ : Joined<["-"], "mcode-object-version=">, Group<m_Group>, 5049 HelpText<"Specify code object ABI version. Defaults to 5. (AMDGPU only)">, 5050 Visibility<[ClangOption, FlangOption, CC1Option, FC1Option]>, 5051 Values<"none,4,5,6">, 5052 NormalizedValuesScope<"llvm::CodeObjectVersionKind">, 5053 NormalizedValues<["COV_None", "COV_4", "COV_5", "COV_6"]>, 5054 MarshallingInfoEnum<TargetOpts<"CodeObjectVersion">, "COV_5">; 5055 5056defm cumode : SimpleMFlag<"cumode", 5057 "Specify CU wavefront", "Specify WGP wavefront", 5058 " execution mode (AMDGPU only)", m_amdgpu_Features_Group>; 5059defm tgsplit : SimpleMFlag<"tgsplit", "Enable", "Disable", 5060 " threadgroup split execution mode (AMDGPU only)", m_amdgpu_Features_Group>; 5061defm wavefrontsize64 : SimpleMFlag<"wavefrontsize64", 5062 "Specify wavefront size 64", "Specify wavefront size 32", 5063 " mode (AMDGPU only)">; 5064defm amdgpu_precise_memory_op 5065 : SimpleMFlag<"amdgpu-precise-memory-op", "Enable", "Disable", 5066 " precise memory mode (AMDGPU only)">; 5067 5068defm unsafe_fp_atomics : BoolMOption<"unsafe-fp-atomics", 5069 TargetOpts<"AllowAMDGPUUnsafeFPAtomics">, DefaultFalse, 5070 PosFlag<SetTrue, [], [ClangOption, CC1Option], 5071 "Enable generation of unsafe floating point " 5072 "atomic instructions. May generate more efficient code, but may not " 5073 "respect rounding and denormal modes, and may give incorrect results " 5074 "for certain memory destinations. (AMDGPU only)">, 5075 NegFlag<SetFalse>>; 5076 5077def faltivec : Flag<["-"], "faltivec">, Group<f_Group>; 5078def fno_altivec : Flag<["-"], "fno-altivec">, Group<f_Group>; 5079let Flags = [TargetSpecific] in { 5080def maltivec : Flag<["-"], "maltivec">, Group<m_ppc_Features_Group>, 5081 HelpText<"Enable AltiVec vector initializer syntax">; 5082def mno_altivec : Flag<["-"], "mno-altivec">, Group<m_ppc_Features_Group>; 5083def mpcrel: Flag<["-"], "mpcrel">, Group<m_ppc_Features_Group>; 5084def mno_pcrel: Flag<["-"], "mno-pcrel">, Group<m_ppc_Features_Group>; 5085def mprefixed: Flag<["-"], "mprefixed">, Group<m_ppc_Features_Group>; 5086def mno_prefixed: Flag<["-"], "mno-prefixed">, Group<m_ppc_Features_Group>; 5087def mspe : Flag<["-"], "mspe">, Group<m_ppc_Features_Group>; 5088def mno_spe : Flag<["-"], "mno-spe">, Group<m_ppc_Features_Group>; 5089def mefpu2 : Flag<["-"], "mefpu2">, Group<m_ppc_Features_Group>; 5090} // let Flags = [TargetSpecific] 5091def mabi_EQ_quadword_atomics : Flag<["-"], "mabi=quadword-atomics">, 5092 Group<m_Group>, Visibility<[ClangOption, CC1Option]>, 5093 HelpText<"Enable quadword atomics ABI on AIX (AIX PPC64 only). Uses lqarx/stqcx. instructions.">, 5094 MarshallingInfoFlag<LangOpts<"EnableAIXQuadwordAtomicsABI">>; 5095let Flags = [TargetSpecific] in { 5096def mvsx : Flag<["-"], "mvsx">, Group<m_ppc_Features_Group>; 5097def mno_vsx : Flag<["-"], "mno-vsx">, Group<m_ppc_Features_Group>; 5098def msecure_plt : Flag<["-"], "msecure-plt">, Group<m_ppc_Features_Group>; 5099def mpower8_vector : Flag<["-"], "mpower8-vector">, 5100 Group<m_ppc_Features_Group>; 5101def mno_power8_vector : Flag<["-"], "mno-power8-vector">, 5102 Group<m_ppc_Features_Group>; 5103def mpower9_vector : Flag<["-"], "mpower9-vector">, 5104 Group<m_ppc_Features_Group>; 5105def mno_power9_vector : Flag<["-"], "mno-power9-vector">, 5106 Group<m_ppc_Features_Group>; 5107def mpower10_vector : Flag<["-"], "mpower10-vector">, 5108 Group<m_ppc_Features_Group>; 5109def mno_power10_vector : Flag<["-"], "mno-power10-vector">, 5110 Group<m_ppc_Features_Group>; 5111def mpower8_crypto : Flag<["-"], "mcrypto">, 5112 Group<m_ppc_Features_Group>; 5113def mnopower8_crypto : Flag<["-"], "mno-crypto">, 5114 Group<m_ppc_Features_Group>; 5115def mdirect_move : Flag<["-"], "mdirect-move">, 5116 Group<m_ppc_Features_Group>; 5117def mnodirect_move : Flag<["-"], "mno-direct-move">, 5118 Group<m_ppc_Features_Group>; 5119def mpaired_vector_memops: Flag<["-"], "mpaired-vector-memops">, 5120 Group<m_ppc_Features_Group>; 5121def mnopaired_vector_memops: Flag<["-"], "mno-paired-vector-memops">, 5122 Group<m_ppc_Features_Group>; 5123def mhtm : Flag<["-"], "mhtm">, Group<m_ppc_Features_Group>; 5124def mno_htm : Flag<["-"], "mno-htm">, Group<m_ppc_Features_Group>; 5125def mfprnd : Flag<["-"], "mfprnd">, Group<m_ppc_Features_Group>; 5126def mno_fprnd : Flag<["-"], "mno-fprnd">, Group<m_ppc_Features_Group>; 5127def mcmpb : Flag<["-"], "mcmpb">, Group<m_ppc_Features_Group>; 5128def mno_cmpb : Flag<["-"], "mno-cmpb">, Group<m_ppc_Features_Group>; 5129def misel : Flag<["-"], "misel">, Group<m_ppc_Features_Group>; 5130def mno_isel : Flag<["-"], "mno-isel">, Group<m_ppc_Features_Group>; 5131def mmfocrf : Flag<["-"], "mmfocrf">, Group<m_ppc_Features_Group>; 5132def mmfcrf : Flag<["-"], "mmfcrf">, Alias<mmfocrf>; 5133def mno_mfocrf : Flag<["-"], "mno-mfocrf">, Group<m_ppc_Features_Group>; 5134def mno_mfcrf : Flag<["-"], "mno-mfcrf">, Alias<mno_mfocrf>; 5135def mpopcntd : Flag<["-"], "mpopcntd">, Group<m_ppc_Features_Group>; 5136def mno_popcntd : Flag<["-"], "mno-popcntd">, Group<m_ppc_Features_Group>; 5137def mcrbits : Flag<["-"], "mcrbits">, Group<m_ppc_Features_Group>, 5138 HelpText<"Control the CR-bit tracking feature on PowerPC. ``-mcrbits`` " 5139 "(the enablement of CR-bit tracking support) is the default for " 5140 "POWER8 and above, as well as for all other CPUs when " 5141 "optimization is applied (-O2 and above).">; 5142def mno_crbits : Flag<["-"], "mno-crbits">, Group<m_ppc_Features_Group>; 5143def minvariant_function_descriptors : 5144 Flag<["-"], "minvariant-function-descriptors">, Group<m_ppc_Features_Group>; 5145def mno_invariant_function_descriptors : 5146 Flag<["-"], "mno-invariant-function-descriptors">, 5147 Group<m_ppc_Features_Group>; 5148def mfloat128: Flag<["-"], "mfloat128">, 5149 Group<m_ppc_Features_Group>; 5150def mno_float128 : Flag<["-"], "mno-float128">, 5151 Group<m_ppc_Features_Group>; 5152def mlongcall: Flag<["-"], "mlongcall">, 5153 Group<m_ppc_Features_Group>; 5154def mno_longcall : Flag<["-"], "mno-longcall">, 5155 Group<m_ppc_Features_Group>; 5156def mmma: Flag<["-"], "mmma">, Group<m_ppc_Features_Group>; 5157def mno_mma: Flag<["-"], "mno-mma">, Group<m_ppc_Features_Group>; 5158def mrop_protect : Flag<["-"], "mrop-protect">, 5159 Group<m_ppc_Features_Group>; 5160def mprivileged : Flag<["-"], "mprivileged">, 5161 Group<m_ppc_Features_Group>; 5162 5163defm regnames : BoolMOption<"regnames", 5164 CodeGenOpts<"PPCUseFullRegisterNames">, DefaultFalse, 5165 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Use full register names when writing assembly output">, 5166 NegFlag<SetFalse, [], [ClangOption], "Use only register numbers when writing assembly output">>; 5167} // let Flags = [TargetSpecific] 5168def maix_small_local_exec_tls : Flag<["-"], "maix-small-local-exec-tls">, 5169 Group<m_ppc_Features_Group>, 5170 HelpText<"Produce a faster access sequence for local-exec TLS variables " 5171 "where the offset from the TLS base is encoded as an " 5172 "immediate operand (AIX 64-bit only). " 5173 "This access sequence is not used for variables larger than 32KB.">; 5174def maix_small_local_dynamic_tls : Flag<["-"], "maix-small-local-dynamic-tls">, 5175 Group<m_ppc_Features_Group>, 5176 HelpText<"Produce a faster access sequence for local-dynamic TLS variables " 5177 "where the offset from the TLS base is encoded as an " 5178 "immediate operand (AIX 64-bit only). " 5179 "This access sequence is not used for variables larger than 32KB.">; 5180def maix_shared_lib_tls_model_opt : Flag<["-"], "maix-shared-lib-tls-model-opt">, 5181 Group<m_ppc_Features_Group>, 5182 HelpText<"For shared library loaded with the main program, change local-dynamic access(es) " 5183 "to initial-exec access(es) at the function level (AIX 64-bit only).">; 5184def maix_struct_return : Flag<["-"], "maix-struct-return">, 5185 Group<m_Group>, Visibility<[ClangOption, CC1Option]>, 5186 HelpText<"Return all structs in memory (PPC32 only)">, 5187 DocBrief<"Override the default ABI for 32-bit targets to return all " 5188 "structs in memory, as in the Power 32-bit ABI for Linux (2011), " 5189 "and on AIX and Darwin.">; 5190def msvr4_struct_return : Flag<["-"], "msvr4-struct-return">, 5191 Group<m_Group>, Visibility<[ClangOption, CC1Option]>, 5192 HelpText<"Return small structs in registers (PPC32 only)">, 5193 DocBrief<"Override the default ABI for 32-bit targets to return small " 5194 "structs in registers, as in the System V ABI (1995).">; 5195def mxcoff_roptr : Flag<["-"], "mxcoff-roptr">, Group<m_Group>, 5196 Flags<[TargetSpecific]>, Visibility<[ClangOption, CC1Option]>, 5197 HelpText<"Place constant objects with relocatable address values in the RO data section and add -bforceimprw to the linker flags (AIX only)">; 5198def mno_xcoff_roptr : Flag<["-"], "mno-xcoff-roptr">, Group<m_Group>, TargetSpecific; 5199 5200let Flags = [TargetSpecific] in { 5201def mvx : Flag<["-"], "mvx">, Group<m_Group>; 5202def mno_vx : Flag<["-"], "mno-vx">, Group<m_Group>; 5203} // let Flags = [TargetSpecific] 5204 5205let Flags = [TargetSpecific] in { 5206def msse2avx : Flag<["-"], "msse2avx">, Group<m_Group>, 5207 Visibility<[ClangOption, CC1Option, CC1AsOption]>, 5208 HelpText<"Specify that the assembler should encode SSE instructions with VEX prefix">, 5209 MarshallingInfoFlag<CodeGenOpts<"SSE2AVX">>; 5210} // let Flags = [TargetSpecific] 5211 5212defm zvector : BoolFOption<"zvector", 5213 LangOpts<"ZVector">, DefaultFalse, 5214 PosFlag<SetTrue, [], [ClangOption, CC1Option], 5215 "Enable System z vector language extension">, 5216 NegFlag<SetFalse>>; 5217def mzvector : Flag<["-"], "mzvector">, Alias<fzvector>; 5218def mno_zvector : Flag<["-"], "mno-zvector">, Alias<fno_zvector>; 5219 5220def mxcoff_build_id_EQ : Joined<["-"], "mxcoff-build-id=">, Group<Link_Group>, MetaVarName<"<0xHEXSTRING>">, 5221 HelpText<"On AIX, request creation of a build-id string, \"0xHEXSTRING\", in the string table of the loader section inside the linked binary">; 5222def mignore_xcoff_visibility : Flag<["-"], "mignore-xcoff-visibility">, Group<m_Group>, 5223HelpText<"Not emit the visibility attribute for asm in AIX OS or give all symbols 'unspecified' visibility in XCOFF object file">, 5224 Flags<[TargetSpecific]>, Visibility<[ClangOption, CC1Option]>; 5225defm backchain : BoolMOption<"backchain", 5226 CodeGenOpts<"Backchain">, DefaultFalse, 5227 PosFlag<SetTrue, [], [ClangOption], "Link stack frames through backchain on System Z">, 5228 NegFlag<SetFalse>, BothFlags<[], [ClangOption, CC1Option]>>; 5229 5230def mno_warn_nonportable_cfstrings : Flag<["-"], "mno-warn-nonportable-cfstrings">, Group<m_Group>; 5231def mno_omit_leaf_frame_pointer : Flag<["-"], "mno-omit-leaf-frame-pointer">, Group<m_Group>; 5232def momit_leaf_frame_pointer : Flag<["-"], "momit-leaf-frame-pointer">, Group<m_Group>, 5233 HelpText<"Omit frame pointer setup for leaf functions">; 5234def moslib_EQ : Joined<["-"], "moslib=">, Group<m_Group>; 5235def mpascal_strings : Flag<["-"], "mpascal-strings">, Alias<fpascal_strings>; 5236def mred_zone : Flag<["-"], "mred-zone">, Group<m_Group>; 5237def mtls_direct_seg_refs : Flag<["-"], "mtls-direct-seg-refs">, Group<m_Group>, 5238 HelpText<"Enable direct TLS access through segment registers (default)">; 5239def mregparm_EQ : Joined<["-"], "mregparm=">, Group<m_Group>; 5240def mrelax_all : Flag<["-"], "mrelax-all">, Group<m_Group>, 5241 Visibility<[ClangOption, CC1Option, CC1AsOption]>, 5242 HelpText<"(integrated-as) Relax all machine instructions">, 5243 MarshallingInfoFlag<CodeGenOpts<"RelaxAll">>; 5244def mincremental_linker_compatible : Flag<["-"], "mincremental-linker-compatible">, Group<m_Group>, 5245 Visibility<[ClangOption, CC1Option, CC1AsOption]>, 5246 HelpText<"(integrated-as) Emit an object file which can be used with an incremental linker">, 5247 MarshallingInfoFlag<CodeGenOpts<"IncrementalLinkerCompatible">>; 5248def mno_incremental_linker_compatible : Flag<["-"], "mno-incremental-linker-compatible">, Group<m_Group>, 5249 HelpText<"(integrated-as) Emit an object file which cannot be used with an incremental linker">; 5250def mrtd : Flag<["-"], "mrtd">, Group<m_Group>, 5251 Visibility<[ClangOption, CC1Option]>, 5252 HelpText<"Make StdCall calling convention the default">; 5253def msmall_data_threshold_EQ : Joined <["-"], "msmall-data-threshold=">, 5254 Group<m_Group>, Alias<G>; 5255def msoft_float : Flag<["-"], "msoft-float">, Group<m_Group>, 5256 Visibility<[ClangOption, CC1Option]>, 5257 HelpText<"Use software floating point">, 5258 MarshallingInfoFlag<CodeGenOpts<"SoftFloat">>; 5259def mno_fmv : Flag<["-"], "mno-fmv">, Group<f_clang_Group>, 5260 Visibility<[ClangOption, CC1Option]>, 5261 HelpText<"Disable function multiversioning">; 5262def moutline_atomics : Flag<["-"], "moutline-atomics">, Group<f_clang_Group>, 5263 Visibility<[ClangOption, CC1Option, FlangOption]>, 5264 HelpText<"Generate local calls to out-of-line atomic operations">; 5265def mno_outline_atomics : Flag<["-"], "mno-outline-atomics">, Group<f_clang_Group>, 5266 Visibility<[ClangOption, CC1Option, FlangOption]>, 5267 HelpText<"Don't generate local calls to out-of-line atomic operations">; 5268def mno_implicit_float : Flag<["-"], "mno-implicit-float">, Group<m_Group>, 5269 HelpText<"Don't generate implicit floating point or vector instructions">; 5270def mimplicit_float : Flag<["-"], "mimplicit-float">, Group<m_Group>; 5271def mrecip : Flag<["-"], "mrecip">, Group<m_Group>, 5272 HelpText<"Equivalent to '-mrecip=all'">; 5273def mrecip_EQ : CommaJoined<["-"], "mrecip=">, Group<m_Group>, 5274 Visibility<[ClangOption, CC1Option]>, 5275 HelpText<"Control use of approximate reciprocal and reciprocal square root instructions followed by <n> iterations of " 5276 "Newton-Raphson refinement. " 5277 "<value> = ( ['!'] ['vec-'] ('rcp'|'sqrt') [('h'|'s'|'d')] [':'<n>] ) | 'all' | 'default' | 'none'">, 5278 MarshallingInfoStringVector<CodeGenOpts<"Reciprocals">>; 5279def mprefer_vector_width_EQ : Joined<["-"], "mprefer-vector-width=">, Group<m_Group>, 5280 Visibility<[ClangOption, CC1Option]>, 5281 HelpText<"Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.">, 5282 MarshallingInfoString<CodeGenOpts<"PreferVectorWidth">>; 5283def mstack_protector_guard_EQ : Joined<["-"], "mstack-protector-guard=">, Group<m_Group>, 5284 Visibility<[ClangOption, CC1Option]>, 5285 HelpText<"Use the given guard (global, tls) for addressing the stack-protector guard">, 5286 MarshallingInfoString<CodeGenOpts<"StackProtectorGuard">>; 5287def mstack_protector_guard_offset_EQ : Joined<["-"], "mstack-protector-guard-offset=">, Group<m_Group>, 5288 Visibility<[ClangOption, CC1Option]>, 5289 HelpText<"Use the given offset for addressing the stack-protector guard">, 5290 MarshallingInfoInt<CodeGenOpts<"StackProtectorGuardOffset">, "INT_MAX", "int">; 5291def mstack_protector_guard_symbol_EQ : Joined<["-"], "mstack-protector-guard-symbol=">, Group<m_Group>, 5292 Visibility<[ClangOption, CC1Option]>, 5293 HelpText<"Use the given symbol for addressing the stack-protector guard">, 5294 MarshallingInfoString<CodeGenOpts<"StackProtectorGuardSymbol">>; 5295def mstack_protector_guard_reg_EQ : Joined<["-"], "mstack-protector-guard-reg=">, Group<m_Group>, 5296 Visibility<[ClangOption, CC1Option]>, 5297 HelpText<"Use the given reg for addressing the stack-protector guard">, 5298 MarshallingInfoString<CodeGenOpts<"StackProtectorGuardReg">>; 5299def mfentry : Flag<["-"], "mfentry">, HelpText<"Insert calls to fentry at function entry (x86/SystemZ only)">, 5300 Visibility<[ClangOption, CC1Option]>, Group<m_Group>, 5301 MarshallingInfoFlag<CodeGenOpts<"CallFEntry">>; 5302def mlsx : Flag<["-"], "mlsx">, Group<m_loongarch_Features_Group>, 5303 HelpText<"Enable Loongson SIMD Extension (LSX).">; 5304def mno_lsx : Flag<["-"], "mno-lsx">, Group<m_loongarch_Features_Group>, 5305 HelpText<"Disable Loongson SIMD Extension (LSX).">; 5306def mlasx : Flag<["-"], "mlasx">, Group<m_loongarch_Features_Group>, 5307 HelpText<"Enable Loongson Advanced SIMD Extension (LASX).">; 5308def mno_lasx : Flag<["-"], "mno-lasx">, Group<m_loongarch_Features_Group>, 5309 HelpText<"Disable Loongson Advanced SIMD Extension (LASX).">; 5310def msimd_EQ : Joined<["-"], "msimd=">, Group<m_loongarch_Features_Group>, 5311 Flags<[TargetSpecific]>, 5312 HelpText<"Select the SIMD extension(s) to be enabled in LoongArch either 'none', 'lsx', 'lasx'.">; 5313def mnop_mcount : Flag<["-"], "mnop-mcount">, HelpText<"Generate mcount/__fentry__ calls as nops. To activate they need to be patched in.">, 5314 Visibility<[ClangOption, CC1Option]>, Group<m_Group>, 5315 MarshallingInfoFlag<CodeGenOpts<"MNopMCount">>; 5316def mrecord_mcount : Flag<["-"], "mrecord-mcount">, HelpText<"Generate a __mcount_loc section entry for each __fentry__ call.">, 5317 Visibility<[ClangOption, CC1Option]>, Group<m_Group>, 5318 MarshallingInfoFlag<CodeGenOpts<"RecordMCount">>; 5319def mpacked_stack : Flag<["-"], "mpacked-stack">, HelpText<"Use packed stack layout (SystemZ only).">, 5320 Visibility<[ClangOption, CC1Option]>, Group<m_Group>, 5321 MarshallingInfoFlag<CodeGenOpts<"PackedStack">>; 5322def mno_packed_stack : Flag<["-"], "mno-packed-stack">, 5323 Visibility<[ClangOption, CC1Option]>, Group<m_Group>; 5324 5325let Flags = [TargetSpecific] in { 5326def mips16 : Flag<["-"], "mips16">, Group<m_mips_Features_Group>; 5327def mno_mips16 : Flag<["-"], "mno-mips16">, Group<m_mips_Features_Group>; 5328def mmicromips : Flag<["-"], "mmicromips">, Group<m_mips_Features_Group>; 5329def mno_micromips : Flag<["-"], "mno-micromips">, Group<m_mips_Features_Group>; 5330def mxgot : Flag<["-"], "mxgot">, Group<m_mips_Features_Group>; 5331def mno_xgot : Flag<["-"], "mno-xgot">, Group<m_mips_Features_Group>; 5332def mldc1_sdc1 : Flag<["-"], "mldc1-sdc1">, Group<m_mips_Features_Group>; 5333def mno_ldc1_sdc1 : Flag<["-"], "mno-ldc1-sdc1">, Group<m_mips_Features_Group>; 5334def mcheck_zero_division : Flag<["-"], "mcheck-zero-division">, 5335 Group<m_mips_Features_Group>; 5336def mno_check_zero_division : Flag<["-"], "mno-check-zero-division">, 5337 Group<m_mips_Features_Group>; 5338def mfix4300 : Flag<["-"], "mfix4300">, Group<m_mips_Features_Group>; 5339def mcompact_branches_EQ : Joined<["-"], "mcompact-branches=">, 5340 Group<m_mips_Features_Group>; 5341} // let Flags = [TargetSpecific] 5342def mbranch_likely : Flag<["-"], "mbranch-likely">, Group<m_Group>, 5343 IgnoredGCCCompat; 5344def mno_branch_likely : Flag<["-"], "mno-branch-likely">, Group<m_Group>, 5345 IgnoredGCCCompat; 5346let Flags = [TargetSpecific] in { 5347def mindirect_jump_EQ : Joined<["-"], "mindirect-jump=">, 5348 Group<m_mips_Features_Group>, 5349 HelpText<"Change indirect jump instructions to inhibit speculation">; 5350def mdsp : Flag<["-"], "mdsp">, Group<m_mips_Features_Group>; 5351def mno_dsp : Flag<["-"], "mno-dsp">, Group<m_mips_Features_Group>; 5352def mdspr2 : Flag<["-"], "mdspr2">, Group<m_mips_Features_Group>; 5353def mno_dspr2 : Flag<["-"], "mno-dspr2">, Group<m_mips_Features_Group>; 5354def msingle_float : Flag<["-"], "msingle-float">, Group<m_Group>; 5355def mdouble_float : Flag<["-"], "mdouble-float">, Group<m_Group>; 5356def mmadd4 : Flag<["-"], "mmadd4">, Group<m_mips_Features_Group>, 5357 HelpText<"Enable the generation of 4-operand madd.s, madd.d and related instructions.">; 5358def mno_madd4 : Flag<["-"], "mno-madd4">, Group<m_mips_Features_Group>, 5359 HelpText<"Disable the generation of 4-operand madd.s, madd.d and related instructions.">; 5360def mmsa : Flag<["-"], "mmsa">, Group<m_mips_Features_Group>, 5361 HelpText<"Enable MSA ASE (MIPS only)">; 5362def mno_msa : Flag<["-"], "mno-msa">, Group<m_mips_Features_Group>, 5363 HelpText<"Disable MSA ASE (MIPS only)">; 5364def mmt : Flag<["-"], "mmt">, Group<m_mips_Features_Group>, 5365 HelpText<"Enable MT ASE (MIPS only)">; 5366def mno_mt : Flag<["-"], "mno-mt">, Group<m_mips_Features_Group>, 5367 HelpText<"Disable MT ASE (MIPS only)">; 5368def mfp64 : Flag<["-"], "mfp64">, Group<m_mips_Features_Group>, 5369 HelpText<"Use 64-bit floating point registers (MIPS only)">; 5370def mfp32 : Flag<["-"], "mfp32">, Group<m_mips_Features_Group>, 5371 HelpText<"Use 32-bit floating point registers (MIPS only)">; 5372def mgpopt : Flag<["-"], "mgpopt">, Group<m_mips_Features_Group>, 5373 HelpText<"Use GP relative accesses for symbols known to be in a small" 5374 " data section (MIPS)">; 5375def mno_gpopt : Flag<["-"], "mno-gpopt">, Group<m_mips_Features_Group>, 5376 HelpText<"Do not use GP relative accesses for symbols known to be in a small" 5377 " data section (MIPS)">; 5378def mlocal_sdata : Flag<["-"], "mlocal-sdata">, 5379 Group<m_mips_Features_Group>, 5380 HelpText<"Extend the -G behaviour to object local data (MIPS)">; 5381def mno_local_sdata : Flag<["-"], "mno-local-sdata">, 5382 Group<m_mips_Features_Group>, 5383 HelpText<"Do not extend the -G behaviour to object local data (MIPS)">; 5384def mextern_sdata : Flag<["-"], "mextern-sdata">, 5385 Group<m_mips_Features_Group>, 5386 HelpText<"Assume that externally defined data is in the small data if it" 5387 " meets the -G <size> threshold (MIPS)">; 5388def mno_extern_sdata : Flag<["-"], "mno-extern-sdata">, 5389 Group<m_mips_Features_Group>, 5390 HelpText<"Do not assume that externally defined data is in the small data if" 5391 " it meets the -G <size> threshold (MIPS)">; 5392def membedded_data : Flag<["-"], "membedded-data">, 5393 Group<m_mips_Features_Group>, 5394 HelpText<"Place constants in the .rodata section instead of the .sdata " 5395 "section even if they meet the -G <size> threshold (MIPS)">; 5396def mno_embedded_data : Flag<["-"], "mno-embedded-data">, 5397 Group<m_mips_Features_Group>, 5398 HelpText<"Do not place constants in the .rodata section instead of the " 5399 ".sdata if they meet the -G <size> threshold (MIPS)">; 5400def mnan_EQ : Joined<["-"], "mnan=">, Group<m_mips_Features_Group>; 5401def mabs_EQ : Joined<["-"], "mabs=">, Group<m_mips_Features_Group>; 5402def mabicalls : Flag<["-"], "mabicalls">, Group<m_mips_Features_Group>, 5403 HelpText<"Enable SVR4-style position-independent code (Mips only)">; 5404def mno_abicalls : Flag<["-"], "mno-abicalls">, Group<m_mips_Features_Group>, 5405 HelpText<"Disable SVR4-style position-independent code (Mips only)">; 5406def mno_crc : Flag<["-"], "mno-crc">, Group<m_mips_Features_Group>, 5407 HelpText<"Disallow use of CRC instructions (Mips only)">; 5408def mvirt : Flag<["-"], "mvirt">, Group<m_mips_Features_Group>; 5409def mno_virt : Flag<["-"], "mno-virt">, Group<m_mips_Features_Group>; 5410def mginv : Flag<["-"], "mginv">, Group<m_mips_Features_Group>; 5411def mno_ginv : Flag<["-"], "mno-ginv">, Group<m_mips_Features_Group>; 5412} // let Flags = [TargetSpecific] 5413def mips1 : Flag<["-"], "mips1">, 5414 Alias<march_EQ>, AliasArgs<["mips1"]>, Group<m_mips_Features_Group>, 5415 HelpText<"Equivalent to -march=mips1">, Flags<[HelpHidden]>; 5416def mips2 : Flag<["-"], "mips2">, 5417 Alias<march_EQ>, AliasArgs<["mips2"]>, Group<m_mips_Features_Group>, 5418 HelpText<"Equivalent to -march=mips2">, Flags<[HelpHidden]>; 5419def mips3 : Flag<["-"], "mips3">, 5420 Alias<march_EQ>, AliasArgs<["mips3"]>, Group<m_mips_Features_Group>, 5421 HelpText<"Equivalent to -march=mips3">, Flags<[HelpHidden]>; 5422def mips4 : Flag<["-"], "mips4">, 5423 Alias<march_EQ>, AliasArgs<["mips4"]>, Group<m_mips_Features_Group>, 5424 HelpText<"Equivalent to -march=mips4">, Flags<[HelpHidden]>; 5425def mips5 : Flag<["-"], "mips5">, 5426 Alias<march_EQ>, AliasArgs<["mips5"]>, Group<m_mips_Features_Group>, 5427 HelpText<"Equivalent to -march=mips5">, Flags<[HelpHidden]>; 5428def mips32 : Flag<["-"], "mips32">, 5429 Alias<march_EQ>, AliasArgs<["mips32"]>, Group<m_mips_Features_Group>, 5430 HelpText<"Equivalent to -march=mips32">, Flags<[HelpHidden]>; 5431def mips32r2 : Flag<["-"], "mips32r2">, 5432 Alias<march_EQ>, AliasArgs<["mips32r2"]>, Group<m_mips_Features_Group>, 5433 HelpText<"Equivalent to -march=mips32r2">, Flags<[HelpHidden]>; 5434def mips32r3 : Flag<["-"], "mips32r3">, 5435 Alias<march_EQ>, AliasArgs<["mips32r3"]>, Group<m_mips_Features_Group>, 5436 HelpText<"Equivalent to -march=mips32r3">, Flags<[HelpHidden]>; 5437def mips32r5 : Flag<["-"], "mips32r5">, 5438 Alias<march_EQ>, AliasArgs<["mips32r5"]>, Group<m_mips_Features_Group>, 5439 HelpText<"Equivalent to -march=mips32r5">, Flags<[HelpHidden]>; 5440def mips32r6 : Flag<["-"], "mips32r6">, 5441 Alias<march_EQ>, AliasArgs<["mips32r6"]>, Group<m_mips_Features_Group>, 5442 HelpText<"Equivalent to -march=mips32r6">, Flags<[HelpHidden]>; 5443def mips64 : Flag<["-"], "mips64">, 5444 Alias<march_EQ>, AliasArgs<["mips64"]>, Group<m_mips_Features_Group>, 5445 HelpText<"Equivalent to -march=mips64">, Flags<[HelpHidden]>; 5446def mips64r2 : Flag<["-"], "mips64r2">, 5447 Alias<march_EQ>, AliasArgs<["mips64r2"]>, Group<m_mips_Features_Group>, 5448 HelpText<"Equivalent to -march=mips64r2">, Flags<[HelpHidden]>; 5449def mips64r3 : Flag<["-"], "mips64r3">, 5450 Alias<march_EQ>, AliasArgs<["mips64r3"]>, Group<m_mips_Features_Group>, 5451 HelpText<"Equivalent to -march=mips64r3">, Flags<[HelpHidden]>; 5452def mips64r5 : Flag<["-"], "mips64r5">, 5453 Alias<march_EQ>, AliasArgs<["mips64r5"]>, Group<m_mips_Features_Group>, 5454 HelpText<"Equivalent to -march=mips64r5">, Flags<[HelpHidden]>; 5455def mips64r6 : Flag<["-"], "mips64r6">, 5456 Alias<march_EQ>, AliasArgs<["mips64r6"]>, Group<m_mips_Features_Group>, 5457 HelpText<"Equivalent to -march=mips64r6">, Flags<[HelpHidden]>; 5458def mfpxx : Flag<["-"], "mfpxx">, Group<m_mips_Features_Group>, 5459 HelpText<"Avoid FPU mode dependent operations when used with the O32 ABI">, 5460 Flags<[HelpHidden]>; 5461def modd_spreg : Flag<["-"], "modd-spreg">, Group<m_mips_Features_Group>, 5462 HelpText<"Enable odd single-precision floating point registers">, 5463 Flags<[HelpHidden]>; 5464def mno_odd_spreg : Flag<["-"], "mno-odd-spreg">, Group<m_mips_Features_Group>, 5465 HelpText<"Disable odd single-precision floating point registers">, 5466 Flags<[HelpHidden]>; 5467def mrelax_pic_calls : Flag<["-"], "mrelax-pic-calls">, 5468 Group<m_mips_Features_Group>, 5469 HelpText<"Produce relaxation hints for linkers to try optimizing PIC " 5470 "call sequences into direct calls (MIPS only)">, Flags<[HelpHidden]>; 5471def mno_relax_pic_calls : Flag<["-"], "mno-relax-pic-calls">, 5472 Group<m_mips_Features_Group>, 5473 HelpText<"Do not produce relaxation hints for linkers to try optimizing PIC " 5474 "call sequences into direct calls (MIPS only)">, Flags<[HelpHidden]>; 5475def mglibc : Flag<["-"], "mglibc">, Group<m_libc_Group>, Flags<[HelpHidden]>; 5476def muclibc : Flag<["-"], "muclibc">, Group<m_libc_Group>, Flags<[HelpHidden]>; 5477def module_file_info : Flag<["-"], "module-file-info">, Flags<[]>, 5478 Visibility<[ClangOption, CC1Option]>, Group<Action_Group>, 5479 HelpText<"Provide information about a particular module file">; 5480def mthumb : Flag<["-"], "mthumb">, Group<m_Group>; 5481def mtune_EQ : Joined<["-"], "mtune=">, Group<m_Group>, 5482 Visibility<[ClangOption, FlangOption]>, 5483 HelpText<"Only supported on AArch64, PowerPC, RISC-V, SPARC, SystemZ, and X86">; 5484def multi__module : Flag<["-"], "multi_module">; 5485def multiply__defined__unused : Separate<["-"], "multiply_defined_unused">; 5486def multiply__defined : Separate<["-"], "multiply_defined">; 5487def mwarn_nonportable_cfstrings : Flag<["-"], "mwarn-nonportable-cfstrings">, Group<m_Group>; 5488def canonical_prefixes : Flag<["-"], "canonical-prefixes">, 5489 Flags<[HelpHidden]>, Visibility<[ClangOption, CLOption, DXCOption]>, 5490 HelpText<"Use absolute paths for invoking subcommands (default)">; 5491def no_canonical_prefixes : Flag<["-"], "no-canonical-prefixes">, 5492 Flags<[HelpHidden]>, Visibility<[ClangOption, CLOption, DXCOption]>, 5493 HelpText<"Use relative paths for invoking subcommands">; 5494def no_cpp_precomp : Flag<["-"], "no-cpp-precomp">, Group<clang_ignored_f_Group>; 5495def no_integrated_cpp : Flag<["-", "--"], "no-integrated-cpp">; 5496def no_pedantic : Flag<["-", "--"], "no-pedantic">, Group<pedantic_Group>; 5497def no__dead__strip__inits__and__terms : Flag<["-"], "no_dead_strip_inits_and_terms">; 5498def nobuiltininc : Flag<["-"], "nobuiltininc">, 5499 Visibility<[ClangOption, CC1Option, CLOption, DXCOption]>, 5500 Group<IncludePath_Group>, 5501 HelpText<"Disable builtin #include directories">, 5502 MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseBuiltinIncludes">>; 5503def nogpuinc : Flag<["-"], "nogpuinc">, Group<IncludePath_Group>, 5504 HelpText<"Do not add include paths for CUDA/HIP and" 5505 " do not include the default CUDA/HIP wrapper headers">; 5506def nohipwrapperinc : Flag<["-"], "nohipwrapperinc">, Group<IncludePath_Group>, 5507 HelpText<"Do not include the default HIP wrapper headers and include paths">; 5508def : Flag<["-"], "nocudainc">, Alias<nogpuinc>; 5509def nogpulib : Flag<["-"], "nogpulib">, MarshallingInfoFlag<LangOpts<"NoGPULib">>, 5510 Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, 5511 HelpText<"Do not link device library for CUDA/HIP device compilation">; 5512def : Flag<["-"], "nocudalib">, Alias<nogpulib>; 5513def gpulibc : Flag<["-"], "gpulibc">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, 5514 HelpText<"Link the LLVM C Library for GPUs">; 5515def nogpulibc : Flag<["-"], "nogpulibc">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>; 5516def nodefaultlibs : Flag<["-"], "nodefaultlibs">; 5517def nodriverkitlib : Flag<["-"], "nodriverkitlib">; 5518def nofixprebinding : Flag<["-"], "nofixprebinding">; 5519def nolibc : Flag<["-"], "nolibc">; 5520def nomultidefs : Flag<["-"], "nomultidefs">; 5521def nopie : Flag<["-"], "nopie">, Visibility<[ClangOption, FlangOption]>, Flags<[TargetSpecific]>; // OpenBSD 5522def no_pie : Flag<["-"], "no-pie">, Visibility<[ClangOption, FlangOption]>; 5523def noprebind : Flag<["-"], "noprebind">; 5524def noprofilelib : Flag<["-"], "noprofilelib">; 5525def noseglinkedit : Flag<["-"], "noseglinkedit">; 5526def nostartfiles : Flag<["-"], "nostartfiles">, Group<Link_Group>; 5527def nostdinc : Flag<["-"], "nostdinc">, 5528 Visibility<[ClangOption, CLOption, DXCOption]>, Group<IncludePath_Group>; 5529def nostdlibinc : Flag<["-"], "nostdlibinc">, Group<IncludePath_Group>; 5530def nostdincxx : Flag<["-"], "nostdinc++">, Visibility<[ClangOption, CC1Option]>, 5531 Group<IncludePath_Group>, 5532 HelpText<"Disable standard #include directories for the C++ standard library">, 5533 MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseStandardCXXIncludes">>; 5534def nostdlib : Flag<["-"], "nostdlib">, Group<Link_Group>; 5535def nostdlibxx : Flag<["-"], "nostdlib++">; 5536def object : Flag<["-"], "object">; 5537def o : JoinedOrSeparate<["-"], "o">, 5538 Flags<[NoXarchOption]>, 5539 Visibility<[ClangOption, CC1Option, CC1AsOption, FC1Option, FlangOption]>, 5540 HelpText<"Write output to <file>">, MetaVarName<"<file>">, 5541 MarshallingInfoString<FrontendOpts<"OutputFile">>; 5542def object_file_name_EQ : Joined<["-"], "object-file-name=">, 5543 Visibility<[ClangOption, CC1Option, CC1AsOption, CLOption, DXCOption]>, 5544 HelpText<"Set the output <file> for debug infos">, MetaVarName<"<file>">, 5545 MarshallingInfoString<CodeGenOpts<"ObjectFilenameForDebug">>; 5546def object_file_name : Separate<["-"], "object-file-name">, 5547 Visibility<[ClangOption, CC1Option, CC1AsOption, CLOption, DXCOption]>, 5548 Alias<object_file_name_EQ>; 5549def pagezero__size : JoinedOrSeparate<["-"], "pagezero_size">; 5550def pass_exit_codes : Flag<["-", "--"], "pass-exit-codes">, Flags<[Unsupported]>; 5551def pedantic_errors : Flag<["-", "--"], "pedantic-errors">, Group<pedantic_Group>, 5552 Visibility<[ClangOption, CC1Option]>, 5553 MarshallingInfoFlag<DiagnosticOpts<"PedanticErrors">>; 5554def pedantic : Flag<["-", "--"], "pedantic">, Group<pedantic_Group>, 5555 Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, 5556 HelpText<"Warn on language extensions">, MarshallingInfoFlag<DiagnosticOpts<"Pedantic">>; 5557def p : Flag<["-"], "p">, HelpText<"Enable mcount instrumentation with prof">; 5558def pg : Flag<["-"], "pg">, HelpText<"Enable mcount instrumentation">, 5559 Visibility<[ClangOption, CC1Option]>, 5560 MarshallingInfoFlag<CodeGenOpts<"InstrumentForProfiling">>; 5561def pipe : Flag<["-", "--"], "pipe">, 5562 HelpText<"Use pipes between commands, when possible">; 5563def prebind__all__twolevel__modules : Flag<["-"], "prebind_all_twolevel_modules">; 5564def prebind : Flag<["-"], "prebind">; 5565def preload : Flag<["-"], "preload">; 5566def print_file_name_EQ : Joined<["-", "--"], "print-file-name=">, 5567 HelpText<"Print the full library path of <file>">, MetaVarName<"<file>">, 5568 Visibility<[ClangOption, CLOption]>; 5569def print_ivar_layout : Flag<["-"], "print-ivar-layout">, 5570 Visibility<[ClangOption, CC1Option]>, 5571 HelpText<"Enable Objective-C Ivar layout bitmap print trace">, 5572 MarshallingInfoFlag<LangOpts<"ObjCGCBitmapPrint">>; 5573def print_libgcc_file_name : Flag<["-", "--"], "print-libgcc-file-name">, 5574 HelpText<"Print the library path for the currently used compiler runtime " 5575 "library (\"libgcc.a\" or \"libclang_rt.builtins.*.a\")">, 5576 Visibility<[ClangOption, CLOption]>; 5577def print_multi_directory : Flag<["-", "--"], "print-multi-directory">; 5578def print_multi_lib : Flag<["-", "--"], "print-multi-lib">; 5579def print_multi_flags : Flag<["-", "--"], "print-multi-flags-experimental">, 5580 HelpText<"Print the flags used for selecting multilibs (experimental)">; 5581def print_multi_os_directory : Flag<["-", "--"], "print-multi-os-directory">, 5582 Flags<[Unsupported]>; 5583def print_target_triple : Flag<["-", "--"], "print-target-triple">, 5584 HelpText<"Print the normalized target triple">, 5585 Visibility<[ClangOption, FlangOption, CLOption]>; 5586def print_effective_triple : Flag<["-", "--"], "print-effective-triple">, 5587 HelpText<"Print the effective target triple">, 5588 Visibility<[ClangOption, FlangOption, CLOption]>; 5589// GCC --disable-multiarch, GCC --enable-multiarch (upstream and Debian 5590// specific) have different behaviors. We choose not to support the option. 5591def : Flag<["-", "--"], "print-multiarch">, Flags<[Unsupported]>; 5592def print_prog_name_EQ : Joined<["-", "--"], "print-prog-name=">, 5593 HelpText<"Print the full program path of <name>">, MetaVarName<"<name>">, 5594 Visibility<[ClangOption, CLOption]>; 5595def print_resource_dir : Flag<["-", "--"], "print-resource-dir">, 5596 HelpText<"Print the resource directory pathname">, 5597 HelpTextForVariants<[FlangOption], 5598 "Print the resource directory pathname that contains lib and " 5599 "include directories with the runtime libraries and MODULE files.">, 5600 Visibility<[ClangOption, CLOption, FlangOption]>; 5601def print_search_dirs : Flag<["-", "--"], "print-search-dirs">, 5602 HelpText<"Print the paths used for finding libraries and programs">, 5603 Visibility<[ClangOption, CLOption]>; 5604def print_std_module_manifest_path : Flag<["-", "--"], "print-library-module-manifest-path">, 5605 HelpText<"Print the path for the C++ Standard library module manifest">, 5606 Visibility<[ClangOption, CLOption]>; 5607def print_targets : Flag<["-", "--"], "print-targets">, 5608 HelpText<"Print the registered targets">, 5609 Visibility<[ClangOption, CLOption]>; 5610def print_rocm_search_dirs : Flag<["-", "--"], "print-rocm-search-dirs">, 5611 HelpText<"Print the paths used for finding ROCm installation">, 5612 Visibility<[ClangOption, CLOption]>; 5613def print_runtime_dir : Flag<["-", "--"], "print-runtime-dir">, 5614 HelpText<"Print the directory pathname containing Clang's runtime libraries">, 5615 Visibility<[ClangOption, CLOption]>; 5616def print_diagnostic_options : Flag<["-", "--"], "print-diagnostic-options">, 5617 HelpText<"Print all of Clang's warning options">, 5618 Visibility<[ClangOption, CLOption]>; 5619def private__bundle : Flag<["-"], "private_bundle">; 5620def pthreads : Flag<["-"], "pthreads">; 5621defm pthread : BoolOption<"", "pthread", 5622 LangOpts<"POSIXThreads">, DefaultFalse, 5623 PosFlag<SetTrue, [], [ClangOption], "Support POSIX threads in generated code">, 5624 NegFlag<SetFalse>, 5625 BothFlags<[], [ClangOption, CC1Option, FlangOption, FC1Option]>>; 5626def pie : Flag<["-"], "pie">, Group<Link_Group>; 5627def static_pie : Flag<["-"], "static-pie">, Group<Link_Group>; 5628def read__only__relocs : Separate<["-"], "read_only_relocs">; 5629def remap : Flag<["-"], "remap">; 5630def rewrite_objc : Flag<["-"], "rewrite-objc">, Flags<[NoXarchOption]>, 5631 Visibility<[ClangOption, CC1Option]>, 5632 HelpText<"Rewrite Objective-C source to C++">, Group<Action_Group>; 5633def rewrite_legacy_objc : Flag<["-"], "rewrite-legacy-objc">, 5634 Flags<[NoXarchOption]>, 5635 HelpText<"Rewrite Legacy Objective-C source to C++">; 5636def rdynamic : Flag<["-"], "rdynamic">, Group<Link_Group>, 5637 Visibility<[ClangOption, FlangOption]>; 5638def resource_dir : Separate<["-"], "resource-dir">, 5639 Flags<[NoXarchOption, HelpHidden]>, 5640 Visibility<[ClangOption, CC1Option, CLOption, DXCOption, FlangOption, FC1Option]>, 5641 HelpText<"The directory which holds the compiler resource files">, 5642 MarshallingInfoString<HeaderSearchOpts<"ResourceDir">>; 5643def resource_dir_EQ : Joined<["-"], "resource-dir=">, Flags<[NoXarchOption]>, 5644 Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, 5645 Alias<resource_dir>; 5646def rpath : Separate<["-"], "rpath">, Flags<[LinkerInput]>, Group<Link_Group>, 5647 Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>; 5648def rtlib_EQ : Joined<["-", "--"], "rtlib=">, Visibility<[ClangOption, CLOption, FlangOption]>, 5649 HelpText<"Compiler runtime library to use">; 5650def frtlib_add_rpath: Flag<["-"], "frtlib-add-rpath">, Flags<[NoArgumentUnused]>, 5651 Visibility<[ClangOption, FlangOption]>, 5652 HelpText<"Add -rpath with architecture-specific resource directory to the linker flags. " 5653 "When --hip-link is specified, also add -rpath with HIP runtime library directory to the linker flags">; 5654def fno_rtlib_add_rpath: Flag<["-"], "fno-rtlib-add-rpath">, 5655 Flags<[NoArgumentUnused]>, 5656 Visibility<[ClangOption, FlangOption]>, 5657 HelpText<"Do not add -rpath with architecture-specific resource directory to the linker flags. " 5658 "When --hip-link is specified, do not add -rpath with HIP runtime library directory to the linker flags">; 5659def frtlib_defaultlib : Flag<["-"], "frtlib-defaultlib">, 5660 Visibility<[ClangOption, CLOption]>, 5661 Group<f_Group>, 5662 HelpText<"On Windows, emit /defaultlib: directives to link compiler-rt libraries (default)">; 5663def fno_rtlib_defaultlib : Flag<["-"], "fno-rtlib-defaultlib">, 5664 Visibility<[ClangOption, CLOption]>, 5665 Group<f_Group>, 5666 HelpText<"On Windows, do not emit /defaultlib: directives to link compiler-rt libraries">; 5667def offload_add_rpath: Flag<["--"], "offload-add-rpath">, 5668 Flags<[NoArgumentUnused]>, 5669 Alias<frtlib_add_rpath>; 5670def no_offload_add_rpath: Flag<["--"], "no-offload-add-rpath">, 5671 Flags<[NoArgumentUnused]>, 5672 Alias<frtlib_add_rpath>; 5673def r : Flag<["-"], "r">, Flags<[LinkerInput, NoArgumentUnused]>, 5674 Group<Link_Group>; 5675def regcall4 : Flag<["-"], "regcall4">, Group<m_Group>, 5676 Visibility<[ClangOption, CC1Option]>, 5677 HelpText<"Set __regcall4 as a default calling convention to respect __regcall ABI v.4">, 5678 MarshallingInfoFlag<LangOpts<"RegCall4">>; 5679def save_temps_EQ : Joined<["-", "--"], "save-temps=">, Flags<[NoXarchOption]>, 5680 Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, 5681 HelpText<"Save intermediate compilation results. <arg> can be set to 'cwd' for " 5682 "current working directory, or 'obj' which will save temporary files in the " 5683 "same directory as the final output file">; 5684def save_temps : Flag<["-", "--"], "save-temps">, Flags<[NoXarchOption]>, 5685 Visibility<[ClangOption, FlangOption, FC1Option]>, 5686 Alias<save_temps_EQ>, AliasArgs<["cwd"]>, 5687 HelpText<"Alias for --save-temps=cwd">; 5688def save_stats_EQ : Joined<["-", "--"], "save-stats=">, Flags<[NoXarchOption]>, 5689 HelpText<"Save llvm statistics.">; 5690def save_stats : Flag<["-", "--"], "save-stats">, Flags<[NoXarchOption]>, 5691 Alias<save_stats_EQ>, AliasArgs<["cwd"]>, 5692 HelpText<"Save llvm statistics.">; 5693def via_file_asm : Flag<["-", "--"], "via-file-asm">, InternalDebugOpt, 5694 HelpText<"Write assembly to file for input to assemble jobs">; 5695def sectalign : MultiArg<["-"], "sectalign", 3>; 5696def sectcreate : MultiArg<["-"], "sectcreate", 3>; 5697def sectobjectsymbols : MultiArg<["-"], "sectobjectsymbols", 2>; 5698def sectorder : MultiArg<["-"], "sectorder", 3>; 5699def seg1addr : JoinedOrSeparate<["-"], "seg1addr">; 5700def seg__addr__table__filename : Separate<["-"], "seg_addr_table_filename">; 5701def seg__addr__table : Separate<["-"], "seg_addr_table">; 5702def segaddr : MultiArg<["-"], "segaddr", 2>; 5703def segcreate : MultiArg<["-"], "segcreate", 3>; 5704def seglinkedit : Flag<["-"], "seglinkedit">; 5705def segprot : MultiArg<["-"], "segprot", 3>; 5706def segs__read__only__addr : Separate<["-"], "segs_read_only_addr">; 5707def segs__read__write__addr : Separate<["-"], "segs_read_write_addr">; 5708def segs__read__ : Joined<["-"], "segs_read_">; 5709def shared_libgcc : Flag<["-"], "shared-libgcc">; 5710def shared : Flag<["-", "--"], "shared">, Group<Link_Group>, 5711 Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>; 5712def single__module : Flag<["-"], "single_module">; 5713def specs_EQ : Joined<["-", "--"], "specs=">, Group<Link_Group>; 5714def specs : Separate<["-", "--"], "specs">, Flags<[Unsupported]>; 5715def start_no_unused_arguments : Flag<["--"], "start-no-unused-arguments">, 5716 Visibility<[ClangOption, CLOption, DXCOption]>, 5717 HelpText<"Don't emit warnings about unused arguments for the following arguments">; 5718def static_libgcc : Flag<["-"], "static-libgcc">; 5719def static_libstdcxx : Flag<["-"], "static-libstdc++">; 5720def static : Flag<["-", "--"], "static">, Group<Link_Group>, 5721 Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, 5722 Flags<[NoArgumentUnused]>; 5723def std_default_EQ : Joined<["-"], "std-default=">; 5724def std_EQ : Joined<["-", "--"], "std=">, 5725 Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, 5726 Group<CompileOnly_Group>, HelpText<"Language standard to compile for">, 5727 ValuesCode<[{ 5728 static constexpr const char VALUES_CODE [] = 5729 #define LANGSTANDARD(id, name, lang, desc, features) name "," 5730 #define LANGSTANDARD_ALIAS(id, alias) alias "," 5731 #include "clang/Basic/LangStandards.def" 5732 ; 5733 }]>; 5734def stdlib_EQ : Joined<["-", "--"], "stdlib=">, 5735 Visibility<[ClangOption, CC1Option]>, 5736 HelpText<"C++ standard library to use">, Values<"libc++,libstdc++,platform">; 5737def stdlibxx_isystem : JoinedOrSeparate<["-"], "stdlib++-isystem">, 5738 Group<clang_i_Group>, 5739 HelpText<"Use directory as the C++ standard library include path">, 5740 Flags<[NoXarchOption]>, MetaVarName<"<directory>">; 5741def unwindlib_EQ : Joined<["-", "--"], "unwindlib=">, 5742 Visibility<[ClangOption, CC1Option]>, 5743 HelpText<"Unwind library to use">, Values<"libgcc,unwindlib,platform">; 5744def sub__library : JoinedOrSeparate<["-"], "sub_library">; 5745def sub__umbrella : JoinedOrSeparate<["-"], "sub_umbrella">; 5746def system_header_prefix : Joined<["--"], "system-header-prefix=">, 5747 Group<clang_i_Group>, Visibility<[ClangOption, CC1Option]>, 5748 MetaVarName<"<prefix>">, 5749 HelpText<"Treat all #include paths starting with <prefix> as including a " 5750 "system header.">; 5751def : Separate<["--"], "system-header-prefix">, Alias<system_header_prefix>; 5752def no_system_header_prefix : Joined<["--"], "no-system-header-prefix=">, 5753 Group<clang_i_Group>, Visibility<[ClangOption, CC1Option]>, 5754 MetaVarName<"<prefix>">, 5755 HelpText<"Treat all #include paths starting with <prefix> as not including a " 5756 "system header.">; 5757def : Separate<["--"], "no-system-header-prefix">, Alias<no_system_header_prefix>; 5758def s : Flag<["-"], "s">, Group<Link_Group>; 5759def target : Joined<["--"], "target=">, Flags<[NoXarchOption]>, 5760 Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, 5761 HelpText<"Generate code for the given target">; 5762def darwin_target_variant : Separate<["-"], "darwin-target-variant">, 5763 Flags<[NoXarchOption]>, Visibility<[ClangOption, CLOption]>, 5764 HelpText<"Generate code for an additional runtime variant of the deployment target">; 5765def print_supported_cpus : Flag<["-", "--"], "print-supported-cpus">, 5766 Group<CompileOnly_Group>, 5767 Visibility<[ClangOption, CC1Option, CLOption]>, 5768 HelpText<"Print supported cpu models for the given target (if target is not specified," 5769 " it will print the supported cpus for the default target)">, 5770 MarshallingInfoFlag<FrontendOpts<"PrintSupportedCPUs">>; 5771def print_supported_extensions : Flag<["-", "--"], "print-supported-extensions">, 5772 Visibility<[ClangOption, CC1Option, CLOption]>, 5773 HelpText<"Print supported -march extensions (RISC-V, AArch64 and ARM only)">, 5774 MarshallingInfoFlag<FrontendOpts<"PrintSupportedExtensions">>; 5775def print_enabled_extensions : Flag<["-", "--"], "print-enabled-extensions">, 5776 Visibility<[ClangOption, CC1Option, CLOption]>, 5777 HelpText<"Print the extensions enabled by the given target and -march/-mcpu options." 5778 " (AArch64 and RISC-V only)">, 5779 MarshallingInfoFlag<FrontendOpts<"PrintEnabledExtensions">>; 5780def : Flag<["-"], "mcpu=help">, Alias<print_supported_cpus>; 5781def : Flag<["-"], "mtune=help">, Alias<print_supported_cpus>; 5782def time : Flag<["-"], "time">, 5783 HelpText<"Time individual commands">; 5784def traditional_cpp : Flag<["-", "--"], "traditional-cpp">, 5785 Visibility<[ClangOption, CC1Option]>, 5786 HelpText<"Enable some traditional CPP emulation">, 5787 MarshallingInfoFlag<LangOpts<"TraditionalCPP">>; 5788def traditional : Flag<["-", "--"], "traditional">; 5789def trigraphs : Flag<["-", "--"], "trigraphs">, Alias<ftrigraphs>, 5790 HelpText<"Process trigraph sequences">; 5791def twolevel__namespace__hints : Flag<["-"], "twolevel_namespace_hints">; 5792def twolevel__namespace : Flag<["-"], "twolevel_namespace">; 5793def t : Flag<["-"], "t">, Group<Link_Group>; 5794def umbrella : Separate<["-"], "umbrella">; 5795def undefined : JoinedOrSeparate<["-"], "undefined">, Group<u_Group>; 5796def undef : Flag<["-"], "undef">, Group<u_Group>, 5797 Visibility<[ClangOption, CC1Option]>, 5798 HelpText<"undef all system defines">, 5799 MarshallingInfoNegativeFlag<PreprocessorOpts<"UsePredefines">>; 5800def unexported__symbols__list : Separate<["-"], "unexported_symbols_list">; 5801def u : JoinedOrSeparate<["-"], "u">, Group<u_Group>; 5802def v : Flag<["-"], "v">, 5803 Visibility<[ClangOption, CC1Option, CLOption, DXCOption, FlangOption]>, 5804 HelpText<"Show commands to run and use verbose output">, 5805 MarshallingInfoFlag<HeaderSearchOpts<"Verbose">>; 5806def altivec_src_compat : Joined<["-"], "faltivec-src-compat=">, 5807 Visibility<[ClangOption, CC1Option]>, Group<f_Group>, 5808 HelpText<"Source-level compatibility for Altivec vectors (for PowerPC " 5809 "targets). This includes results of vector comparison (scalar for " 5810 "'xl', vector for 'gcc') as well as behavior when initializing with " 5811 "a scalar (splatting for 'xl', element zero only for 'gcc'). For " 5812 "'mixed', the compatibility is as 'gcc' for 'vector bool/vector " 5813 "pixel' and as 'xl' for other types. Current default is 'mixed'.">, 5814 Values<"mixed,gcc,xl">, 5815 NormalizedValuesScope<"LangOptions::AltivecSrcCompatKind">, 5816 NormalizedValues<["Mixed", "GCC", "XL"]>, 5817 MarshallingInfoEnum<LangOpts<"AltivecSrcCompat">, "Mixed">; 5818def verify_debug_info : Flag<["--"], "verify-debug-info">, 5819 Flags<[NoXarchOption]>, 5820 HelpText<"Verify the binary representation of debug output">; 5821def weak_l : Joined<["-"], "weak-l">, Flags<[LinkerInput]>; 5822def weak__framework : Separate<["-"], "weak_framework">, Flags<[LinkerInput]>; 5823def weak__library : Separate<["-"], "weak_library">, Flags<[LinkerInput]>; 5824def weak__reference__mismatches : Separate<["-"], "weak_reference_mismatches">; 5825def whatsloaded : Flag<["-"], "whatsloaded">; 5826def why_load : Flag<["-"], "why_load">; 5827def whyload : Flag<["-"], "whyload">, Alias<why_load>; 5828def w : Flag<["-"], "w">, HelpText<"Suppress all warnings">, 5829 Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, 5830 MarshallingInfoFlag<DiagnosticOpts<"IgnoreWarnings">>; 5831def x : JoinedOrSeparate<["-"], "x">, 5832Flags<[NoXarchOption]>, 5833 Visibility<[ClangOption, CC1Option, FlangOption, FC1Option, CLOption]>, 5834 HelpText<"Treat subsequent input files as having type <language>">, 5835 MetaVarName<"<language>">; 5836def y : Joined<["-"], "y">; 5837 5838defm integrated_as : BoolFOption<"integrated-as", 5839 CodeGenOpts<"DisableIntegratedAS">, DefaultFalse, 5840 NegFlag<SetTrue, [], [ClangOption, CC1Option, FlangOption], "Disable">, 5841 PosFlag<SetFalse, [], [ClangOption, CC1Option, FlangOption], "Enable">, 5842 BothFlags<[], [ClangOption], " the integrated assembler">>; 5843 5844def fintegrated_cc1 : Flag<["-"], "fintegrated-cc1">, 5845 Visibility<[ClangOption, CLOption, DXCOption]>, 5846 Group<f_Group>, 5847 HelpText<"Run cc1 in-process">; 5848def fno_integrated_cc1 : Flag<["-"], "fno-integrated-cc1">, 5849 Visibility<[ClangOption, CLOption, DXCOption]>, 5850 Group<f_Group>, 5851 HelpText<"Spawn a separate process for each cc1">; 5852 5853def fintegrated_objemitter : Flag<["-"], "fintegrated-objemitter">, 5854 Visibility<[ClangOption, CLOption]>, 5855 Group<f_Group>, 5856 HelpText<"Use internal machine object code emitter.">; 5857def fno_integrated_objemitter : Flag<["-"], "fno-integrated-objemitter">, 5858 Visibility<[ClangOption, CLOption]>, 5859 Group<f_Group>, 5860 HelpText<"Use external machine object code emitter.">; 5861 5862def : Flag<["-"], "integrated-as">, Alias<fintegrated_as>; 5863def : Flag<["-"], "no-integrated-as">, Alias<fno_integrated_as>, 5864 Visibility<[ClangOption, CC1Option, FlangOption]>; 5865 5866def working_directory : Separate<["-"], "working-directory">, 5867 Visibility<[ClangOption, CC1Option]>, 5868 HelpText<"Resolve file paths relative to the specified directory">, 5869 MarshallingInfoString<FileSystemOpts<"WorkingDir">>; 5870def working_directory_EQ : Joined<["-"], "working-directory=">, 5871 Visibility<[ClangOption, CC1Option]>, 5872 Alias<working_directory>; 5873 5874// Double dash options, which are usually an alias for one of the previous 5875// options. 5876 5877def _mhwdiv_EQ : Joined<["--"], "mhwdiv=">, Alias<mhwdiv_EQ>; 5878def _mhwdiv : Separate<["--"], "mhwdiv">, Alias<mhwdiv_EQ>; 5879def _CLASSPATH_EQ : Joined<["--"], "CLASSPATH=">, Alias<fclasspath_EQ>; 5880def _CLASSPATH : Separate<["--"], "CLASSPATH">, Alias<fclasspath_EQ>; 5881def _all_warnings : Flag<["--"], "all-warnings">, Alias<Wall>; 5882def _analyzer_no_default_checks : Flag<["--"], "analyzer-no-default-checks">, 5883 Flags<[NoXarchOption]>; 5884def _analyzer_output : JoinedOrSeparate<["--"], "analyzer-output">, 5885 Flags<[NoXarchOption]>, 5886 HelpText<"Static analyzer report output format (html|plist|plist-multi-file|plist-html|sarif|sarif-html|text).">; 5887def _analyze : Flag<["--"], "analyze">, Flags<[NoXarchOption]>, 5888 Visibility<[ClangOption, CLOption]>, 5889 HelpText<"Run the static analyzer">; 5890def _assemble : Flag<["--"], "assemble">, Alias<S>; 5891def _assert_EQ : Joined<["--"], "assert=">, Alias<A>; 5892def _assert : Separate<["--"], "assert">, Alias<A>; 5893def _bootclasspath_EQ : Joined<["--"], "bootclasspath=">, Alias<fbootclasspath_EQ>; 5894def _bootclasspath : Separate<["--"], "bootclasspath">, Alias<fbootclasspath_EQ>; 5895def _classpath_EQ : Joined<["--"], "classpath=">, Alias<fclasspath_EQ>; 5896def _classpath : Separate<["--"], "classpath">, Alias<fclasspath_EQ>; 5897def _comments_in_macros : Flag<["--"], "comments-in-macros">, Alias<CC>; 5898def _comments : Flag<["--"], "comments">, Alias<C>; 5899def _compile : Flag<["--"], "compile">, Alias<c>; 5900def _constant_cfstrings : Flag<["--"], "constant-cfstrings">; 5901def _debug_EQ : Joined<["--"], "debug=">, Alias<g_Flag>; 5902def _debug : Flag<["--"], "debug">, Alias<g_Flag>; 5903def _define_macro_EQ : Joined<["--"], "define-macro=">, Alias<D>; 5904def _define_macro : Separate<["--"], "define-macro">, Alias<D>; 5905def _dependencies : Flag<["--"], "dependencies">, Alias<M>; 5906def _dyld_prefix_EQ : Joined<["--"], "dyld-prefix=">; 5907def _dyld_prefix : Separate<["--"], "dyld-prefix">, Alias<_dyld_prefix_EQ>; 5908def _encoding_EQ : Joined<["--"], "encoding=">, Alias<fencoding_EQ>; 5909def _encoding : Separate<["--"], "encoding">, Alias<fencoding_EQ>; 5910def _entry : Flag<["--"], "entry">, Alias<e>; 5911def _extdirs_EQ : Joined<["--"], "extdirs=">, Alias<fextdirs_EQ>; 5912def _extdirs : Separate<["--"], "extdirs">, Alias<fextdirs_EQ>; 5913def _extra_warnings : Flag<["--"], "extra-warnings">, Alias<W_Joined>; 5914def _for_linker_EQ : Joined<["--"], "for-linker=">, Alias<Xlinker>; 5915def _for_linker : Separate<["--"], "for-linker">, Alias<Xlinker>; 5916def _force_link_EQ : Joined<["--"], "force-link=">, Alias<u>; 5917def _force_link : Separate<["--"], "force-link">, Alias<u>; 5918def _imacros_EQ : Joined<["--"], "imacros=">, Alias<imacros>; 5919def _include_barrier : Flag<["--"], "include-barrier">, Alias<I_>; 5920def _include_directory_after_EQ : Joined<["--"], "include-directory-after=">, Alias<idirafter>; 5921def _include_directory_after : Separate<["--"], "include-directory-after">, Alias<idirafter>; 5922def _include_directory_EQ : Joined<["--"], "include-directory=">, Alias<I>; 5923def _include_directory : Separate<["--"], "include-directory">, Alias<I>; 5924def _include_prefix_EQ : Joined<["--"], "include-prefix=">, Alias<iprefix>; 5925def _include_prefix : Separate<["--"], "include-prefix">, Alias<iprefix>; 5926def _include_with_prefix_after_EQ : Joined<["--"], "include-with-prefix-after=">, Alias<iwithprefix>; 5927def _include_with_prefix_after : Separate<["--"], "include-with-prefix-after">, Alias<iwithprefix>; 5928def _include_with_prefix_before_EQ : Joined<["--"], "include-with-prefix-before=">, Alias<iwithprefixbefore>; 5929def _include_with_prefix_before : Separate<["--"], "include-with-prefix-before">, Alias<iwithprefixbefore>; 5930def _include_with_prefix_EQ : Joined<["--"], "include-with-prefix=">, Alias<iwithprefix>; 5931def _include_with_prefix : Separate<["--"], "include-with-prefix">, Alias<iwithprefix>; 5932def _include_EQ : Joined<["--"], "include=">, Alias<include_>; 5933def _language_EQ : Joined<["--"], "language=">, Alias<x>; 5934def _language : Separate<["--"], "language">, Alias<x>; 5935def _library_directory_EQ : Joined<["--"], "library-directory=">, Alias<L>; 5936def _library_directory : Separate<["--"], "library-directory">, Alias<L>; 5937def _no_line_commands : Flag<["--"], "no-line-commands">, Alias<P>; 5938def _no_standard_includes : Flag<["--"], "no-standard-includes">, Alias<nostdinc>; 5939def _no_standard_libraries : Flag<["--"], "no-standard-libraries">, Alias<nostdlib>; 5940def _no_undefined : Flag<["--"], "no-undefined">, Flags<[LinkerInput]>; 5941def _no_warnings : Flag<["--"], "no-warnings">, Alias<w>; 5942def _optimize_EQ : Joined<["--"], "optimize=">, Alias<O>; 5943def _optimize : Flag<["--"], "optimize">, Alias<O>; 5944def _output_class_directory_EQ : Joined<["--"], "output-class-directory=">, Alias<foutput_class_dir_EQ>; 5945def _output_class_directory : Separate<["--"], "output-class-directory">, Alias<foutput_class_dir_EQ>; 5946def _output_EQ : Joined<["--"], "output=">, Alias<o>; 5947def _output : Separate<["--"], "output">, Alias<o>; 5948def _param : Separate<["--"], "param">, Group<CompileOnly_Group>; 5949def _param_EQ : Joined<["--"], "param=">, Alias<_param>; 5950def _precompile : Flag<["--"], "precompile">, Flags<[NoXarchOption]>, 5951 Visibility<[ClangOption, CLOption]>, 5952 Group<Action_Group>, HelpText<"Only precompile the input">; 5953def _prefix_EQ : Joined<["--"], "prefix=">, Alias<B>; 5954def _prefix : Separate<["--"], "prefix">, Alias<B>; 5955def _preprocess : Flag<["--"], "preprocess">, Alias<E>; 5956def _print_diagnostic_categories : Flag<["--"], "print-diagnostic-categories">; 5957def _print_file_name : Separate<["--"], "print-file-name">, Alias<print_file_name_EQ>; 5958def _print_missing_file_dependencies : Flag<["--"], "print-missing-file-dependencies">, Alias<MG>; 5959def _print_prog_name : Separate<["--"], "print-prog-name">, Alias<print_prog_name_EQ>; 5960def _profile : Flag<["--"], "profile">, Alias<p>; 5961def _resource_EQ : Joined<["--"], "resource=">, Alias<fcompile_resource_EQ>; 5962def _resource : Separate<["--"], "resource">, Alias<fcompile_resource_EQ>; 5963def _rtlib : Separate<["--"], "rtlib">, Alias<rtlib_EQ>; 5964def _serialize_diags : Separate<["-", "--"], "serialize-diagnostics">, 5965 Flags<[NoXarchOption]>, 5966 HelpText<"Serialize compiler diagnostics to a file">; 5967// We give --version different semantics from -version. 5968def _version : Flag<["--"], "version">, 5969 Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, 5970 HelpText<"Print version information">; 5971def _signed_char : Flag<["--"], "signed-char">, Alias<fsigned_char>; 5972def _std : Separate<["--"], "std">, Alias<std_EQ>; 5973def _stdlib : Separate<["--"], "stdlib">, Alias<stdlib_EQ>; 5974def _target_help : Flag<["--"], "target-help">; 5975def _trace_includes : Flag<["--"], "trace-includes">, Alias<H>; 5976def _undefine_macro_EQ : Joined<["--"], "undefine-macro=">, Alias<U>; 5977def _undefine_macro : Separate<["--"], "undefine-macro">, Alias<U>; 5978def _unsigned_char : Flag<["--"], "unsigned-char">, Alias<funsigned_char>; 5979def _user_dependencies : Flag<["--"], "user-dependencies">, Alias<MM>; 5980def _verbose : Flag<["--"], "verbose">, Alias<v>; 5981def _warn__EQ : Joined<["--"], "warn-=">, Alias<W_Joined>; 5982def _warn_ : Joined<["--"], "warn-">, Alias<W_Joined>; 5983def _write_dependencies : Flag<["--"], "write-dependencies">, Alias<MD>; 5984def _write_user_dependencies : Flag<["--"], "write-user-dependencies">, Alias<MMD>; 5985 5986def _help_hidden : Flag<["--"], "help-hidden">, 5987 Visibility<[ClangOption, FlangOption]>, 5988 HelpText<"Display help for hidden options">; 5989def _sysroot_EQ : Joined<["--"], "sysroot=">, Visibility<[ClangOption, FlangOption]>; 5990def _sysroot : Separate<["--"], "sysroot">, Alias<_sysroot_EQ>; 5991 5992//===----------------------------------------------------------------------===// 5993// pie/pic options (clang + flang-new) 5994//===----------------------------------------------------------------------===// 5995let Visibility = [ClangOption, FlangOption] in { 5996 5997def fPIC : Flag<["-"], "fPIC">, Group<f_Group>; 5998def fno_PIC : Flag<["-"], "fno-PIC">, Group<f_Group>; 5999def fPIE : Flag<["-"], "fPIE">, Group<f_Group>; 6000def fno_PIE : Flag<["-"], "fno-PIE">, Group<f_Group>; 6001def fpic : Flag<["-"], "fpic">, Group<f_Group>; 6002def fno_pic : Flag<["-"], "fno-pic">, Group<f_Group>; 6003def fpie : Flag<["-"], "fpie">, Group<f_Group>; 6004def fno_pie : Flag<["-"], "fno-pie">, Group<f_Group>; 6005 6006} // let Vis = [Default, FlangOption] 6007 6008//===----------------------------------------------------------------------===// 6009// Target Options (clang + flang-new) 6010//===----------------------------------------------------------------------===// 6011let Flags = [TargetSpecific] in { 6012let Visibility = [ClangOption, FlangOption] in { 6013 6014def mcpu_EQ : Joined<["-"], "mcpu=">, Group<m_Group>, 6015 HelpText<"For a list of available CPUs for the target use '-mcpu=help'">; 6016def mdynamic_no_pic : Joined<["-"], "mdynamic-no-pic">, Group<m_Group>; 6017 6018} // let Vis = [Default, FlangOption] 6019} // let Flags = [TargetSpecific] 6020 6021// Hexagon feature flags. 6022let Flags = [TargetSpecific] in { 6023def mieee_rnd_near : Flag<["-"], "mieee-rnd-near">, 6024 Group<m_hexagon_Features_Group>; 6025def mv5 : Flag<["-"], "mv5">, Group<m_hexagon_Features_Group>, Alias<mcpu_EQ>, 6026 AliasArgs<["hexagonv5"]>; 6027def mv55 : Flag<["-"], "mv55">, Group<m_hexagon_Features_Group>, 6028 Alias<mcpu_EQ>, AliasArgs<["hexagonv55"]>; 6029def mv60 : Flag<["-"], "mv60">, Group<m_hexagon_Features_Group>, 6030 Alias<mcpu_EQ>, AliasArgs<["hexagonv60"]>; 6031def mv62 : Flag<["-"], "mv62">, Group<m_hexagon_Features_Group>, 6032 Alias<mcpu_EQ>, AliasArgs<["hexagonv62"]>; 6033def mv65 : Flag<["-"], "mv65">, Group<m_hexagon_Features_Group>, 6034 Alias<mcpu_EQ>, AliasArgs<["hexagonv65"]>; 6035def mv66 : Flag<["-"], "mv66">, Group<m_hexagon_Features_Group>, 6036 Alias<mcpu_EQ>, AliasArgs<["hexagonv66"]>; 6037def mv67 : Flag<["-"], "mv67">, Group<m_hexagon_Features_Group>, 6038 Alias<mcpu_EQ>, AliasArgs<["hexagonv67"]>; 6039def mv67t : Flag<["-"], "mv67t">, Group<m_hexagon_Features_Group>, 6040 Alias<mcpu_EQ>, AliasArgs<["hexagonv67t"]>; 6041def mv68 : Flag<["-"], "mv68">, Group<m_hexagon_Features_Group>, 6042 Alias<mcpu_EQ>, AliasArgs<["hexagonv68"]>; 6043def mv69 : Flag<["-"], "mv69">, Group<m_hexagon_Features_Group>, 6044 Alias<mcpu_EQ>, AliasArgs<["hexagonv69"]>; 6045def mv71 : Flag<["-"], "mv71">, Group<m_hexagon_Features_Group>, 6046 Alias<mcpu_EQ>, AliasArgs<["hexagonv71"]>; 6047def mv71t : Flag<["-"], "mv71t">, Group<m_hexagon_Features_Group>, 6048 Alias<mcpu_EQ>, AliasArgs<["hexagonv71t"]>; 6049def mv73 : Flag<["-"], "mv73">, Group<m_hexagon_Features_Group>, 6050 Alias<mcpu_EQ>, AliasArgs<["hexagonv73"]>; 6051def mhexagon_hvx : Flag<["-"], "mhvx">, Group<m_hexagon_Features_HVX_Group>, 6052 HelpText<"Enable Hexagon Vector eXtensions">; 6053def mhexagon_hvx_EQ : Joined<["-"], "mhvx=">, 6054 Group<m_hexagon_Features_HVX_Group>, 6055 HelpText<"Enable Hexagon Vector eXtensions">; 6056def mno_hexagon_hvx : Flag<["-"], "mno-hvx">, 6057 Group<m_hexagon_Features_HVX_Group>, 6058 HelpText<"Disable Hexagon Vector eXtensions">; 6059def mhexagon_hvx_length_EQ : Joined<["-"], "mhvx-length=">, 6060 Group<m_hexagon_Features_HVX_Group>, HelpText<"Set Hexagon Vector Length">, 6061 Values<"64B,128B">; 6062def mhexagon_hvx_qfloat : Flag<["-"], "mhvx-qfloat">, 6063 Group<m_hexagon_Features_HVX_Group>, 6064 HelpText<"Enable Hexagon HVX QFloat instructions">; 6065def mno_hexagon_hvx_qfloat : Flag<["-"], "mno-hvx-qfloat">, 6066 Group<m_hexagon_Features_HVX_Group>, 6067 HelpText<"Disable Hexagon HVX QFloat instructions">; 6068def mhexagon_hvx_ieee_fp : Flag<["-"], "mhvx-ieee-fp">, 6069 Group<m_hexagon_Features_Group>, 6070 HelpText<"Enable Hexagon HVX IEEE floating-point">; 6071def mno_hexagon_hvx_ieee_fp : Flag<["-"], "mno-hvx-ieee-fp">, 6072 Group<m_hexagon_Features_Group>, 6073 HelpText<"Disable Hexagon HVX IEEE floating-point">; 6074def ffixed_r19: Flag<["-"], "ffixed-r19">, Group<f_Group>, 6075 HelpText<"Reserve register r19 (Hexagon only)">; 6076} // let Flags = [TargetSpecific] 6077def mmemops : Flag<["-"], "mmemops">, Group<m_hexagon_Features_Group>, 6078 Visibility<[ClangOption, CC1Option]>, 6079 HelpText<"Enable generation of memop instructions">; 6080def mno_memops : Flag<["-"], "mno-memops">, Group<m_hexagon_Features_Group>, 6081 Visibility<[ClangOption, CC1Option]>, 6082 HelpText<"Disable generation of memop instructions">; 6083def mpackets : Flag<["-"], "mpackets">, Group<m_hexagon_Features_Group>, 6084 Visibility<[ClangOption, CC1Option]>, 6085 HelpText<"Enable generation of instruction packets">; 6086def mno_packets : Flag<["-"], "mno-packets">, Group<m_hexagon_Features_Group>, 6087 Visibility<[ClangOption, CC1Option]>, 6088 HelpText<"Disable generation of instruction packets">; 6089def mnvj : Flag<["-"], "mnvj">, Group<m_hexagon_Features_Group>, 6090 Visibility<[ClangOption, CC1Option]>, 6091 HelpText<"Enable generation of new-value jumps">; 6092def mno_nvj : Flag<["-"], "mno-nvj">, Group<m_hexagon_Features_Group>, 6093 Visibility<[ClangOption, CC1Option]>, 6094 HelpText<"Disable generation of new-value jumps">; 6095def mnvs : Flag<["-"], "mnvs">, Group<m_hexagon_Features_Group>, 6096 Visibility<[ClangOption, CC1Option]>, 6097 HelpText<"Enable generation of new-value stores">; 6098def mno_nvs : Flag<["-"], "mno-nvs">, Group<m_hexagon_Features_Group>, 6099 Visibility<[ClangOption, CC1Option]>, 6100 HelpText<"Disable generation of new-value stores">; 6101def mcabac: Flag<["-"], "mcabac">, Group<m_hexagon_Features_Group>, 6102 HelpText<"Enable CABAC instructions">; 6103 6104// SPARC feature flags 6105let Flags = [TargetSpecific] in { 6106def mfpu : Flag<["-"], "mfpu">, Group<m_sparc_Features_Group>; 6107def mno_fpu : Flag<["-"], "mno-fpu">, Group<m_sparc_Features_Group>; 6108def mfsmuld : Flag<["-"], "mfsmuld">, Group<m_sparc_Features_Group>; 6109def mno_fsmuld : Flag<["-"], "mno-fsmuld">, Group<m_sparc_Features_Group>; 6110def mpopc : Flag<["-"], "mpopc">, Group<m_sparc_Features_Group>; 6111def mno_popc : Flag<["-"], "mno-popc">, Group<m_sparc_Features_Group>; 6112def mvis : Flag<["-"], "mvis">, Group<m_sparc_Features_Group>; 6113def mno_vis : Flag<["-"], "mno-vis">, Group<m_sparc_Features_Group>; 6114def mvis2 : Flag<["-"], "mvis2">, Group<m_sparc_Features_Group>; 6115def mno_vis2 : Flag<["-"], "mno-vis2">, Group<m_sparc_Features_Group>; 6116def mvis3 : Flag<["-"], "mvis3">, Group<m_sparc_Features_Group>; 6117def mno_vis3 : Flag<["-"], "mno-vis3">, Group<m_sparc_Features_Group>; 6118def mhard_quad_float : Flag<["-"], "mhard-quad-float">, Group<m_sparc_Features_Group>; 6119def msoft_quad_float : Flag<["-"], "msoft-quad-float">, Group<m_sparc_Features_Group>; 6120foreach i = 1 ... 7 in 6121 def ffixed_g#i : Flag<["-"], "ffixed-g"#i>, Group<m_sparc_Features_Group>, 6122 HelpText<"Reserve the G"#i#" register (SPARC only)">; 6123foreach i = 0 ... 5 in 6124 def ffixed_o#i : Flag<["-"], "ffixed-o"#i>, Group<m_sparc_Features_Group>, 6125 HelpText<"Reserve the O"#i#" register (SPARC only)">; 6126foreach i = 0 ... 7 in 6127 def ffixed_l#i : Flag<["-"], "ffixed-l"#i>, Group<m_sparc_Features_Group>, 6128 HelpText<"Reserve the L"#i#" register (SPARC only)">; 6129foreach i = 0 ... 5 in 6130 def ffixed_i#i : Flag<["-"], "ffixed-i"#i>, Group<m_sparc_Features_Group>, 6131 HelpText<"Reserve the I"#i#" register (SPARC only)">; 6132} // let Flags = [TargetSpecific] 6133 6134// M68k features flags 6135let Flags = [TargetSpecific] in { 6136def m68000 : Flag<["-"], "m68000">, Group<m_m68k_Features_Group>; 6137def m68010 : Flag<["-"], "m68010">, Group<m_m68k_Features_Group>; 6138def m68020 : Flag<["-"], "m68020">, Group<m_m68k_Features_Group>; 6139def m68030 : Flag<["-"], "m68030">, Group<m_m68k_Features_Group>; 6140def m68040 : Flag<["-"], "m68040">, Group<m_m68k_Features_Group>; 6141def m68060 : Flag<["-"], "m68060">, Group<m_m68k_Features_Group>; 6142 6143def m68881 : Flag<["-"], "m68881">, Group<m_m68k_Features_Group>; 6144 6145foreach i = {0-6} in 6146 def ffixed_a#i : Flag<["-"], "ffixed-a"#i>, Group<m_m68k_Features_Group>, 6147 HelpText<"Reserve the a"#i#" register (M68k only)">; 6148foreach i = {0-7} in 6149 def ffixed_d#i : Flag<["-"], "ffixed-d"#i>, Group<m_m68k_Features_Group>, 6150 HelpText<"Reserve the d"#i#" register (M68k only)">; 6151} // let Flags = [TargetSpecific] 6152 6153// X86 feature flags 6154let Flags = [TargetSpecific] in { 6155def mx87 : Flag<["-"], "mx87">, Group<m_x86_Features_Group>; 6156def mno_x87 : Flag<["-"], "mno-x87">, Group<m_x86_Features_Group>; 6157def m80387 : Flag<["-"], "m80387">, Alias<mx87>; 6158def mno_80387 : Flag<["-"], "mno-80387">, Alias<mno_x87>; 6159def mno_fp_ret_in_387 : Flag<["-"], "mno-fp-ret-in-387">, Alias<mno_x87>; 6160def mmmx : Flag<["-"], "mmmx">, Group<m_x86_Features_Group>; 6161def mno_mmx : Flag<["-"], "mno-mmx">, Group<m_x86_Features_Group>; 6162def mamx_bf16 : Flag<["-"], "mamx-bf16">, Group<m_x86_Features_Group>; 6163def mno_amx_bf16 : Flag<["-"], "mno-amx-bf16">, Group<m_x86_Features_Group>; 6164def mamx_complex : Flag<["-"], "mamx-complex">, Group<m_x86_Features_Group>; 6165def mno_amx_complex : Flag<["-"], "mno-amx-complex">, Group<m_x86_Features_Group>; 6166def mamx_fp16 : Flag<["-"], "mamx-fp16">, Group<m_x86_Features_Group>; 6167def mno_amx_fp16 : Flag<["-"], "mno-amx-fp16">, Group<m_x86_Features_Group>; 6168def mamx_int8 : Flag<["-"], "mamx-int8">, Group<m_x86_Features_Group>; 6169def mno_amx_int8 : Flag<["-"], "mno-amx-int8">, Group<m_x86_Features_Group>; 6170def mamx_tile : Flag<["-"], "mamx-tile">, Group<m_x86_Features_Group>; 6171def mno_amx_tile : Flag<["-"], "mno-amx-tile">, Group<m_x86_Features_Group>; 6172def mcmpccxadd : Flag<["-"], "mcmpccxadd">, Group<m_x86_Features_Group>; 6173def mno_cmpccxadd : Flag<["-"], "mno-cmpccxadd">, Group<m_x86_Features_Group>; 6174def msse : Flag<["-"], "msse">, Group<m_x86_Features_Group>; 6175def mno_sse : Flag<["-"], "mno-sse">, Group<m_x86_Features_Group>; 6176def msse2 : Flag<["-"], "msse2">, Group<m_x86_Features_Group>; 6177def mno_sse2 : Flag<["-"], "mno-sse2">, Group<m_x86_Features_Group>; 6178def msse3 : Flag<["-"], "msse3">, Group<m_x86_Features_Group>; 6179def mno_sse3 : Flag<["-"], "mno-sse3">, Group<m_x86_Features_Group>; 6180def mssse3 : Flag<["-"], "mssse3">, Group<m_x86_Features_Group>; 6181def mno_ssse3 : Flag<["-"], "mno-ssse3">, Group<m_x86_Features_Group>; 6182def msse4_1 : Flag<["-"], "msse4.1">, Group<m_x86_Features_Group>; 6183def mno_sse4_1 : Flag<["-"], "mno-sse4.1">, Group<m_x86_Features_Group>; 6184} // let Flags = [TargetSpecific] 6185// TODO: Make -msse4.2 TargetSpecific after 6186// https://github.com/llvm/llvm-project/issues/63270 is fixed. 6187def msse4_2 : Flag<["-"], "msse4.2">, Group<m_x86_Features_Group>; 6188let Flags = [TargetSpecific] in { 6189def mno_sse4_2 : Flag<["-"], "mno-sse4.2">, Group<m_x86_Features_Group>; 6190def msse4 : Flag<["-"], "msse4">, Alias<msse4_2>; 6191// -mno-sse4 turns off sse4.1 which has the effect of turning off everything 6192// later than 4.1. -msse4 turns on 4.2 which has the effect of turning on 6193// everything earlier than 4.2. 6194def mno_sse4 : Flag<["-"], "mno-sse4">, Alias<mno_sse4_1>; 6195def msse4a : Flag<["-"], "msse4a">, Group<m_x86_Features_Group>; 6196def mno_sse4a : Flag<["-"], "mno-sse4a">, Group<m_x86_Features_Group>; 6197def mavx : Flag<["-"], "mavx">, Group<m_x86_Features_Group>; 6198def mno_avx : Flag<["-"], "mno-avx">, Group<m_x86_Features_Group>; 6199def mavx10_1_256 : Flag<["-"], "mavx10.1-256">, Group<m_x86_AVX10_Features_Group>; 6200def mno_avx10_1_256 : Flag<["-"], "mno-avx10.1-256">, Group<m_x86_AVX10_Features_Group>; 6201def mavx10_1_512 : Flag<["-"], "mavx10.1-512">, Group<m_x86_AVX10_Features_Group>; 6202def mno_avx10_1_512 : Flag<["-"], "mno-avx10.1-512">, Group<m_x86_AVX10_Features_Group>; 6203def mavx10_1 : Flag<["-"], "mavx10.1">, Alias<mavx10_1_256>; 6204def mno_avx10_1 : Flag<["-"], "mno-avx10.1">, Alias<mno_avx10_1_256>; 6205def mavx2 : Flag<["-"], "mavx2">, Group<m_x86_Features_Group>; 6206def mno_avx2 : Flag<["-"], "mno-avx2">, Group<m_x86_Features_Group>; 6207def mavx512f : Flag<["-"], "mavx512f">, Group<m_x86_Features_Group>; 6208def mno_avx512f : Flag<["-"], "mno-avx512f">, Group<m_x86_Features_Group>; 6209def mavx512bf16 : Flag<["-"], "mavx512bf16">, Group<m_x86_Features_Group>; 6210def mno_avx512bf16 : Flag<["-"], "mno-avx512bf16">, Group<m_x86_Features_Group>; 6211def mavx512bitalg : Flag<["-"], "mavx512bitalg">, Group<m_x86_Features_Group>; 6212def mno_avx512bitalg : Flag<["-"], "mno-avx512bitalg">, Group<m_x86_Features_Group>; 6213def mavx512bw : Flag<["-"], "mavx512bw">, Group<m_x86_Features_Group>; 6214def mno_avx512bw : Flag<["-"], "mno-avx512bw">, Group<m_x86_Features_Group>; 6215def mavx512cd : Flag<["-"], "mavx512cd">, Group<m_x86_Features_Group>; 6216def mno_avx512cd : Flag<["-"], "mno-avx512cd">, Group<m_x86_Features_Group>; 6217def mavx512dq : Flag<["-"], "mavx512dq">, Group<m_x86_Features_Group>; 6218def mno_avx512dq : Flag<["-"], "mno-avx512dq">, Group<m_x86_Features_Group>; 6219def mavx512fp16 : Flag<["-"], "mavx512fp16">, Group<m_x86_Features_Group>; 6220def mno_avx512fp16 : Flag<["-"], "mno-avx512fp16">, Group<m_x86_Features_Group>; 6221def mavx512ifma : Flag<["-"], "mavx512ifma">, Group<m_x86_Features_Group>; 6222def mno_avx512ifma : Flag<["-"], "mno-avx512ifma">, Group<m_x86_Features_Group>; 6223def mavx512vbmi : Flag<["-"], "mavx512vbmi">, Group<m_x86_Features_Group>; 6224def mno_avx512vbmi : Flag<["-"], "mno-avx512vbmi">, Group<m_x86_Features_Group>; 6225def mavx512vbmi2 : Flag<["-"], "mavx512vbmi2">, Group<m_x86_Features_Group>; 6226def mno_avx512vbmi2 : Flag<["-"], "mno-avx512vbmi2">, Group<m_x86_Features_Group>; 6227def mavx512vl : Flag<["-"], "mavx512vl">, Group<m_x86_Features_Group>; 6228def mno_avx512vl : Flag<["-"], "mno-avx512vl">, Group<m_x86_Features_Group>; 6229def mavx512vnni : Flag<["-"], "mavx512vnni">, Group<m_x86_Features_Group>; 6230def mno_avx512vnni : Flag<["-"], "mno-avx512vnni">, Group<m_x86_Features_Group>; 6231def mavx512vpopcntdq : Flag<["-"], "mavx512vpopcntdq">, Group<m_x86_Features_Group>; 6232def mno_avx512vpopcntdq : Flag<["-"], "mno-avx512vpopcntdq">, Group<m_x86_Features_Group>; 6233def mavx512vp2intersect : Flag<["-"], "mavx512vp2intersect">, Group<m_x86_Features_Group>; 6234def mno_avx512vp2intersect : Flag<["-"], "mno-avx512vp2intersect">, Group<m_x86_Features_Group>; 6235def mavxifma : Flag<["-"], "mavxifma">, Group<m_x86_Features_Group>; 6236def mno_avxifma : Flag<["-"], "mno-avxifma">, Group<m_x86_Features_Group>; 6237def mavxneconvert : Flag<["-"], "mavxneconvert">, Group<m_x86_Features_Group>; 6238def mno_avxneconvert : Flag<["-"], "mno-avxneconvert">, Group<m_x86_Features_Group>; 6239def mavxvnniint16 : Flag<["-"], "mavxvnniint16">, Group<m_x86_Features_Group>; 6240def mno_avxvnniint16 : Flag<["-"], "mno-avxvnniint16">, Group<m_x86_Features_Group>; 6241def mavxvnniint8 : Flag<["-"], "mavxvnniint8">, Group<m_x86_Features_Group>; 6242def mno_avxvnniint8 : Flag<["-"], "mno-avxvnniint8">, Group<m_x86_Features_Group>; 6243def mavxvnni : Flag<["-"], "mavxvnni">, Group<m_x86_Features_Group>; 6244def mno_avxvnni : Flag<["-"], "mno-avxvnni">, Group<m_x86_Features_Group>; 6245def madx : Flag<["-"], "madx">, Group<m_x86_Features_Group>; 6246def mno_adx : Flag<["-"], "mno-adx">, Group<m_x86_Features_Group>; 6247def maes : Flag<["-"], "maes">, Group<m_x86_Features_Group>; 6248def mno_aes : Flag<["-"], "mno-aes">, Group<m_x86_Features_Group>; 6249def mbmi : Flag<["-"], "mbmi">, Group<m_x86_Features_Group>; 6250def mno_bmi : Flag<["-"], "mno-bmi">, Group<m_x86_Features_Group>; 6251def mbmi2 : Flag<["-"], "mbmi2">, Group<m_x86_Features_Group>; 6252def mno_bmi2 : Flag<["-"], "mno-bmi2">, Group<m_x86_Features_Group>; 6253def mcldemote : Flag<["-"], "mcldemote">, Group<m_x86_Features_Group>; 6254def mno_cldemote : Flag<["-"], "mno-cldemote">, Group<m_x86_Features_Group>; 6255def mclflushopt : Flag<["-"], "mclflushopt">, Group<m_x86_Features_Group>; 6256def mno_clflushopt : Flag<["-"], "mno-clflushopt">, Group<m_x86_Features_Group>; 6257def mclwb : Flag<["-"], "mclwb">, Group<m_x86_Features_Group>; 6258def mno_clwb : Flag<["-"], "mno-clwb">, Group<m_x86_Features_Group>; 6259def mwbnoinvd : Flag<["-"], "mwbnoinvd">, Group<m_x86_Features_Group>; 6260def mno_wbnoinvd : Flag<["-"], "mno-wbnoinvd">, Group<m_x86_Features_Group>; 6261def mclzero : Flag<["-"], "mclzero">, Group<m_x86_Features_Group>; 6262def mno_clzero : Flag<["-"], "mno-clzero">, Group<m_x86_Features_Group>; 6263def mcrc32 : Flag<["-"], "mcrc32">, Group<m_x86_Features_Group>; 6264def mno_crc32 : Flag<["-"], "mno-crc32">, Group<m_x86_Features_Group>; 6265def mcx16 : Flag<["-"], "mcx16">, Group<m_x86_Features_Group>; 6266def mno_cx16 : Flag<["-"], "mno-cx16">, Group<m_x86_Features_Group>; 6267def menqcmd : Flag<["-"], "menqcmd">, Group<m_x86_Features_Group>; 6268def mno_enqcmd : Flag<["-"], "mno-enqcmd">, Group<m_x86_Features_Group>; 6269def mevex512 : Flag<["-"], "mevex512">, Group<m_x86_Features_Group>; 6270def mno_evex512 : Flag<["-"], "mno-evex512">, Group<m_x86_Features_Group>; 6271def mf16c : Flag<["-"], "mf16c">, Group<m_x86_Features_Group>; 6272def mno_f16c : Flag<["-"], "mno-f16c">, Group<m_x86_Features_Group>; 6273def mfma : Flag<["-"], "mfma">, Group<m_x86_Features_Group>; 6274def mno_fma : Flag<["-"], "mno-fma">, Group<m_x86_Features_Group>; 6275def mfma4 : Flag<["-"], "mfma4">, Group<m_x86_Features_Group>; 6276def mno_fma4 : Flag<["-"], "mno-fma4">, Group<m_x86_Features_Group>; 6277def mfsgsbase : Flag<["-"], "mfsgsbase">, Group<m_x86_Features_Group>; 6278def mno_fsgsbase : Flag<["-"], "mno-fsgsbase">, Group<m_x86_Features_Group>; 6279def mfxsr : Flag<["-"], "mfxsr">, Group<m_x86_Features_Group>; 6280def mno_fxsr : Flag<["-"], "mno-fxsr">, Group<m_x86_Features_Group>; 6281def minvpcid : Flag<["-"], "minvpcid">, Group<m_x86_Features_Group>; 6282def mno_invpcid : Flag<["-"], "mno-invpcid">, Group<m_x86_Features_Group>; 6283def mgfni : Flag<["-"], "mgfni">, Group<m_x86_Features_Group>; 6284def mno_gfni : Flag<["-"], "mno-gfni">, Group<m_x86_Features_Group>; 6285def mhreset : Flag<["-"], "mhreset">, Group<m_x86_Features_Group>; 6286def mno_hreset : Flag<["-"], "mno-hreset">, Group<m_x86_Features_Group>; 6287def mkl : Flag<["-"], "mkl">, Group<m_x86_Features_Group>; 6288def mno_kl : Flag<["-"], "mno-kl">, Group<m_x86_Features_Group>; 6289def mwidekl : Flag<["-"], "mwidekl">, Group<m_x86_Features_Group>; 6290def mno_widekl : Flag<["-"], "mno-widekl">, Group<m_x86_Features_Group>; 6291def mlwp : Flag<["-"], "mlwp">, Group<m_x86_Features_Group>; 6292def mno_lwp : Flag<["-"], "mno-lwp">, Group<m_x86_Features_Group>; 6293def mlzcnt : Flag<["-"], "mlzcnt">, Group<m_x86_Features_Group>; 6294def mno_lzcnt : Flag<["-"], "mno-lzcnt">, Group<m_x86_Features_Group>; 6295def mmovbe : Flag<["-"], "mmovbe">, Group<m_x86_Features_Group>; 6296def mno_movbe : Flag<["-"], "mno-movbe">, Group<m_x86_Features_Group>; 6297def mmovdiri : Flag<["-"], "mmovdiri">, Group<m_x86_Features_Group>; 6298def mno_movdiri : Flag<["-"], "mno-movdiri">, Group<m_x86_Features_Group>; 6299def mmovdir64b : Flag<["-"], "mmovdir64b">, Group<m_x86_Features_Group>; 6300def mno_movdir64b : Flag<["-"], "mno-movdir64b">, Group<m_x86_Features_Group>; 6301def mmwaitx : Flag<["-"], "mmwaitx">, Group<m_x86_Features_Group>; 6302def mno_mwaitx : Flag<["-"], "mno-mwaitx">, Group<m_x86_Features_Group>; 6303def mpku : Flag<["-"], "mpku">, Group<m_x86_Features_Group>; 6304def mno_pku : Flag<["-"], "mno-pku">, Group<m_x86_Features_Group>; 6305def mpclmul : Flag<["-"], "mpclmul">, Group<m_x86_Features_Group>; 6306def mno_pclmul : Flag<["-"], "mno-pclmul">, Group<m_x86_Features_Group>; 6307def mpconfig : Flag<["-"], "mpconfig">, Group<m_x86_Features_Group>; 6308def mno_pconfig : Flag<["-"], "mno-pconfig">, Group<m_x86_Features_Group>; 6309def mpopcnt : Flag<["-"], "mpopcnt">, Group<m_x86_Features_Group>; 6310def mno_popcnt : Flag<["-"], "mno-popcnt">, Group<m_x86_Features_Group>; 6311def mprefetchi : Flag<["-"], "mprefetchi">, Group<m_x86_Features_Group>; 6312def mno_prefetchi : Flag<["-"], "mno-prefetchi">, Group<m_x86_Features_Group>; 6313def mprfchw : Flag<["-"], "mprfchw">, Group<m_x86_Features_Group>; 6314def mno_prfchw : Flag<["-"], "mno-prfchw">, Group<m_x86_Features_Group>; 6315def mptwrite : Flag<["-"], "mptwrite">, Group<m_x86_Features_Group>; 6316def mno_ptwrite : Flag<["-"], "mno-ptwrite">, Group<m_x86_Features_Group>; 6317def mraoint : Flag<["-"], "mraoint">, Group<m_x86_Features_Group>; 6318def mno_raoint : Flag<["-"], "mno-raoint">, Group<m_x86_Features_Group>; 6319def mrdpid : Flag<["-"], "mrdpid">, Group<m_x86_Features_Group>; 6320def mno_rdpid : Flag<["-"], "mno-rdpid">, Group<m_x86_Features_Group>; 6321def mrdpru : Flag<["-"], "mrdpru">, Group<m_x86_Features_Group>; 6322def mno_rdpru : Flag<["-"], "mno-rdpru">, Group<m_x86_Features_Group>; 6323def mrdrnd : Flag<["-"], "mrdrnd">, Group<m_x86_Features_Group>; 6324def mno_rdrnd : Flag<["-"], "mno-rdrnd">, Group<m_x86_Features_Group>; 6325def mrtm : Flag<["-"], "mrtm">, Group<m_x86_Features_Group>; 6326def mno_rtm : Flag<["-"], "mno-rtm">, Group<m_x86_Features_Group>; 6327def mrdseed : Flag<["-"], "mrdseed">, Group<m_x86_Features_Group>; 6328def mno_rdseed : Flag<["-"], "mno-rdseed">, Group<m_x86_Features_Group>; 6329def msahf : Flag<["-"], "msahf">, Group<m_x86_Features_Group>; 6330def mno_sahf : Flag<["-"], "mno-sahf">, Group<m_x86_Features_Group>; 6331def mserialize : Flag<["-"], "mserialize">, Group<m_x86_Features_Group>; 6332def mno_serialize : Flag<["-"], "mno-serialize">, Group<m_x86_Features_Group>; 6333def msgx : Flag<["-"], "msgx">, Group<m_x86_Features_Group>; 6334def mno_sgx : Flag<["-"], "mno-sgx">, Group<m_x86_Features_Group>; 6335def msha : Flag<["-"], "msha">, Group<m_x86_Features_Group>; 6336def mno_sha : Flag<["-"], "mno-sha">, Group<m_x86_Features_Group>; 6337def msha512 : Flag<["-"], "msha512">, Group<m_x86_Features_Group>; 6338def mno_sha512 : Flag<["-"], "mno-sha512">, Group<m_x86_Features_Group>; 6339def msm3 : Flag<["-"], "msm3">, Group<m_x86_Features_Group>; 6340def mno_sm3 : Flag<["-"], "mno-sm3">, Group<m_x86_Features_Group>; 6341def msm4 : Flag<["-"], "msm4">, Group<m_x86_Features_Group>; 6342def mno_sm4 : Flag<["-"], "mno-sm4">, Group<m_x86_Features_Group>; 6343def mtbm : Flag<["-"], "mtbm">, Group<m_x86_Features_Group>; 6344def mno_tbm : Flag<["-"], "mno-tbm">, Group<m_x86_Features_Group>; 6345def mtsxldtrk : Flag<["-"], "mtsxldtrk">, Group<m_x86_Features_Group>; 6346def mno_tsxldtrk : Flag<["-"], "mno-tsxldtrk">, Group<m_x86_Features_Group>; 6347def muintr : Flag<["-"], "muintr">, Group<m_x86_Features_Group>; 6348def mno_uintr : Flag<["-"], "mno-uintr">, Group<m_x86_Features_Group>; 6349def musermsr : Flag<["-"], "musermsr">, Group<m_x86_Features_Group>; 6350def mno_usermsr : Flag<["-"], "mno-usermsr">, Group<m_x86_Features_Group>; 6351def mvaes : Flag<["-"], "mvaes">, Group<m_x86_Features_Group>; 6352def mno_vaes : Flag<["-"], "mno-vaes">, Group<m_x86_Features_Group>; 6353def mvpclmulqdq : Flag<["-"], "mvpclmulqdq">, Group<m_x86_Features_Group>; 6354def mno_vpclmulqdq : Flag<["-"], "mno-vpclmulqdq">, Group<m_x86_Features_Group>; 6355def mwaitpkg : Flag<["-"], "mwaitpkg">, Group<m_x86_Features_Group>; 6356def mno_waitpkg : Flag<["-"], "mno-waitpkg">, Group<m_x86_Features_Group>; 6357def mxop : Flag<["-"], "mxop">, Group<m_x86_Features_Group>; 6358def mno_xop : Flag<["-"], "mno-xop">, Group<m_x86_Features_Group>; 6359def mxsave : Flag<["-"], "mxsave">, Group<m_x86_Features_Group>; 6360def mno_xsave : Flag<["-"], "mno-xsave">, Group<m_x86_Features_Group>; 6361def mxsavec : Flag<["-"], "mxsavec">, Group<m_x86_Features_Group>; 6362def mno_xsavec : Flag<["-"], "mno-xsavec">, Group<m_x86_Features_Group>; 6363def mxsaveopt : Flag<["-"], "mxsaveopt">, Group<m_x86_Features_Group>; 6364def mno_xsaveopt : Flag<["-"], "mno-xsaveopt">, Group<m_x86_Features_Group>; 6365def mxsaves : Flag<["-"], "mxsaves">, Group<m_x86_Features_Group>; 6366def mno_xsaves : Flag<["-"], "mno-xsaves">, Group<m_x86_Features_Group>; 6367def mshstk : Flag<["-"], "mshstk">, Group<m_x86_Features_Group>; 6368def mno_shstk : Flag<["-"], "mno-shstk">, Group<m_x86_Features_Group>; 6369def mretpoline_external_thunk : Flag<["-"], "mretpoline-external-thunk">, Group<m_x86_Features_Group>; 6370def mno_retpoline_external_thunk : Flag<["-"], "mno-retpoline-external-thunk">, Group<m_x86_Features_Group>; 6371def mvzeroupper : Flag<["-"], "mvzeroupper">, Group<m_x86_Features_Group>; 6372def mno_vzeroupper : Flag<["-"], "mno-vzeroupper">, Group<m_x86_Features_Group>; 6373def mno_gather : Flag<["-"], "mno-gather">, Group<m_Group>, 6374 HelpText<"Disable generation of gather instructions in auto-vectorization(x86 only)">; 6375def mno_scatter : Flag<["-"], "mno-scatter">, Group<m_Group>, 6376 HelpText<"Disable generation of scatter instructions in auto-vectorization(x86 only)">; 6377def mapx_features_EQ : CommaJoined<["-"], "mapx-features=">, Group<m_x86_Features_Group>, 6378 HelpText<"Enable features of APX">, Values<"egpr,push2pop2,ppx,ndd,ccmp,nf,cf,zu">, Visibility<[ClangOption, CLOption, FlangOption]>; 6379def mno_apx_features_EQ : CommaJoined<["-"], "mno-apx-features=">, Group<m_x86_Features_Group>, 6380 HelpText<"Disable features of APX">, Values<"egpr,push2pop2,ppx,ndd,ccmp,nf,cf,zu">, Visibility<[ClangOption, CLOption, FlangOption]>; 6381def mapxf : Flag<["-"], "mapxf">, Alias<mapx_features_EQ>, AliasArgs<["egpr","push2pop2","ppx","ndd","ccmp","nf","cf","zu"]>; 6382def mno_apxf : Flag<["-"], "mno-apxf">, Alias<mno_apx_features_EQ>, AliasArgs<["egpr","push2pop2","ppx","ndd","ccmp","nf","cf","zu"]>; 6383def mapx_inline_asm_use_gpr32 : Flag<["-"], "mapx-inline-asm-use-gpr32">, Group<m_Group>, 6384 HelpText<"Enable use of GPR32 in inline assembly for APX">; 6385} // let Flags = [TargetSpecific] 6386 6387// VE feature flags 6388let Flags = [TargetSpecific] in { 6389def mvevpu : Flag<["-"], "mvevpu">, Group<m_ve_Features_Group>, 6390 HelpText<"Emit VPU instructions for VE">; 6391def mno_vevpu : Flag<["-"], "mno-vevpu">, Group<m_ve_Features_Group>; 6392} // let Flags = [TargetSpecific] 6393 6394// Unsupported X86 feature flags (triggers a warning) 6395def m3dnow : Flag<["-"], "m3dnow">; 6396def mno_3dnow : Flag<["-"], "mno-3dnow">; 6397def m3dnowa : Flag<["-"], "m3dnowa">; 6398def mno_3dnowa : Flag<["-"], "mno-3dnowa">; 6399 6400// These are legacy user-facing driver-level option spellings. They are always 6401// aliases for options that are spelled using the more common Unix / GNU flag 6402// style of double-dash and equals-joined flags. 6403def target_legacy_spelling : Separate<["-"], "target">, 6404 Alias<target>, 6405 Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>; 6406 6407// Special internal option to handle -Xlinker --no-demangle. 6408def Z_Xlinker__no_demangle : Flag<["-"], "Z-Xlinker-no-demangle">, 6409 Flags<[Unsupported, NoArgumentUnused]>; 6410 6411// Special internal option to allow forwarding arbitrary arguments to linker. 6412def Zlinker_input : Separate<["-"], "Zlinker-input">, 6413 Flags<[Unsupported, NoArgumentUnused]>; 6414 6415// Reserved library options. 6416def Z_reserved_lib_stdcxx : Flag<["-"], "Z-reserved-lib-stdc++">, 6417 Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, 6418 Group<reserved_lib_Group>; 6419def Z_reserved_lib_cckext : Flag<["-"], "Z-reserved-lib-cckext">, 6420 Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, 6421 Group<reserved_lib_Group>; 6422 6423// Ignored options 6424multiclass BooleanFFlag<string name> { 6425 def f#NAME : Flag<["-"], "f"#name>; 6426 def fno_#NAME : Flag<["-"], "fno-"#name>; 6427} 6428 6429multiclass FlangIgnoredDiagOpt<string name> { 6430 def unsupported_warning_w#NAME : Flag<["-", "--"], "W"#name>, 6431 Visibility<[FlangOption]>, Group<flang_ignored_w_Group>; 6432} 6433 6434defm : BooleanFFlag<"keep-inline-functions">, Group<clang_ignored_gcc_optimization_f_Group>; 6435 6436def fprofile_dir : Joined<["-"], "fprofile-dir=">, Group<f_Group>; 6437 6438// The default value matches BinutilsVersion in MCAsmInfo.h. 6439def fbinutils_version_EQ : Joined<["-"], "fbinutils-version=">, 6440 MetaVarName<"<major.minor>">, Group<f_Group>, 6441 Visibility<[ClangOption, CC1Option]>, 6442 HelpText<"Produced object files can use all ELF features supported by this " 6443 "binutils version and newer. If -fno-integrated-as is specified, the " 6444 "generated assembly will consider GNU as support. 'none' means that all ELF " 6445 "features can be used, regardless of binutils support. Defaults to 2.26.">; 6446def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group<f_Group>, 6447 Flags<[LinkOption]>, Visibility<[ClangOption, FlangOption, CLOption]>; 6448def ld_path_EQ : Joined<["--"], "ld-path=">, Group<Link_Group>; 6449 6450defm align_labels : BooleanFFlag<"align-labels">, Group<clang_ignored_gcc_optimization_f_Group>; 6451def falign_labels_EQ : Joined<["-"], "falign-labels=">, Group<clang_ignored_gcc_optimization_f_Group>; 6452defm align_loops : BooleanFFlag<"align-loops">, Group<clang_ignored_gcc_optimization_f_Group>; 6453defm align_jumps : BooleanFFlag<"align-jumps">, Group<clang_ignored_gcc_optimization_f_Group>; 6454def falign_jumps_EQ : Joined<["-"], "falign-jumps=">, Group<clang_ignored_gcc_optimization_f_Group>; 6455 6456// FIXME: This option should be supported and wired up to our diognostics, but 6457// ignore it for now to avoid breaking builds that use it. 6458def fdiagnostics_show_location_EQ : Joined<["-"], "fdiagnostics-show-location=">, Group<clang_ignored_f_Group>; 6459 6460defm check_new : BoolOption<"f", "check-new", 6461 LangOpts<"CheckNew">, DefaultFalse, 6462 PosFlag<SetTrue, [], [ClangOption], "Do not assume C++ operator new may not return NULL">, 6463 NegFlag<SetFalse>, BothFlags<[], [ClangOption, CC1Option]>>; 6464 6465defm caller_saves : BooleanFFlag<"caller-saves">, Group<clang_ignored_gcc_optimization_f_Group>; 6466defm reorder_blocks : BooleanFFlag<"reorder-blocks">, Group<clang_ignored_gcc_optimization_f_Group>; 6467defm branch_count_reg : BooleanFFlag<"branch-count-reg">, Group<clang_ignored_gcc_optimization_f_Group>; 6468defm default_inline : BooleanFFlag<"default-inline">, Group<clang_ignored_gcc_optimization_f_Group>; 6469defm float_store : BooleanFFlag<"float-store">, Group<clang_ignored_gcc_optimization_f_Group>; 6470defm friend_injection : BooleanFFlag<"friend-injection">, Group<clang_ignored_f_Group>; 6471defm function_attribute_list : BooleanFFlag<"function-attribute-list">, Group<clang_ignored_f_Group>; 6472defm gcse : BooleanFFlag<"gcse">, Group<clang_ignored_gcc_optimization_f_Group>; 6473defm gcse_after_reload: BooleanFFlag<"gcse-after-reload">, Group<clang_ignored_gcc_optimization_f_Group>; 6474defm gcse_las: BooleanFFlag<"gcse-las">, Group<clang_ignored_gcc_optimization_f_Group>; 6475defm gcse_sm: BooleanFFlag<"gcse-sm">, Group<clang_ignored_gcc_optimization_f_Group>; 6476defm gnu : BooleanFFlag<"gnu">, Group<clang_ignored_f_Group>; 6477defm implicit_templates : BooleanFFlag<"implicit-templates">, Group<clang_ignored_f_Group>; 6478defm implement_inlines : BooleanFFlag<"implement-inlines">, Group<clang_ignored_f_Group>; 6479defm merge_constants : BooleanFFlag<"merge-constants">, Group<clang_ignored_gcc_optimization_f_Group>; 6480defm modulo_sched : BooleanFFlag<"modulo-sched">, Group<clang_ignored_gcc_optimization_f_Group>; 6481defm modulo_sched_allow_regmoves : BooleanFFlag<"modulo-sched-allow-regmoves">, 6482 Group<clang_ignored_gcc_optimization_f_Group>; 6483defm inline_functions_called_once : BooleanFFlag<"inline-functions-called-once">, 6484 Group<clang_ignored_gcc_optimization_f_Group>; 6485def finline_limit_EQ : Joined<["-"], "finline-limit=">, Group<clang_ignored_gcc_optimization_f_Group>; 6486defm finline_limit : BooleanFFlag<"inline-limit">, Group<clang_ignored_gcc_optimization_f_Group>; 6487defm inline_small_functions : BooleanFFlag<"inline-small-functions">, 6488 Group<clang_ignored_gcc_optimization_f_Group>; 6489defm ipa_cp : BooleanFFlag<"ipa-cp">, 6490 Group<clang_ignored_gcc_optimization_f_Group>; 6491defm ivopts : BooleanFFlag<"ivopts">, Group<clang_ignored_gcc_optimization_f_Group>; 6492defm semantic_interposition : BoolFOption<"semantic-interposition", 6493 LangOpts<"SemanticInterposition">, DefaultFalse, 6494 PosFlag<SetTrue, [], [ClangOption, CC1Option]>, 6495 NegFlag<SetFalse>>, 6496 DocBrief<[{Enable semantic interposition. Semantic interposition allows for the 6497interposition of a symbol by another at runtime, thus preventing a range of 6498inter-procedural optimisation.}]>; 6499defm non_call_exceptions : BooleanFFlag<"non-call-exceptions">, Group<clang_ignored_f_Group>; 6500defm peel_loops : BooleanFFlag<"peel-loops">, Group<clang_ignored_gcc_optimization_f_Group>; 6501defm permissive : BooleanFFlag<"permissive">, Group<clang_ignored_f_Group>; 6502defm prefetch_loop_arrays : BooleanFFlag<"prefetch-loop-arrays">, Group<clang_ignored_gcc_optimization_f_Group>; 6503defm printf : BooleanFFlag<"printf">, Group<clang_ignored_f_Group>; 6504defm profile : BooleanFFlag<"profile">, Group<clang_ignored_f_Group>; 6505defm profile_correction : BooleanFFlag<"profile-correction">, Group<clang_ignored_gcc_optimization_f_Group>; 6506defm profile_generate_sampling : BooleanFFlag<"profile-generate-sampling">, Group<clang_ignored_f_Group>; 6507defm profile_reusedist : BooleanFFlag<"profile-reusedist">, Group<clang_ignored_f_Group>; 6508defm profile_values : BooleanFFlag<"profile-values">, Group<clang_ignored_gcc_optimization_f_Group>; 6509defm regs_graph : BooleanFFlag<"regs-graph">, Group<clang_ignored_f_Group>; 6510defm rename_registers : BooleanFFlag<"rename-registers">, Group<clang_ignored_gcc_optimization_f_Group>; 6511defm ripa : BooleanFFlag<"ripa">, Group<clang_ignored_f_Group>; 6512defm schedule_insns : BooleanFFlag<"schedule-insns">, Group<clang_ignored_gcc_optimization_f_Group>; 6513defm schedule_insns2 : BooleanFFlag<"schedule-insns2">, Group<clang_ignored_gcc_optimization_f_Group>; 6514defm see : BooleanFFlag<"see">, Group<clang_ignored_f_Group>; 6515defm signaling_nans : BooleanFFlag<"signaling-nans">, Group<clang_ignored_gcc_optimization_f_Group>; 6516defm single_precision_constant : BooleanFFlag<"single-precision-constant">, 6517 Group<clang_ignored_gcc_optimization_f_Group>; 6518defm spec_constr_count : BooleanFFlag<"spec-constr-count">, Group<clang_ignored_f_Group>; 6519defm stack_check : BooleanFFlag<"stack-check">, Group<clang_ignored_f_Group>; 6520defm strength_reduce : 6521 BooleanFFlag<"strength-reduce">, Group<clang_ignored_gcc_optimization_f_Group>; 6522defm tls_model : BooleanFFlag<"tls-model">, Group<clang_ignored_f_Group>; 6523defm tracer : BooleanFFlag<"tracer">, Group<clang_ignored_gcc_optimization_f_Group>; 6524defm tree_dce : BooleanFFlag<"tree-dce">, Group<clang_ignored_gcc_optimization_f_Group>; 6525defm tree_salias : BooleanFFlag<"tree-salias">, Group<clang_ignored_f_Group>; 6526defm tree_ter : BooleanFFlag<"tree-ter">, Group<clang_ignored_gcc_optimization_f_Group>; 6527defm tree_vectorizer_verbose : BooleanFFlag<"tree-vectorizer-verbose">, Group<clang_ignored_f_Group>; 6528defm tree_vrp : BooleanFFlag<"tree-vrp">, Group<clang_ignored_gcc_optimization_f_Group>; 6529defm : BooleanFFlag<"unit-at-a-time">, Group<clang_ignored_gcc_optimization_f_Group>; 6530defm unroll_all_loops : BooleanFFlag<"unroll-all-loops">, Group<clang_ignored_gcc_optimization_f_Group>; 6531defm unsafe_loop_optimizations : BooleanFFlag<"unsafe-loop-optimizations">, 6532 Group<clang_ignored_gcc_optimization_f_Group>; 6533defm unswitch_loops : BooleanFFlag<"unswitch-loops">, Group<clang_ignored_gcc_optimization_f_Group>; 6534defm use_linker_plugin : BooleanFFlag<"use-linker-plugin">, Group<clang_ignored_gcc_optimization_f_Group>; 6535defm vect_cost_model : BooleanFFlag<"vect-cost-model">, Group<clang_ignored_gcc_optimization_f_Group>; 6536defm variable_expansion_in_unroller : BooleanFFlag<"variable-expansion-in-unroller">, 6537 Group<clang_ignored_gcc_optimization_f_Group>; 6538defm web : BooleanFFlag<"web">, Group<clang_ignored_gcc_optimization_f_Group>; 6539defm whole_program : BooleanFFlag<"whole-program">, Group<clang_ignored_gcc_optimization_f_Group>; 6540defm devirtualize : BooleanFFlag<"devirtualize">, Group<clang_ignored_gcc_optimization_f_Group>; 6541defm devirtualize_speculatively : BooleanFFlag<"devirtualize-speculatively">, 6542 Group<clang_ignored_gcc_optimization_f_Group>; 6543 6544// Generic gfortran options. 6545def A_DASH : Joined<["-"], "A-">, Group<gfortran_Group>; 6546def static_libgfortran : Flag<["-"], "static-libgfortran">, Group<gfortran_Group>; 6547 6548// "f" options with values for gfortran. 6549def fblas_matmul_limit_EQ : Joined<["-"], "fblas-matmul-limit=">, Group<gfortran_Group>; 6550def fcheck_EQ : Joined<["-"], "fcheck=">, Group<gfortran_Group>; 6551def fcoarray_EQ : Joined<["-"], "fcoarray=">, Group<gfortran_Group>; 6552def ffpe_trap_EQ : Joined<["-"], "ffpe-trap=">, Group<gfortran_Group>; 6553def ffree_line_length_VALUE : Joined<["-"], "ffree-line-length-">, Group<gfortran_Group>; 6554def finit_character_EQ : Joined<["-"], "finit-character=">, Group<gfortran_Group>; 6555def finit_integer_EQ : Joined<["-"], "finit-integer=">, Group<gfortran_Group>; 6556def finit_logical_EQ : Joined<["-"], "finit-logical=">, Group<gfortran_Group>; 6557def finit_real_EQ : Joined<["-"], "finit-real=">, Group<gfortran_Group>; 6558def fmax_array_constructor_EQ : Joined<["-"], "fmax-array-constructor=">, Group<gfortran_Group>; 6559def fmax_errors_EQ : Joined<["-"], "fmax-errors=">, Group<gfortran_Group>; 6560def fmax_stack_var_size_EQ : Joined<["-"], "fmax-stack-var-size=">, Group<gfortran_Group>; 6561def fmax_subrecord_length_EQ : Joined<["-"], "fmax-subrecord-length=">, Group<gfortran_Group>; 6562def frecord_marker_EQ : Joined<["-"], "frecord-marker=">, Group<gfortran_Group>; 6563 6564// "f" flags for gfortran. 6565defm aggressive_function_elimination : BooleanFFlag<"aggressive-function-elimination">, Group<gfortran_Group>; 6566defm align_commons : BooleanFFlag<"align-commons">, Group<gfortran_Group>; 6567defm all_intrinsics : BooleanFFlag<"all-intrinsics">, Group<gfortran_Group>; 6568def fautomatic : Flag<["-"], "fautomatic">; // -fno-automatic is significant 6569defm backtrace : BooleanFFlag<"backtrace">, Group<gfortran_Group>; 6570defm bounds_check : BooleanFFlag<"bounds-check">, Group<gfortran_Group>; 6571defm check_array_temporaries : BooleanFFlag<"check-array-temporaries">, Group<gfortran_Group>; 6572defm cray_pointer : BooleanFFlag<"cray-pointer">, Group<gfortran_Group>; 6573defm d_lines_as_code : BooleanFFlag<"d-lines-as-code">, Group<gfortran_Group>; 6574defm d_lines_as_comments : BooleanFFlag<"d-lines-as-comments">, Group<gfortran_Group>; 6575defm dollar_ok : BooleanFFlag<"dollar-ok">, Group<gfortran_Group>; 6576defm dump_fortran_optimized : BooleanFFlag<"dump-fortran-optimized">, Group<gfortran_Group>; 6577defm dump_fortran_original : BooleanFFlag<"dump-fortran-original">, Group<gfortran_Group>; 6578defm dump_parse_tree : BooleanFFlag<"dump-parse-tree">, Group<gfortran_Group>; 6579defm external_blas : BooleanFFlag<"external-blas">, Group<gfortran_Group>; 6580defm f2c : BooleanFFlag<"f2c">, Group<gfortran_Group>; 6581defm frontend_optimize : BooleanFFlag<"frontend-optimize">, Group<gfortran_Group>; 6582defm init_local_zero : BooleanFFlag<"init-local-zero">, Group<gfortran_Group>; 6583defm integer_4_integer_8 : BooleanFFlag<"integer-4-integer-8">, Group<gfortran_Group>; 6584defm max_identifier_length : BooleanFFlag<"max-identifier-length">, Group<gfortran_Group>; 6585defm module_private : BooleanFFlag<"module-private">, Group<gfortran_Group>; 6586defm pack_derived : BooleanFFlag<"pack-derived">, Group<gfortran_Group>; 6587//defm protect_parens : BooleanFFlag<"protect-parens">, Group<gfortran_Group>; 6588defm range_check : BooleanFFlag<"range-check">, Group<gfortran_Group>; 6589defm real_4_real_10 : BooleanFFlag<"real-4-real-10">, Group<gfortran_Group>; 6590defm real_4_real_16 : BooleanFFlag<"real-4-real-16">, Group<gfortran_Group>; 6591defm real_4_real_8 : BooleanFFlag<"real-4-real-8">, Group<gfortran_Group>; 6592defm real_8_real_10 : BooleanFFlag<"real-8-real-10">, Group<gfortran_Group>; 6593defm real_8_real_16 : BooleanFFlag<"real-8-real-16">, Group<gfortran_Group>; 6594defm real_8_real_4 : BooleanFFlag<"real-8-real-4">, Group<gfortran_Group>; 6595defm realloc_lhs : BooleanFFlag<"realloc-lhs">, Group<gfortran_Group>; 6596defm recursive : BooleanFFlag<"recursive">, Group<gfortran_Group>; 6597defm repack_arrays : BooleanFFlag<"repack-arrays">, Group<gfortran_Group>; 6598defm second_underscore : BooleanFFlag<"second-underscore">, Group<gfortran_Group>; 6599defm sign_zero : BooleanFFlag<"sign-zero">, Group<gfortran_Group>; 6600defm whole_file : BooleanFFlag<"whole-file">, Group<gfortran_Group>; 6601 6602// -W <arg> options unsupported by the flang compiler 6603// If any of these options are passed into flang's compiler driver, 6604// a warning will be raised and the argument will be claimed 6605defm : FlangIgnoredDiagOpt<"extra">; 6606defm : FlangIgnoredDiagOpt<"aliasing">; 6607defm : FlangIgnoredDiagOpt<"ampersand">; 6608defm : FlangIgnoredDiagOpt<"array-bounds">; 6609defm : FlangIgnoredDiagOpt<"c-binding-type">; 6610defm : FlangIgnoredDiagOpt<"character-truncation">; 6611defm : FlangIgnoredDiagOpt<"conversion">; 6612defm : FlangIgnoredDiagOpt<"do-subscript">; 6613defm : FlangIgnoredDiagOpt<"function-elimination">; 6614defm : FlangIgnoredDiagOpt<"implicit-interface">; 6615defm : FlangIgnoredDiagOpt<"implicit-procedure">; 6616defm : FlangIgnoredDiagOpt<"intrinsic-shadow">; 6617defm : FlangIgnoredDiagOpt<"use-without-only">; 6618defm : FlangIgnoredDiagOpt<"intrinsics-std">; 6619defm : FlangIgnoredDiagOpt<"line-truncation">; 6620defm : FlangIgnoredDiagOpt<"no-align-commons">; 6621defm : FlangIgnoredDiagOpt<"no-overwrite-recursive">; 6622defm : FlangIgnoredDiagOpt<"no-tabs">; 6623defm : FlangIgnoredDiagOpt<"real-q-constant">; 6624defm : FlangIgnoredDiagOpt<"surprising">; 6625defm : FlangIgnoredDiagOpt<"underflow">; 6626defm : FlangIgnoredDiagOpt<"unused-parameter">; 6627defm : FlangIgnoredDiagOpt<"realloc-lhs">; 6628defm : FlangIgnoredDiagOpt<"realloc-lhs-all">; 6629defm : FlangIgnoredDiagOpt<"frontend-loop-interchange">; 6630defm : FlangIgnoredDiagOpt<"target-lifetime">; 6631 6632// C++ SYCL options 6633def fsycl : Flag<["-"], "fsycl">, 6634 Visibility<[ClangOption, CLOption]>, 6635 Group<sycl_Group>, HelpText<"Enables SYCL kernels compilation for device">; 6636def fno_sycl : Flag<["-"], "fno-sycl">, 6637 Visibility<[ClangOption, CLOption]>, 6638 Group<sycl_Group>, HelpText<"Disables SYCL kernels compilation for device">; 6639 6640// OS-specific options 6641let Flags = [TargetSpecific] in { 6642defm android_pad_segment : BooleanFFlag<"android-pad-segment">, Group<f_Group>; 6643} // let Flags = [TargetSpecific] 6644 6645//===----------------------------------------------------------------------===// 6646// FLangOption + NoXarchOption 6647//===----------------------------------------------------------------------===// 6648 6649def flang_experimental_hlfir : Flag<["-"], "flang-experimental-hlfir">, 6650 Flags<[HelpHidden]>, Visibility<[FlangOption, FC1Option]>, 6651 HelpText<"Use HLFIR lowering (experimental)">; 6652 6653def flang_deprecated_no_hlfir : Flag<["-"], "flang-deprecated-no-hlfir">, 6654 Flags<[HelpHidden]>, Visibility<[FlangOption, FC1Option]>, 6655 HelpText<"Do not use HLFIR lowering (deprecated)">; 6656 6657def flang_experimental_integer_overflow : Flag<["-"], "flang-experimental-integer-overflow">, 6658 Flags<[HelpHidden]>, Visibility<[FlangOption, FC1Option]>, 6659 HelpText<"Add nsw flag to internal operations such as do-variable increment (experimental)">; 6660 6661//===----------------------------------------------------------------------===// 6662// FLangOption + CoreOption + NoXarchOption 6663//===----------------------------------------------------------------------===// 6664 6665def Xflang : Separate<["-"], "Xflang">, 6666 HelpText<"Pass <arg> to the flang compiler">, MetaVarName<"<arg>">, 6667 Flags<[NoXarchOption]>, Visibility<[FlangOption, CLOption]>, 6668 Group<CompileOnly_Group>; 6669 6670//===----------------------------------------------------------------------===// 6671// FlangOption and FC1 Options 6672//===----------------------------------------------------------------------===// 6673 6674let Visibility = [FC1Option, FlangOption] in { 6675 6676def cpp : Flag<["-"], "cpp">, Group<f_Group>, 6677 HelpText<"Enable predefined and command line preprocessor macros">; 6678def nocpp : Flag<["-"], "nocpp">, Group<f_Group>, 6679 HelpText<"Disable predefined and command line preprocessor macros">; 6680def module_dir : JoinedOrSeparate<["-"], "module-dir">, MetaVarName<"<dir>">, 6681 HelpText<"Put MODULE files in <dir>">, 6682 DocBrief<[{This option specifies where to put .mod files for compiled modules. 6683It is also added to the list of directories to be searched by an USE statement. 6684The default is the current directory.}]>; 6685 6686def ffixed_form : Flag<["-"], "ffixed-form">, Group<f_Group>, 6687 HelpText<"Process source files in fixed form">; 6688def ffree_form : Flag<["-"], "ffree-form">, Group<f_Group>, 6689 HelpText<"Process source files in free form">; 6690def ffixed_line_length_EQ : Joined<["-"], "ffixed-line-length=">, Group<f_Group>, 6691 HelpText<"Use <value> as character line width in fixed mode">, 6692 DocBrief<[{Set column after which characters are ignored in typical fixed-form lines in the source 6693file}]>; 6694def ffixed_line_length_VALUE : Joined<["-"], "ffixed-line-length-">, Group<f_Group>, Alias<ffixed_line_length_EQ>; 6695def fconvert_EQ : Joined<["-"], "fconvert=">, Group<f_Group>, 6696 HelpText<"Set endian conversion of data for unformatted files">; 6697def fdefault_double_8 : Flag<["-"],"fdefault-double-8">, Group<f_Group>, 6698 HelpText<"Set the default double precision kind to an 8 byte wide type">; 6699def fdefault_integer_8 : Flag<["-"],"fdefault-integer-8">, Group<f_Group>, 6700 HelpText<"Set the default integer and logical kind to an 8 byte wide type">; 6701def fdefault_real_8 : Flag<["-"],"fdefault-real-8">, Group<f_Group>, 6702 HelpText<"Set the default real kind to an 8 byte wide type">; 6703def flarge_sizes : Flag<["-"],"flarge-sizes">, Group<f_Group>, 6704 HelpText<"Use INTEGER(KIND=8) for the result type in size-related intrinsics">; 6705 6706def falternative_parameter_statement : Flag<["-"], "falternative-parameter-statement">, Group<f_Group>, 6707 HelpText<"Enable the old style PARAMETER statement">; 6708def fintrinsic_modules_path : Separate<["-"], "fintrinsic-modules-path">, Group<f_Group>, MetaVarName<"<dir>">, 6709 HelpText<"Specify where to find the compiled intrinsic modules">, 6710 DocBrief<[{This option specifies the location of pre-compiled intrinsic modules, 6711 if they are not in the default location expected by the compiler.}]>; 6712 6713defm backslash : OptInFC1FFlag<"backslash", "Specify that backslash in string introduces an escape character">; 6714defm xor_operator : OptInFC1FFlag<"xor-operator", "Enable .XOR. as a synonym of .NEQV.">; 6715defm logical_abbreviations : OptInFC1FFlag<"logical-abbreviations", "Enable logical abbreviations">; 6716defm implicit_none : OptInFC1FFlag<"implicit-none", "No implicit typing allowed unless overridden by IMPLICIT statements">; 6717defm underscoring : OptInFC1FFlag<"underscoring", "Appends one trailing underscore to external names">; 6718defm ppc_native_vec_elem_order: BoolOptionWithoutMarshalling<"f", "ppc-native-vector-element-order", 6719 PosFlag<SetTrue, [], [ClangOption], "Specifies PowerPC native vector element order (default)">, 6720 NegFlag<SetFalse, [], [ClangOption], "Specifies PowerPC non-native vector element order">>; 6721 6722def fno_automatic : Flag<["-"], "fno-automatic">, Group<f_Group>, 6723 HelpText<"Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE">; 6724 6725defm stack_arrays : BoolOptionWithoutMarshalling<"f", "stack-arrays", 6726 PosFlag<SetTrue, [], [ClangOption], "Attempt to allocate array temporaries on the stack, no matter their size">, 6727 NegFlag<SetFalse, [], [ClangOption], "Allocate array temporaries on the heap (default)">>; 6728defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stride", 6729 PosFlag<SetTrue, [], [ClangOption], "Create unit-strided versions of loops">, 6730 NegFlag<SetFalse, [], [ClangOption], "Do not create unit-strided loops (default)">>; 6731 6732def fhermetic_module_files : Flag<["-"], "fhermetic-module-files">, Group<f_Group>, 6733 HelpText<"Emit hermetic module files (no nested USE association)">; 6734} // let Visibility = [FC1Option, FlangOption] 6735 6736def J : JoinedOrSeparate<["-"], "J">, 6737 Flags<[RenderJoined]>, Visibility<[FlangOption, FC1Option]>, 6738 Group<gfortran_Group>, 6739 Alias<module_dir>; 6740 6741//===----------------------------------------------------------------------===// 6742// FC1 Options 6743//===----------------------------------------------------------------------===// 6744 6745let Visibility = [FC1Option] in { 6746 6747def fget_definition : MultiArg<["-"], "fget-definition", 3>, 6748 HelpText<"Get the symbol definition from <line> <start-column> <end-column>">, 6749 Group<Action_Group>; 6750def test_io : Flag<["-"], "test-io">, Group<Action_Group>, 6751 HelpText<"Run the InputOuputTest action. Use for development and testing only.">; 6752def fdebug_unparse_no_sema : Flag<["-"], "fdebug-unparse-no-sema">, Group<Action_Group>, 6753 HelpText<"Unparse and stop (skips the semantic checks)">, 6754 DocBrief<[{Only run the parser, then unparse the parse-tree and output the 6755generated Fortran source file. Semantic checks are disabled.}]>; 6756def fdebug_unparse : Flag<["-"], "fdebug-unparse">, Group<Action_Group>, 6757 HelpText<"Unparse and stop.">, 6758 DocBrief<[{Run the parser and the semantic checks. Then unparse the 6759parse-tree and output the generated Fortran source file.}]>; 6760def fdebug_unparse_with_symbols : Flag<["-"], "fdebug-unparse-with-symbols">, Group<Action_Group>, 6761 HelpText<"Unparse with symbols and stop.">; 6762def fdebug_unparse_with_modules : Flag<["-"], "fdebug-unparse-with-modules">, Group<Action_Group>, 6763 HelpText<"Unparse with dependent modules and stop.">; 6764def fdebug_dump_symbols : Flag<["-"], "fdebug-dump-symbols">, Group<Action_Group>, 6765 HelpText<"Dump symbols after the semantic analysis">; 6766def fdebug_dump_parse_tree : Flag<["-"], "fdebug-dump-parse-tree">, Group<Action_Group>, 6767 HelpText<"Dump the parse tree">, 6768 DocBrief<[{Run the Parser and the semantic checks, and then output the 6769parse tree.}]>; 6770def fdebug_dump_pft : Flag<["-"], "fdebug-dump-pft">, Group<Action_Group>, 6771 HelpText<"Dump the pre-fir parse tree">; 6772def fdebug_dump_parse_tree_no_sema : Flag<["-"], "fdebug-dump-parse-tree-no-sema">, Group<Action_Group>, 6773 HelpText<"Dump the parse tree (skips the semantic checks)">, 6774 DocBrief<[{Run the Parser and then output the parse tree. Semantic 6775checks are disabled.}]>; 6776def fdebug_dump_all : Flag<["-"], "fdebug-dump-all">, Group<Action_Group>, 6777 HelpText<"Dump symbols and the parse tree after the semantic checks">; 6778def fdebug_dump_provenance : Flag<["-"], "fdebug-dump-provenance">, Group<Action_Group>, 6779 HelpText<"Dump provenance">; 6780def fdebug_dump_parsing_log : Flag<["-"], "fdebug-dump-parsing-log">, Group<Action_Group>, 6781 HelpText<"Run instrumented parse and dump the parsing log">; 6782def fdebug_measure_parse_tree : Flag<["-"], "fdebug-measure-parse-tree">, Group<Action_Group>, 6783 HelpText<"Measure the parse tree">; 6784def fdebug_pre_fir_tree : Flag<["-"], "fdebug-pre-fir-tree">, Group<Action_Group>, 6785 HelpText<"Dump the pre-FIR tree">; 6786def fdebug_module_writer : Flag<["-"],"fdebug-module-writer">, 6787 HelpText<"Enable debug messages while writing module files">; 6788def fget_symbols_sources : Flag<["-"], "fget-symbols-sources">, Group<Action_Group>, 6789 HelpText<"Dump symbols and their source code locations">; 6790 6791def module_suffix : Separate<["-"], "module-suffix">, Group<f_Group>, MetaVarName<"<suffix>">, 6792 HelpText<"Use <suffix> as the suffix for module files (the default value is `.mod`)">; 6793def fno_reformat : Flag<["-"], "fno-reformat">, Group<Preprocessor_Group>, 6794 HelpText<"Dump the cooked character stream in -E mode">; 6795defm analyzed_objects_for_unparse : OptOutFC1FFlag<"analyzed-objects-for-unparse", "", "Do not use the analyzed objects when unparsing">; 6796 6797def emit_fir : Flag<["-"], "emit-fir">, Group<Action_Group>, 6798 HelpText<"Build the parse tree, then lower it to FIR">; 6799def emit_mlir : Flag<["-"], "emit-mlir">, Alias<emit_fir>; 6800 6801def emit_hlfir : Flag<["-"], "emit-hlfir">, Group<Action_Group>, 6802 HelpText<"Build the parse tree, then lower it to HLFIR">; 6803 6804} // let Visibility = [FC1Option] 6805 6806//===----------------------------------------------------------------------===// 6807// Target Options (cc1 + cc1as) 6808//===----------------------------------------------------------------------===// 6809 6810let Visibility = [CC1Option, CC1AsOption] in { 6811 6812def target_abi : Separate<["-"], "target-abi">, 6813 HelpText<"Target a particular ABI type">, 6814 MarshallingInfoString<TargetOpts<"ABI">>; 6815def target_sdk_version_EQ : Joined<["-"], "target-sdk-version=">, 6816 HelpText<"The version of target SDK used for compilation">; 6817def darwin_target_variant_sdk_version_EQ : Joined<["-"], 6818 "darwin-target-variant-sdk-version=">, 6819 HelpText<"The version of darwin target variant SDK used for compilation">; 6820 6821} // let Visibility = [CC1Option, CC1AsOption] 6822 6823let Visibility = [ClangOption, CC1Option, CC1AsOption] in { 6824 6825def darwin_target_variant_triple : Separate<["-"], "darwin-target-variant-triple">, 6826 HelpText<"Specify the darwin target variant triple">, 6827 MarshallingInfoString<TargetOpts<"DarwinTargetVariantTriple">>, 6828 Normalizer<"normalizeTriple">; 6829 6830} // let Visibility = [ClangOption, CC1Option, CC1AsOption] 6831 6832//===----------------------------------------------------------------------===// 6833// Target Options (cc1 + cc1as + fc1) 6834//===----------------------------------------------------------------------===// 6835 6836let Visibility = [CC1Option, CC1AsOption, FC1Option] in { 6837 6838def tune_cpu : Separate<["-"], "tune-cpu">, 6839 HelpText<"Tune for a specific cpu type">, 6840 MarshallingInfoString<TargetOpts<"TuneCPU">>; 6841def target_cpu : Separate<["-"], "target-cpu">, 6842 HelpText<"Target a specific cpu type">, 6843 MarshallingInfoString<TargetOpts<"CPU">>; 6844def target_feature : Separate<["-"], "target-feature">, 6845 HelpText<"Target specific attributes">, 6846 MarshallingInfoStringVector<TargetOpts<"FeaturesAsWritten">>; 6847def triple : Separate<["-"], "triple">, 6848 HelpText<"Specify target triple (e.g. i686-apple-darwin9)">, 6849 MarshallingInfoString<TargetOpts<"Triple">, "llvm::Triple::normalize(llvm::sys::getDefaultTargetTriple())">, 6850 AlwaysEmit, Normalizer<"normalizeTriple">; 6851 6852} // let Visibility = [CC1Option, CC1AsOption, FC1Option] 6853 6854//===----------------------------------------------------------------------===// 6855// Target Options (other) 6856//===----------------------------------------------------------------------===// 6857 6858let Visibility = [CC1Option] in { 6859 6860def target_linker_version : Separate<["-"], "target-linker-version">, 6861 HelpText<"Target linker version">, 6862 MarshallingInfoString<TargetOpts<"LinkerVersion">>; 6863def triple_EQ : Joined<["-"], "triple=">, Alias<triple>; 6864def mfpmath : Separate<["-"], "mfpmath">, 6865 HelpText<"Which unit to use for fp math">, 6866 MarshallingInfoString<TargetOpts<"FPMath">>; 6867 6868defm padding_on_unsigned_fixed_point : BoolOption<"f", "padding-on-unsigned-fixed-point", 6869 LangOpts<"PaddingOnUnsignedFixedPoint">, DefaultFalse, 6870 PosFlag<SetTrue, [], [ClangOption], "Force each unsigned fixed point type to have an extra bit of padding to align their scales with those of signed fixed point types">, 6871 NegFlag<SetFalse>>, 6872 ShouldParseIf<ffixed_point.KeyPath>; 6873 6874} // let Visibility = [CC1Option] 6875 6876//===----------------------------------------------------------------------===// 6877// Analyzer Options 6878//===----------------------------------------------------------------------===// 6879 6880let Visibility = [CC1Option] in { 6881 6882def analysis_UnoptimizedCFG : Flag<["-"], "unoptimized-cfg">, 6883 HelpText<"Generate unoptimized CFGs for all analyses">, 6884 MarshallingInfoFlag<AnalyzerOpts<"UnoptimizedCFG">>; 6885def analysis_CFGAddImplicitDtors : Flag<["-"], "cfg-add-implicit-dtors">, 6886 HelpText<"Add C++ implicit destructors to CFGs for all analyses">; 6887 6888def analyzer_constraints : Separate<["-"], "analyzer-constraints">, 6889 HelpText<"Source Code Analysis - Symbolic Constraint Engines">; 6890def analyzer_constraints_EQ : Joined<["-"], "analyzer-constraints=">, 6891 Alias<analyzer_constraints>; 6892 6893def analyzer_output : Separate<["-"], "analyzer-output">, 6894 HelpText<"Source Code Analysis - Output Options">; 6895def analyzer_output_EQ : Joined<["-"], "analyzer-output=">, 6896 Alias<analyzer_output>; 6897 6898def analyzer_purge : Separate<["-"], "analyzer-purge">, 6899 HelpText<"Source Code Analysis - Dead Symbol Removal Frequency">; 6900def analyzer_purge_EQ : Joined<["-"], "analyzer-purge=">, Alias<analyzer_purge>; 6901 6902def analyzer_opt_analyze_headers : Flag<["-"], "analyzer-opt-analyze-headers">, 6903 HelpText<"Force the static analyzer to analyze functions defined in header files">, 6904 MarshallingInfoFlag<AnalyzerOpts<"AnalyzeAll">>; 6905def analyzer_display_progress : Flag<["-"], "analyzer-display-progress">, 6906 HelpText<"Emit verbose output about the analyzer's progress">, 6907 MarshallingInfoFlag<AnalyzerOpts<"AnalyzerDisplayProgress">>; 6908def analyzer_note_analysis_entry_points : Flag<["-"], "analyzer-note-analysis-entry-points">, 6909 HelpText<"Add a note for each bug report to denote their analysis entry points">, 6910 MarshallingInfoFlag<AnalyzerOpts<"AnalyzerNoteAnalysisEntryPoints">>; 6911def analyze_function : Separate<["-"], "analyze-function">, 6912 HelpText<"Run analysis on specific function (for C++ include parameters in name)">, 6913 MarshallingInfoString<AnalyzerOpts<"AnalyzeSpecificFunction">>; 6914def analyze_function_EQ : Joined<["-"], "analyze-function=">, Alias<analyze_function>; 6915def trim_egraph : Flag<["-"], "trim-egraph">, 6916 HelpText<"Only show error-related paths in the analysis graph">, 6917 MarshallingInfoFlag<AnalyzerOpts<"TrimGraph">>; 6918def analyzer_viz_egraph_graphviz : Flag<["-"], "analyzer-viz-egraph-graphviz">, 6919 HelpText<"Display exploded graph using GraphViz">, 6920 MarshallingInfoFlag<AnalyzerOpts<"visualizeExplodedGraphWithGraphViz">>; 6921def analyzer_dump_egraph : Separate<["-"], "analyzer-dump-egraph">, 6922 HelpText<"Dump exploded graph to the specified file">, 6923 MarshallingInfoString<AnalyzerOpts<"DumpExplodedGraphTo">>; 6924def analyzer_dump_egraph_EQ : Joined<["-"], "analyzer-dump-egraph=">, Alias<analyzer_dump_egraph>; 6925 6926def analyzer_inline_max_stack_depth : Separate<["-"], "analyzer-inline-max-stack-depth">, 6927 HelpText<"Bound on stack depth while inlining (4 by default)">, 6928 // Cap the stack depth at 4 calls (5 stack frames, base + 4 calls). 6929 MarshallingInfoInt<AnalyzerOpts<"InlineMaxStackDepth">, "5">; 6930def analyzer_inline_max_stack_depth_EQ : Joined<["-"], "analyzer-inline-max-stack-depth=">, 6931 Alias<analyzer_inline_max_stack_depth>; 6932 6933def analyzer_inlining_mode : Separate<["-"], "analyzer-inlining-mode">, 6934 HelpText<"Specify the function selection heuristic used during inlining">; 6935def analyzer_inlining_mode_EQ : Joined<["-"], "analyzer-inlining-mode=">, Alias<analyzer_inlining_mode>; 6936 6937def analyzer_disable_retry_exhausted : Flag<["-"], "analyzer-disable-retry-exhausted">, 6938 HelpText<"Do not re-analyze paths leading to exhausted nodes with a different strategy (may decrease code coverage)">, 6939 MarshallingInfoFlag<AnalyzerOpts<"NoRetryExhausted">>; 6940 6941def analyzer_max_loop : Separate<["-"], "analyzer-max-loop">, 6942 HelpText<"The maximum number of times the analyzer will go through a loop">, 6943 MarshallingInfoInt<AnalyzerOpts<"maxBlockVisitOnPath">, "4">; 6944def analyzer_stats : Flag<["-"], "analyzer-stats">, 6945 HelpText<"Print internal analyzer statistics.">, 6946 MarshallingInfoFlag<AnalyzerOpts<"PrintStats">>; 6947 6948def analyzer_checker : Separate<["-"], "analyzer-checker">, 6949 HelpText<"Choose analyzer checkers to enable">, 6950 ValuesCode<[{ 6951 static constexpr const char VALUES_CODE [] = 6952 #define GET_CHECKERS 6953 #define CHECKER(FULLNAME, CLASS, HT, DOC_URI, IS_HIDDEN) FULLNAME "," 6954 #include "clang/StaticAnalyzer/Checkers/Checkers.inc" 6955 #undef GET_CHECKERS 6956 #define GET_PACKAGES 6957 #define PACKAGE(FULLNAME) FULLNAME "," 6958 #include "clang/StaticAnalyzer/Checkers/Checkers.inc" 6959 #undef GET_PACKAGES 6960 ; 6961 }]>; 6962def analyzer_checker_EQ : Joined<["-"], "analyzer-checker=">, 6963 Alias<analyzer_checker>; 6964 6965def analyzer_disable_checker : Separate<["-"], "analyzer-disable-checker">, 6966 HelpText<"Choose analyzer checkers to disable">; 6967def analyzer_disable_checker_EQ : Joined<["-"], "analyzer-disable-checker=">, 6968 Alias<analyzer_disable_checker>; 6969 6970def analyzer_disable_all_checks : Flag<["-"], "analyzer-disable-all-checks">, 6971 HelpText<"Disable all static analyzer checks">, 6972 MarshallingInfoFlag<AnalyzerOpts<"DisableAllCheckers">>; 6973 6974def analyzer_checker_help : Flag<["-"], "analyzer-checker-help">, 6975 HelpText<"Display the list of analyzer checkers that are available">, 6976 MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerHelp">>; 6977 6978def analyzer_checker_help_alpha : Flag<["-"], "analyzer-checker-help-alpha">, 6979 HelpText<"Display the list of in development analyzer checkers. These " 6980 "are NOT considered safe, they are unstable and will emit incorrect " 6981 "reports. Enable ONLY FOR DEVELOPMENT purposes">, 6982 MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerHelpAlpha">>; 6983 6984def analyzer_checker_help_developer : Flag<["-"], "analyzer-checker-help-developer">, 6985 HelpText<"Display the list of developer-only checkers such as modeling " 6986 "and debug checkers">, 6987 MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerHelpDeveloper">>; 6988 6989def analyzer_config_help : Flag<["-"], "analyzer-config-help">, 6990 HelpText<"Display the list of -analyzer-config options. These are meant for " 6991 "development purposes only!">, 6992 MarshallingInfoFlag<AnalyzerOpts<"ShowConfigOptionsList">>; 6993 6994def analyzer_list_enabled_checkers : Flag<["-"], "analyzer-list-enabled-checkers">, 6995 HelpText<"Display the list of enabled analyzer checkers">, 6996 MarshallingInfoFlag<AnalyzerOpts<"ShowEnabledCheckerList">>; 6997 6998def analyzer_config : Separate<["-"], "analyzer-config">, 6999 HelpText<"Choose analyzer options to enable">; 7000 7001def analyzer_checker_option_help : Flag<["-"], "analyzer-checker-option-help">, 7002 HelpText<"Display the list of checker and package options">, 7003 MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionList">>; 7004 7005def analyzer_checker_option_help_alpha : Flag<["-"], "analyzer-checker-option-help-alpha">, 7006 HelpText<"Display the list of in development checker and package options. " 7007 "These are NOT considered safe, they are unstable and will emit " 7008 "incorrect reports. Enable ONLY FOR DEVELOPMENT purposes">, 7009 MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionAlphaList">>; 7010 7011def analyzer_checker_option_help_developer : Flag<["-"], "analyzer-checker-option-help-developer">, 7012 HelpText<"Display the list of checker and package options meant for " 7013 "development purposes only">, 7014 MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionDeveloperList">>; 7015 7016def analyzer_config_compatibility_mode : Separate<["-"], "analyzer-config-compatibility-mode">, 7017 HelpText<"Don't emit errors on invalid analyzer-config inputs">, 7018 Values<"true,false">, NormalizedValues<[[{false}], [{true}]]>, 7019 MarshallingInfoEnum<AnalyzerOpts<"ShouldEmitErrorsOnInvalidConfigValue">, [{true}]>; 7020 7021def analyzer_config_compatibility_mode_EQ : Joined<["-"], "analyzer-config-compatibility-mode=">, 7022 Alias<analyzer_config_compatibility_mode>; 7023 7024def analyzer_werror : Flag<["-"], "analyzer-werror">, 7025 HelpText<"Emit analyzer results as errors rather than warnings">, 7026 MarshallingInfoFlag<AnalyzerOpts<"AnalyzerWerror">>; 7027 7028} // let Visibility = [CC1Option] 7029 7030//===----------------------------------------------------------------------===// 7031// Migrator Options 7032//===----------------------------------------------------------------------===// 7033 7034def migrator_no_nsalloc_error : Flag<["-"], "no-ns-alloc-error">, 7035 HelpText<"Do not error on use of NSAllocateCollectable/NSReallocateCollectable">, 7036 Visibility<[CC1Option]>, 7037 MarshallingInfoFlag<MigratorOpts<"NoNSAllocReallocError">>; 7038 7039def migrator_no_finalize_removal : Flag<["-"], "no-finalize-removal">, 7040 HelpText<"Do not remove finalize method in gc mode">, 7041 Visibility<[CC1Option]>, 7042 MarshallingInfoFlag<MigratorOpts<"NoFinalizeRemoval">>; 7043 7044//===----------------------------------------------------------------------===// 7045// CodeGen Options 7046//===----------------------------------------------------------------------===// 7047 7048let Visibility = [CC1Option, CC1AsOption, FC1Option] in { 7049 7050def mrelocation_model : Separate<["-"], "mrelocation-model">, 7051 HelpText<"The relocation model to use">, Values<"static,pic,ropi,rwpi,ropi-rwpi,dynamic-no-pic">, 7052 NormalizedValuesScope<"llvm::Reloc">, 7053 NormalizedValues<["Static", "PIC_", "ROPI", "RWPI", "ROPI_RWPI", "DynamicNoPIC"]>, 7054 MarshallingInfoEnum<CodeGenOpts<"RelocationModel">, "PIC_">; 7055def debug_info_kind_EQ : Joined<["-"], "debug-info-kind=">; 7056 7057} // let Visibility = [CC1Option, CC1AsOption, FC1Option] 7058 7059let Visibility = [CC1Option, CC1AsOption] in { 7060 7061def debug_info_macro : Flag<["-"], "debug-info-macro">, 7062 HelpText<"Emit macro debug information">, 7063 MarshallingInfoFlag<CodeGenOpts<"MacroDebugInfo">>; 7064def default_function_attr : Separate<["-"], "default-function-attr">, 7065 HelpText<"Apply given attribute to all functions">, 7066 MarshallingInfoStringVector<CodeGenOpts<"DefaultFunctionAttrs">>; 7067def dwarf_version_EQ : Joined<["-"], "dwarf-version=">, 7068 MarshallingInfoInt<CodeGenOpts<"DwarfVersion">>; 7069def debugger_tuning_EQ : Joined<["-"], "debugger-tuning=">, 7070 Values<"gdb,lldb,sce,dbx">, 7071 NormalizedValuesScope<"llvm::DebuggerKind">, NormalizedValues<["GDB", "LLDB", "SCE", "DBX"]>, 7072 MarshallingInfoEnum<CodeGenOpts<"DebuggerTuning">, "Default">; 7073def dwarf_debug_flags : Separate<["-"], "dwarf-debug-flags">, 7074 HelpText<"The string to embed in the Dwarf debug flags record.">, 7075 MarshallingInfoString<CodeGenOpts<"DwarfDebugFlags">>; 7076def record_command_line : Separate<["-"], "record-command-line">, 7077 HelpText<"The string to embed in the .LLVM.command.line section.">, 7078 MarshallingInfoString<CodeGenOpts<"RecordCommandLine">>; 7079def compress_debug_sections_EQ : Joined<["-", "--"], "compress-debug-sections=">, 7080 HelpText<"DWARF debug sections compression type">, Values<"none,zlib,zstd">, 7081 NormalizedValuesScope<"llvm::DebugCompressionType">, NormalizedValues<["None", "Zlib", "Zstd"]>, 7082 MarshallingInfoEnum<CodeGenOpts<"CompressDebugSections">, "None">; 7083def compress_debug_sections : Flag<["-", "--"], "compress-debug-sections">, 7084 Alias<compress_debug_sections_EQ>, AliasArgs<["zlib"]>; 7085def mno_exec_stack : Flag<["-"], "mnoexecstack">, 7086 HelpText<"Mark the file as not needing an executable stack">, 7087 MarshallingInfoFlag<CodeGenOpts<"NoExecStack">>; 7088def massembler_no_warn : Flag<["-"], "massembler-no-warn">, 7089 HelpText<"Make assembler not emit warnings">, 7090 MarshallingInfoFlag<CodeGenOpts<"NoWarn">>; 7091def massembler_fatal_warnings : Flag<["-"], "massembler-fatal-warnings">, 7092 HelpText<"Make assembler warnings fatal">, 7093 MarshallingInfoFlag<CodeGenOpts<"FatalWarnings">>; 7094def crel : Flag<["--"], "crel">, 7095 HelpText<"Enable CREL relocation format (ELF only)">, 7096 MarshallingInfoFlag<CodeGenOpts<"Crel">>; 7097def mrelax_relocations_no : Flag<["-"], "mrelax-relocations=no">, 7098 HelpText<"Disable x86 relax relocations">, 7099 MarshallingInfoNegativeFlag<CodeGenOpts<"RelaxELFRelocations">>; 7100def msave_temp_labels : Flag<["-"], "msave-temp-labels">, 7101 HelpText<"Save temporary labels in the symbol table. " 7102 "Note this may change .s semantics and shouldn't generally be used " 7103 "on compiler-generated code.">, 7104 MarshallingInfoFlag<CodeGenOpts<"SaveTempLabels">>; 7105def mno_type_check : Flag<["-"], "mno-type-check">, 7106 HelpText<"Don't perform type checking of the assembly code (wasm only)">, 7107 MarshallingInfoFlag<CodeGenOpts<"NoTypeCheck">>; 7108def fno_math_builtin : Flag<["-"], "fno-math-builtin">, 7109 HelpText<"Disable implicit builtin knowledge of math functions">, 7110 MarshallingInfoFlag<LangOpts<"NoMathBuiltin">>; 7111def fno_use_ctor_homing: Flag<["-"], "fno-use-ctor-homing">, 7112 HelpText<"Don't use constructor homing for debug info">; 7113def fuse_ctor_homing: Flag<["-"], "fuse-ctor-homing">, 7114 HelpText<"Use constructor homing if we are using limited debug info already">; 7115def as_secure_log_file : Separate<["-"], "as-secure-log-file">, 7116 HelpText<"Emit .secure_log_unique directives to this filename.">, 7117 MarshallingInfoString<CodeGenOpts<"AsSecureLogFile">>; 7118 7119} // let Visibility = [CC1Option, CC1AsOption] 7120 7121let Visibility = [CC1Option, FC1Option] in { 7122def mlink_builtin_bitcode : Separate<["-"], "mlink-builtin-bitcode">, 7123 HelpText<"Link and internalize needed symbols from the given bitcode file " 7124 "before performing optimizations.">; 7125} // let Visibility = [CC1Option, FC1Option] 7126 7127let Visibility = [CC1Option] in { 7128 7129def llvm_verify_each : Flag<["-"], "llvm-verify-each">, 7130 HelpText<"Run the LLVM verifier after every LLVM pass">, 7131 MarshallingInfoFlag<CodeGenOpts<"VerifyEach">>; 7132def disable_llvm_verifier : Flag<["-"], "disable-llvm-verifier">, 7133 HelpText<"Don't run the LLVM IR verifier pass">, 7134 MarshallingInfoNegativeFlag<CodeGenOpts<"VerifyModule">>; 7135def disable_llvm_passes : Flag<["-"], "disable-llvm-passes">, 7136 HelpText<"Use together with -emit-llvm to get pristine LLVM IR from the " 7137 "frontend by not running any LLVM passes at all">, 7138 MarshallingInfoFlag<CodeGenOpts<"DisableLLVMPasses">>; 7139def disable_llvm_optzns : Flag<["-"], "disable-llvm-optzns">, 7140 Alias<disable_llvm_passes>; 7141def disable_lifetimemarkers : Flag<["-"], "disable-lifetime-markers">, 7142 HelpText<"Disable lifetime-markers emission even when optimizations are " 7143 "enabled">, 7144 MarshallingInfoFlag<CodeGenOpts<"DisableLifetimeMarkers">>; 7145def disable_O0_optnone : Flag<["-"], "disable-O0-optnone">, 7146 HelpText<"Disable adding the optnone attribute to functions at O0">, 7147 MarshallingInfoFlag<CodeGenOpts<"DisableO0ImplyOptNone">>; 7148def disable_red_zone : Flag<["-"], "disable-red-zone">, 7149 HelpText<"Do not emit code that uses the red zone.">, 7150 MarshallingInfoFlag<CodeGenOpts<"DisableRedZone">>; 7151def dwarf_ext_refs : Flag<["-"], "dwarf-ext-refs">, 7152 HelpText<"Generate debug info with external references to clang modules" 7153 " or precompiled headers">, 7154 MarshallingInfoFlag<CodeGenOpts<"DebugTypeExtRefs">>; 7155def dwarf_explicit_import : Flag<["-"], "dwarf-explicit-import">, 7156 HelpText<"Generate explicit import from anonymous namespace to containing" 7157 " scope">, 7158 MarshallingInfoFlag<CodeGenOpts<"DebugExplicitImport">>; 7159def debug_forward_template_params : Flag<["-"], "debug-forward-template-params">, 7160 HelpText<"Emit complete descriptions of template parameters in forward" 7161 " declarations">, 7162 MarshallingInfoFlag<CodeGenOpts<"DebugFwdTemplateParams">>; 7163def fforbid_guard_variables : Flag<["-"], "fforbid-guard-variables">, 7164 HelpText<"Emit an error if a C++ static local initializer would need a guard variable">, 7165 MarshallingInfoFlag<CodeGenOpts<"ForbidGuardVariables">>; 7166def no_implicit_float : Flag<["-"], "no-implicit-float">, 7167 HelpText<"Don't generate implicit floating point or vector instructions">, 7168 MarshallingInfoFlag<CodeGenOpts<"NoImplicitFloat">>; 7169def fdump_vtable_layouts : Flag<["-"], "fdump-vtable-layouts">, 7170 HelpText<"Dump the layouts of all vtables that will be emitted in a translation unit">, 7171 MarshallingInfoFlag<LangOpts<"DumpVTableLayouts">>; 7172def fmerge_functions : Flag<["-"], "fmerge-functions">, 7173 HelpText<"Permit merging of identical functions when optimizing.">, 7174 MarshallingInfoFlag<CodeGenOpts<"MergeFunctions">>; 7175def : Joined<["-"], "coverage-data-file=">, 7176 MarshallingInfoString<CodeGenOpts<"CoverageDataFile">>; 7177def : Joined<["-"], "coverage-notes-file=">, 7178 MarshallingInfoString<CodeGenOpts<"CoverageNotesFile">>; 7179def coverage_version_EQ : Joined<["-"], "coverage-version=">, 7180 HelpText<"Four-byte version string for gcov files.">; 7181def dump_coverage_mapping : Flag<["-"], "dump-coverage-mapping">, 7182 HelpText<"Dump the coverage mapping records, for testing">, 7183 MarshallingInfoFlag<CodeGenOpts<"DumpCoverageMapping">>; 7184def fuse_register_sized_bitfield_access: Flag<["-"], "fuse-register-sized-bitfield-access">, 7185 HelpText<"Use register sized accesses to bit-fields, when possible.">, 7186 MarshallingInfoFlag<CodeGenOpts<"UseRegisterSizedBitfieldAccess">>; 7187def relaxed_aliasing : Flag<["-"], "relaxed-aliasing">, 7188 HelpText<"Turn off Type Based Alias Analysis">, 7189 MarshallingInfoFlag<CodeGenOpts<"RelaxedAliasing">>; 7190def pointer_tbaa: Flag<["-"], "pointer-tbaa">, 7191 HelpText<"Turn on Type Based Alias Analysis for pointer accesses">, 7192 MarshallingInfoFlag<CodeGenOpts<"PointerTBAA">>; 7193def no_struct_path_tbaa : Flag<["-"], "no-struct-path-tbaa">, 7194 HelpText<"Turn off struct-path aware Type Based Alias Analysis">, 7195 MarshallingInfoNegativeFlag<CodeGenOpts<"StructPathTBAA">>; 7196def new_struct_path_tbaa : Flag<["-"], "new-struct-path-tbaa">, 7197 HelpText<"Enable enhanced struct-path aware Type Based Alias Analysis">; 7198def mdebug_pass : Separate<["-"], "mdebug-pass">, 7199 HelpText<"Enable additional debug output">, 7200 MarshallingInfoString<CodeGenOpts<"DebugPass">>; 7201def mabi_EQ_ieeelongdouble : Flag<["-"], "mabi=ieeelongdouble">, 7202 HelpText<"Use IEEE 754 quadruple-precision for long double">, 7203 MarshallingInfoFlag<LangOpts<"PPCIEEELongDouble">>; 7204def mabi_EQ_vec_extabi : Flag<["-"], "mabi=vec-extabi">, 7205 HelpText<"Enable the extended Altivec ABI on AIX. Use volatile and nonvolatile vector registers">, 7206 MarshallingInfoFlag<LangOpts<"EnableAIXExtendedAltivecABI">>; 7207def mfloat_abi : Separate<["-"], "mfloat-abi">, 7208 HelpText<"The float ABI to use">, 7209 MarshallingInfoString<CodeGenOpts<"FloatABI">>; 7210def mtp : Separate<["-"], "mtp">, 7211 HelpText<"Mode for reading thread pointer">; 7212def mlimit_float_precision : Separate<["-"], "mlimit-float-precision">, 7213 HelpText<"Limit float precision to the given value">, 7214 MarshallingInfoString<CodeGenOpts<"LimitFloatPrecision">>; 7215def mregparm : Separate<["-"], "mregparm">, 7216 HelpText<"Limit the number of registers available for integer arguments">, 7217 MarshallingInfoInt<CodeGenOpts<"NumRegisterParameters">>; 7218def msmall_data_limit : Separate<["-"], "msmall-data-limit">, 7219 HelpText<"Put global and static data smaller than the limit into a special section">, 7220 MarshallingInfoInt<CodeGenOpts<"SmallDataLimit">>; 7221def funwind_tables_EQ : Joined<["-"], "funwind-tables=">, 7222 HelpText<"Generate unwinding tables for all functions">, 7223 MarshallingInfoInt<CodeGenOpts<"UnwindTables">>; 7224defm constructor_aliases : BoolMOption<"constructor-aliases", 7225 CodeGenOpts<"CXXCtorDtorAliases">, DefaultFalse, 7226 PosFlag<SetTrue, [], [ClangOption], "Enable">, 7227 NegFlag<SetFalse, [], [ClangOption], "Disable">, 7228 BothFlags<[], [ClangOption, CC1Option], 7229 " emitting complete constructors and destructors as aliases when possible">>; 7230def mlink_bitcode_file : Separate<["-"], "mlink-bitcode-file">, 7231 HelpText<"Link the given bitcode file before performing optimizations.">; 7232defm link_builtin_bitcode_postopt: BoolMOption<"link-builtin-bitcode-postopt", 7233 CodeGenOpts<"LinkBitcodePostopt">, DefaultFalse, 7234 PosFlag<SetTrue, [], [ClangOption], "Link builtin bitcodes after the " 7235 "optimization pipeline">, 7236 NegFlag<SetFalse, [], [ClangOption]>>; 7237def vectorize_loops : Flag<["-"], "vectorize-loops">, 7238 HelpText<"Run the Loop vectorization passes">, 7239 MarshallingInfoFlag<CodeGenOpts<"VectorizeLoop">>; 7240def vectorize_slp : Flag<["-"], "vectorize-slp">, 7241 HelpText<"Run the SLP vectorization passes">, 7242 MarshallingInfoFlag<CodeGenOpts<"VectorizeSLP">>; 7243def linker_option : Joined<["--"], "linker-option=">, 7244 HelpText<"Add linker option">, 7245 MarshallingInfoStringVector<CodeGenOpts<"LinkerOptions">>; 7246def fsanitize_coverage_type : Joined<["-"], "fsanitize-coverage-type=">, 7247 HelpText<"Sanitizer coverage type">, 7248 MarshallingInfoInt<CodeGenOpts<"SanitizeCoverageType">>; 7249def fsanitize_coverage_indirect_calls 7250 : Flag<["-"], "fsanitize-coverage-indirect-calls">, 7251 HelpText<"Enable sanitizer coverage for indirect calls">, 7252 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageIndirectCalls">>; 7253def fsanitize_coverage_trace_bb 7254 : Flag<["-"], "fsanitize-coverage-trace-bb">, 7255 HelpText<"Enable basic block tracing in sanitizer coverage">, 7256 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceBB">>; 7257def fsanitize_coverage_trace_cmp 7258 : Flag<["-"], "fsanitize-coverage-trace-cmp">, 7259 HelpText<"Enable cmp instruction tracing in sanitizer coverage">, 7260 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceCmp">>; 7261def fsanitize_coverage_trace_div 7262 : Flag<["-"], "fsanitize-coverage-trace-div">, 7263 HelpText<"Enable div instruction tracing in sanitizer coverage">, 7264 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceDiv">>; 7265def fsanitize_coverage_trace_gep 7266 : Flag<["-"], "fsanitize-coverage-trace-gep">, 7267 HelpText<"Enable gep instruction tracing in sanitizer coverage">, 7268 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceGep">>; 7269def fsanitize_coverage_8bit_counters 7270 : Flag<["-"], "fsanitize-coverage-8bit-counters">, 7271 HelpText<"Enable frequency counters in sanitizer coverage">, 7272 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverage8bitCounters">>; 7273def fsanitize_coverage_inline_8bit_counters 7274 : Flag<["-"], "fsanitize-coverage-inline-8bit-counters">, 7275 HelpText<"Enable inline 8-bit counters in sanitizer coverage">, 7276 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageInline8bitCounters">>; 7277def fsanitize_coverage_inline_bool_flag 7278 : Flag<["-"], "fsanitize-coverage-inline-bool-flag">, 7279 HelpText<"Enable inline bool flag in sanitizer coverage">, 7280 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageInlineBoolFlag">>; 7281def fsanitize_coverage_pc_table 7282 : Flag<["-"], "fsanitize-coverage-pc-table">, 7283 HelpText<"Create a table of coverage-instrumented PCs">, 7284 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoveragePCTable">>; 7285def fsanitize_coverage_control_flow 7286 : Flag<["-"], "fsanitize-coverage-control-flow">, 7287 HelpText<"Collect control flow of function">, 7288 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageControlFlow">>; 7289def fsanitize_coverage_trace_pc 7290 : Flag<["-"], "fsanitize-coverage-trace-pc">, 7291 HelpText<"Enable PC tracing in sanitizer coverage">, 7292 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTracePC">>; 7293def fsanitize_coverage_trace_pc_guard 7294 : Flag<["-"], "fsanitize-coverage-trace-pc-guard">, 7295 HelpText<"Enable PC tracing with guard in sanitizer coverage">, 7296 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTracePCGuard">>; 7297def fsanitize_coverage_no_prune 7298 : Flag<["-"], "fsanitize-coverage-no-prune">, 7299 HelpText<"Disable coverage pruning (i.e. instrument all blocks/edges)">, 7300 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageNoPrune">>; 7301def fsanitize_coverage_stack_depth 7302 : Flag<["-"], "fsanitize-coverage-stack-depth">, 7303 HelpText<"Enable max stack depth tracing">, 7304 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageStackDepth">>; 7305def fsanitize_coverage_trace_loads 7306 : Flag<["-"], "fsanitize-coverage-trace-loads">, 7307 HelpText<"Enable tracing of loads">, 7308 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceLoads">>; 7309def fsanitize_coverage_trace_stores 7310 : Flag<["-"], "fsanitize-coverage-trace-stores">, 7311 HelpText<"Enable tracing of stores">, 7312 MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceStores">>; 7313def fexperimental_sanitize_metadata_EQ_covered 7314 : Flag<["-"], "fexperimental-sanitize-metadata=covered">, 7315 HelpText<"Emit PCs for code covered with binary analysis sanitizers">, 7316 MarshallingInfoFlag<CodeGenOpts<"SanitizeBinaryMetadataCovered">>; 7317def fexperimental_sanitize_metadata_EQ_atomics 7318 : Flag<["-"], "fexperimental-sanitize-metadata=atomics">, 7319 HelpText<"Emit PCs for atomic operations used by binary analysis sanitizers">, 7320 MarshallingInfoFlag<CodeGenOpts<"SanitizeBinaryMetadataAtomics">>; 7321def fexperimental_sanitize_metadata_EQ_uar 7322 : Flag<["-"], "fexperimental-sanitize-metadata=uar">, 7323 HelpText<"Emit PCs for start of functions that are subject for use-after-return checking.">, 7324 MarshallingInfoFlag<CodeGenOpts<"SanitizeBinaryMetadataUAR">>; 7325def fpatchable_function_entry_offset_EQ 7326 : Joined<["-"], "fpatchable-function-entry-offset=">, MetaVarName<"<M>">, 7327 HelpText<"Generate M NOPs before function entry">, 7328 MarshallingInfoInt<CodeGenOpts<"PatchableFunctionEntryOffset">>; 7329def fprofile_instrument_EQ : Joined<["-"], "fprofile-instrument=">, 7330 HelpText<"Enable PGO instrumentation">, Values<"none,clang,llvm,csllvm">, 7331 NormalizedValuesScope<"CodeGenOptions">, 7332 NormalizedValues<["ProfileNone", "ProfileClangInstr", "ProfileIRInstr", "ProfileCSIRInstr"]>, 7333 MarshallingInfoEnum<CodeGenOpts<"ProfileInstr">, "ProfileNone">; 7334def fprofile_instrument_path_EQ : Joined<["-"], "fprofile-instrument-path=">, 7335 HelpText<"Generate instrumented code to collect execution counts into " 7336 "<file> (overridden by LLVM_PROFILE_FILE env var)">, 7337 MarshallingInfoString<CodeGenOpts<"InstrProfileOutput">>; 7338def fprofile_instrument_use_path_EQ : 7339 Joined<["-"], "fprofile-instrument-use-path=">, 7340 HelpText<"Specify the profile path in PGO use compilation">, 7341 MarshallingInfoString<CodeGenOpts<"ProfileInstrumentUsePath">>; 7342def flto_visibility_public_std: 7343 Flag<["-"], "flto-visibility-public-std">, 7344 HelpText<"Use public LTO visibility for classes in std and stdext namespaces">, 7345 MarshallingInfoFlag<CodeGenOpts<"LTOVisibilityPublicStd">>; 7346defm lto_unit : BoolOption<"f", "lto-unit", 7347 CodeGenOpts<"LTOUnit">, DefaultFalse, 7348 PosFlag<SetTrue, [], [ClangOption, CC1Option], 7349 "Emit IR to support LTO unit features (CFI, whole program vtable opt)">, 7350 NegFlag<SetFalse>>; 7351def fverify_debuginfo_preserve 7352 : Flag<["-"], "fverify-debuginfo-preserve">, 7353 HelpText<"Enable Debug Info Metadata preservation testing in " 7354 "optimizations.">, 7355 MarshallingInfoFlag<CodeGenOpts<"EnableDIPreservationVerify">>; 7356def fverify_debuginfo_preserve_export 7357 : Joined<["-"], "fverify-debuginfo-preserve-export=">, 7358 MetaVarName<"<file>">, 7359 HelpText<"Export debug info (by testing original Debug Info) failures " 7360 "into specified (JSON) file (should be abs path as we use " 7361 "append mode to insert new JSON objects).">, 7362 MarshallingInfoString<CodeGenOpts<"DIBugsReportFilePath">>; 7363def fwarn_stack_size_EQ 7364 : Joined<["-"], "fwarn-stack-size=">, 7365 MarshallingInfoInt<CodeGenOpts<"WarnStackSize">, "UINT_MAX">; 7366// The driver option takes the key as a parameter to the -msign-return-address= 7367// and -mbranch-protection= options, but CC1 has a separate option so we 7368// don't have to parse the parameter twice. 7369def msign_return_address_key_EQ : Joined<["-"], "msign-return-address-key=">, 7370 Values<"a_key,b_key">; 7371def mbranch_target_enforce : Flag<["-"], "mbranch-target-enforce">, 7372 MarshallingInfoFlag<LangOpts<"BranchTargetEnforcement">>; 7373def mbranch_protection_pauth_lr : Flag<["-"], "mbranch-protection-pauth-lr">, 7374 MarshallingInfoFlag<LangOpts<"BranchProtectionPAuthLR">>; 7375def mguarded_control_stack : Flag<["-"], "mguarded-control-stack">, 7376 MarshallingInfoFlag<LangOpts<"GuardedControlStack">>; 7377def fno_dllexport_inlines : Flag<["-"], "fno-dllexport-inlines">, 7378 MarshallingInfoNegativeFlag<LangOpts<"DllExportInlines">>; 7379def cfguard_no_checks : Flag<["-"], "cfguard-no-checks">, 7380 HelpText<"Emit Windows Control Flow Guard tables only (no checks)">, 7381 MarshallingInfoFlag<CodeGenOpts<"ControlFlowGuardNoChecks">>; 7382def cfguard : Flag<["-"], "cfguard">, 7383 HelpText<"Emit Windows Control Flow Guard tables and checks">, 7384 MarshallingInfoFlag<CodeGenOpts<"ControlFlowGuard">>; 7385def ehcontguard : Flag<["-"], "ehcontguard">, 7386 HelpText<"Emit Windows EH Continuation Guard tables">, 7387 MarshallingInfoFlag<CodeGenOpts<"EHContGuard">>; 7388 7389def fdenormal_fp_math_f32_EQ : Joined<["-"], "fdenormal-fp-math-f32=">, 7390 Group<f_Group>; 7391 7392def fctor_dtor_return_this : Flag<["-"], "fctor-dtor-return-this">, 7393 HelpText<"Change the C++ ABI to returning `this` pointer from constructors " 7394 "and non-deleting destructors. (No effect on Microsoft ABI)">, 7395 MarshallingInfoFlag<CodeGenOpts<"CtorDtorReturnThis">>; 7396 7397def fexperimental_assignment_tracking_EQ : Joined<["-"], "fexperimental-assignment-tracking=">, 7398 Group<f_Group>, CodeGenOpts<"EnableAssignmentTracking">, 7399 NormalizedValuesScope<"CodeGenOptions::AssignmentTrackingOpts">, 7400 Values<"disabled,enabled,forced">, NormalizedValues<["Disabled","Enabled","Forced"]>, 7401 MarshallingInfoEnum<CodeGenOpts<"AssignmentTrackingMode">, "Enabled">; 7402 7403def enable_tlsdesc : Flag<["-"], "enable-tlsdesc">, 7404 MarshallingInfoFlag<CodeGenOpts<"EnableTLSDESC">>; 7405 7406} // let Visibility = [CC1Option] 7407 7408//===----------------------------------------------------------------------===// 7409// Dependency Output Options 7410//===----------------------------------------------------------------------===// 7411 7412let Visibility = [CC1Option] in { 7413 7414def sys_header_deps : Flag<["-"], "sys-header-deps">, 7415 HelpText<"Include system headers in dependency output">, 7416 MarshallingInfoFlag<DependencyOutputOpts<"IncludeSystemHeaders">>; 7417def module_file_deps : Flag<["-"], "module-file-deps">, 7418 HelpText<"Include module files in dependency output">, 7419 MarshallingInfoFlag<DependencyOutputOpts<"IncludeModuleFiles">>; 7420def header_include_file : Separate<["-"], "header-include-file">, 7421 HelpText<"Filename (or -) to write header include output to">, 7422 MarshallingInfoString<DependencyOutputOpts<"HeaderIncludeOutputFile">>; 7423def header_include_format_EQ : Joined<["-"], "header-include-format=">, 7424 HelpText<"set format in which header info is emitted">, 7425 Values<"textual,json">, NormalizedValues<["HIFMT_Textual", "HIFMT_JSON"]>, 7426 MarshallingInfoEnum<DependencyOutputOpts<"HeaderIncludeFormat">, "HIFMT_Textual">; 7427def header_include_filtering_EQ : Joined<["-"], "header-include-filtering=">, 7428 HelpText<"set the flag that enables filtering header information">, 7429 Values<"none,only-direct-system">, NormalizedValues<["HIFIL_None", "HIFIL_Only_Direct_System"]>, 7430 MarshallingInfoEnum<DependencyOutputOpts<"HeaderIncludeFiltering">, "HIFIL_None">; 7431def show_includes : Flag<["--"], "show-includes">, 7432 HelpText<"Print cl.exe style /showIncludes to stdout">; 7433 7434} // let Visibility = [CC1Option] 7435 7436//===----------------------------------------------------------------------===// 7437// Diagnostic Options 7438//===----------------------------------------------------------------------===// 7439 7440let Visibility = [CC1Option] in { 7441 7442def diagnostic_log_file : Separate<["-"], "diagnostic-log-file">, 7443 HelpText<"Filename (or -) to log diagnostics to">, 7444 MarshallingInfoString<DiagnosticOpts<"DiagnosticLogFile">>; 7445def diagnostic_serialized_file : Separate<["-"], "serialize-diagnostic-file">, 7446 MetaVarName<"<filename>">, 7447 HelpText<"File for serializing diagnostics in a binary format">; 7448 7449def fdiagnostics_format : Separate<["-"], "fdiagnostics-format">, 7450 HelpText<"Change diagnostic formatting to match IDE and command line tools">, 7451 Values<"clang,msvc,vi,sarif,SARIF">, 7452 NormalizedValuesScope<"DiagnosticOptions">, NormalizedValues<["Clang", "MSVC", "Vi", "SARIF", "SARIF"]>, 7453 MarshallingInfoEnum<DiagnosticOpts<"Format">, "Clang">; 7454def fdiagnostics_show_category : Separate<["-"], "fdiagnostics-show-category">, 7455 HelpText<"Print diagnostic category">, 7456 Values<"none,id,name">, 7457 NormalizedValues<["0", "1", "2"]>, 7458 MarshallingInfoEnum<DiagnosticOpts<"ShowCategories">, "0">; 7459def fno_diagnostics_use_presumed_location : Flag<["-"], "fno-diagnostics-use-presumed-location">, 7460 HelpText<"Ignore #line directives when displaying diagnostic locations">, 7461 MarshallingInfoNegativeFlag<DiagnosticOpts<"ShowPresumedLoc">>; 7462def ftabstop : Separate<["-"], "ftabstop">, MetaVarName<"<N>">, 7463 HelpText<"Set the tab stop distance.">, 7464 MarshallingInfoInt<DiagnosticOpts<"TabStop">, "DiagnosticOptions::DefaultTabStop">; 7465def ferror_limit : Separate<["-"], "ferror-limit">, MetaVarName<"<N>">, 7466 HelpText<"Set the maximum number of errors to emit before stopping (0 = no limit).">, 7467 MarshallingInfoInt<DiagnosticOpts<"ErrorLimit">>; 7468def verify_EQ : CommaJoined<["-"], "verify=">, 7469 MetaVarName<"<prefixes>">, 7470 HelpText<"Verify diagnostic output using comment directives that start with" 7471 " prefixes in the comma-separated sequence <prefixes>">; 7472def verify : Flag<["-"], "verify">, 7473 HelpText<"Equivalent to -verify=expected">; 7474def verify_ignore_unexpected : Flag<["-"], "verify-ignore-unexpected">, 7475 HelpText<"Ignore unexpected diagnostic messages">; 7476def verify_ignore_unexpected_EQ : CommaJoined<["-"], "verify-ignore-unexpected=">, 7477 HelpText<"Ignore unexpected diagnostic messages">; 7478def Wno_rewrite_macros : Flag<["-"], "Wno-rewrite-macros">, 7479 HelpText<"Silence ObjC rewriting warnings">, 7480 MarshallingInfoFlag<DiagnosticOpts<"NoRewriteMacros">>; 7481 7482} // let Visibility = [CC1Option] 7483 7484//===----------------------------------------------------------------------===// 7485// Frontend Options 7486//===----------------------------------------------------------------------===// 7487 7488let Visibility = [CC1Option] in { 7489 7490// This isn't normally used, it is just here so we can parse a 7491// CompilerInvocation out of a driver-derived argument vector. 7492def cc1 : Flag<["-"], "cc1">; 7493def cc1as : Flag<["-"], "cc1as">; 7494 7495def ast_merge : Separate<["-"], "ast-merge">, 7496 MetaVarName<"<ast file>">, 7497 HelpText<"Merge the given AST file into the translation unit being compiled.">, 7498 MarshallingInfoStringVector<FrontendOpts<"ASTMergeFiles">>; 7499def aux_target_cpu : Separate<["-"], "aux-target-cpu">, 7500 HelpText<"Target a specific auxiliary cpu type">; 7501def aux_target_feature : Separate<["-"], "aux-target-feature">, 7502 HelpText<"Target specific auxiliary attributes">; 7503def aux_triple : Separate<["-"], "aux-triple">, 7504 HelpText<"Auxiliary target triple.">, 7505 MarshallingInfoString<FrontendOpts<"AuxTriple">>; 7506def code_completion_at : Separate<["-"], "code-completion-at">, 7507 MetaVarName<"<file>:<line>:<column>">, 7508 HelpText<"Dump code-completion information at a location">; 7509def remap_file : Separate<["-"], "remap-file">, 7510 MetaVarName<"<from>;<to>">, 7511 HelpText<"Replace the contents of the <from> file with the contents of the <to> file">; 7512def code_completion_at_EQ : Joined<["-"], "code-completion-at=">, 7513 Alias<code_completion_at>; 7514def code_completion_macros : Flag<["-"], "code-completion-macros">, 7515 HelpText<"Include macros in code-completion results">, 7516 MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeMacros">>; 7517def code_completion_patterns : Flag<["-"], "code-completion-patterns">, 7518 HelpText<"Include code patterns in code-completion results">, 7519 MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeCodePatterns">>; 7520def no_code_completion_globals : Flag<["-"], "no-code-completion-globals">, 7521 HelpText<"Do not include global declarations in code-completion results.">, 7522 MarshallingInfoNegativeFlag<FrontendOpts<"CodeCompleteOpts.IncludeGlobals">>; 7523def no_code_completion_ns_level_decls : Flag<["-"], "no-code-completion-ns-level-decls">, 7524 HelpText<"Do not include declarations inside namespaces (incl. global namespace) in the code-completion results.">, 7525 MarshallingInfoNegativeFlag<FrontendOpts<"CodeCompleteOpts.IncludeNamespaceLevelDecls">>; 7526def code_completion_brief_comments : Flag<["-"], "code-completion-brief-comments">, 7527 HelpText<"Include brief documentation comments in code-completion results.">, 7528 MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeBriefComments">>; 7529def code_completion_with_fixits : Flag<["-"], "code-completion-with-fixits">, 7530 HelpText<"Include code completion results which require small fix-its.">, 7531 MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeFixIts">>; 7532def disable_free : Flag<["-"], "disable-free">, 7533 HelpText<"Disable freeing of memory on exit">, 7534 MarshallingInfoFlag<FrontendOpts<"DisableFree">>; 7535defm clear_ast_before_backend : BoolOption<"", 7536 "clear-ast-before-backend", 7537 CodeGenOpts<"ClearASTBeforeBackend">, 7538 DefaultFalse, 7539 PosFlag<SetTrue, [], [ClangOption], "Clear">, 7540 NegFlag<SetFalse, [], [ClangOption], "Don't clear">, 7541 BothFlags<[], [ClangOption], " the Clang AST before running backend code generation">>; 7542defm enable_noundef_analysis : BoolOption<"", 7543 "enable-noundef-analysis", 7544 CodeGenOpts<"EnableNoundefAttrs">, 7545 DefaultTrue, 7546 PosFlag<SetTrue, [], [ClangOption], "Enable">, 7547 NegFlag<SetFalse, [], [ClangOption], "Disable">, 7548 BothFlags<[], [ClangOption], " analyzing function argument and return types for mandatory definedness">>; 7549def discard_value_names : Flag<["-"], "discard-value-names">, 7550 HelpText<"Discard value names in LLVM IR">, 7551 MarshallingInfoFlag<CodeGenOpts<"DiscardValueNames">>; 7552def plugin_arg : JoinedAndSeparate<["-"], "plugin-arg-">, 7553 MetaVarName<"<name> <arg>">, 7554 HelpText<"Pass <arg> to plugin <name>">; 7555def add_plugin : Separate<["-"], "add-plugin">, MetaVarName<"<name>">, 7556 HelpText<"Use the named plugin action in addition to the default action">, 7557 MarshallingInfoStringVector<FrontendOpts<"AddPluginActions">>; 7558def ast_dump_filter : Separate<["-"], "ast-dump-filter">, 7559 MetaVarName<"<dump_filter>">, 7560 HelpText<"Use with -ast-dump or -ast-print to dump/print only AST declaration" 7561 " nodes having a certain substring in a qualified name. Use" 7562 " -ast-list to list all filterable declaration node names.">, 7563 MarshallingInfoString<FrontendOpts<"ASTDumpFilter">>; 7564def ast_dump_filter_EQ : Joined<["-"], "ast-dump-filter=">, 7565 Alias<ast_dump_filter>; 7566def fno_modules_global_index : Flag<["-"], "fno-modules-global-index">, 7567 HelpText<"Do not automatically generate or update the global module index">, 7568 MarshallingInfoNegativeFlag<FrontendOpts<"UseGlobalModuleIndex">>; 7569def fno_modules_error_recovery : Flag<["-"], "fno-modules-error-recovery">, 7570 HelpText<"Do not automatically import modules for error recovery">, 7571 MarshallingInfoNegativeFlag<LangOpts<"ModulesErrorRecovery">>; 7572def fmodule_map_file_home_is_cwd : Flag<["-"], "fmodule-map-file-home-is-cwd">, 7573 HelpText<"Use the current working directory as the home directory of " 7574 "module maps specified by -fmodule-map-file=<FILE>">, 7575 MarshallingInfoFlag<HeaderSearchOpts<"ModuleMapFileHomeIsCwd">>; 7576def fmodule_file_home_is_cwd : Flag<["-"], "fmodule-file-home-is-cwd">, 7577 HelpText<"Use the current working directory as the base directory of " 7578 "compiled module files.">, 7579 MarshallingInfoFlag<HeaderSearchOpts<"ModuleFileHomeIsCwd">>; 7580def fmodule_feature : Separate<["-"], "fmodule-feature">, 7581 MetaVarName<"<feature>">, 7582 HelpText<"Enable <feature> in module map requires declarations">, 7583 MarshallingInfoStringVector<LangOpts<"ModuleFeatures">>; 7584def fmodules_embed_file_EQ : Joined<["-"], "fmodules-embed-file=">, 7585 MetaVarName<"<file>">, 7586 HelpText<"Embed the contents of the specified file into the module file " 7587 "being compiled.">, 7588 MarshallingInfoStringVector<FrontendOpts<"ModulesEmbedFiles">>; 7589def fmodules_embed_all_files : Joined<["-"], "fmodules-embed-all-files">, 7590 HelpText<"Embed the contents of all files read by this compilation into " 7591 "the produced module file.">, 7592 MarshallingInfoFlag<FrontendOpts<"ModulesEmbedAllFiles">>; 7593defm fimplicit_modules_use_lock : BoolOption<"f", "implicit-modules-use-lock", 7594 FrontendOpts<"BuildingImplicitModuleUsesLock">, DefaultTrue, 7595 NegFlag<SetFalse>, 7596 PosFlag<SetTrue, [], [ClangOption], 7597 "Use filesystem locks for implicit modules builds to avoid " 7598 "duplicating work in competing clang invocations.">>; 7599// FIXME: We only need this in C++ modules if we might textually 7600// enter a different module (eg, when building a header unit). 7601def fmodules_local_submodule_visibility : 7602 Flag<["-"], "fmodules-local-submodule-visibility">, 7603 HelpText<"Enforce name visibility rules across submodules of the same " 7604 "top-level module.">, 7605 MarshallingInfoFlag<LangOpts<"ModulesLocalVisibility">>, 7606 ImpliedByAnyOf<[fcxx_modules.KeyPath]>; 7607def fmodules_codegen : 7608 Flag<["-"], "fmodules-codegen">, 7609 HelpText<"Generate code for uses of this module that assumes an explicit " 7610 "object file will be built for the module">, 7611 MarshallingInfoFlag<LangOpts<"ModulesCodegen">>; 7612def fmodules_debuginfo : 7613 Flag<["-"], "fmodules-debuginfo">, 7614 HelpText<"Generate debug info for types in an object file built from this " 7615 "module and do not generate them elsewhere">, 7616 MarshallingInfoFlag<LangOpts<"ModulesDebugInfo">>; 7617def fmodule_format_EQ : Joined<["-"], "fmodule-format=">, 7618 HelpText<"Select the container format for clang modules and PCH. " 7619 "Supported options are 'raw' and 'obj'.">, 7620 MarshallingInfoString<HeaderSearchOpts<"ModuleFormat">, [{"raw"}]>; 7621def ftest_module_file_extension_EQ : 7622 Joined<["-"], "ftest-module-file-extension=">, 7623 HelpText<"introduce a module file extension for testing purposes. " 7624 "The argument is parsed as blockname:major:minor:hashed:user info">; 7625 7626defm recovery_ast : BoolOption<"f", "recovery-ast", 7627 LangOpts<"RecoveryAST">, DefaultTrue, 7628 NegFlag<SetFalse>, 7629 PosFlag<SetTrue, [], [ClangOption], "Preserve expressions in AST rather " 7630 "than dropping them when encountering semantic errors">>; 7631defm recovery_ast_type : BoolOption<"f", "recovery-ast-type", 7632 LangOpts<"RecoveryASTType">, DefaultTrue, 7633 NegFlag<SetFalse>, 7634 PosFlag<SetTrue, [], [ClangOption], "Preserve the type for recovery " 7635 "expressions when possible">>; 7636 7637let Group = Action_Group in { 7638 7639def Eonly : Flag<["-"], "Eonly">, 7640 HelpText<"Just run preprocessor, no output (for timings)">; 7641def dump_raw_tokens : Flag<["-"], "dump-raw-tokens">, 7642 HelpText<"Lex file in raw mode and dump raw tokens">; 7643def analyze : Flag<["-"], "analyze">, 7644 HelpText<"Run static analysis engine">; 7645def dump_tokens : Flag<["-"], "dump-tokens">, 7646 HelpText<"Run preprocessor, dump internal rep of tokens">; 7647def fixit : Flag<["-"], "fixit">, 7648 HelpText<"Apply fix-it advice to the input source">; 7649def fixit_EQ : Joined<["-"], "fixit=">, 7650 HelpText<"Apply fix-it advice creating a file with the given suffix">; 7651def print_preamble : Flag<["-"], "print-preamble">, 7652 HelpText<"Print the \"preamble\" of a file, which is a candidate for implicit" 7653 " precompiled headers.">; 7654def emit_html : Flag<["-"], "emit-html">, 7655 HelpText<"Output input source as HTML">; 7656def ast_print : Flag<["-"], "ast-print">, 7657 HelpText<"Build ASTs and then pretty-print them">; 7658def ast_list : Flag<["-"], "ast-list">, 7659 HelpText<"Build ASTs and print the list of declaration node qualified names">; 7660def ast_dump : Flag<["-"], "ast-dump">, 7661 HelpText<"Build ASTs and then debug dump them">; 7662def ast_dump_EQ : Joined<["-"], "ast-dump=">, 7663 HelpText<"Build ASTs and then debug dump them in the specified format. " 7664 "Supported formats include: default, json">; 7665def ast_dump_all : Flag<["-"], "ast-dump-all">, 7666 HelpText<"Build ASTs and then debug dump them, forcing deserialization">; 7667def ast_dump_all_EQ : Joined<["-"], "ast-dump-all=">, 7668 HelpText<"Build ASTs and then debug dump them in the specified format, " 7669 "forcing deserialization. Supported formats include: default, json">; 7670def ast_dump_decl_types : Flag<["-"], "ast-dump-decl-types">, 7671 HelpText<"Include declaration types in AST dumps">, 7672 MarshallingInfoFlag<FrontendOpts<"ASTDumpDeclTypes">>; 7673def templight_dump : Flag<["-"], "templight-dump">, 7674 HelpText<"Dump templight information to stdout">; 7675def ast_dump_lookups : Flag<["-"], "ast-dump-lookups">, 7676 HelpText<"Build ASTs and then debug dump their name lookup tables">, 7677 MarshallingInfoFlag<FrontendOpts<"ASTDumpLookups">>; 7678def ast_view : Flag<["-"], "ast-view">, 7679 HelpText<"Build ASTs and view them with GraphViz">; 7680def emit_module : Flag<["-"], "emit-module">, 7681 HelpText<"Generate pre-compiled module file from a module map">; 7682def emit_module_interface : Flag<["-"], "emit-module-interface">, 7683 HelpText<"Generate pre-compiled module file from a standard C++ module interface unit">; 7684def emit_reduced_module_interface : Flag<["-"], "emit-reduced-module-interface">, 7685 HelpText<"Generate reduced prebuilt module interface from a standard C++ module interface unit">; 7686def emit_header_unit : Flag<["-"], "emit-header-unit">, 7687 HelpText<"Generate C++20 header units from header files">; 7688def emit_pch : Flag<["-"], "emit-pch">, 7689 HelpText<"Generate pre-compiled header file">; 7690def emit_llvm_only : Flag<["-"], "emit-llvm-only">, 7691 HelpText<"Build ASTs and convert to LLVM, discarding output">; 7692def emit_codegen_only : Flag<["-"], "emit-codegen-only">, 7693 HelpText<"Generate machine code, but discard output">; 7694def rewrite_test : Flag<["-"], "rewrite-test">, 7695 HelpText<"Rewriter playground">; 7696def rewrite_macros : Flag<["-"], "rewrite-macros">, 7697 HelpText<"Expand macros without full preprocessing">; 7698def migrate : Flag<["-"], "migrate">, 7699 HelpText<"Migrate source code">; 7700def compiler_options_dump : Flag<["-"], "compiler-options-dump">, 7701 HelpText<"Dump the compiler configuration options">; 7702def print_dependency_directives_minimized_source : Flag<["-"], 7703 "print-dependency-directives-minimized-source">, 7704 HelpText<"Print the output of the dependency directives source minimizer">; 7705} 7706 7707defm emit_llvm_uselists : BoolOption<"", "emit-llvm-uselists", 7708 CodeGenOpts<"EmitLLVMUseLists">, DefaultFalse, 7709 PosFlag<SetTrue, [], [ClangOption], "Preserve">, 7710 NegFlag<SetFalse, [], [ClangOption], "Don't preserve">, 7711 BothFlags<[], [ClangOption], " order of LLVM use-lists when serializing">>; 7712 7713def mt_migrate_directory : Separate<["-"], "mt-migrate-directory">, 7714 HelpText<"Directory for temporary files produced during ARC or ObjC migration">, 7715 MarshallingInfoString<FrontendOpts<"MTMigrateDir">>; 7716 7717def arcmt_action_EQ : Joined<["-"], "arcmt-action=">, Visibility<[CC1Option]>, 7718 HelpText<"The ARC migration action to take">, 7719 Values<"check,modify,migrate">, 7720 NormalizedValuesScope<"FrontendOptions">, 7721 NormalizedValues<["ARCMT_Check", "ARCMT_Modify", "ARCMT_Migrate"]>, 7722 MarshallingInfoEnum<FrontendOpts<"ARCMTAction">, "ARCMT_None">; 7723 7724def print_stats : Flag<["-"], "print-stats">, 7725 HelpText<"Print performance metrics and statistics">, 7726 MarshallingInfoFlag<FrontendOpts<"ShowStats">>; 7727def stats_file : Joined<["-"], "stats-file=">, 7728 HelpText<"Filename to write statistics to">, 7729 MarshallingInfoString<FrontendOpts<"StatsFile">>; 7730def stats_file_append : Flag<["-"], "stats-file-append">, 7731 HelpText<"If stats should be appended to stats-file instead of overwriting it">, 7732 MarshallingInfoFlag<FrontendOpts<"AppendStats">>; 7733def fdump_record_layouts_simple : Flag<["-"], "fdump-record-layouts-simple">, 7734 HelpText<"Dump record layout information in a simple form used for testing">, 7735 MarshallingInfoFlag<LangOpts<"DumpRecordLayoutsSimple">>; 7736def fdump_record_layouts_canonical : Flag<["-"], "fdump-record-layouts-canonical">, 7737 HelpText<"Dump record layout information with canonical field types">, 7738 MarshallingInfoFlag<LangOpts<"DumpRecordLayoutsCanonical">>; 7739def fdump_record_layouts_complete : Flag<["-"], "fdump-record-layouts-complete">, 7740 HelpText<"Dump record layout information for all complete types">, 7741 MarshallingInfoFlag<LangOpts<"DumpRecordLayoutsComplete">>; 7742def fdump_record_layouts : Flag<["-"], "fdump-record-layouts">, 7743 HelpText<"Dump record layout information">, 7744 MarshallingInfoFlag<LangOpts<"DumpRecordLayouts">>, 7745 ImpliedByAnyOf<[fdump_record_layouts_simple.KeyPath, fdump_record_layouts_complete.KeyPath, fdump_record_layouts_canonical.KeyPath]>; 7746def fix_what_you_can : Flag<["-"], "fix-what-you-can">, 7747 HelpText<"Apply fix-it advice even in the presence of unfixable errors">, 7748 MarshallingInfoFlag<FrontendOpts<"FixWhatYouCan">>; 7749def fix_only_warnings : Flag<["-"], "fix-only-warnings">, 7750 HelpText<"Apply fix-it advice only for warnings, not errors">, 7751 MarshallingInfoFlag<FrontendOpts<"FixOnlyWarnings">>; 7752def fixit_recompile : Flag<["-"], "fixit-recompile">, 7753 HelpText<"Apply fix-it changes and recompile">, 7754 MarshallingInfoFlag<FrontendOpts<"FixAndRecompile">>; 7755def fixit_to_temp : Flag<["-"], "fixit-to-temporary">, 7756 HelpText<"Apply fix-it changes to temporary files">, 7757 MarshallingInfoFlag<FrontendOpts<"FixToTemporaries">>; 7758 7759def foverride_record_layout_EQ : Joined<["-"], "foverride-record-layout=">, 7760 HelpText<"Override record layouts with those in the given file">, 7761 MarshallingInfoString<FrontendOpts<"OverrideRecordLayoutsFile">>; 7762def pch_through_header_EQ : Joined<["-"], "pch-through-header=">, 7763 HelpText<"Stop PCH generation after including this file. When using a PCH, " 7764 "skip tokens until after this file is included.">, 7765 MarshallingInfoString<PreprocessorOpts<"PCHThroughHeader">>; 7766def pch_through_hdrstop_create : Flag<["-"], "pch-through-hdrstop-create">, 7767 HelpText<"When creating a PCH, stop PCH generation after #pragma hdrstop.">, 7768 MarshallingInfoFlag<PreprocessorOpts<"PCHWithHdrStopCreate">>; 7769def pch_through_hdrstop_use : Flag<["-"], "pch-through-hdrstop-use">, 7770 HelpText<"When using a PCH, skip tokens until after a #pragma hdrstop.">; 7771def fno_pch_timestamp : Flag<["-"], "fno-pch-timestamp">, 7772 HelpText<"Disable inclusion of timestamp in precompiled headers">, 7773 MarshallingInfoNegativeFlag<FrontendOpts<"IncludeTimestamps">>; 7774def building_pch_with_obj : Flag<["-"], "building-pch-with-obj">, 7775 HelpText<"This compilation is part of building a PCH with corresponding object file.">, 7776 MarshallingInfoFlag<LangOpts<"BuildingPCHWithObjectFile">>; 7777 7778def aligned_alloc_unavailable : Flag<["-"], "faligned-alloc-unavailable">, 7779 HelpText<"Aligned allocation/deallocation functions are unavailable">, 7780 MarshallingInfoFlag<LangOpts<"AlignedAllocationUnavailable">>, 7781 ShouldParseIf<faligned_allocation.KeyPath>; 7782 7783} // let Visibility = [CC1Option] 7784 7785//===----------------------------------------------------------------------===// 7786// Language Options 7787//===----------------------------------------------------------------------===// 7788 7789def version : Flag<["-"], "version">, 7790 HelpText<"Print the compiler version">, 7791 Visibility<[CC1Option, CC1AsOption, FC1Option]>, 7792 MarshallingInfoFlag<FrontendOpts<"ShowVersion">>; 7793 7794def main_file_name : Separate<["-"], "main-file-name">, 7795 HelpText<"Main file name to use for debug info and source if missing">, 7796 Visibility<[CC1Option, CC1AsOption]>, 7797 MarshallingInfoString<CodeGenOpts<"MainFileName">>; 7798def split_dwarf_output : Separate<["-"], "split-dwarf-output">, 7799 HelpText<"File name to use for split dwarf debug info output">, 7800 Visibility<[CC1Option, CC1AsOption]>, 7801 MarshallingInfoString<CodeGenOpts<"SplitDwarfOutput">>; 7802 7803let Visibility = [CC1Option, FC1Option] in { 7804 7805def mreassociate : Flag<["-"], "mreassociate">, 7806 HelpText<"Allow reassociation transformations for floating-point instructions">, 7807 MarshallingInfoFlag<LangOpts<"AllowFPReassoc">>, ImpliedByAnyOf<[funsafe_math_optimizations.KeyPath]>; 7808def menable_no_nans : Flag<["-"], "menable-no-nans">, 7809 HelpText<"Allow optimization to assume there are no NaNs.">, 7810 MarshallingInfoFlag<LangOpts<"NoHonorNaNs">>, ImpliedByAnyOf<[ffinite_math_only.KeyPath]>; 7811def menable_no_infinities : Flag<["-"], "menable-no-infs">, 7812 HelpText<"Allow optimization to assume there are no infinities.">, 7813 MarshallingInfoFlag<LangOpts<"NoHonorInfs">>, ImpliedByAnyOf<[ffinite_math_only.KeyPath]>; 7814 7815def pic_level : Separate<["-"], "pic-level">, 7816 HelpText<"Value for __PIC__">, 7817 MarshallingInfoInt<LangOpts<"PICLevel">>; 7818def pic_is_pie : Flag<["-"], "pic-is-pie">, 7819 HelpText<"File is for a position independent executable">, 7820 MarshallingInfoFlag<LangOpts<"PIE">>; 7821 7822def mframe_pointer_EQ : Joined<["-"], "mframe-pointer=">, 7823 HelpText<"Specify which frame pointers to retain.">, Values<"all,non-leaf,reserved,none">, 7824 NormalizedValuesScope<"CodeGenOptions::FramePointerKind">, NormalizedValues<["All", "NonLeaf", "Reserved", "None"]>, 7825 MarshallingInfoEnum<CodeGenOpts<"FramePointer">, "None">; 7826 7827 7828def dependent_lib : Joined<["--"], "dependent-lib=">, 7829 HelpText<"Add dependent library">, 7830 MarshallingInfoStringVector<CodeGenOpts<"DependentLibraries">>; 7831 7832} // let Visibility = [CC1Option, FC1Option] 7833 7834let Visibility = [CC1Option] in { 7835 7836def fblocks_runtime_optional : Flag<["-"], "fblocks-runtime-optional">, 7837 HelpText<"Weakly link in the blocks runtime">, 7838 MarshallingInfoFlag<LangOpts<"BlocksRuntimeOptional">>; 7839def fexternc_nounwind : Flag<["-"], "fexternc-nounwind">, 7840 HelpText<"Assume all functions with C linkage do not unwind">, 7841 MarshallingInfoFlag<LangOpts<"ExternCNoUnwind">>; 7842def split_dwarf_file : Separate<["-"], "split-dwarf-file">, 7843 HelpText<"Name of the split dwarf debug info file to encode in the object file">, 7844 MarshallingInfoString<CodeGenOpts<"SplitDwarfFile">>; 7845def fno_wchar : Flag<["-"], "fno-wchar">, 7846 HelpText<"Disable C++ builtin type wchar_t">, 7847 MarshallingInfoNegativeFlag<LangOpts<"WChar">, cplusplus.KeyPath>, 7848 ShouldParseIf<cplusplus.KeyPath>; 7849def fconstant_string_class : Separate<["-"], "fconstant-string-class">, 7850 MetaVarName<"<class name>">, 7851 HelpText<"Specify the class to use for constant Objective-C string objects.">, 7852 MarshallingInfoString<LangOpts<"ObjCConstantStringClass">>; 7853def fobjc_arc_cxxlib_EQ : Joined<["-"], "fobjc-arc-cxxlib=">, 7854 HelpText<"Objective-C++ Automatic Reference Counting standard library kind">, 7855 Values<"libc++,libstdc++,none">, 7856 NormalizedValues<["ARCXX_libcxx", "ARCXX_libstdcxx", "ARCXX_nolib"]>, 7857 MarshallingInfoEnum<PreprocessorOpts<"ObjCXXARCStandardLibrary">, "ARCXX_nolib">; 7858def fobjc_runtime_has_weak : Flag<["-"], "fobjc-runtime-has-weak">, 7859 HelpText<"The target Objective-C runtime supports ARC weak operations">; 7860def fobjc_dispatch_method_EQ : Joined<["-"], "fobjc-dispatch-method=">, 7861 HelpText<"Objective-C dispatch method to use">, 7862 Values<"legacy,non-legacy,mixed">, 7863 NormalizedValuesScope<"CodeGenOptions">, NormalizedValues<["Legacy", "NonLegacy", "Mixed"]>, 7864 MarshallingInfoEnum<CodeGenOpts<"ObjCDispatchMethod">, "Legacy">; 7865def disable_objc_default_synthesize_properties : Flag<["-"], "disable-objc-default-synthesize-properties">, 7866 HelpText<"disable the default synthesis of Objective-C properties">, 7867 MarshallingInfoNegativeFlag<LangOpts<"ObjCDefaultSynthProperties">>; 7868def fencode_extended_block_signature : Flag<["-"], "fencode-extended-block-signature">, 7869 HelpText<"enable extended encoding of block type signature">, 7870 MarshallingInfoFlag<LangOpts<"EncodeExtendedBlockSig">>; 7871def function_alignment : Separate<["-"], "function-alignment">, 7872 HelpText<"default alignment for functions">, 7873 MarshallingInfoInt<LangOpts<"FunctionAlignment">>; 7874def fhalf_no_semantic_interposition : Flag<["-"], "fhalf-no-semantic-interposition">, 7875 HelpText<"Like -fno-semantic-interposition but don't use local aliases">, 7876 MarshallingInfoFlag<LangOpts<"HalfNoSemanticInterposition">>; 7877def fno_validate_pch : Flag<["-"], "fno-validate-pch">, 7878 HelpText<"Disable validation of precompiled headers">, 7879 MarshallingInfoFlag<PreprocessorOpts<"DisablePCHOrModuleValidation">, "DisableValidationForModuleKind::None">, 7880 Normalizer<"makeFlagToValueNormalizer(DisableValidationForModuleKind::All)">; 7881def fallow_pcm_with_errors : Flag<["-"], "fallow-pcm-with-compiler-errors">, 7882 HelpText<"Accept a PCM file that was created with compiler errors">, 7883 MarshallingInfoFlag<FrontendOpts<"AllowPCMWithCompilerErrors">>; 7884def fallow_pch_with_errors : Flag<["-"], "fallow-pch-with-compiler-errors">, 7885 HelpText<"Accept a PCH file that was created with compiler errors">, 7886 MarshallingInfoFlag<PreprocessorOpts<"AllowPCHWithCompilerErrors">>, 7887 ImpliedByAnyOf<[fallow_pcm_with_errors.KeyPath]>; 7888def fallow_pch_with_different_modules_cache_path : 7889 Flag<["-"], "fallow-pch-with-different-modules-cache-path">, 7890 HelpText<"Accept a PCH file that was created with a different modules cache path">, 7891 MarshallingInfoFlag<PreprocessorOpts<"AllowPCHWithDifferentModulesCachePath">>; 7892def fno_modules_share_filemanager : Flag<["-"], "fno-modules-share-filemanager">, 7893 HelpText<"Disable sharing the FileManager when building a module implicitly">, 7894 MarshallingInfoNegativeFlag<FrontendOpts<"ModulesShareFileManager">>; 7895def dump_deserialized_pch_decls : Flag<["-"], "dump-deserialized-decls">, 7896 HelpText<"Dump declarations that are deserialized from PCH, for testing">, 7897 MarshallingInfoFlag<PreprocessorOpts<"DumpDeserializedPCHDecls">>; 7898def error_on_deserialized_pch_decl : Separate<["-"], "error-on-deserialized-decl">, 7899 HelpText<"Emit error if a specific declaration is deserialized from PCH, for testing">; 7900def error_on_deserialized_pch_decl_EQ : Joined<["-"], "error-on-deserialized-decl=">, 7901 Alias<error_on_deserialized_pch_decl>; 7902def static_define : Flag<["-"], "static-define">, 7903 HelpText<"Should __STATIC__ be defined">, 7904 MarshallingInfoFlag<LangOpts<"Static">>; 7905def stack_protector : Separate<["-"], "stack-protector">, 7906 HelpText<"Enable stack protectors">, 7907 Values<"0,1,2,3">, 7908 NormalizedValuesScope<"LangOptions">, 7909 NormalizedValues<["SSPOff", "SSPOn", "SSPStrong", "SSPReq"]>, 7910 MarshallingInfoEnum<LangOpts<"StackProtector">, "SSPOff">; 7911def stack_protector_buffer_size : Separate<["-"], "stack-protector-buffer-size">, 7912 HelpText<"Lower bound for a buffer to be considered for stack protection">, 7913 MarshallingInfoInt<CodeGenOpts<"SSPBufferSize">, "8">; 7914def ftype_visibility : Joined<["-"], "ftype-visibility=">, 7915 HelpText<"Default type visibility">, 7916 MarshallingInfoVisibility<LangOpts<"TypeVisibilityMode">, fvisibility_EQ.KeyPath>; 7917def fapply_global_visibility_to_externs : Flag<["-"], "fapply-global-visibility-to-externs">, 7918 HelpText<"Apply global symbol visibility to external declarations without an explicit visibility">, 7919 MarshallingInfoFlag<LangOpts<"SetVisibilityForExternDecls">>; 7920def fbracket_depth : Separate<["-"], "fbracket-depth">, 7921 HelpText<"Maximum nesting level for parentheses, brackets, and braces">, 7922 MarshallingInfoInt<LangOpts<"BracketDepth">, "256">; 7923defm const_strings : BoolOption<"f", "const-strings", 7924 LangOpts<"ConstStrings">, DefaultFalse, 7925 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Use">, 7926 NegFlag<SetFalse, [], [ClangOption], "Don't use">, 7927 BothFlags<[], [ClangOption], " a const qualified type for string literals in C and ObjC">>; 7928def fno_bitfield_type_align : Flag<["-"], "fno-bitfield-type-align">, 7929 HelpText<"Ignore bit-field types when aligning structures">, 7930 MarshallingInfoFlag<LangOpts<"NoBitFieldTypeAlign">>; 7931def ffake_address_space_map : Flag<["-"], "ffake-address-space-map">, 7932 HelpText<"Use a fake address space map; OpenCL testing purposes only">, 7933 MarshallingInfoFlag<LangOpts<"FakeAddressSpaceMap">>; 7934def faddress_space_map_mangling_EQ : Joined<["-"], "faddress-space-map-mangling=">, 7935 HelpText<"Set the mode for address space map based mangling; OpenCL testing purposes only">, 7936 Values<"target,no,yes">, 7937 NormalizedValuesScope<"LangOptions">, 7938 NormalizedValues<["ASMM_Target", "ASMM_Off", "ASMM_On"]>, 7939 MarshallingInfoEnum<LangOpts<"AddressSpaceMapMangling">, "ASMM_Target">; 7940def funknown_anytype : Flag<["-"], "funknown-anytype">, 7941 HelpText<"Enable parser support for the __unknown_anytype type; for testing purposes only">, 7942 MarshallingInfoFlag<LangOpts<"ParseUnknownAnytype">>; 7943def fdebugger_support : Flag<["-"], "fdebugger-support">, 7944 HelpText<"Enable special debugger support behavior">, 7945 MarshallingInfoFlag<LangOpts<"DebuggerSupport">>; 7946def fdebugger_cast_result_to_id : Flag<["-"], "fdebugger-cast-result-to-id">, 7947 HelpText<"Enable casting unknown expression results to id">, 7948 MarshallingInfoFlag<LangOpts<"DebuggerCastResultToId">>; 7949def fdebugger_objc_literal : Flag<["-"], "fdebugger-objc-literal">, 7950 HelpText<"Enable special debugger support for Objective-C subscripting and literals">, 7951 MarshallingInfoFlag<LangOpts<"DebuggerObjCLiteral">>; 7952defm deprecated_macro : BoolOption<"f", "deprecated-macro", 7953 LangOpts<"Deprecated">, DefaultFalse, 7954 PosFlag<SetTrue, [], [ClangOption], "Defines">, 7955 NegFlag<SetFalse, [], [ClangOption], "Undefines">, 7956 BothFlags<[], [ClangOption], " the __DEPRECATED macro">>; 7957def fobjc_subscripting_legacy_runtime : Flag<["-"], "fobjc-subscripting-legacy-runtime">, 7958 HelpText<"Allow Objective-C array and dictionary subscripting in legacy runtime">; 7959// TODO: Enforce values valid for MSVtorDispMode. 7960def vtordisp_mode_EQ : Joined<["-"], "vtordisp-mode=">, 7961 HelpText<"Control vtordisp placement on win32 targets">, 7962 MarshallingInfoInt<LangOpts<"VtorDispMode">, "1">; 7963def fnative_half_type: Flag<["-"], "fnative-half-type">, 7964 HelpText<"Use the native half type for __fp16 instead of promoting to float">, 7965 MarshallingInfoFlag<LangOpts<"NativeHalfType">>, 7966 ImpliedByAnyOf<[open_cl.KeyPath, render_script.KeyPath]>; 7967def fnative_half_arguments_and_returns : Flag<["-"], "fnative-half-arguments-and-returns">, 7968 HelpText<"Use the native __fp16 type for arguments and returns (and skip ABI-specific lowering)">, 7969 MarshallingInfoFlag<LangOpts<"NativeHalfArgsAndReturns">>, 7970 ImpliedByAnyOf<[open_cl.KeyPath, render_script.KeyPath, hlsl.KeyPath]>; 7971def fdefault_calling_conv_EQ : Joined<["-"], "fdefault-calling-conv=">, 7972 HelpText<"Set default calling convention">, 7973 Values<"cdecl,fastcall,stdcall,vectorcall,regcall,rtdcall">, 7974 NormalizedValuesScope<"LangOptions">, 7975 NormalizedValues<["DCC_CDecl", "DCC_FastCall", "DCC_StdCall", "DCC_VectorCall", "DCC_RegCall", "DCC_RtdCall"]>, 7976 MarshallingInfoEnum<LangOpts<"DefaultCallingConv">, "DCC_None">; 7977 7978// These options cannot be marshalled, because they are used to set up the LangOptions defaults. 7979def finclude_default_header : Flag<["-"], "finclude-default-header">, 7980 HelpText<"Include default header file for OpenCL and HLSL">; 7981def fdeclare_opencl_builtins : Flag<["-"], "fdeclare-opencl-builtins">, 7982 HelpText<"Add OpenCL builtin function declarations (experimental)">; 7983 7984def fhlsl_strict_availability : Flag<["-"], "fhlsl-strict-availability">, 7985 HelpText<"Enables strict availability diagnostic mode for HLSL built-in functions.">, 7986 Group<hlsl_Group>, 7987 MarshallingInfoFlag<LangOpts<"HLSLStrictAvailability">>; 7988 7989def fpreserve_vec3_type : Flag<["-"], "fpreserve-vec3-type">, 7990 HelpText<"Preserve 3-component vector type">, 7991 MarshallingInfoFlag<CodeGenOpts<"PreserveVec3Type">>, 7992 ImpliedByAnyOf<[hlsl.KeyPath]>; 7993def fwchar_type_EQ : Joined<["-"], "fwchar-type=">, 7994 HelpText<"Select underlying type for wchar_t">, 7995 Values<"char,short,int">, 7996 NormalizedValues<["1", "2", "4"]>, 7997 MarshallingInfoEnum<LangOpts<"WCharSize">, "0">; 7998defm signed_wchar : BoolOption<"f", "signed-wchar", 7999 LangOpts<"WCharIsSigned">, DefaultTrue, 8000 NegFlag<SetFalse, [], [ClangOption, CC1Option], "Use an unsigned">, 8001 PosFlag<SetTrue, [], [ClangOption], "Use a signed">, 8002 BothFlags<[], [ClangOption], " type for wchar_t">>; 8003def fcompatibility_qualified_id_block_param_type_checking : Flag<["-"], "fcompatibility-qualified-id-block-type-checking">, 8004 HelpText<"Allow using blocks with parameters of more specific type than " 8005 "the type system guarantees when a parameter is qualified id">, 8006 MarshallingInfoFlag<LangOpts<"CompatibilityQualifiedIdBlockParamTypeChecking">>; 8007def fpass_by_value_is_noalias: Flag<["-"], "fpass-by-value-is-noalias">, 8008 HelpText<"Allows assuming by-value parameters do not alias any other value. " 8009 "Has no effect on non-trivially-copyable classes in C++.">, Group<f_Group>, 8010 MarshallingInfoFlag<CodeGenOpts<"PassByValueIsNoAlias">>; 8011 8012// FIXME: Remove these entirely once functionality/tests have been excised. 8013def fobjc_gc_only : Flag<["-"], "fobjc-gc-only">, Group<f_Group>, 8014 HelpText<"Use GC exclusively for Objective-C related memory management">; 8015def fobjc_gc : Flag<["-"], "fobjc-gc">, Group<f_Group>, 8016 HelpText<"Enable Objective-C garbage collection">; 8017 8018def fexperimental_max_bitint_width_EQ: 8019 Joined<["-"], "fexperimental-max-bitint-width=">, Group<f_Group>, 8020 MetaVarName<"<N>">, 8021 HelpText<"Set the maximum bitwidth for _BitInt (this option is expected to be removed in the future)">, 8022 MarshallingInfoInt<LangOpts<"MaxBitIntWidth">>; 8023 8024} // let Visibility = [CC1Option] 8025 8026//===----------------------------------------------------------------------===// 8027// Header Search Options 8028//===----------------------------------------------------------------------===// 8029 8030let Visibility = [CC1Option] in { 8031 8032def nostdsysteminc : Flag<["-"], "nostdsysteminc">, 8033 HelpText<"Disable standard system #include directories">, 8034 MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseStandardSystemIncludes">>; 8035def fdisable_module_hash : Flag<["-"], "fdisable-module-hash">, 8036 HelpText<"Disable the module hash">, 8037 MarshallingInfoFlag<HeaderSearchOpts<"DisableModuleHash">>; 8038def fmodules_hash_content : Flag<["-"], "fmodules-hash-content">, 8039 HelpText<"Enable hashing the content of a module file">, 8040 MarshallingInfoFlag<HeaderSearchOpts<"ModulesHashContent">>; 8041def fmodules_strict_context_hash : Flag<["-"], "fmodules-strict-context-hash">, 8042 HelpText<"Enable hashing of all compiler options that could impact the " 8043 "semantics of a module in an implicit build">, 8044 MarshallingInfoFlag<HeaderSearchOpts<"ModulesStrictContextHash">>; 8045def c_isystem : Separate<["-"], "c-isystem">, MetaVarName<"<directory>">, 8046 HelpText<"Add directory to the C SYSTEM include search path">; 8047def objc_isystem : Separate<["-"], "objc-isystem">, 8048 MetaVarName<"<directory>">, 8049 HelpText<"Add directory to the ObjC SYSTEM include search path">; 8050def objcxx_isystem : Separate<["-"], "objcxx-isystem">, 8051 MetaVarName<"<directory>">, 8052 HelpText<"Add directory to the ObjC++ SYSTEM include search path">; 8053def internal_isystem : Separate<["-"], "internal-isystem">, 8054 MetaVarName<"<directory>">, 8055 HelpText<"Add directory to the internal system include search path; these " 8056 "are assumed to not be user-provided and are used to model system " 8057 "and standard headers' paths.">; 8058def internal_externc_isystem : Separate<["-"], "internal-externc-isystem">, 8059 MetaVarName<"<directory>">, 8060 HelpText<"Add directory to the internal system include search path with " 8061 "implicit extern \"C\" semantics; these are assumed to not be " 8062 "user-provided and are used to model system and standard headers' " 8063 "paths.">; 8064 8065} // let Visibility = [CC1Option] 8066 8067//===----------------------------------------------------------------------===// 8068// Preprocessor Options 8069//===----------------------------------------------------------------------===// 8070 8071let Visibility = [CC1Option] in { 8072 8073def chain_include : Separate<["-"], "chain-include">, MetaVarName<"<file>">, 8074 HelpText<"Include and chain a header file after turning it into PCH">; 8075def preamble_bytes_EQ : Joined<["-"], "preamble-bytes=">, 8076 HelpText<"Assume that the precompiled header is a precompiled preamble " 8077 "covering the first N bytes of the main file">; 8078def detailed_preprocessing_record : Flag<["-"], "detailed-preprocessing-record">, 8079 HelpText<"include a detailed record of preprocessing actions">, 8080 MarshallingInfoFlag<PreprocessorOpts<"DetailedRecord">>; 8081def setup_static_analyzer : Flag<["-"], "setup-static-analyzer">, 8082 HelpText<"Set up preprocessor for static analyzer (done automatically when static analyzer is run).">, 8083 MarshallingInfoFlag<PreprocessorOpts<"SetUpStaticAnalyzer">>; 8084def disable_pragma_debug_crash : Flag<["-"], "disable-pragma-debug-crash">, 8085 HelpText<"Disable any #pragma clang __debug that can lead to crashing behavior. This is meant for testing.">, 8086 MarshallingInfoFlag<PreprocessorOpts<"DisablePragmaDebugCrash">>; 8087def source_date_epoch : Separate<["-"], "source-date-epoch">, 8088 MetaVarName<"<time since Epoch in seconds>">, 8089 HelpText<"Time to be used in __DATE__, __TIME__, and __TIMESTAMP__ macros">; 8090 8091} // let Visibility = [CC1Option] 8092 8093//===----------------------------------------------------------------------===// 8094// CUDA Options 8095//===----------------------------------------------------------------------===// 8096 8097let Visibility = [CC1Option] in { 8098 8099def fcuda_is_device : Flag<["-"], "fcuda-is-device">, 8100 HelpText<"Generate code for CUDA device">, 8101 MarshallingInfoFlag<LangOpts<"CUDAIsDevice">>; 8102def fcuda_include_gpubinary : Separate<["-"], "fcuda-include-gpubinary">, 8103 HelpText<"Incorporate CUDA device-side binary into host object file.">, 8104 MarshallingInfoString<CodeGenOpts<"CudaGpuBinaryFileName">>; 8105def fcuda_allow_variadic_functions : Flag<["-"], "fcuda-allow-variadic-functions">, 8106 HelpText<"Allow variadic functions in CUDA device code.">, 8107 MarshallingInfoFlag<LangOpts<"CUDAAllowVariadicFunctions">>; 8108def fno_cuda_host_device_constexpr : Flag<["-"], "fno-cuda-host-device-constexpr">, 8109 HelpText<"Don't treat unattributed constexpr functions as __host__ __device__.">, 8110 MarshallingInfoNegativeFlag<LangOpts<"CUDAHostDeviceConstexpr">>; 8111 8112} // let Visibility = [CC1Option] 8113 8114//===----------------------------------------------------------------------===// 8115// OpenMP Options 8116//===----------------------------------------------------------------------===// 8117 8118let Visibility = [CC1Option, FC1Option] in { 8119 8120def fopenmp_is_target_device : Flag<["-"], "fopenmp-is-target-device">, 8121 HelpText<"Generate code only for an OpenMP target device.">; 8122def : Flag<["-"], "fopenmp-is-device">, Alias<fopenmp_is_target_device>; 8123def fopenmp_host_ir_file_path : Separate<["-"], "fopenmp-host-ir-file-path">, 8124 HelpText<"Path to the IR file produced by the frontend for the host.">; 8125 8126} // let Visibility = [CC1Option, FC1Option] 8127 8128//===----------------------------------------------------------------------===// 8129// SYCL Options 8130//===----------------------------------------------------------------------===// 8131 8132def fsycl_is_device : Flag<["-"], "fsycl-is-device">, 8133 HelpText<"Generate code for SYCL device.">, 8134 Visibility<[CC1Option]>, 8135 MarshallingInfoFlag<LangOpts<"SYCLIsDevice">>; 8136def fsycl_is_host : Flag<["-"], "fsycl-is-host">, 8137 HelpText<"SYCL host compilation">, 8138 Visibility<[CC1Option]>, 8139 MarshallingInfoFlag<LangOpts<"SYCLIsHost">>; 8140 8141def sycl_std_EQ : Joined<["-"], "sycl-std=">, Group<sycl_Group>, 8142 Flags<[NoArgumentUnused]>, 8143 Visibility<[ClangOption, CC1Option, CLOption]>, 8144 HelpText<"SYCL language standard to compile for.">, 8145 Values<"2020,2017,121,1.2.1,sycl-1.2.1">, 8146 NormalizedValues<["SYCL_2020", "SYCL_2017", "SYCL_2017", "SYCL_2017", "SYCL_2017"]>, 8147 NormalizedValuesScope<"LangOptions">, 8148 MarshallingInfoEnum<LangOpts<"SYCLVersion">, "SYCL_None">, 8149 ShouldParseIf<!strconcat(fsycl_is_device.KeyPath, "||", fsycl_is_host.KeyPath)>; 8150 8151defm gpu_approx_transcendentals : BoolFOption<"gpu-approx-transcendentals", 8152 LangOpts<"GPUDeviceApproxTranscendentals">, DefaultFalse, 8153 PosFlag<SetTrue, [], [ClangOption, CC1Option], "Use">, 8154 NegFlag<SetFalse, [], [ClangOption], "Don't use">, 8155 BothFlags<[], [ClangOption], " approximate transcendental functions">>; 8156def : Flag<["-"], "fcuda-approx-transcendentals">, Alias<fgpu_approx_transcendentals>; 8157def : Flag<["-"], "fno-cuda-approx-transcendentals">, Alias<fno_gpu_approx_transcendentals>; 8158 8159//===----------------------------------------------------------------------===// 8160// Frontend Options - cc1 + fc1 8161//===----------------------------------------------------------------------===// 8162 8163let Visibility = [CC1Option, FC1Option] in { 8164let Group = Action_Group in { 8165 8166def emit_obj : Flag<["-"], "emit-obj">, 8167 HelpText<"Emit native object files">; 8168def init_only : Flag<["-"], "init-only">, 8169 HelpText<"Only execute frontend initialization">; 8170def emit_llvm_bc : Flag<["-"], "emit-llvm-bc">, 8171 HelpText<"Build ASTs then convert to LLVM, emit .bc file">; 8172 8173} // let Group = Action_Group 8174 8175def load : Separate<["-"], "load">, MetaVarName<"<dsopath>">, 8176 HelpText<"Load the named plugin (dynamic shared object)">; 8177def plugin : Separate<["-"], "plugin">, MetaVarName<"<name>">, 8178 HelpText<"Use the named plugin action instead of the default action (use \"help\" to list available options)">; 8179defm debug_pass_manager : BoolOption<"f", "debug-pass-manager", 8180 CodeGenOpts<"DebugPassManager">, DefaultFalse, 8181 PosFlag<SetTrue, [], [ClangOption], "Prints debug information for the new pass manager">, 8182 NegFlag<SetFalse, [], [ClangOption], "Disables debug printing for the new pass manager">>; 8183 8184def opt_record_file : Separate<["-"], "opt-record-file">, 8185 HelpText<"File name to use for YAML optimization record output">, 8186 MarshallingInfoString<CodeGenOpts<"OptRecordFile">>; 8187def opt_record_passes : Separate<["-"], "opt-record-passes">, 8188 HelpText<"Only record remark information for passes whose names match the given regular expression">; 8189def opt_record_format : Separate<["-"], "opt-record-format">, 8190 HelpText<"The format used for serializing remarks (default: YAML)">; 8191 8192} // let Visibility = [CC1Option, FC1Option] 8193 8194//===----------------------------------------------------------------------===// 8195// cc1as-only Options 8196//===----------------------------------------------------------------------===// 8197 8198let Visibility = [CC1AsOption] in { 8199 8200// Language Options 8201def n : Flag<["-"], "n">, 8202 HelpText<"Don't automatically start assembly file with a text section">; 8203 8204// Frontend Options 8205def filetype : Separate<["-"], "filetype">, 8206 HelpText<"Specify the output file type ('asm', 'null', or 'obj')">; 8207 8208// Transliterate Options 8209def output_asm_variant : Separate<["-"], "output-asm-variant">, 8210 HelpText<"Select the asm variant index to use for output">; 8211def show_encoding : Flag<["-"], "show-encoding">, 8212 HelpText<"Show instruction encoding information in transliterate mode">; 8213def show_inst : Flag<["-"], "show-inst">, 8214 HelpText<"Show internal instruction representation in transliterate mode">; 8215 8216// Assemble Options 8217def dwarf_debug_producer : Separate<["-"], "dwarf-debug-producer">, 8218 HelpText<"The string to embed in the Dwarf debug AT_producer record.">; 8219 8220def defsym : Separate<["--"], "defsym">, 8221 HelpText<"Define a value for a symbol">; 8222 8223} // let Visibility = [CC1AsOption] 8224 8225//===----------------------------------------------------------------------===// 8226// clang-cl Options 8227//===----------------------------------------------------------------------===// 8228 8229def cl_Group : OptionGroup<"<clang-cl options>">, 8230 HelpText<"CL.EXE COMPATIBILITY OPTIONS">; 8231 8232def cl_compile_Group : OptionGroup<"<clang-cl compile-only options>">, 8233 Group<cl_Group>; 8234 8235def cl_ignored_Group : OptionGroup<"<clang-cl ignored options>">, 8236 Group<cl_Group>; 8237 8238class CLFlag<string name, list<OptionVisibility> vis = [CLOption]> : 8239 Option<["/", "-"], name, KIND_FLAG>, 8240 Group<cl_Group>, Flags<[NoXarchOption]>, Visibility<vis>; 8241 8242class CLCompileFlag<string name, list<OptionVisibility> vis = [CLOption]> : 8243 Option<["/", "-"], name, KIND_FLAG>, 8244 Group<cl_compile_Group>, Flags<[NoXarchOption]>, Visibility<vis>; 8245 8246class CLIgnoredFlag<string name, list<OptionVisibility> vis = [CLOption]> : 8247 Option<["/", "-"], name, KIND_FLAG>, 8248 Group<cl_ignored_Group>, Flags<[NoXarchOption]>, Visibility<vis>; 8249 8250class CLJoined<string name, list<OptionVisibility> vis = [CLOption]> : 8251 Option<["/", "-"], name, KIND_JOINED>, 8252 Group<cl_Group>, Flags<[NoXarchOption]>, Visibility<vis>; 8253 8254class CLCompileJoined<string name, list<OptionVisibility> vis = [CLOption]> : 8255 Option<["/", "-"], name, KIND_JOINED>, 8256 Group<cl_compile_Group>, Flags<[NoXarchOption]>, Visibility<vis>; 8257 8258class CLIgnoredJoined<string name, list<OptionVisibility> vis = [CLOption]> : 8259 Option<["/", "-"], name, KIND_JOINED>, 8260 Group<cl_ignored_Group>, Flags<[NoXarchOption, HelpHidden]>, Visibility<vis>; 8261 8262class CLJoinedOrSeparate<string name, list<OptionVisibility> vis = [CLOption]> : 8263 Option<["/", "-"], name, KIND_JOINED_OR_SEPARATE>, 8264 Group<cl_Group>, Flags<[NoXarchOption]>, Visibility<vis>; 8265 8266class CLCompileJoinedOrSeparate<string name, 8267 list<OptionVisibility> vis = [CLOption]> : 8268 Option<["/", "-"], name, KIND_JOINED_OR_SEPARATE>, 8269 Group<cl_compile_Group>, Flags<[NoXarchOption]>, Visibility<vis>; 8270 8271class CLRemainingArgsJoined<string name, 8272 list<OptionVisibility> vis = [CLOption]> : 8273 Option<["/", "-"], name, KIND_REMAINING_ARGS_JOINED>, 8274 Group<cl_Group>, Flags<[NoXarchOption]>, Visibility<vis>; 8275 8276// Aliases: 8277// (We don't put any of these in cl_compile_Group as the options they alias are 8278// already in the right group.) 8279 8280def _SLASH_Brepro : CLFlag<"Brepro">, 8281 HelpText<"Do not write current time into COFF output (breaks link.exe /incremental)">, 8282 Alias<mno_incremental_linker_compatible>; 8283def _SLASH_Brepro_ : CLFlag<"Brepro-">, 8284 HelpText<"Write current time into COFF output (default)">, 8285 Alias<mincremental_linker_compatible>; 8286def _SLASH_C : CLFlag<"C">, 8287 HelpText<"Do not discard comments when preprocessing">, Alias<C>; 8288def _SLASH_c : CLFlag<"c">, HelpText<"Compile only">, Alias<c>; 8289def _SLASH_d1PP : CLFlag<"d1PP">, 8290 HelpText<"Retain macro definitions in /E mode">, Alias<dD>; 8291def _SLASH_d1reportAllClassLayout : CLFlag<"d1reportAllClassLayout">, 8292 HelpText<"Dump record layout information">, 8293 Alias<Xclang>, AliasArgs<["-fdump-record-layouts"]>; 8294def _SLASH_diagnostics_caret : CLFlag<"diagnostics:caret">, 8295 HelpText<"Enable caret and column diagnostics (default)">; 8296def _SLASH_diagnostics_column : CLFlag<"diagnostics:column">, 8297 HelpText<"Disable caret diagnostics but keep column info">; 8298def _SLASH_diagnostics_classic : CLFlag<"diagnostics:classic">, 8299 HelpText<"Disable column and caret diagnostics">; 8300def _SLASH_D : CLJoinedOrSeparate<"D", [CLOption, DXCOption]>, 8301 HelpText<"Define macro">, MetaVarName<"<macro[=value]>">, Alias<D>; 8302def _SLASH_E : CLFlag<"E">, HelpText<"Preprocess to stdout">, Alias<E>; 8303def _SLASH_external_COLON_I : CLJoinedOrSeparate<"external:I">, Alias<isystem>, 8304 HelpText<"Add directory to include search path with warnings suppressed">, 8305 MetaVarName<"<dir>">; 8306def _SLASH_fp_contract : CLFlag<"fp:contract">, HelpText<"">, Alias<ffp_contract>, AliasArgs<["on"]>; 8307def _SLASH_fp_except : CLFlag<"fp:except">, HelpText<"">, Alias<ffp_exception_behavior_EQ>, AliasArgs<["strict"]>; 8308def _SLASH_fp_except_ : CLFlag<"fp:except-">, HelpText<"">, Alias<ffp_exception_behavior_EQ>, AliasArgs<["ignore"]>; 8309def _SLASH_fp_fast : CLFlag<"fp:fast">, HelpText<"">, Alias<ffast_math>; 8310def _SLASH_fp_precise : CLFlag<"fp:precise">, HelpText<"">, Alias<ffp_model_EQ>, AliasArgs<["precise"]>; 8311def _SLASH_fp_strict : CLFlag<"fp:strict">, HelpText<"">, Alias<ffp_model_EQ>, AliasArgs<["strict"]>; 8312def _SLASH_fsanitize_EQ_address : CLFlag<"fsanitize=address">, 8313 HelpText<"Enable AddressSanitizer">, 8314 Alias<fsanitize_EQ>, AliasArgs<["address"]>; 8315def _SLASH_GA : CLFlag<"GA">, Alias<ftlsmodel_EQ>, AliasArgs<["local-exec"]>, 8316 HelpText<"Assume thread-local variables are defined in the executable">; 8317def _SLASH_GR : CLFlag<"GR">, HelpText<"Emit RTTI data (default)">; 8318def _SLASH_GR_ : CLFlag<"GR-">, HelpText<"Do not emit RTTI data">; 8319def _SLASH_GF : CLIgnoredFlag<"GF">, 8320 HelpText<"Enable string pooling (default)">; 8321def _SLASH_GF_ : CLFlag<"GF-">, HelpText<"Disable string pooling">, 8322 Alias<fwritable_strings>; 8323def _SLASH_GS : CLFlag<"GS">, 8324 HelpText<"Enable buffer security check (default)">; 8325def _SLASH_GS_ : CLFlag<"GS-">, HelpText<"Disable buffer security check">; 8326def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">, 8327 Alias<mstack_probe_size>, AliasArgs<["4096"]>; 8328def _SLASH_Gs : CLJoined<"Gs">, 8329 HelpText<"Set stack probe size (default 4096)">, Alias<mstack_probe_size>; 8330def _SLASH_Gy : CLFlag<"Gy">, HelpText<"Put each function in its own section">, 8331 Alias<ffunction_sections>; 8332def _SLASH_Gy_ : CLFlag<"Gy-">, 8333 HelpText<"Do not put each function in its own section (default)">, 8334 Alias<fno_function_sections>; 8335def _SLASH_Gw : CLFlag<"Gw">, HelpText<"Put each data item in its own section">, 8336 Alias<fdata_sections>; 8337def _SLASH_Gw_ : CLFlag<"Gw-">, 8338 HelpText<"Do not put each data item in its own section (default)">, 8339 Alias<fno_data_sections>; 8340def _SLASH_help : CLFlag<"help", [CLOption, DXCOption]>, Alias<help>, 8341 HelpText<"Display available options">; 8342def _SLASH_HELP : CLFlag<"HELP">, Alias<help>; 8343def _SLASH_hotpatch : CLFlag<"hotpatch">, Alias<fms_hotpatch>, 8344 HelpText<"Create hotpatchable image">; 8345def _SLASH_I : CLJoinedOrSeparate<"I", [CLOption, DXCOption]>, 8346 HelpText<"Add directory to include search path">, MetaVarName<"<dir>">, 8347 Alias<I>; 8348def _SLASH_J : CLFlag<"J">, HelpText<"Make char type unsigned">, 8349 Alias<funsigned_char>; 8350 8351// The _SLASH_O option handles all the /O flags, but we also provide separate 8352// aliased options to provide separate help messages. 8353def _SLASH_O : CLJoined<"O", [CLOption, DXCOption]>, 8354 HelpText<"Set multiple /O flags at once; e.g. '/O2y-' for '/O2 /Oy-'">, 8355 MetaVarName<"<flags>">; 8356def : CLFlag<"O1">, Alias<_SLASH_O>, AliasArgs<["1"]>, 8357 HelpText<"Optimize for size (like /Og /Os /Oy /Ob2 /GF /Gy)">; 8358def : CLFlag<"O2">, Alias<_SLASH_O>, AliasArgs<["2"]>, 8359 HelpText<"Optimize for speed (like /Og /Oi /Ot /Oy /Ob2 /GF /Gy)">; 8360def : CLFlag<"Ob0">, Alias<_SLASH_O>, AliasArgs<["b0"]>, 8361 HelpText<"Disable function inlining">; 8362def : CLFlag<"Ob1">, Alias<_SLASH_O>, AliasArgs<["b1"]>, 8363 HelpText<"Only inline functions explicitly or implicitly marked inline">; 8364def : CLFlag<"Ob2">, Alias<_SLASH_O>, AliasArgs<["b2"]>, 8365 HelpText<"Inline functions as deemed beneficial by the compiler">; 8366def : CLFlag<"Ob3">, Alias<_SLASH_O>, AliasArgs<["b3"]>, 8367 HelpText<"Same as /Ob2">; 8368def : CLFlag<"Od", [CLOption, DXCOption]>, Alias<_SLASH_O>, AliasArgs<["d"]>, 8369 HelpText<"Disable optimization">; 8370def : CLFlag<"Og">, Alias<_SLASH_O>, AliasArgs<["g"]>, 8371 HelpText<"No effect">; 8372def : CLFlag<"Oi">, Alias<_SLASH_O>, AliasArgs<["i"]>, 8373 HelpText<"Enable use of builtin functions">; 8374def : CLFlag<"Oi-">, Alias<_SLASH_O>, AliasArgs<["i-"]>, 8375 HelpText<"Disable use of builtin functions">; 8376def : CLFlag<"Os">, Alias<_SLASH_O>, AliasArgs<["s"]>, 8377 HelpText<"Optimize for size (like clang -Os)">; 8378def : CLFlag<"Ot">, Alias<_SLASH_O>, AliasArgs<["t"]>, 8379 HelpText<"Optimize for speed (like clang -O3)">; 8380def : CLFlag<"Ox">, Alias<_SLASH_O>, AliasArgs<["x"]>, 8381 HelpText<"Deprecated (like /Og /Oi /Ot /Oy /Ob2); use /O2">; 8382def : CLFlag<"Oy">, Alias<_SLASH_O>, AliasArgs<["y"]>, 8383 HelpText<"Enable frame pointer omission (x86 only)">; 8384def : CLFlag<"Oy-">, Alias<_SLASH_O>, AliasArgs<["y-"]>, 8385 HelpText<"Disable frame pointer omission (x86 only, default)">; 8386 8387def _SLASH_QUESTION : CLFlag<"?">, Alias<help>, 8388 HelpText<"Display available options">; 8389def _SLASH_Qvec : CLFlag<"Qvec">, 8390 HelpText<"Enable the loop vectorization passes">, Alias<fvectorize>; 8391def _SLASH_Qvec_ : CLFlag<"Qvec-">, 8392 HelpText<"Disable the loop vectorization passes">, Alias<fno_vectorize>; 8393def _SLASH_showIncludes : CLFlag<"showIncludes">, 8394 HelpText<"Print info about included files to stderr">; 8395def _SLASH_showIncludes_user : CLFlag<"showIncludes:user">, 8396 HelpText<"Like /showIncludes but omit system headers">; 8397def _SLASH_showFilenames : CLFlag<"showFilenames">, 8398 HelpText<"Print the name of each compiled file">; 8399def _SLASH_showFilenames_ : CLFlag<"showFilenames-">, 8400 HelpText<"Do not print the name of each compiled file (default)">; 8401def _SLASH_source_charset : CLCompileJoined<"source-charset:">, 8402 HelpText<"Set source encoding, supports only UTF-8">, 8403 Alias<finput_charset_EQ>; 8404def _SLASH_execution_charset : CLCompileJoined<"execution-charset:">, 8405 HelpText<"Set runtime encoding, supports only UTF-8">, 8406 Alias<fexec_charset_EQ>; 8407def _SLASH_std : CLCompileJoined<"std:">, 8408 HelpText<"Set language version (c++14,c++17,c++20,c++latest,c11,c17)">; 8409def _SLASH_U : CLJoinedOrSeparate<"U">, HelpText<"Undefine macro">, 8410 MetaVarName<"<macro>">, Alias<U>; 8411def _SLASH_validate_charset : CLFlag<"validate-charset">, 8412 Alias<W_Joined>, AliasArgs<["invalid-source-encoding"]>; 8413def _SLASH_validate_charset_ : CLFlag<"validate-charset-">, 8414 Alias<W_Joined>, AliasArgs<["no-invalid-source-encoding"]>; 8415def _SLASH_external_W0 : CLFlag<"external:W0">, HelpText<"Ignore warnings from system headers (default)">, Alias<Wno_system_headers>; 8416def _SLASH_external_W1 : CLFlag<"external:W1">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>; 8417def _SLASH_external_W2 : CLFlag<"external:W2">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>; 8418def _SLASH_external_W3 : CLFlag<"external:W3">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>; 8419def _SLASH_external_W4 : CLFlag<"external:W4">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>; 8420def _SLASH_W0 : CLFlag<"W0">, HelpText<"Disable all warnings">, Alias<w>; 8421def _SLASH_W1 : CLFlag<"W1">, HelpText<"Enable -Wall">, Alias<Wall>; 8422def _SLASH_W2 : CLFlag<"W2">, HelpText<"Enable -Wall">, Alias<Wall>; 8423def _SLASH_W3 : CLFlag<"W3">, HelpText<"Enable -Wall">, Alias<Wall>; 8424def _SLASH_W4 : CLFlag<"W4">, HelpText<"Enable -Wall and -Wextra">, Alias<WCL4>; 8425def _SLASH_Wall : CLFlag<"Wall">, HelpText<"Enable -Weverything">, 8426 Alias<W_Joined>, AliasArgs<["everything"]>; 8427def _SLASH_WX : CLFlag<"WX">, HelpText<"Treat warnings as errors">, 8428 Alias<W_Joined>, AliasArgs<["error"]>; 8429def _SLASH_WX_ : CLFlag<"WX-">, 8430 HelpText<"Do not treat warnings as errors (default)">, 8431 Alias<W_Joined>, AliasArgs<["no-error"]>; 8432def _SLASH_w_flag : CLFlag<"w">, HelpText<"Disable all warnings">, Alias<w>; 8433def _SLASH_wd : CLCompileJoined<"wd">; 8434def _SLASH_vd : CLJoined<"vd">, HelpText<"Control vtordisp placement">, 8435 Alias<vtordisp_mode_EQ>; 8436def _SLASH_X : CLFlag<"X">, 8437 HelpText<"Do not add %INCLUDE% to include search path">, Alias<nostdlibinc>; 8438def _SLASH_Zc___STDC__ : CLFlag<"Zc:__STDC__">, 8439 HelpText<"Define __STDC__">, 8440 Alias<fms_define_stdc>; 8441def _SLASH_Zc_sizedDealloc : CLFlag<"Zc:sizedDealloc">, 8442 HelpText<"Enable C++14 sized global deallocation functions">, 8443 Alias<fsized_deallocation>; 8444def _SLASH_Zc_sizedDealloc_ : CLFlag<"Zc:sizedDealloc-">, 8445 HelpText<"Disable C++14 sized global deallocation functions">, 8446 Alias<fno_sized_deallocation>; 8447def _SLASH_Zc_alignedNew : CLFlag<"Zc:alignedNew">, 8448 HelpText<"Enable C++17 aligned allocation functions">, 8449 Alias<faligned_allocation>; 8450def _SLASH_Zc_alignedNew_ : CLFlag<"Zc:alignedNew-">, 8451 HelpText<"Disable C++17 aligned allocation functions">, 8452 Alias<fno_aligned_allocation>; 8453def _SLASH_Zc_char8_t : CLFlag<"Zc:char8_t">, 8454 HelpText<"Enable char8_t from C++2a">, 8455 Alias<fchar8__t>; 8456def _SLASH_Zc_char8_t_ : CLFlag<"Zc:char8_t-">, 8457 HelpText<"Disable char8_t from c++2a">, 8458 Alias<fno_char8__t>; 8459def _SLASH_Zc_strictStrings : CLFlag<"Zc:strictStrings">, 8460 HelpText<"Treat string literals as const">, Alias<W_Joined>, 8461 AliasArgs<["error=c++11-compat-deprecated-writable-strings"]>; 8462def _SLASH_Zc_threadSafeInit : CLFlag<"Zc:threadSafeInit">, 8463 HelpText<"Enable thread-safe initialization of static variables">, 8464 Alias<fthreadsafe_statics>; 8465def _SLASH_Zc_threadSafeInit_ : CLFlag<"Zc:threadSafeInit-">, 8466 HelpText<"Disable thread-safe initialization of static variables">, 8467 Alias<fno_threadsafe_statics>; 8468def _SLASH_Zc_trigraphs : CLFlag<"Zc:trigraphs">, 8469 HelpText<"Enable trigraphs">, Alias<ftrigraphs>; 8470def _SLASH_Zc_trigraphs_off : CLFlag<"Zc:trigraphs-">, 8471 HelpText<"Disable trigraphs (default)">, Alias<fno_trigraphs>; 8472def _SLASH_Zc_twoPhase : CLFlag<"Zc:twoPhase">, 8473 HelpText<"Enable two-phase name lookup in templates">, 8474 Alias<fno_delayed_template_parsing>; 8475def _SLASH_Zc_twoPhase_ : CLFlag<"Zc:twoPhase-">, 8476 HelpText<"Disable two-phase name lookup in templates (default)">, 8477 Alias<fdelayed_template_parsing>; 8478def _SLASH_Zc_wchar_t : CLFlag<"Zc:wchar_t">, 8479 HelpText<"Enable C++ builtin type wchar_t (default)">; 8480def _SLASH_Zc_wchar_t_ : CLFlag<"Zc:wchar_t-">, 8481 HelpText<"Disable C++ builtin type wchar_t">; 8482def _SLASH_Z7 : CLFlag<"Z7">, Alias<g_Flag>, 8483 HelpText<"Enable CodeView debug information in object files">; 8484def _SLASH_ZH_MD5 : CLFlag<"ZH:MD5">, 8485 HelpText<"Use MD5 for file checksums in debug info (default)">, 8486 Alias<gsrc_hash_EQ>, AliasArgs<["md5"]>; 8487def _SLASH_ZH_SHA1 : CLFlag<"ZH:SHA1">, 8488 HelpText<"Use SHA1 for file checksums in debug info">, 8489 Alias<gsrc_hash_EQ>, AliasArgs<["sha1"]>; 8490def _SLASH_ZH_SHA_256 : CLFlag<"ZH:SHA_256">, 8491 HelpText<"Use SHA256 for file checksums in debug info">, 8492 Alias<gsrc_hash_EQ>, AliasArgs<["sha256"]>; 8493def _SLASH_Zi : CLFlag<"Zi", [CLOption, DXCOption]>, Alias<g_Flag>, 8494 HelpText<"Like /Z7">; 8495def _SLASH_Zp : CLJoined<"Zp">, 8496 HelpText<"Set default maximum struct packing alignment">, 8497 Alias<fpack_struct_EQ>; 8498def _SLASH_Zp_flag : CLFlag<"Zp">, 8499 HelpText<"Set default maximum struct packing alignment to 1">, 8500 Alias<fpack_struct_EQ>, AliasArgs<["1"]>; 8501def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Run the preprocessor, parser and semantic analysis stages">, 8502 Alias<fsyntax_only>; 8503def _SLASH_openmp_ : CLFlag<"openmp-">, 8504 HelpText<"Disable OpenMP support">, Alias<fno_openmp>; 8505def _SLASH_openmp : CLFlag<"openmp">, HelpText<"Enable OpenMP support">, 8506 Alias<fopenmp>; 8507def _SLASH_openmp_experimental : CLFlag<"openmp:experimental">, 8508 HelpText<"Enable OpenMP support with experimental SIMD support">, 8509 Alias<fopenmp>; 8510def _SLASH_tune : CLCompileJoined<"tune:">, 8511 HelpText<"Set CPU for optimization without affecting instruction set">, 8512 Alias<mtune_EQ>; 8513def _SLASH_QIntel_jcc_erratum : CLFlag<"QIntel-jcc-erratum">, 8514 HelpText<"Align branches within 32-byte boundaries to mitigate the performance impact of the Intel JCC erratum.">, 8515 Alias<mbranches_within_32B_boundaries>; 8516def _SLASH_arm64EC : CLFlag<"arm64EC">, 8517 HelpText<"Set build target to arm64ec">; 8518def : CLFlag<"Qgather-">, Alias<mno_gather>, 8519 HelpText<"Disable generation of gather instructions in auto-vectorization(x86 only)">; 8520def : CLFlag<"Qscatter-">, Alias<mno_scatter>, 8521 HelpText<"Disable generation of scatter instructions in auto-vectorization(x86 only)">; 8522 8523// Non-aliases: 8524 8525def _SLASH_arch : CLCompileJoined<"arch:">, 8526 HelpText<"Set architecture for code generation">; 8527 8528def _SLASH_M_Group : OptionGroup<"</M group>">, Group<cl_compile_Group>; 8529def _SLASH_volatile_Group : OptionGroup<"</volatile group>">, 8530 Group<cl_compile_Group>; 8531 8532def _SLASH_EH : CLJoined<"EH">, HelpText<"Set exception handling model">; 8533def _SLASH_EP : CLFlag<"EP">, 8534 HelpText<"Disable linemarker output and preprocess to stdout">; 8535def _SLASH_external_env : CLJoined<"external:env:">, 8536 HelpText<"Add dirs in env var <var> to include search path with warnings suppressed">, 8537 MetaVarName<"<var>">; 8538def _SLASH_FA : CLJoined<"FA">, 8539 HelpText<"Output assembly code file during compilation">; 8540def _SLASH_Fa : CLJoined<"Fa">, 8541 HelpText<"Set assembly output file name (with /FA)">, 8542 MetaVarName<"<file or dir/>">; 8543def _SLASH_FI : CLJoinedOrSeparate<"FI">, 8544 HelpText<"Include file before parsing">, Alias<include_>; 8545def _SLASH_Fe : CLJoined<"Fe">, 8546 HelpText<"Set output executable file name">, 8547 MetaVarName<"<file or dir/>">; 8548def _SLASH_Fe_COLON : CLJoinedOrSeparate<"Fe:">, Alias<_SLASH_Fe>; 8549def _SLASH_Fi : CLCompileJoined<"Fi">, 8550 HelpText<"Set preprocess output file name (with /P)">, 8551 MetaVarName<"<file>">; 8552def _SLASH_Fi_COLON : CLJoinedOrSeparate<"Fi:">, Alias<_SLASH_Fi>; 8553def _SLASH_Fo : CLCompileJoined<"Fo">, 8554 HelpText<"Set output object file (with /c)">, 8555 MetaVarName<"<file or dir/>">; 8556def _SLASH_Fo_COLON : CLCompileJoinedOrSeparate<"Fo:">, Alias<_SLASH_Fo>; 8557def _SLASH_guard : CLJoined<"guard:">, 8558 HelpText<"Enable Control Flow Guard with /guard:cf, or only the table with /guard:cf,nochecks. " 8559 "Enable EH Continuation Guard with /guard:ehcont">; 8560def _SLASH_GX : CLFlag<"GX">, 8561 HelpText<"Deprecated; use /EHsc">; 8562def _SLASH_GX_ : CLFlag<"GX-">, 8563 HelpText<"Deprecated (like not passing /EH)">; 8564def _SLASH_imsvc : CLJoinedOrSeparate<"imsvc">, 8565 HelpText<"Add <dir> to system include search path, as if in %INCLUDE%">, 8566 MetaVarName<"<dir>">; 8567def _SLASH_JMC : CLFlag<"JMC">, Alias<fjmc>, 8568 HelpText<"Enable just-my-code debugging">; 8569def _SLASH_JMC_ : CLFlag<"JMC-">, Alias<fno_jmc>, 8570 HelpText<"Disable just-my-code debugging (default)">; 8571def _SLASH_LD : CLFlag<"LD">, HelpText<"Create DLL">; 8572def _SLASH_LDd : CLFlag<"LDd">, HelpText<"Create debug DLL">; 8573def _SLASH_link : CLRemainingArgsJoined<"link">, 8574 HelpText<"Forward options to the linker">, MetaVarName<"<options>">; 8575def _SLASH_MD : Option<["/", "-"], "MD", KIND_FLAG>, Group<_SLASH_M_Group>, 8576 Flags<[NoXarchOption]>, Visibility<[CLOption]>, HelpText<"Use DLL run-time">; 8577def _SLASH_MDd : Option<["/", "-"], "MDd", KIND_FLAG>, Group<_SLASH_M_Group>, 8578 Flags<[NoXarchOption]>, Visibility<[CLOption]>, 8579 HelpText<"Use DLL debug run-time">; 8580def _SLASH_MT : Option<["/", "-"], "MT", KIND_FLAG>, Group<_SLASH_M_Group>, 8581 Flags<[NoXarchOption]>, Visibility<[CLOption]>, 8582 HelpText<"Use static run-time">; 8583def _SLASH_MTd : Option<["/", "-"], "MTd", KIND_FLAG>, Group<_SLASH_M_Group>, 8584 Flags<[NoXarchOption]>, Visibility<[CLOption]>, 8585 HelpText<"Use static debug run-time">; 8586def _SLASH_o : CLJoinedOrSeparate<"o">, 8587 HelpText<"Deprecated (set output file name); use /Fe or /Fe">, 8588 MetaVarName<"<file or dir/>">; 8589def _SLASH_P : CLFlag<"P">, HelpText<"Preprocess to file">; 8590def _SLASH_permissive : CLFlag<"permissive">, 8591 HelpText<"Enable some non conforming code to compile">; 8592def _SLASH_permissive_ : CLFlag<"permissive-">, 8593 HelpText<"Disable non conforming code from compiling (default)">; 8594def _SLASH_Tc : CLCompileJoinedOrSeparate<"Tc">, 8595 HelpText<"Treat <file> as C source file">, MetaVarName<"<file>">; 8596def _SLASH_TC : CLCompileFlag<"TC">, HelpText<"Treat all source files as C">; 8597def _SLASH_Tp : CLCompileJoinedOrSeparate<"Tp">, 8598 HelpText<"Treat <file> as C++ source file">, MetaVarName<"<file>">; 8599def _SLASH_TP : CLCompileFlag<"TP">, HelpText<"Treat all source files as C++">; 8600def _SLASH_diasdkdir : CLJoinedOrSeparate<"diasdkdir">, 8601 HelpText<"Path to the DIA SDK">, MetaVarName<"<dir>">; 8602def _SLASH_vctoolsdir : CLJoinedOrSeparate<"vctoolsdir">, 8603 HelpText<"Path to the VCToolChain">, MetaVarName<"<dir>">; 8604def _SLASH_vctoolsversion : CLJoinedOrSeparate<"vctoolsversion">, 8605 HelpText<"For use with /winsysroot, defaults to newest found">; 8606def _SLASH_winsdkdir : CLJoinedOrSeparate<"winsdkdir">, 8607 HelpText<"Path to the Windows SDK">, MetaVarName<"<dir>">; 8608def _SLASH_winsdkversion : CLJoinedOrSeparate<"winsdkversion">, 8609 HelpText<"Full version of the Windows SDK, defaults to newest found">; 8610def _SLASH_winsysroot : CLJoinedOrSeparate<"winsysroot">, 8611 HelpText<"Same as \"/diasdkdir <dir>/DIA SDK\" /vctoolsdir <dir>/VC/Tools/MSVC/<vctoolsversion> \"/winsdkdir <dir>/Windows Kits/10\"">, 8612 MetaVarName<"<dir>">; 8613def _SLASH_volatile_iso : Option<["/", "-"], "volatile:iso", KIND_FLAG>, 8614 Visibility<[CLOption]>, Alias<fno_ms_volatile>, 8615 HelpText<"Volatile loads and stores have standard semantics">; 8616def _SLASH_vmb : CLFlag<"vmb">, 8617 HelpText<"Use a best-case representation method for member pointers">; 8618def _SLASH_vmg : CLFlag<"vmg">, 8619 HelpText<"Use a most-general representation for member pointers">; 8620def _SLASH_vms : CLFlag<"vms">, 8621 HelpText<"Set the default most-general representation to single inheritance">; 8622def _SLASH_vmm : CLFlag<"vmm">, 8623 HelpText<"Set the default most-general representation to " 8624 "multiple inheritance">; 8625def _SLASH_vmv : CLFlag<"vmv">, 8626 HelpText<"Set the default most-general representation to " 8627 "virtual inheritance">; 8628def _SLASH_volatile_ms : Option<["/", "-"], "volatile:ms", KIND_FLAG>, 8629 Visibility<[CLOption]>, Alias<fms_volatile>, 8630 HelpText<"Volatile loads and stores have acquire and release semantics">; 8631def _SLASH_clang : CLJoined<"clang:">, 8632 HelpText<"Pass <arg> to the clang driver">, MetaVarName<"<arg>">; 8633def _SLASH_Zl : CLFlag<"Zl">, Alias<fms_omit_default_lib>, 8634 HelpText<"Do not let object file auto-link default libraries">; 8635 8636def _SLASH_Yc : CLJoined<"Yc">, 8637 HelpText<"Generate a pch file for all code up to and including <filename>">, 8638 MetaVarName<"<filename>">; 8639def _SLASH_Yu : CLJoined<"Yu">, 8640 HelpText<"Load a pch file and use it instead of all code up to " 8641 "and including <filename>">, 8642 MetaVarName<"<filename>">; 8643def _SLASH_Y_ : CLFlag<"Y-">, 8644 HelpText<"Disable precompiled headers, overrides /Yc and /Yu">; 8645def _SLASH_Zc_dllexportInlines : CLFlag<"Zc:dllexportInlines">, 8646 HelpText<"dllexport/dllimport inline member functions of dllexport/import classes (default)">; 8647def _SLASH_Zc_dllexportInlines_ : CLFlag<"Zc:dllexportInlines-">, 8648 HelpText<"Do not dllexport/dllimport inline member functions of dllexport/import classes">; 8649def _SLASH_Fp : CLJoined<"Fp">, 8650 HelpText<"Set pch file name (with /Yc and /Yu)">, MetaVarName<"<file>">; 8651def _SLASH_Fp_COLON : CLJoinedOrSeparate<"Fp:">, Alias<_SLASH_Fp>; 8652 8653def _SLASH_Gd : CLFlag<"Gd">, 8654 HelpText<"Set __cdecl as a default calling convention">; 8655def _SLASH_Gr : CLFlag<"Gr">, 8656 HelpText<"Set __fastcall as a default calling convention">; 8657def _SLASH_Gz : CLFlag<"Gz">, 8658 HelpText<"Set __stdcall as a default calling convention">; 8659def _SLASH_Gv : CLFlag<"Gv">, 8660 HelpText<"Set __vectorcall as a default calling convention">; 8661def _SLASH_Gregcall : CLFlag<"Gregcall">, 8662 HelpText<"Set __regcall as a default calling convention">; 8663def _SLASH_Gregcall4 : CLFlag<"Gregcall4">, 8664 HelpText<"Set __regcall4 as a default calling convention to respect __regcall ABI v.4">; 8665 8666// GNU Driver aliases 8667 8668def : Separate<["-"], "Xmicrosoft-visualc-tools-root">, Alias<_SLASH_vctoolsdir>; 8669def : Separate<["-"], "Xmicrosoft-visualc-tools-version">, 8670 Alias<_SLASH_vctoolsversion>; 8671def : Separate<["-"], "Xmicrosoft-windows-sdk-root">, 8672 Alias<_SLASH_winsdkdir>; 8673def : Separate<["-"], "Xmicrosoft-windows-sdk-version">, 8674 Alias<_SLASH_winsdkversion>; 8675def : Separate<["-"], "Xmicrosoft-windows-sys-root">, 8676 Alias<_SLASH_winsysroot>; 8677 8678// Ignored: 8679 8680def _SLASH_analyze_ : CLIgnoredFlag<"analyze-">; 8681def _SLASH_bigobj : CLIgnoredFlag<"bigobj">; 8682def _SLASH_cgthreads : CLIgnoredJoined<"cgthreads">; 8683def _SLASH_d2FastFail : CLIgnoredFlag<"d2FastFail">; 8684def _SLASH_d2Zi_PLUS : CLIgnoredFlag<"d2Zi+">; 8685def _SLASH_errorReport : CLIgnoredJoined<"errorReport">; 8686def _SLASH_FC : CLIgnoredFlag<"FC">; 8687def _SLASH_Fd : CLIgnoredJoined<"Fd">; 8688def _SLASH_FS : CLIgnoredFlag<"FS">; 8689def _SLASH_kernel_ : CLIgnoredFlag<"kernel-">; 8690def _SLASH_nologo : CLIgnoredFlag<"nologo">; 8691def _SLASH_RTC : CLIgnoredJoined<"RTC">; 8692def _SLASH_sdl : CLIgnoredFlag<"sdl">; 8693def _SLASH_sdl_ : CLIgnoredFlag<"sdl-">; 8694def _SLASH_utf8 : CLIgnoredFlag<"utf-8">, 8695 HelpText<"Set source and runtime encoding to UTF-8 (default)">; 8696def _SLASH_w : CLIgnoredJoined<"w">; 8697def _SLASH_Wv_ : CLIgnoredJoined<"Wv">; 8698def _SLASH_Zc___cplusplus : CLIgnoredFlag<"Zc:__cplusplus">; 8699def _SLASH_Zc_auto : CLIgnoredFlag<"Zc:auto">; 8700def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">; 8701def _SLASH_Zc_inline : CLIgnoredFlag<"Zc:inline">; 8702def _SLASH_Zc_rvalueCast : CLIgnoredFlag<"Zc:rvalueCast">; 8703def _SLASH_Zc_ternary : CLIgnoredFlag<"Zc:ternary">; 8704def _SLASH_Zm : CLIgnoredJoined<"Zm">; 8705def _SLASH_Zo : CLIgnoredFlag<"Zo">; 8706def _SLASH_Zo_ : CLIgnoredFlag<"Zo-">; 8707 8708 8709// Unsupported: 8710 8711def _SLASH_await : CLFlag<"await">; 8712def _SLASH_await_COLON : CLJoined<"await:">; 8713def _SLASH_constexpr : CLJoined<"constexpr:">; 8714def _SLASH_AI : CLJoinedOrSeparate<"AI">; 8715def _SLASH_Bt : CLFlag<"Bt">; 8716def _SLASH_Bt_plus : CLFlag<"Bt+">; 8717def _SLASH_clr : CLJoined<"clr">; 8718def _SLASH_d1 : CLJoined<"d1">; 8719def _SLASH_d2 : CLJoined<"d2">; 8720def _SLASH_doc : CLJoined<"doc">; 8721def _SLASH_experimental : CLJoined<"experimental:">; 8722def _SLASH_exportHeader : CLFlag<"exportHeader">; 8723def _SLASH_external : CLJoined<"external:">; 8724def _SLASH_favor : CLJoined<"favor">; 8725def _SLASH_fsanitize_address_use_after_return : CLJoined<"fsanitize-address-use-after-return">; 8726def _SLASH_fno_sanitize_address_vcasan_lib : CLJoined<"fno-sanitize-address-vcasan-lib">; 8727def _SLASH_F : CLJoinedOrSeparate<"F">; 8728def _SLASH_Fm : CLJoined<"Fm">; 8729def _SLASH_Fr : CLJoined<"Fr">; 8730def _SLASH_FR : CLJoined<"FR">; 8731def _SLASH_FU : CLJoinedOrSeparate<"FU">; 8732def _SLASH_Fx : CLFlag<"Fx">; 8733def _SLASH_G1 : CLFlag<"G1">; 8734def _SLASH_G2 : CLFlag<"G2">; 8735def _SLASH_Ge : CLFlag<"Ge">; 8736def _SLASH_Gh : CLFlag<"Gh">; 8737def _SLASH_GH : CLFlag<"GH">; 8738def _SLASH_GL : CLFlag<"GL">; 8739def _SLASH_GL_ : CLFlag<"GL-">; 8740def _SLASH_Gm : CLFlag<"Gm">; 8741def _SLASH_Gm_ : CLFlag<"Gm-">; 8742def _SLASH_GT : CLFlag<"GT">; 8743def _SLASH_GZ : CLFlag<"GZ">; 8744def _SLASH_H : CLFlag<"H">; 8745def _SLASH_headername : CLJoined<"headerName:">; 8746def _SLASH_headerUnit : CLJoinedOrSeparate<"headerUnit">; 8747def _SLASH_headerUnitAngle : CLJoinedOrSeparate<"headerUnit:angle">; 8748def _SLASH_headerUnitQuote : CLJoinedOrSeparate<"headerUnit:quote">; 8749def _SLASH_homeparams : CLFlag<"homeparams">; 8750def _SLASH_kernel : CLFlag<"kernel">; 8751def _SLASH_LN : CLFlag<"LN">; 8752def _SLASH_MP : CLJoined<"MP">; 8753def _SLASH_Qfast_transcendentals : CLFlag<"Qfast_transcendentals">; 8754def _SLASH_QIfist : CLFlag<"QIfist">; 8755def _SLASH_Qimprecise_fwaits : CLFlag<"Qimprecise_fwaits">; 8756def _SLASH_Qpar : CLFlag<"Qpar">; 8757def _SLASH_Qpar_report : CLJoined<"Qpar-report">; 8758def _SLASH_Qsafe_fp_loads : CLFlag<"Qsafe_fp_loads">; 8759def _SLASH_Qspectre : CLFlag<"Qspectre">; 8760def _SLASH_Qspectre_load : CLFlag<"Qspectre-load">; 8761def _SLASH_Qspectre_load_cf : CLFlag<"Qspectre-load-cf">; 8762def _SLASH_Qvec_report : CLJoined<"Qvec-report">; 8763def _SLASH_reference : CLJoinedOrSeparate<"reference">; 8764def _SLASH_sourceDependencies : CLJoinedOrSeparate<"sourceDependencies">; 8765def _SLASH_sourceDependenciesDirectives : CLJoinedOrSeparate<"sourceDependencies:directives">; 8766def _SLASH_translateInclude : CLFlag<"translateInclude">; 8767def _SLASH_u : CLFlag<"u">; 8768def _SLASH_V : CLFlag<"V">; 8769def _SLASH_WL : CLFlag<"WL">; 8770def _SLASH_Wp64 : CLFlag<"Wp64">; 8771def _SLASH_Yd : CLFlag<"Yd">; 8772def _SLASH_Yl : CLJoined<"Yl">; 8773def _SLASH_Za : CLFlag<"Za">; 8774def _SLASH_Zc : CLJoined<"Zc:">; 8775def _SLASH_Ze : CLFlag<"Ze">; 8776def _SLASH_Zg : CLFlag<"Zg">; 8777def _SLASH_ZI : CLFlag<"ZI">; 8778def _SLASH_ZW : CLJoined<"ZW">; 8779 8780//===----------------------------------------------------------------------===// 8781// clang-dxc Options 8782//===----------------------------------------------------------------------===// 8783 8784def dxc_Group : OptionGroup<"clang-dxc options">, Visibility<[DXCOption]>, 8785 HelpText<"dxc compatibility options.">; 8786class DXCFlag<string name> : Option<["/", "-"], name, KIND_FLAG>, 8787 Group<dxc_Group>, Visibility<[DXCOption]>; 8788class DXCJoinedOrSeparate<string name> : Option<["/", "-"], name, 8789 KIND_JOINED_OR_SEPARATE>, Group<dxc_Group>, 8790 Visibility<[DXCOption]>; 8791 8792def dxc_no_stdinc : DXCFlag<"hlsl-no-stdinc">, 8793 HelpText<"HLSL only. Disables all standard includes containing non-native compiler types and functions.">; 8794def dxc_Fo : DXCJoinedOrSeparate<"Fo">, 8795 HelpText<"Output object file">; 8796def dxc_Fc : DXCJoinedOrSeparate<"Fc">, 8797 HelpText<"Output assembly listing file">; 8798def dxil_validator_version : Option<["/", "-"], "validator-version", KIND_SEPARATE>, 8799 Group<dxc_Group>, Flags<[HelpHidden]>, 8800 Visibility<[DXCOption, ClangOption, CC1Option]>, 8801 HelpText<"Override validator version for module. Format: <major.minor>;" 8802 "Default: DXIL.dll version or current internal version">, 8803 MarshallingInfoString<TargetOpts<"DxilValidatorVersion">>; 8804def target_profile : DXCJoinedOrSeparate<"T">, MetaVarName<"<profile>">, 8805 HelpText<"Set target profile">, 8806 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," 8807 "vs_6_0, vs_6_1, vs_6_2, vs_6_3, vs_6_4, vs_6_5, vs_6_6, vs_6_7," 8808 "gs_6_0, gs_6_1, gs_6_2, gs_6_3, gs_6_4, gs_6_5, gs_6_6, gs_6_7," 8809 "hs_6_0, hs_6_1, hs_6_2, hs_6_3, hs_6_4, hs_6_5, hs_6_6, hs_6_7," 8810 "ds_6_0, ds_6_1, ds_6_2, ds_6_3, ds_6_4, ds_6_5, ds_6_6, ds_6_7," 8811 "cs_6_0, cs_6_1, cs_6_2, cs_6_3, cs_6_4, cs_6_5, cs_6_6, cs_6_7," 8812 "lib_6_3, lib_6_4, lib_6_5, lib_6_6, lib_6_7, lib_6_x," 8813 "ms_6_5, ms_6_6, ms_6_7," 8814 "as_6_5, as_6_6, as_6_7">; 8815def emit_pristine_llvm : DXCFlag<"emit-pristine-llvm">, 8816 HelpText<"Emit pristine LLVM IR from the frontend by not running any LLVM passes at all." 8817 "Same as -S + -emit-llvm + -disable-llvm-passes.">; 8818def fcgl : DXCFlag<"fcgl">, Alias<emit_pristine_llvm>; 8819def enable_16bit_types : DXCFlag<"enable-16bit-types">, Alias<fnative_half_type>, 8820 HelpText<"Enable 16-bit types and disable min precision types." 8821 "Available in HLSL 2018 and shader model 6.2.">; 8822def hlsl_entrypoint : Option<["-"], "hlsl-entry", KIND_SEPARATE>, 8823 Group<dxc_Group>, 8824 Visibility<[ClangOption, CC1Option]>, 8825 MarshallingInfoString<TargetOpts<"HLSLEntry">, "\"main\"">, 8826 HelpText<"Entry point name for hlsl">; 8827def dxc_entrypoint : Option<["--", "/", "-"], "E", KIND_JOINED_OR_SEPARATE>, 8828 Group<dxc_Group>, 8829 Visibility<[DXCOption]>, 8830 HelpText<"Entry point name">; 8831def dxc_hlsl_version : Option<["/", "-"], "HV", KIND_JOINED_OR_SEPARATE>, 8832 Group<dxc_Group>, 8833 Visibility<[DXCOption]>, 8834 HelpText<"HLSL Version">, 8835 Values<"2016, 2017, 2018, 2021, 202x">; 8836def dxc_validator_path_EQ : Joined<["--"], "dxv-path=">, Group<dxc_Group>, 8837 HelpText<"DXIL validator installation path">; 8838def dxc_disable_validation : DXCFlag<"Vd">, 8839 HelpText<"Disable validation">; 8840def : Option<["/", "-"], "Qembed_debug", KIND_FLAG>, Group<dxc_Group>, 8841 Flags<[Ignored]>, Visibility<[DXCOption]>, 8842 HelpText<"Embed PDB in shader container (ignored)">; 8843def spirv : DXCFlag<"spirv">, 8844 HelpText<"Generate SPIR-V code">; 8845def fspv_target_env_EQ : Joined<["-"], "fspv-target-env=">, Group<dxc_Group>, 8846 HelpText<"Specify the target environment">, 8847 Values<"vulkan1.2, vulkan1.3">; 8848def no_wasm_opt : Flag<["--"], "no-wasm-opt">, 8849 Group<m_Group>, 8850 HelpText<"Disable the wasm-opt optimizer">, 8851 MarshallingInfoFlag<LangOpts<"NoWasmOpt">>; 8852def wasm_opt : Flag<["--"], "wasm-opt">, 8853 Group<m_Group>, 8854 HelpText<"Enable the wasm-opt optimizer (default)">, 8855 MarshallingInfoNegativeFlag<LangOpts<"NoWasmOpt">>; 8856