diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -381,7 +381,8 @@ // Definition of single command line flag. This is an implementation detail, use // SetTrueBy or SetFalseBy instead. -class FlagDef option_flags, +class FlagDef option_flags, list option_vis, string help, list implied_by_expressions = []> { // The polarity. Besides spelling, this also decides whether the TableGen // record will be prefixed with "no_". @@ -390,9 +391,12 @@ // The value assigned to key path when the flag is present on command line. bit Value = value; - // OptionFlags that control visibility of the flag in different tools. + // OptionFlags in different tools. list OptionFlags = option_flags; + // OptionVisibility flags for different tools. + list OptionVis = option_vis; + // The help text associated with the flag. string Help = help; @@ -401,8 +405,11 @@ } // Additional information to be appended to both positive and negative flag. -class BothFlags option_flags, string help = ""> { +class BothFlags option_flags, + list option_vis = [Default], + string help = ""> { list OptionFlags = option_flags; + list OptionVis = option_vis; string Help = help; } @@ -411,23 +418,26 @@ FlagDef Result = FlagDef; } // Definition of the command line flag with positive spelling, e.g. "-ffoo". -class PosFlag flags = [], string help = "", - list implied_by_expressions = []> - : FlagDef {} +class PosFlag flags = [], list vis = [], + string help = "", list implied_by_expressions = []> + : FlagDef {} // Definition of the command line flag with negative spelling, e.g. "-fno-foo". -class NegFlag flags = [], string help = "", - list implied_by_expressions = []> - : FlagDef {} +class NegFlag flags = [], list vis = [], + string help = "", list implied_by_expressions = []> + : FlagDef {} // Expanded FlagDef that's convenient for creation of TableGen records. class FlagDefExpanded - : FlagDef { + : FlagDef { // Name of the TableGen record. string RecordName = prefix # !if(flag.Polarity, "", "no_") # name; @@ -445,7 +455,8 @@ class MarshalledFlagRec - : Flag<["-"], flag.Spelling>, Flags, HelpText, + : Flag<["-"], flag.Spelling>, Flags, Vis, + HelpText, MarshallingInfoBooleanFlag, ImpliedByAnyOf {} @@ -459,7 +470,7 @@ multiclass BoolOption> { + BothFlags suffix = BothFlags<[]>> { defvar flag1 = FlagDefExpanded.Result, prefix, NAME, spelling_base>; @@ -490,7 +501,7 @@ /// CompilerInvocation. multiclass BoolFOption> { + BothFlags both = BothFlags<[]>> { defm NAME : BoolOption<"f", flag_base, kpm, default, flag1, flag2, both>, Group; } @@ -501,7 +512,7 @@ // CompilerInvocation. multiclass BoolGOption> { + BothFlags both = BothFlags<[]>> { defm NAME : BoolOption<"g", flag_base, kpm, default, flag1, flag2, both>, Group; } @@ -509,7 +520,7 @@ // Works like BoolOption except without marshalling multiclass BoolOptionWithoutMarshalling> { + BothFlags suffix = BothFlags<[]>> { defvar flag1 = FlagDefExpanded.Result, prefix, NAME, spelling_base>; @@ -531,11 +542,11 @@ defvar implied = !if(flag1.CanBeImplied, flag1, flag2); def flag1.RecordName : Flag<["-"], flag1.Spelling>, Flags, - HelpText, + Vis, HelpText, ImpliedByAnyOf {} def flag2.RecordName : Flag<["-"], flag2.Spelling>, Flags, - HelpText, + Vis, HelpText, ImpliedByAnyOf {} } @@ -925,8 +936,9 @@ defm offload_uniform_block : BoolFOption<"offload-uniform-block", LangOpts<"OffloadUniformBlock">, Default<"LangOpts->CUDA">, - PosFlag, NegFlag, - BothFlags<[], " that kernels are launched with uniform block sizes (default true for CUDA/HIP and false otherwise)">>; + PosFlag, + NegFlag, + BothFlags<[], [Default], " that kernels are launched with uniform block sizes (default true for CUDA/HIP and false otherwise)">>; // OpenCL-only Options def cl_opt_disable : Flag<["-"], "cl-opt-disable">, Group, Flags<[CC1Option]>, @@ -994,8 +1006,8 @@ HelpText<"Only run preprocess, compile, and assemble steps">; defm convergent_functions : BoolFOption<"convergent-functions", LangOpts<"ConvergentFunctions">, DefaultFalse, - NegFlag, - PosFlag>; + NegFlag, + PosFlag>; // Common offloading options let Group = offload_Group in { @@ -1030,7 +1042,7 @@ defm gpu_rdc : BoolFOption<"gpu-rdc", LangOpts<"GPURelocatableDeviceCode">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; def fgpu_default_stream_EQ : Joined<["-"], "fgpu-default-stream=">, @@ -1047,14 +1059,15 @@ defm gpu_defer_diag : BoolFOption<"gpu-defer-diag", LangOpts<"GPUDeferDiag">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[], " host/device related diagnostic messages for CUDA/HIP">>; + PosFlag, + NegFlag, + BothFlags<[], [Default], " host/device related diagnostic messages for CUDA/HIP">>; defm gpu_exclude_wrong_side_overloads : BoolFOption<"gpu-exclude-wrong-side-overloads", LangOpts<"GPUExcludeWrongSideOverloads">, DefaultFalse, - PosFlag, - NegFlag, - BothFlags<[HelpHidden], " in overloading resolution for CUDA/HIP">>; + PosFlag, + NegFlag, + BothFlags<[HelpHidden], [Default], " in overloading resolution for CUDA/HIP">>; def cuid_EQ : Joined<["-"], "cuid=">, Flags<[CC1Option]>, HelpText<"An ID for compilation unit, which should be the same for the same " @@ -1119,7 +1132,7 @@ def : Flag<["-"], "fno-cuda-rdc">, Alias; defm cuda_short_ptr : BoolFOption<"cuda-short-ptr", TargetOpts<"NVPTXUseShortPointers">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; } @@ -1159,28 +1172,30 @@ Group, Flags<[NoArgumentUnused, HelpHidden]>; defm hip_new_launch_api : BoolFOption<"hip-new-launch-api", LangOpts<"HIPUseNewLaunchAPI">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[], " new kernel launching API for HIP">>; + PosFlag, + NegFlag, + BothFlags<[], [Default], " new kernel launching API for HIP">>; defm hip_fp32_correctly_rounded_divide_sqrt : BoolFOption<"hip-fp32-correctly-rounded-divide-sqrt", CodeGenOpts<"HIPCorrectlyRoundedDivSqrt">, DefaultTrue, - PosFlag, - NegFlag, - BothFlags<[], " that single precision floating-point divide and sqrt used in " + PosFlag, + NegFlag, + BothFlags<[], [Default], " that single precision floating-point divide and sqrt used in " "the program source are correctly rounded (HIP device compilation only)">>, ShouldParseIf; defm hip_kernel_arg_name : BoolFOption<"hip-kernel-arg-name", CodeGenOpts<"HIPSaveKernelArgName">, DefaultFalse, - PosFlag, - NegFlag, - BothFlags<[], " that kernel argument names are preserved (HIP only)">>, + PosFlag, + NegFlag, + BothFlags<[], [Default], " that kernel argument names are preserved (HIP only)">>, ShouldParseIf; def hipspv_pass_plugin_EQ : Joined<["--"], "hipspv-pass-plugin=">, Group, MetaVarName<"">, HelpText<"path to a pass plugin for HIP to SPIR-V passes.">; defm gpu_allow_device_init : BoolFOption<"gpu-allow-device-init", LangOpts<"GPUAllowDeviceInit">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[], " device side init function in HIP (experimental)">>, + PosFlag, + NegFlag, + BothFlags<[], [Default], " device side init function in HIP (experimental)">>, ShouldParseIf; def gpu_max_threads_per_block_EQ : Joined<["--"], "gpu-max-threads-per-block=">, Flags<[CC1Option]>, @@ -1273,7 +1288,7 @@ def fno_PIE : Flag<["-"], "fno-PIE">, Group; defm access_control : BoolFOption<"access-control", LangOpts<"AccessControl">, DefaultTrue, - NegFlag, + NegFlag, PosFlag>; def falign_functions : Flag<["-"], "falign-functions">, Group; def falign_functions_EQ : Joined<["-"], "falign-functions=">, Group; @@ -1283,7 +1298,7 @@ def fno_align_functions: Flag<["-"], "fno-align-functions">, Group; defm allow_editor_placeholders : BoolFOption<"allow-editor-placeholders", LangOpts<"AllowEditorPlaceholders">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; def fallow_unsupported : Flag<["-"], "fallow-unsupported">, Group; def fapple_kext : Flag<["-"], "fapple-kext">, Group, Flags<[CC1Option]>, @@ -1299,11 +1314,11 @@ MarshallingInfoEnum, "Default">; defm apple_pragma_pack : BoolFOption<"apple-pragma-pack", LangOpts<"ApplePragmaPack">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; defm xl_pragma_pack : BoolFOption<"xl-pragma-pack", LangOpts<"XLPragmaPack">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; def shared_libsan : Flag<["-"], "shared-libsan">, HelpText<"Dynamically link the sanitizer runtime">; @@ -1315,7 +1330,7 @@ defm assume_unique_vtables : BoolFOption<"assume-unique-vtables", CodeGenOpts<"AssumeUniqueVTables">, DefaultTrue, PosFlag, - NegFlag, BothFlags<[CoreOption]>>; @@ -1326,11 +1341,12 @@ def fasynchronous_unwind_tables : Flag<["-"], "fasynchronous-unwind-tables">, Group; defm double_square_bracket_attributes : BoolFOption<"double-square-bracket-attributes", - LangOpts<"DoubleSquareBracketAttributes">, DefaultTrue, PosFlag, NegFlag>; + LangOpts<"DoubleSquareBracketAttributes">, DefaultTrue, PosFlag, + NegFlag>; defm autolink : BoolFOption<"autolink", CodeGenOpts<"Autolink">, DefaultTrue, - NegFlag, + NegFlag, PosFlag>; // In the future this option will be supported by other offloading @@ -1342,17 +1358,17 @@ // C++ Coroutines defm coroutines : BoolFOption<"coroutines", LangOpts<"Coroutines">, Default, - PosFlag, + PosFlag, NegFlag>; defm coro_aligned_allocation : BoolFOption<"coro-aligned-allocation", LangOpts<"CoroAlignedAllocation">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; defm experimental_library : BoolFOption<"experimental-library", LangOpts<"ExperimentalLibrary">, DefaultFalse, - PosFlag; defm gnu_inline_asm : BoolFOption<"gnu-inline-asm", LangOpts<"GNUAsm">, DefaultTrue, - NegFlag, PosFlag>; + NegFlag, + PosFlag>; def fprofile_sample_use : Flag<["-"], "fprofile-sample-use">, Group, Flags<[CoreOption]>; @@ -1430,7 +1447,7 @@ HelpText<"The compilation directory to embed in the debug info and coverage mapping.">; defm debug_info_for_profiling : BoolFOption<"debug-info-for-profiling", CodeGenOpts<"DebugInfoForProfiling">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; def fprofile_instr_generate : Flag<["-"], "fprofile-instr-generate">, Group, Flags<[CoreOption]>, @@ -1449,8 +1466,8 @@ MarshallingInfoString>; defm coverage_mapping : BoolFOption<"coverage-mapping", CodeGenOpts<"CoverageMapping">, DefaultFalse, - PosFlag, - NegFlag, BothFlags<[CoreOption]>>; + PosFlag, + NegFlag, BothFlags<[CoreOption]>>; def fprofile_generate : Flag<["-"], "fprofile-generate">, Group, Flags<[CoreOption]>, HelpText<"Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">; @@ -1500,8 +1517,9 @@ MarshallingInfoFlag>; defm pseudo_probe_for_profiling : BoolFOption<"pseudo-probe-for-profiling", CodeGenOpts<"PseudoProbeForProfiling">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[NoXarchOption, CC1Option], " pseudo probes for sample profiling">>; + PosFlag, + NegFlag, + BothFlags<[NoXarchOption, CC1Option], [Default], " pseudo probes for sample profiling">>; def forder_file_instrumentation : Flag<["-"], "forder-file-instrumentation">, Group, Flags<[CC1Option, CoreOption]>, HelpText<"Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">; @@ -1529,20 +1547,22 @@ defm addrsig : BoolFOption<"addrsig", CodeGenOpts<"Addrsig">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[CoreOption], " an address-significance table">>; + PosFlag, + NegFlag, + BothFlags<[CoreOption], [Default], " an address-significance table">>; defm blocks : OptInCC1FFlag<"blocks", "Enable the 'blocks' language feature", "", "", [CoreOption]>; def fbootclasspath_EQ : Joined<["-"], "fbootclasspath=">, Group; defm borland_extensions : BoolFOption<"borland-extensions", LangOpts<"Borland">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; def fbuiltin : Flag<["-"], "fbuiltin">, Group, Flags<[CoreOption]>; def fbuiltin_module_map : Flag <["-"], "fbuiltin-module-map">, Group, Flags<[NoXarchOption]>, HelpText<"Load the clang builtins module map file.">; defm caret_diagnostics : BoolFOption<"caret-diagnostics", DiagnosticOpts<"ShowCarets">, DefaultTrue, - NegFlag, PosFlag>; + NegFlag, + PosFlag>; def fclang_abi_compat_EQ : Joined<["-"], "fclang-abi-compat=">, Group, Flags<[CC1Option]>, MetaVarName<"">, Values<".,latest">, HelpText<"Attempt to match the ABI of Clang ">; @@ -1585,8 +1605,9 @@ def fcompile_resource_EQ : Joined<["-"], "fcompile-resource=">, Group; defm complete_member_pointers : BoolOption<"f", "complete-member-pointers", LangOpts<"CompleteMemberPointers">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[CoreOption], " member pointer base types to be complete if they" + PosFlag, + NegFlag, + BothFlags<[CoreOption], [Default], " member pointer base types to be complete if they" " would be significant under the Microsoft ABI">>, Group; def fcf_runtime_abi_EQ : Joined<["-"], "fcf-runtime-abi=">, Group, @@ -1596,7 +1617,7 @@ MarshallingInfoEnum, "ObjectiveC">; defm constant_cfstrings : BoolFOption<"constant-cfstrings", LangOpts<"NoConstantCFStrings">, DefaultFalse, - NegFlag, + NegFlag, PosFlag>; def fconstant_string_class_EQ : Joined<["-"], "fconstant-string-class=">, Group; def fconstexpr_depth_EQ : Joined<["-"], "fconstexpr-depth=">, Group, Flags<[CC1Option]>, @@ -1624,14 +1645,17 @@ def fcreate_profile : Flag<["-"], "fcreate-profile">, Group; defm cxx_exceptions: BoolFOption<"cxx-exceptions", LangOpts<"CXXExceptions">, DefaultFalse, - PosFlag, NegFlag>; + PosFlag, + NegFlag>; defm async_exceptions: BoolFOption<"async-exceptions", LangOpts<"EHAsynch">, DefaultFalse, - PosFlag, NegFlag>; + PosFlag, + NegFlag>; defm cxx_modules : BoolFOption<"cxx-modules", LangOpts<"CPlusPlusModules">, Default, - NegFlag, PosFlag, - BothFlags<[NoXarchOption], " modules for C++">>, + NegFlag, + PosFlag, + BothFlags<[NoXarchOption], [Default], " modules for C++">>, ShouldParseIf; def fdebug_pass_arguments : Flag<["-"], "fdebug-pass-arguments">, Group; def fdebug_pass_structure : Flag<["-"], "fdebug-pass-structure">, Group; @@ -1650,7 +1674,7 @@ MarshallingInfoFlag>; defm diagnostics_show_hotness : BoolFOption<"diagnostics-show-hotness", CodeGenOpts<"DiagnosticsWithHotness">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; def fdiagnostics_hotness_threshold_EQ : Joined<["-"], "fdiagnostics-hotness-threshold=">, Group, Flags<[CC1Option]>, MetaVarName<"">, @@ -1661,10 +1685,11 @@ HelpText<"Prevent misexpect diagnostics from being output if the profile counts are within N% of the expected. ">; defm diagnostics_show_option : BoolFOption<"diagnostics-show-option", DiagnosticOpts<"ShowOptionNames">, DefaultTrue, - NegFlag, PosFlag>; + NegFlag, + PosFlag>; defm diagnostics_show_note_include_stack : BoolFOption<"diagnostics-show-note-include-stack", DiagnosticOpts<"ShowNoteIncludeStack">, DefaultFalse, - PosFlag, + PosFlag, NegFlag, BothFlags<[CC1Option]>>; def fdiagnostics_format_EQ : Joined<["-"], "fdiagnostics-format=">, Group; def fdiagnostics_show_category_EQ : Joined<["-"], "fdiagnostics-show-category=">, Group; @@ -1674,7 +1699,7 @@ MarshallingInfoFlag>; defm safe_buffer_usage_suggestions : BoolFOption<"safe-buffer-usage-suggestions", DiagnosticOpts<"ShowSafeBufferUsageSuggestions">, DefaultFalse, - PosFlag, NegFlag>; def fdiscard_value_names : Flag<["-"], "fdiscard-value-names">, Group, @@ -1683,16 +1708,18 @@ HelpText<"Do not discard value names in LLVM IR">, Flags<[NoXarchOption]>; defm dollars_in_identifiers : BoolFOption<"dollars-in-identifiers", LangOpts<"DollarIdents">, Default, - PosFlag, NegFlag, - BothFlags<[CC1Option], " '$' in identifiers">>; + PosFlag, + NegFlag, + BothFlags<[CC1Option], [Default], " '$' in identifiers">>; def fdwarf2_cfi_asm : Flag<["-"], "fdwarf2-cfi-asm">, Group; def fno_dwarf2_cfi_asm : Flag<["-"], "fno-dwarf2-cfi-asm">, Group; defm dwarf_directory_asm : BoolFOption<"dwarf-directory-asm", CodeGenOpts<"NoDwarfDirectoryAsm">, DefaultFalse, - NegFlag, PosFlag>; + NegFlag, + PosFlag>; defm elide_constructors : BoolFOption<"elide-constructors", LangOpts<"ElideConstructors">, DefaultTrue, - NegFlag, + NegFlag, PosFlag>; def fno_elide_type : Flag<["-"], "fno-elide-type">, Group, Flags<[CC1Option]>, @@ -1706,14 +1733,15 @@ MarshallingInfoFlag>; defm emulated_tls : BoolFOption<"emulated-tls", CodeGenOpts<"EmulatedTLS">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; def fencoding_EQ : Joined<["-"], "fencoding=">, Group; def ferror_limit_EQ : Joined<["-"], "ferror-limit=">, Group, Flags<[CoreOption]>; defm exceptions : BoolFOption<"exceptions", LangOpts<"Exceptions">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[], " support for exception handling">>; + PosFlag, + NegFlag, + BothFlags<[], [Default], " support for exception handling">>; def fdwarf_exceptions : Flag<["-"], "fdwarf-exceptions">, Group, HelpText<"Use DWARF style exceptions">; def fsjlj_exceptions : Flag<["-"], "fsjlj-exceptions">, Group, @@ -1790,12 +1818,12 @@ MarshallingInfoEnum, "FPE_Default">; defm fast_math : BoolFOption<"fast-math", LangOpts<"FastMath">, DefaultFalse, - PosFlag, NegFlag>; defm math_errno : BoolFOption<"math-errno", LangOpts<"MathErrno">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>, ShouldParseIf; def fextend_args_EQ : Joined<["-"], "fextend-arguments=">, Group, @@ -1811,27 +1839,32 @@ def fno_signaling_math : Flag<["-"], "fno-signaling-math">, Group; defm jump_tables : BoolFOption<"jump-tables", CodeGenOpts<"NoUseJumpTables">, DefaultFalse, - NegFlag, PosFlag, - BothFlags<[], " jump tables for lowering switches">>; + NegFlag, + PosFlag, + BothFlags<[], [Default], " jump tables for lowering switches">>; defm force_enable_int128 : BoolFOption<"force-enable-int128", TargetOpts<"ForceEnableInt128">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[], " support for int128_t type">>; + PosFlag, + NegFlag, + BothFlags<[], [Default], " support for int128_t type">>; defm keep_static_consts : BoolFOption<"keep-static-consts", CodeGenOpts<"KeepStaticConsts">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[NoXarchOption], " static const variables even if unused">>; + PosFlag, + NegFlag, + BothFlags<[NoXarchOption], [Default], " static const variables even if unused">>; defm keep_persistent_storage_variables : BoolFOption<"keep-persistent-storage-variables", CodeGenOpts<"KeepPersistentStorageVariables">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[NoXarchOption], " keeping all variables that have a persistent storage duration, including global, static and thread-local variables, to guarantee that they can be directly addressed">>; + PosFlag, + NegFlag, + BothFlags<[NoXarchOption], [Default], " keeping all variables that have a persistent storage duration, including global, static and thread-local variables, to guarantee that they can be directly addressed">>; defm fixed_point : BoolFOption<"fixed-point", LangOpts<"FixedPoint">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[], " fixed point types">>, ShouldParseIf; + PosFlag, + NegFlag, + BothFlags<[], [Default], " fixed point types">>, ShouldParseIf; defm cxx_static_destructors : BoolFOption<"c++-static-destructors", LangOpts<"RegisterStaticDestructors">, DefaultTrue, - NegFlag, + NegFlag, PosFlag>; def fsymbol_partition_EQ : Joined<["-"], "fsymbol-partition=">, Group, Flags<[CC1Option]>, MarshallingInfoString>; @@ -1933,8 +1966,9 @@ HelpText<"Disable aliasing mode in HWAddressSanitizer">; defm sanitize_memory_use_after_dtor : BoolOption<"f", "sanitize-memory-use-after-dtor", CodeGenOpts<"SanitizeMemoryUseAfterDtor">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[], " use-after-destroy detection in MemorySanitizer">>, + PosFlag, + NegFlag, + BothFlags<[], [Default], " use-after-destroy detection in MemorySanitizer">>, Group; def fsanitize_address_field_padding : Joined<["-"], "fsanitize-address-field-padding=">, Group, @@ -1942,8 +1976,9 @@ MarshallingInfoInt>; defm sanitize_address_use_after_scope : BoolOption<"f", "sanitize-address-use-after-scope", CodeGenOpts<"SanitizeAddressUseAfterScope">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[], " use-after-scope detection in AddressSanitizer">>, + PosFlag, + NegFlag, + BothFlags<[], [Default], " use-after-scope detection in AddressSanitizer">>, Group; def sanitize_address_use_after_return_EQ : Joined<["-"], "fsanitize-address-use-after-return=">, @@ -1957,8 +1992,9 @@ MarshallingInfoEnum, "Runtime">; defm sanitize_address_poison_custom_array_cookie : BoolOption<"f", "sanitize-address-poison-custom-array-cookie", CodeGenOpts<"SanitizeAddressPoisonCustomArrayCookie">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[], " poisoning array cookies when using custom operator new[] in AddressSanitizer">>, + PosFlag, + NegFlag, + BothFlags<[], [Default], " poisoning array cookies when using custom operator new[] in AddressSanitizer">>, DocBrief<[{Enable "poisoning" array cookies when allocating arrays with a custom operator new\[\] in Address Sanitizer, preventing accesses to the cookies from user code. An array cookie is a small implementation-defined @@ -1973,14 +2009,14 @@ Group; defm sanitize_address_globals_dead_stripping : BoolOption<"f", "sanitize-address-globals-dead-stripping", CodeGenOpts<"SanitizeAddressGlobalsDeadStripping">, DefaultFalse, - PosFlag, - NegFlag>, + PosFlag, + NegFlag>, Group; defm sanitize_address_use_odr_indicator : BoolOption<"f", "sanitize-address-use-odr-indicator", CodeGenOpts<"SanitizeAddressUseOdrIndicator">, DefaultTrue, - PosFlag, - NegFlag>, + NegFlag>, Group; def sanitize_address_destructor_EQ : Joined<["-"], "fsanitize-address-destructor=">, @@ -1998,8 +2034,9 @@ : BoolFOption<"sanitize-memory-param-retval", CodeGenOpts<"SanitizeMemoryParamRetval">, DefaultTrue, - PosFlag, NegFlag, - BothFlags<[], " detection of uninitialized parameters and return values">>; + PosFlag, + NegFlag, + BothFlags<[], [Default], " detection of uninitialized parameters and return values">>; //// Note: This flag was introduced when it was necessary to distinguish between // ABI for correct codegen. This is no longer needed, but the flag is // not removed since targeting either ABI will behave the same. @@ -2041,7 +2078,8 @@ Alias, AliasArgs<["undefined"]>; defm sanitize_minimal_runtime : BoolOption<"f", "sanitize-minimal-runtime", CodeGenOpts<"SanitizeMinimalRuntime">, DefaultFalse, - PosFlag, NegFlag>, + PosFlag, + NegFlag>, Group; def fsanitize_link_runtime : Flag<["-"], "fsanitize-link-runtime">, Group; @@ -2053,8 +2091,9 @@ Group; defm sanitize_cfi_cross_dso : BoolOption<"f", "sanitize-cfi-cross-dso", CodeGenOpts<"SanitizeCfiCrossDso">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[], " control flow integrity (CFI) checks for cross-DSO calls.">>, + PosFlag, + NegFlag, + BothFlags<[], [Default], " control flow integrity (CFI) checks for cross-DSO calls.">>, Group; def fsanitize_cfi_icall_generalize_pointers : Flag<["-"], "fsanitize-cfi-icall-generalize-pointers">, Group, @@ -2066,13 +2105,15 @@ MarshallingInfoFlag>; defm sanitize_cfi_canonical_jump_tables : BoolOption<"f", "sanitize-cfi-canonical-jump-tables", CodeGenOpts<"SanitizeCfiCanonicalJumpTables">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[], " the jump table addresses canonical in the symbol table">>, + PosFlag, + NegFlag, + BothFlags<[], [Default], " the jump table addresses canonical in the symbol table">>, Group; defm sanitize_stats : BoolOption<"f", "sanitize-stats", CodeGenOpts<"SanitizeStats">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[], " sanitizer statistics gathering.">>, + PosFlag, + NegFlag, + BothFlags<[], [Default], " sanitizer statistics gathering.">>, Group; def fsanitize_thread_memory_access : Flag<["-"], "fsanitize-thread-memory-access">, Group, @@ -2114,24 +2155,24 @@ def fno_associative_math : Flag<["-"], "fno-associative-math">, Group; defm reciprocal_math : BoolFOption<"reciprocal-math", LangOpts<"AllowRecip">, DefaultFalse, - PosFlag, NegFlag>; defm approx_func : BoolFOption<"approx-func", LangOpts<"ApproxFunc">, DefaultFalse, - PosFlag, NegFlag>; defm finite_math_only : BoolFOption<"finite-math-only", LangOpts<"FiniteMathOnly">, DefaultFalse, - PosFlag, NegFlag>; defm signed_zeros : BoolFOption<"signed-zeros", LangOpts<"NoSignedZero">, DefaultFalse, - NegFlag, PosFlag>; def fhonor_nans : Flag<["-"], "fhonor-nans">, Group, @@ -2165,13 +2206,13 @@ defm strict_float_cast_overflow : BoolFOption<"strict-float-cast-overflow", CodeGenOpts<"StrictFloatCastOverflow">, DefaultTrue, - NegFlag, - PosFlag>; + PosFlag>; defm protect_parens : BoolFOption<"protect-parens", LangOpts<"ProtectParens">, DefaultFalse, - PosFlag, NegFlag>; @@ -2181,17 +2222,19 @@ defm rewrite_imports : BoolFOption<"rewrite-imports", PreprocessorOutputOpts<"RewriteImports">, DefaultFalse, - PosFlag, NegFlag>; + PosFlag, + NegFlag>; defm rewrite_includes : BoolFOption<"rewrite-includes", PreprocessorOutputOpts<"RewriteIncludes">, DefaultFalse, - PosFlag, NegFlag>; + PosFlag, + NegFlag>; defm directives_only : OptInCC1FFlag<"directives-only", "">; defm delete_null_pointer_checks : BoolFOption<"delete-null-pointer-checks", CodeGenOpts<"NullPointerIsValid">, DefaultFalse, - NegFlag, - PosFlag, + NegFlag, + PosFlag, BothFlags<[CoreOption]>>, DocBrief<[{When enabled, treat null pointer dereference, creation of a reference to null, or passing a null pointer to a function parameter annotated with the "nonnull" @@ -2201,10 +2244,11 @@ defm use_line_directives : BoolFOption<"use-line-directives", PreprocessorOutputOpts<"UseLineDirectives">, DefaultFalse, - PosFlag, NegFlag>; + PosFlag, + NegFlag>; defm minimize_whitespace : BoolFOption<"minimize-whitespace", PreprocessorOutputOpts<"MinimizeWhitespace">, DefaultFalse, - PosFlag, Default, - PosFlag, + PosFlag, NegFlag, BothFlags<[CC1Option]>>; defm gnu89_inline : BoolFOption<"gnu89-inline", LangOpts<"GNUInline">, Default, - PosFlag, + PosFlag, NegFlag>, ShouldParseIf; def fgnu_runtime : Flag<["-"], "fgnu-runtime">, Group, HelpText<"Generate output compatible with the standard GNU Objective-C runtime">; @@ -2250,7 +2294,7 @@ MarshallingInfoInt, "UINT_MAX">; defm jmc : BoolFOption<"jmc", CodeGenOpts<"JMCInstrument">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; def fglobal_isel : Flag<["-"], "fglobal-isel">, Group, HelpText<"Enables the global instruction selector">; @@ -2291,7 +2335,7 @@ defm xray_instrument : BoolFOption<"xray-instrument", LangOpts<"XRayInstrument">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; def fxray_instruction_threshold_EQ : @@ -2322,26 +2366,26 @@ defm xray_always_emit_customevents : BoolFOption<"xray-always-emit-customevents", LangOpts<"XRayAlwaysEmitCustomEvents">, DefaultFalse, - PosFlag, NegFlag>; defm xray_always_emit_typedevents : BoolFOption<"xray-always-emit-typedevents", LangOpts<"XRayAlwaysEmitTypedEvents">, DefaultFalse, - PosFlag, NegFlag>; defm xray_ignore_loops : BoolFOption<"xray-ignore-loops", CodeGenOpts<"XRayIgnoreLoops">, DefaultFalse, - PosFlag, NegFlag>; defm xray_function_index : BoolFOption<"xray-function-index", CodeGenOpts<"XRayFunctionIndex">, DefaultTrue, - PosFlag, - NegFlag, + NegFlag>; def fxray_link_deps : Flag<["-"], "fxray-link-deps">, Group, @@ -2368,8 +2412,8 @@ defm fine_grained_bitfield_accesses : BoolOption<"f", "fine-grained-bitfield-accesses", CodeGenOpts<"FineGrainedBitfieldAccesses">, DefaultFalse, - PosFlag, - NegFlag, + PosFlag, + NegFlag, BothFlags<[CC1Option]>>, Group; @@ -2411,9 +2455,9 @@ Alias, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode">; defm unified_lto : BoolFOption<"unified-lto", CodeGenOpts<"UnifiedLTO">, DefaultFalse, - PosFlag, - NegFlag, - BothFlags<[CC1Option], "">>; + PosFlag, + NegFlag, + BothFlags<[CC1Option], [Default], "">>; def fno_lto : Flag<["-"], "fno-lto">, Flags<[CoreOption, CC1Option]>, Group, HelpText<"Disable LTO mode (default)">; def foffload_lto_EQ : Joined<["-"], "foffload-lto=">, Flags<[CoreOption]>, Group, @@ -2436,9 +2480,9 @@ MarshallingInfoString>; defm fat_lto_objects : BoolFOption<"fat-lto-objects", CodeGenOpts<"FatLTO">, DefaultFalse, - PosFlag, - NegFlag, - BothFlags<[CC1Option], " fat LTO object support">>; + PosFlag, + NegFlag, + BothFlags<[CC1Option], [Default], " fat LTO object support">>; def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">, Group, Flags<[NoXarchOption, CC1Option, CoreOption]>, HelpText<"Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit)">, @@ -2450,8 +2494,9 @@ MarshallingInfoInt, "DiagnosticOptions::DefaultSnippetLineLimit">; defm merge_all_constants : BoolFOption<"merge-all-constants", CodeGenOpts<"MergeAllConstants">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[], " merging of constants">>; + PosFlag, + NegFlag, + BothFlags<[], [Default], " merging of constants">>; def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group, Flags<[CC1Option]>, HelpText<"Format message diagnostics so that they fit within N columns">, MarshallingInfoInt>; @@ -2469,7 +2514,8 @@ MarshallingInfoFlag>, ImpliedByAnyOf<[fms_compatibility.KeyPath]>; defm asm_blocks : BoolFOption<"asm-blocks", LangOpts<"AsmBlocks">, Default, - PosFlag, NegFlag>; + PosFlag, + NegFlag>; def fms_volatile : Flag<["-"], "fms-volatile">, Group, Flags<[CC1Option]>, MarshallingInfoFlag>; def fmsc_version : Joined<["-"], "fmsc-version=">, Group, Flags<[NoXarchOption, CoreOption]>, @@ -2493,8 +2539,8 @@ Group, Flags<[NoXarchOption, CoreOption]>; defm delayed_template_parsing : BoolFOption<"delayed-template-parsing", LangOpts<"DelayedTemplateParsing">, DefaultFalse, - PosFlag, - NegFlag, + PosFlag, + NegFlag, BothFlags<[CoreOption]>>; def fms_memptr_rep_EQ : Joined<["-"], "fms-memptr-rep=">, Group, Flags<[CC1Option]>, Values<"single,multiple,virtual">, NormalizedValuesScope<"LangOptions">, @@ -2513,9 +2559,9 @@ // term here. defm declspec : BoolOption<"f", "declspec", LangOpts<"DeclSpecKeyword">, DefaultFalse, - PosFlag, - NegFlag, - BothFlags<[CC1Option], " __declspec as a keyword">>, Group; + PosFlag, + NegFlag, + BothFlags<[CC1Option], [Default], " __declspec as a keyword">>, Group; def fmodules_cache_path : Joined<["-"], "fmodules-cache-path=">, Group, Flags<[NoXarchOption, CC1Option]>, MetaVarName<"">, HelpText<"Specify the module cache path">; @@ -2528,7 +2574,7 @@ HelpText<"Specify the prebuilt module path">; defm prebuilt_implicit_modules : BoolFOption<"prebuilt-implicit-modules", HeaderSearchOpts<"EnablePrebuiltImplicitModules">, DefaultFalse, - PosFlag, + PosFlag, NegFlag, BothFlags<[NoXarchOption, CC1Option]>>; def fmodule_output_EQ : Joined<["-"], "fmodule-output=">, Flags<[NoXarchOption, CC1Option]>, @@ -2562,8 +2608,8 @@ MarshallingInfoNegativeFlag>; defm modules_validate_system_headers : BoolOption<"f", "modules-validate-system-headers", HeaderSearchOpts<"ModulesValidateSystemHeaders">, DefaultFalse, - PosFlag, - NegFlag>, Group; + PosFlag, + NegFlag>, Group; def fno_modules_validate_textual_header_includes : Flag<["-"], "fno-modules-validate-textual-header-includes">, Group, Flags<[CC1Option, NoXarchOption]>, @@ -2601,7 +2647,7 @@ Group, Flags<[NoXarchOption]>; defm pch_instantiate_templates : BoolFOption<"pch-instantiate-templates", LangOpts<"PCHInstantiateTemplates">, DefaultFalse, - PosFlag, + PosFlag, NegFlag, BothFlags<[CC1Option, CoreOption]>>; defm pch_codegen: OptInCC1FFlag<"pch-codegen", "Generate ", "Do not generate ", "code for uses of this PCH that assumes an explicit object file will be built for the PCH">; @@ -2614,7 +2660,7 @@ MarshallingInfoFlag>; defm modules : BoolFOption<"modules", LangOpts<"Modules">, Default, - PosFlag, + PosFlag, NegFlag, BothFlags<[NoXarchOption, CoreOption]>>; def fmodule_maps : Flag <["-"], "fmodule-maps">, Flags<[CoreOption]>, Alias; def fmodule_name_EQ : Joined<["-"], "fmodule-name=">, Group, @@ -2642,16 +2688,17 @@ MarshallingInfoFlag>; defm modules_decluse : BoolFOption<"modules-decluse", LangOpts<"ModulesDeclUse">, Default, - PosFlag, + PosFlag, NegFlag, BothFlags<[NoXarchOption,CoreOption]>>; defm modules_search_all : BoolFOption<"modules-search-all", LangOpts<"ModulesSearchAll">, DefaultFalse, - PosFlag, + PosFlag, NegFlag, BothFlags<[NoXarchOption, CC1Option,CoreOption]>>, ShouldParseIf; defm implicit_modules : BoolFOption<"implicit-modules", LangOpts<"ImplicitModules">, DefaultTrue, - NegFlag, PosFlag, BothFlags<[NoXarchOption,CoreOption]>>; + NegFlag, + PosFlag, BothFlags<[NoXarchOption,CoreOption]>>; def fno_modules_check_relocated : Joined<["-"], "fno-modules-check-relocated">, Group, Flags<[CC1Option]>, HelpText<"Skip checks for relocated modules when loading PCM files">, @@ -2686,8 +2733,8 @@ HelpText<"Compile common globals like normal definitions">; defm digraphs : BoolFOption<"digraphs", LangOpts<"Digraphs">, Default, - PosFlag', '<%', '%>', '%:', '%:%:' (default)">, - NegFlag', '<%', '%>', '%:', '%:%:'">, + PosFlag', '<%', '%>', '%:', '%:%:' (default)">, + NegFlag', '<%', '%>', '%:', '%:%:'">, BothFlags<[CC1Option]>>; def fno_eliminate_unused_debug_symbols : Flag<["-"], "fno-eliminate-unused-debug-symbols">, Group; def fno_inline_functions : Flag<["-"], "fno-inline-functions">, Group, Flags<[CC1Option]>; @@ -2723,14 +2770,14 @@ def fno_omit_frame_pointer : Flag<["-"], "fno-omit-frame-pointer">, Group; defm operator_names : BoolFOption<"operator-names", LangOpts<"CXXOperatorNames">, Default, - NegFlag, + NegFlag, PosFlag>; def fdiagnostics_absolute_paths : Flag<["-"], "fdiagnostics-absolute-paths">, Group, Flags<[CC1Option, CoreOption]>, HelpText<"Print absolute paths in diagnostics">, MarshallingInfoFlag>; defm diagnostics_show_line_numbers : BoolFOption<"diagnostics-show-line-numbers", DiagnosticOpts<"ShowLineNumbers">, DefaultTrue, - NegFlag, + NegFlag, PosFlag>; def fno_stack_protector : Flag<["-"], "fno-stack-protector">, Group, HelpText<"Disable the use of stack protectors">; @@ -2746,7 +2793,7 @@ MarshallingInfoNegativeFlag>; defm use_cxa_atexit : BoolFOption<"use-cxa-atexit", CodeGenOpts<"CXAAtExit">, DefaultTrue, - NegFlag, + NegFlag, PosFlag>; def fno_unwind_tables : Flag<["-"], "fno-unwind-tables">, Group; def fno_verbose_asm : Flag<["-"], "fno-verbose-asm">, Group, Flags<[CC1Option]>, @@ -2758,35 +2805,37 @@ def fno_objc_arc : Flag<["-"], "fno-objc-arc">, Group; defm objc_encode_cxx_class_template_spec : BoolFOption<"objc-encode-cxx-class-template-spec", LangOpts<"EncodeCXXClassTemplateSpec">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; defm objc_convert_messages_to_runtime_calls : BoolFOption<"objc-convert-messages-to-runtime-calls", CodeGenOpts<"ObjCConvertMessagesToRuntimeCalls">, DefaultTrue, - NegFlag, PosFlag>; + NegFlag, + PosFlag>; defm objc_arc_exceptions : BoolFOption<"objc-arc-exceptions", CodeGenOpts<"ObjCAutoRefCountExceptions">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; def fobjc_atdefs : Flag<["-"], "fobjc-atdefs">, Group; def fobjc_call_cxx_cdtors : Flag<["-"], "fobjc-call-cxx-cdtors">, Group; defm objc_exceptions : BoolFOption<"objc-exceptions", LangOpts<"ObjCExceptions">, DefaultFalse, - PosFlag, NegFlag>; + PosFlag, + NegFlag>; defm application_extension : BoolFOption<"application-extension", LangOpts<"AppExt">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; defm relaxed_template_template_args : BoolFOption<"relaxed-template-template-args", LangOpts<"RelaxedTemplateTemplateArgs">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; defm sized_deallocation : BoolFOption<"sized-deallocation", LangOpts<"SizedDeallocation">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; defm aligned_allocation : BoolFOption<"aligned-allocation", LangOpts<"AlignedAllocation">, Default, - PosFlag, + PosFlag, NegFlag, BothFlags<[CC1Option]>>; def fnew_alignment_EQ : Joined<["-"], "fnew-alignment=">, HelpText<"Specifies the largest alignment guaranteed by '::operator new(size_t)'">, @@ -2801,7 +2850,7 @@ def fobjc_new_property : Flag<["-"], "fobjc-new-property">, Group; defm objc_infer_related_result_type : BoolFOption<"objc-infer-related-result-type", LangOpts<"ObjCInferRelatedResultType">, DefaultTrue, - NegFlag, + NegFlag, PosFlag>; def fobjc_link_runtime: Flag<["-"], "fobjc-link-runtime">, Group; def fobjc_weak : Flag<["-"], "fobjc-weak">, Group, Flags<[CC1Option]>, @@ -2823,9 +2872,9 @@ MarshallingInfoFlag>; defm objc_avoid_heapify_local_blocks : BoolFOption<"objc-avoid-heapify-local-blocks", CodeGenOpts<"ObjCAvoidHeapifyLocalBlocks">, DefaultFalse, - PosFlag, - NegFlag, - BothFlags<[CC1Option, NoDriverOption], " to avoid heapifying local blocks">>; + PosFlag, + NegFlag, + BothFlags<[CC1Option, NoDriverOption], [Default], " to avoid heapifying local blocks">>; def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group, HelpText<"Omit the frame pointer from functions that don't need it. " @@ -2839,9 +2888,9 @@ HelpText<"Set OpenMP version (e.g. 45 for OpenMP 4.5, 50 for OpenMP 5.0). Default value is 50 for Clang and 11 for Flang">; defm openmp_extensions: BoolFOption<"openmp-extensions", LangOpts<"OpenMPExtensions">, DefaultTrue, - PosFlag, - NegFlag>; def fopenmp_EQ : Joined<["-"], "fopenmp=">, Group; def fopenmp_use_tls : Flag<["-"], "fopenmp-use-tls">, Group, @@ -2917,7 +2966,8 @@ Group, Flags<[CC1Option, HelpHidden]>; defm openmp_optimistic_collapse : BoolFOption<"openmp-optimistic-collapse", LangOpts<"OpenMPOptimisticCollapse">, DefaultFalse, - PosFlag, NegFlag, BothFlags<[NoArgumentUnused, HelpHidden]>>; + PosFlag, + NegFlag, BothFlags<[NoArgumentUnused, HelpHidden]>>; def static_openmp: Flag<["-"], "static-openmp">, HelpText<"Use the static host OpenMP runtime while linking.">; def fopenmp_new_driver : Flag<["-"], "fopenmp-new-driver">, Flags<[HelpHidden]>, @@ -2930,7 +2980,8 @@ def foptimize_sibling_calls : Flag<["-"], "foptimize-sibling-calls">, Group; defm escaping_block_tail_calls : BoolFOption<"escaping-block-tail-calls", CodeGenOpts<"NoEscapingBlockTailCalls">, DefaultFalse, - NegFlag, PosFlag>; + NegFlag, + PosFlag>; def force__cpusubtype__ALL : Flag<["-"], "force_cpusubtype_ALL">; def force__flat__namespace : Flag<["-"], "force_flat_namespace">; def force__load : Separate<["-"], "force_load">; @@ -2947,7 +2998,7 @@ def fno_max_type_align : Flag<["-"], "fno-max-type-align">, Group; defm pascal_strings : BoolFOption<"pascal-strings", LangOpts<"PascalStrings">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; // Note: This flag has different semantics in the driver and in -cc1. The driver accepts -fpatchable-function-entry=M,N // and forwards it to -cc1 as -fpatchable-function-entry=M and -fpatchable-function-entry-offset=N. In -cc1, both flags @@ -2973,15 +3024,15 @@ HelpText<"Use GOT indirection to reference external data symbols">; defm plt : BoolFOption<"plt", CodeGenOpts<"NoPLT">, DefaultFalse, - NegFlag, + NegFlag, PosFlag>; defm ropi : BoolFOption<"ropi", LangOpts<"ROPI">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; defm rwpi : BoolFOption<"rwpi", LangOpts<"RWPI">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; def fplugin_EQ : Joined<["-"], "fplugin=">, Group, Flags<[NoXarchOption]>, MetaVarName<"">, HelpText<"Load the named plugin (dynamic shared object)">; @@ -2994,7 +3045,7 @@ MarshallingInfoStringVector>; defm preserve_as_comments : BoolFOption<"preserve-as-comments", CodeGenOpts<"PreserveAsmComments">, DefaultTrue, - NegFlag, + NegFlag, PosFlag>; def framework : Separate<["-"], "framework">, Flags<[LinkerInput]>; def frandom_seed_EQ : Joined<["-"], "frandom-seed=">, Group; @@ -3002,22 +3053,23 @@ HelpText<"Override the default ABI to return small structs in registers">; defm rtti : BoolFOption<"rtti", LangOpts<"RTTI">, Default, - NegFlag, + NegFlag, PosFlag>, ShouldParseIf; defm rtti_data : BoolFOption<"rtti-data", LangOpts<"RTTIData">, Default, - NegFlag, + NegFlag, PosFlag>, ShouldParseIf; def : Flag<["-"], "fsched-interblock">, Group; defm short_enums : BoolFOption<"short-enums", LangOpts<"ShortEnums">, DefaultFalse, - PosFlag, NegFlag>; defm char8__t : BoolFOption<"char8_t", LangOpts<"Char8">, Default, - PosFlag, NegFlag, - BothFlags<[CC1Option], " C++ builtin type char8_t">>; + PosFlag, + NegFlag, + BothFlags<[CC1Option], [Default], " C++ builtin type char8_t">>; def fshort_wchar : Flag<["-"], "fshort-wchar">, Group, HelpText<"Force wchar_t to be a short unsigned int">; def fno_short_wchar : Flag<["-"], "fno-short-wchar">, Group, @@ -3029,33 +3081,36 @@ MarshallingInfoEnum, "Ovl_All">; defm show_column : BoolFOption<"show-column", DiagnosticOpts<"ShowColumn">, DefaultTrue, - NegFlag, + NegFlag, PosFlag>; defm show_source_location : BoolFOption<"show-source-location", DiagnosticOpts<"ShowLocation">, DefaultTrue, - NegFlag, + NegFlag, PosFlag>; defm spell_checking : BoolFOption<"spell-checking", LangOpts<"SpellChecking">, DefaultTrue, - NegFlag, PosFlag>; + NegFlag, + PosFlag>; def fspell_checking_limit_EQ : Joined<["-"], "fspell-checking-limit=">, Group, Flags<[CC1Option]>, HelpText<"Set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit)">, MarshallingInfoInt, "DiagnosticOptions::DefaultSpellCheckingLimit">; def fsigned_bitfields : Flag<["-"], "fsigned-bitfields">, Group; defm signed_char : BoolFOption<"signed-char", LangOpts<"CharIsSigned">, DefaultTrue, - NegFlag, PosFlag>, + NegFlag, + PosFlag>, ShouldParseIf; defm split_stack : BoolFOption<"split-stack", CodeGenOpts<"EnableSegmentedStacks">, DefaultFalse, - NegFlag, - PosFlag>; + NegFlag, + PosFlag>; def fstack_protector_all : Flag<["-"], "fstack-protector-all">, Group, HelpText<"Enable stack protectors for all functions">; defm stack_clash_protection : BoolFOption<"stack-clash-protection", CodeGenOpts<"StackClashProtector">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[], " stack clash protection">>, + PosFlag, + NegFlag, + BothFlags<[], [Default], " stack clash protection">>, DocBrief<"Instrument stack allocation to prevent stack clash attacks">; def fstack_protector_strong : Flag<["-"], "fstack-protector-strong">, Group, HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. " @@ -3100,7 +3155,7 @@ MarshallingInfoFlag>; defm strict_vtable_pointers : BoolFOption<"strict-vtable-pointers", CodeGenOpts<"StrictVTablePointers">, DefaultFalse, - PosFlag, NegFlag>; def fstrict_overflow : Flag<["-"], "fstrict-overflow">, Group; @@ -3167,7 +3222,7 @@ def : Flag<["-"], "fterminated-vtables">, Alias; defm threadsafe_statics : BoolFOption<"threadsafe-statics", LangOpts<"ThreadsafeStatics">, DefaultTrue, - NegFlag, + NegFlag, PosFlag>; def ftime_report : Flag<["-"], "ftime-report">, Group, Flags<[CC1Option]>, MarshallingInfoFlag>; @@ -3215,7 +3270,8 @@ HelpText<"Turn off loop unroller">, Flags<[CC1Option]>; defm reroll_loops : BoolFOption<"reroll-loops", CodeGenOpts<"RerollLoops">, DefaultFalse, - PosFlag, NegFlag>; + PosFlag, + NegFlag>; def ffinite_loops: Flag<["-"], "ffinite-loops">, Group, HelpText<"Assume all loops are finite.">, Flags<[CC1Option]>; def fno_finite_loops: Flag<["-"], "fno-finite-loops">, Group, @@ -3231,11 +3287,12 @@ def funwind_tables : Flag<["-"], "funwind-tables">, Group; defm register_global_dtors_with_atexit : BoolFOption<"register-global-dtors-with-atexit", CodeGenOpts<"RegisterGlobalDtorsWithAtExit">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[], " atexit or __cxa_atexit to register global destructors">>; + PosFlag, + NegFlag, + BothFlags<[], [Default], " atexit or __cxa_atexit to register global destructors">>; defm use_init_array : BoolFOption<"use-init-array", CodeGenOpts<"UseInitArray">, DefaultTrue, - NegFlag, + NegFlag, PosFlag>; def fno_var_tracking : Flag<["-"], "fno-var-tracking">, Group; def fverbose_asm : Flag<["-"], "fverbose-asm">, Group, @@ -3243,7 +3300,7 @@ def dA : Flag<["-"], "dA">, Alias; defm visibility_from_dllstorageclass : BoolFOption<"visibility-from-dllstorageclass", LangOpts<"VisibilityFromDLLStorageClass">, DefaultFalse, - PosFlag, + PosFlag, NegFlag>; def fvisibility_dllexport_EQ : Joined<["-"], "fvisibility-dllexport=">, Group, Flags<[CC1Option]>, HelpText<"The visibility for dllexport definitions [-fvisibility-from-dllstorageclass]">, @@ -3266,13 +3323,13 @@ MarshallingInfoVisibility, "DefaultVisibility">; defm visibility_inlines_hidden : BoolFOption<"visibility-inlines-hidden", LangOpts<"InlineVisibilityHidden">, DefaultFalse, - PosFlag