Options.td revision f925e0414d76d39d612d54d233e9fa2ee04b0a27
1//===--- DriverOptions.td - Options for clang -----------------------------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10//  This file defines the options accepted by clang.
11//
12//===----------------------------------------------------------------------===//
13
14// Include the common option parsing interfaces.
15include "OptParser.td"
16
17/////////
18// Groups
19
20// Meta-group which defines
21def CompileOnly_Group     : OptionGroup<"<CompileOnly group>">;
22def Action_Group          : OptionGroup<"<action group>">;
23
24def I_Group               : OptionGroup<"<I group>">, Group<CompileOnly_Group>;
25def L_Group               : OptionGroup<"<L group>">, Group<CompileOnly_Group>;
26def M_Group               : OptionGroup<"<M group>">, Group<CompileOnly_Group>;
27def T_Group               : OptionGroup<"<T group>">;
28def O_Group               : OptionGroup<"<O group>">, Group<CompileOnly_Group>;
29def W_Group               : OptionGroup<"<W group>">, Group<CompileOnly_Group>;
30def X_Group               : OptionGroup<"<X group>">;
31def a_Group               : OptionGroup<"<a group>">;
32def d_Group               : OptionGroup<"<d group>">;
33def f_Group               : OptionGroup<"<f group>">, Group<CompileOnly_Group>;
34def f_clang_Group         : OptionGroup<"<f (clang-only) group>">, Group<CompileOnly_Group>;
35def g_Group               : OptionGroup<"<g group>">;
36def g_flags_Group         : OptionGroup<"<g flags group>">;
37def i_Group               : OptionGroup<"<i group>">, Group<CompileOnly_Group>;
38def clang_i_Group         : OptionGroup<"<clang i group>">, Group<i_Group>;
39def m_Group               : OptionGroup<"<m group>">, Group<CompileOnly_Group>;
40def m_x86_Features_Group  : OptionGroup<"<m x86 features group>">, Group<m_Group>;
41def m_hexagon_Features_Group  : OptionGroup<"<m hexagon features group>">, Group<m_Group>;
42def opencl_Group          : OptionGroup<"<opencl group>">;
43def u_Group               : OptionGroup<"<u group>">;
44
45def pedantic_Group        : OptionGroup<"<pedantic group>">,
46  Group<CompileOnly_Group>;
47def reserved_lib_Group   : OptionGroup<"<reserved libs group>">;
48
49// Temporary groups for clang options which we know we don't support,
50// but don't want to verbosely warn the user about.
51def clang_ignored_f_Group : OptionGroup<"<clang ignored f group>">,
52  Group<f_Group>;
53def clang_ignored_m_Group : OptionGroup<"<clang ignored m group>">,
54  Group<m_Group>;
55
56/////////
57// Options
58
59// The internal option ID must be a valid C++ identifier and results in a
60// clang::driver::options::OPT_XX enum constant for XX.
61//
62// We want to unambiguously be able to refer to options from the driver source
63// code, for this reason the option name is mangled into an ID. This mangling
64// isn't guaranteed to have an inverse, but for practical purposes it does.
65//
66// The mangling scheme is to ignore the leading '-', and perform the following
67// substitutions:
68//   _ => __
69//   - => _
70//   # => _HASH
71//   , => _COMMA
72//   = => _EQ
73//   C++ => CXX
74//   . => _
75
76// Developer Driver Options
77
78def ccc_Group : OptionGroup<"<clang internal options>">;
79def ccc_driver_Group : OptionGroup<"<clang driver internal options>">,
80  Group<ccc_Group>, HelpText<"DRIVER OPTIONS">;
81def ccc_debug_Group : OptionGroup<"<clang debug/development internal options>">,
82  Group<ccc_Group>, HelpText<"DEBUG/DEVELOPMENT OPTIONS">;
83
84class CCCDriverOpt : Group<ccc_driver_Group>, Flags<[DriverOption, HelpHidden]>;
85def ccc_cxx : Flag<"-ccc-cxx">, CCCDriverOpt,
86  HelpText<"Act as a C++ driver">;
87def ccc_echo : Flag<"-ccc-echo">, CCCDriverOpt,
88  HelpText<"Echo commands before running them">;
89def ccc_gcc_name : Separate<"-ccc-gcc-name">, CCCDriverOpt,
90  HelpText<"Name for native GCC compiler">,
91  MetaVarName<"<gcc-path>">;
92def ccc_clang_cxx : Flag<"-ccc-clang-cxx">, CCCDriverOpt,
93  HelpText<"Enable the clang compiler for C++">;
94def ccc_no_clang_cxx : Flag<"-ccc-no-clang-cxx">, CCCDriverOpt,
95  HelpText<"Disable the clang compiler for C++">;
96def ccc_no_clang : Flag<"-ccc-no-clang">, CCCDriverOpt,
97  HelpText<"Disable the clang compiler">;
98def ccc_no_clang_cpp : Flag<"-ccc-no-clang-cpp">, CCCDriverOpt,
99  HelpText<"Disable the clang preprocessor">;
100def ccc_clang_archs : Separate<"-ccc-clang-archs">, CCCDriverOpt,
101  HelpText<"Comma separate list of architectures to use the clang compiler for">,
102  MetaVarName<"<arch-list>">;
103def ccc_pch_is_pch : Flag<"-ccc-pch-is-pch">, CCCDriverOpt,
104  HelpText<"Use lazy PCH for precompiled headers">;
105def ccc_pch_is_pth : Flag<"-ccc-pch-is-pth">, CCCDriverOpt,
106  HelpText<"Use pretokenized headers for precompiled headers">;
107
108class CCCDebugOpt : Group<ccc_debug_Group>, Flags<[DriverOption, HelpHidden]>;
109def ccc_install_dir : Separate<"-ccc-install-dir">, CCCDebugOpt,
110  HelpText<"Simulate installation in the given directory">;
111def ccc_print_options : Flag<"-ccc-print-options">, CCCDebugOpt,
112  HelpText<"Dump parsed command line arguments">;
113def ccc_print_phases : Flag<"-ccc-print-phases">, CCCDebugOpt,
114  HelpText<"Dump list of actions to perform">;
115def ccc_print_bindings : Flag<"-ccc-print-bindings">, CCCDebugOpt,
116  HelpText<"Show bindings of tools to actions">;
117
118def ccc_arcmt_check : Flag<"-ccc-arcmt-check">, CCCDriverOpt,
119  HelpText<"Check for ARC migration issues that need manual handling">;
120def ccc_arcmt_modify : Flag<"-ccc-arcmt-modify">, CCCDriverOpt,
121  HelpText<"Apply modifications to files to conform to ARC">;
122def ccc_arrmt_check : Flag<"-ccc-arrmt-check">, Alias<ccc_arcmt_check>;
123def ccc_arrmt_modify : Flag<"-ccc-arrmt-modify">, Alias<ccc_arcmt_modify>;
124def ccc_arcmt_migrate : Separate<"-ccc-arcmt-migrate">, CCCDriverOpt,
125  HelpText<"Apply modifications and produces temporary files that conform to ARC">;
126def arcmt_migrate_report_output : Separate<"-arcmt-migrate-report-output">,
127  HelpText<"Output path for the plist report">,  Flags<[CC1Option]>;
128def arcmt_migrate_emit_arc_errors : Flag<"-arcmt-migrate-emit-errors">,
129  HelpText<"Emit ARC errors even if the migrator can fix them">,
130  Flags<[CC1Option]>;
131
132def _migrate : Flag<"--migrate">, Flags<[DriverOption]>,
133  HelpText<"Run the migrator">;
134def ccc_objcmt_migrate : Separate<"-ccc-objcmt-migrate">, CCCDriverOpt,
135  HelpText<"Apply modifications and produces temporary files to migrate to "
136   "modern ObjC syntax">;
137def objcmt_migrate_literals : Flag<"-objcmt-migrate-literals">, Flags<[CC1Option]>,
138  HelpText<"Enable migration to modern ObjC literals">;
139def objcmt_migrate_subscripting : Flag<"-objcmt-migrate-subscripting">, Flags<[CC1Option]>,
140  HelpText<"Enable migration to modern ObjC subscripting">;
141
142// Make sure all other -ccc- options are rejected.
143def ccc_ : Joined<"-ccc-">, Group<ccc_Group>, Flags<[Unsupported]>;
144
145// Standard Options
146
147def _HASH_HASH_HASH : Flag<"-###">, Flags<[DriverOption]>,
148    HelpText<"Print the commands to run for this compilation">;
149// The '--' option is here for the sake of compatibility with gcc, but is 
150// being ignored by the driver.
151def _DASH_DASH : Flag<"--">, Flags<[DriverOption]>;
152def A : JoinedOrSeparate<"-A">;
153def B : JoinedOrSeparate<"-B">;
154def CC : Flag<"-CC">, Flags<[CC1Option]>;
155def C : Flag<"-C">, Flags<[CC1Option]>;
156def D : JoinedOrSeparate<"-D">, Group<CompileOnly_Group>, Flags<[CC1Option]>;
157def E : Flag<"-E">, Flags<[DriverOption,CC1Option]>, Group<Action_Group>,
158  HelpText<"Only run the preprocessor">;
159def F : JoinedOrSeparate<"-F">, Flags<[RenderJoined,CC1Option]>,
160    HelpText<"Add directory to framework include search path">;
161def G : Separate<"-G">, Flags<[DriverOption]>;
162def H : Flag<"-H">, Flags<[CC1Option]>,
163    HelpText<"Show header includes and nesting depth">;
164def I_ : Flag<"-I-">, Group<I_Group>;
165def I : JoinedOrSeparate<"-I">, Group<I_Group>, Flags<[CC1Option]>,
166    HelpText<"Add directory to include search path">;
167def L : JoinedOrSeparate<"-L">, Flags<[RenderJoined]>;
168def MD : Flag<"-MD">, Group<M_Group>;
169def MF : JoinedOrSeparate<"-MF">, Group<M_Group>;
170def MG : Flag<"-MG">, Group<M_Group>, Flags<[CC1Option]>,
171    HelpText<"Add missing headers to dependency list">;
172def MMD : Flag<"-MMD">, Group<M_Group>;
173def MM : Flag<"-MM">, Group<M_Group>;
174def MP : Flag<"-MP">, Group<M_Group>, Flags<[CC1Option]>,
175    HelpText<"Create phony target for each dependency (other than main file)">;
176def MQ : JoinedOrSeparate<"-MQ">, Group<M_Group>, Flags<[CC1Option]>,
177    HelpText<"Specify target to quote for dependency">;
178def MT : JoinedOrSeparate<"-MT">, Group<M_Group>, Flags<[CC1Option]>,
179    HelpText<"Specify target for dependency">;
180def Mach : Flag<"-Mach">;
181def M : Flag<"-M">, Group<M_Group>;
182def O0 : Joined<"-O0">, Group<O_Group>, Flags<[CC1Option]>;
183def O4 : Joined<"-O4">, Group<O_Group>, Flags<[CC1Option]>;
184def ObjCXX : Flag<"-ObjC++">, Flags<[DriverOption]>,
185  HelpText<"Treat source input files as Objective-C++ inputs">;
186def ObjC : Flag<"-ObjC">, Flags<[DriverOption]>,
187  HelpText<"Treat source input files as Objective-C inputs">;
188def O : Joined<"-O">, Group<O_Group>, Flags<[CC1Option]>;
189def P : Flag<"-P">, Flags<[CC1Option]>,
190  HelpText<"Disable linemarker output in -E mode">;
191def Qn : Flag<"-Qn">;
192def Qunused_arguments : Flag<"-Qunused-arguments">, Flags<[DriverOption]>,
193  HelpText<"Don't emit warning for unused driver arguments">;
194def Q : Flag<"-Q">;
195def R : Flag<"-R">;
196def S : Flag<"-S">, Flags<[DriverOption,CC1Option]>, Group<Action_Group>,
197  HelpText<"Only run preprocess and compilation steps">;
198def Tbss : JoinedOrSeparate<"-Tbss">, Group<T_Group>;
199def Tdata : JoinedOrSeparate<"-Tdata">, Group<T_Group>;
200def Ttext : JoinedOrSeparate<"-Ttext">, Group<T_Group>;
201def T : JoinedOrSeparate<"-T">, Group<T_Group>;
202def U : JoinedOrSeparate<"-U">, Group<CompileOnly_Group>, Flags<[CC1Option]>;
203def V : JoinedOrSeparate<"-V">, Flags<[DriverOption, Unsupported]>;
204def Wa_COMMA : CommaJoined<"-Wa,">,
205  HelpText<"Pass the comma separated arguments in <arg> to the assembler">,
206  MetaVarName<"<arg>">;
207def Wall : Flag<"-Wall">, Group<W_Group>, Flags<[CC1Option]>;
208def Wdeprecated : Flag<"-Wdeprecated">, Group<W_Group>, Flags<[CC1Option]>;
209def Wno_deprecated : Flag<"-Wno-deprecated">, Group<W_Group>, Flags<[CC1Option]>;
210def Wextra : Flag<"-Wextra">, Group<W_Group>, Flags<[CC1Option]>;
211def Wl_COMMA : CommaJoined<"-Wl,">, Flags<[LinkerInput, RenderAsInput]>,
212  HelpText<"Pass the comma separated arguments in <arg> to the linker">,
213  MetaVarName<"<arg>">;
214def Wno_nonportable_cfstrings : Joined<"-Wno-nonportable-cfstrings">, Group<W_Group>,
215  Flags<[CC1Option]>;
216def Wnonportable_cfstrings : Joined<"-Wnonportable-cfstrings">, Group<W_Group>,
217  Flags<[CC1Option]>;
218def Wp_COMMA : CommaJoined<"-Wp,">,
219  HelpText<"Pass the comma separated arguments in <arg> to the preprocessor">,
220  MetaVarName<"<arg>">;
221def Wwrite_strings : Flag<"-Wwrite-strings">, Group<W_Group>, Flags<[CC1Option]>;
222def Wno_write_strings : Flag<"-Wno-write-strings">, Group<W_Group>, Flags<[CC1Option]>;
223def W_Joined : Joined<"-W">, Group<W_Group>, Flags<[CC1Option]>;
224def Xanalyzer : Separate<"-Xanalyzer">,
225  HelpText<"Pass <arg> to the static analyzer">, MetaVarName<"<arg>">;
226def Xarch__ : JoinedAndSeparate<"-Xarch_">, Flags<[DriverOption]>;
227def Xassembler : Separate<"-Xassembler">,
228  HelpText<"Pass <arg> to the assembler">, MetaVarName<"<arg>">;
229def Xclang : Separate<"-Xclang">,
230  HelpText<"Pass <arg> to the clang compiler">, MetaVarName<"<arg>">,
231  Flags<[NoForward]>;
232def Xlinker : Separate<"-Xlinker">, Flags<[LinkerInput, RenderAsInput]>,
233  HelpText<"Pass <arg> to the linker">, MetaVarName<"<arg>">;
234def Xpreprocessor : Separate<"-Xpreprocessor">,
235  HelpText<"Pass <arg> to the preprocessor">, MetaVarName<"<arg>">;
236def X_Flag : Flag<"-X">;
237def X_Joined : Joined<"-X">;
238def Z_Flag : Flag<"-Z">;
239def Z_Joined : Joined<"-Z">;
240def all__load : Flag<"-all_load">;
241def allowable__client : Separate<"-allowable_client">;
242def ansi : Flag<"-ansi">, Group<a_Group>;
243def arch__errors__fatal : Flag<"-arch_errors_fatal">;
244def arch : Separate<"-arch">, Flags<[DriverOption]>;
245def arch__only : Separate<"-arch_only">;
246def a : Joined<"-a">, Group<a_Group>;
247def bind__at__load : Flag<"-bind_at_load">;
248def bundle__loader : Separate<"-bundle_loader">;
249def bundle : Flag<"-bundle">;
250def b : JoinedOrSeparate<"-b">, Flags<[Unsupported]>;
251def cl_kernel_arg_info : Flag<"-cl-kernel-arg-info">, Flags<[CC1Option]>, Group<opencl_Group>,
252HelpText<"OpenCL only. This option allows the compiler to store information about the arguments of a kernel(s)"> ;
253def client__name : JoinedOrSeparate<"-client_name">;
254def combine : Flag<"-combine">, Flags<[DriverOption, Unsupported]>;
255def compatibility__version : JoinedOrSeparate<"-compatibility_version">;
256def coverage : Flag<"-coverage">;
257def cpp_precomp : Flag<"-cpp-precomp">, Group<clang_ignored_f_Group>;
258def current__version : JoinedOrSeparate<"-current_version">;
259def cxx_isystem : JoinedOrSeparate<"-cxx-isystem">, Group<clang_i_Group>,
260  HelpText<"Add directory to the C++ SYSTEM include search path">, Flags<[CC1Option]>,
261  MetaVarName<"<directory>">;
262def c : Flag<"-c">, Flags<[DriverOption]>,
263  HelpText<"Only run preprocess, compile, and assemble steps">;
264def dA : Flag<"-dA">, Group<d_Group>;
265def dD : Flag<"-dD">, Group<d_Group>, Flags<[CC1Option]>,
266  HelpText<"Print macro definitions in -E mode in addition to normal output">;
267def dM : Flag<"-dM">, Group<d_Group>, Flags<[CC1Option]>,
268  HelpText<"Print macro definitions in -E mode instead of normal output">;
269def dead__strip : Flag<"-dead_strip">;
270def dependency_file : Separate<"-dependency-file">, Flags<[CC1Option]>,
271  HelpText<"Filename (or -) to write dependency output to">;
272def dependency_dot : Separate<"-dependency-dot">, Flags<[CC1Option]>,
273  HelpText<"Filename to write DOT-formatted header dependencies to">;
274def dumpmachine : Flag<"-dumpmachine">;
275def dumpspecs : Flag<"-dumpspecs">, Flags<[Unsupported]>;
276def dumpversion : Flag<"-dumpversion">;
277def dylib__file : Separate<"-dylib_file">;
278def dylinker__install__name : JoinedOrSeparate<"-dylinker_install_name">;
279def dylinker : Flag<"-dylinker">;
280def dynamiclib : Flag<"-dynamiclib">;
281def dynamic : Flag<"-dynamic">, Flags<[NoArgumentUnused]>;
282def d_Flag : Flag<"-d">, Group<d_Group>;
283def d_Joined : Joined<"-d">, Group<d_Group>;
284def emit_ast : Flag<"-emit-ast">,
285  HelpText<"Emit Clang AST files for source inputs">;
286def emit_llvm : Flag<"-emit-llvm">, Flags<[CC1Option]>, Group<Action_Group>,
287  HelpText<"Use the LLVM representation for assembler and object files">;
288def exported__symbols__list : Separate<"-exported_symbols_list">;
289def e : JoinedOrSeparate<"-e">;
290def fPIC : Flag<"-fPIC">, Group<f_Group>;
291def fno_PIC : Flag<"-fno-PIC">, Group<f_Group>;
292def fPIE : Flag<"-fPIE">, Group<f_Group>;
293def fno_PIE : Flag<"-fno-PIE">, Group<f_Group>;
294def faccess_control : Flag<"-faccess-control">, Group<f_Group>;
295def fallow_unsupported : Flag<"-fallow-unsupported">, Group<f_Group>;
296def faltivec : Flag<"-faltivec">, Group<f_Group>, Flags<[CC1Option]>,
297  HelpText<"Enable AltiVec vector initializer syntax">;
298def fapple_kext : Flag<"-fapple-kext">, Group<f_Group>, Flags<[CC1Option]>,
299  HelpText<"Use Apple's kernel extensions ABI">;
300def fapple_pragma_pack : Flag<"-fapple-pragma-pack">, Group<f_Group>, Flags<[CC1Option]>,
301  HelpText<"Enable Apple gcc-compatible #pragma pack handling">;
302def faddress_sanitizer : Flag<"-faddress-sanitizer">, Group<f_Group>, Flags<[CC1Option]>,
303  HelpText<"Enable AddressSanitizer instrumentation (memory error detection)">;
304def fno_address_sanitizer : Flag<"-fno-address-sanitizer">, Group<f_Group>, Flags<[CC1Option]>;
305def fthread_sanitizer : Flag<"-fthread-sanitizer">, Group<f_Group>, Flags<[CC1Option]>,
306  HelpText<"Enable ThreadSanitizer instrumentation (race detection)">;
307def fno_thread_sanitizer : Flag<"-fno-thread-sanitizer">, Group<f_Group>, Flags<[CC1Option]>;
308def fasm : Flag<"-fasm">, Group<f_Group>;
309
310def fasm_blocks : Flag<"-fasm-blocks">, Group<f_Group>;
311def fno_asm_blocks : Flag<"-fno-asm-blocks">, Group<f_Group>;
312
313def fassume_sane_operator_new : Flag<"-fassume-sane-operator-new">, Group<f_Group>;
314def fastcp : Flag<"-fastcp">, Group<f_Group>;
315def fastf : Flag<"-fastf">, Group<f_Group>;
316def fast : Flag<"-fast">, Group<f_Group>;
317def fasynchronous_unwind_tables : Flag<"-fasynchronous-unwind-tables">, Group<f_Group>;
318def fblocks : Flag<"-fblocks">, Group<f_Group>, Flags<[CC1Option]>,
319  HelpText<"Enable the 'blocks' language feature">;
320def fbootclasspath_EQ : Joined<"-fbootclasspath=">, Group<f_Group>;
321def fborland_extensions : Flag<"-fborland-extensions">, Group<f_Group>, Flags<[CC1Option]>,
322  HelpText<"Accept non-standard constructs supported by the Borland compiler">;
323def fbounds_checking : Flag<"-fbounds-checking">, Group<f_Group>,
324  HelpText<"Enable run-time bounds checks.">;
325def fbounds_checking_EQ : Joined<"-fbounds-checking=">, Flags<[CC1Option]>,
326  Group<f_Group>;
327def fbuiltin_strcat : Flag<"-fbuiltin-strcat">, Group<f_Group>;
328def fbuiltin_strcpy : Flag<"-fbuiltin-strcpy">, Group<f_Group>;
329def fbuiltin : Flag<"-fbuiltin">, Group<f_Group>;
330def fcaret_diagnostics : Flag<"-fcaret-diagnostics">, Group<f_Group>;
331def fcatch_undefined_behavior : Flag<"-fcatch-undefined-behavior">, Flags<[CC1Option]>,
332  Group<f_Group>, HelpText<"Generate runtime checks for undefined behavior.">;
333def fclasspath_EQ : Joined<"-fclasspath=">, Group<f_Group>;
334def fcolor_diagnostics : Flag<"-fcolor-diagnostics">, Group<f_Group>, Flags<[CC1Option]>,
335  HelpText<"Use colors in diagnostics">;
336def fcommon : Flag<"-fcommon">, Group<f_Group>;
337def fcompile_resource_EQ : Joined<"-fcompile-resource=">, Group<f_Group>;
338def fconstant_cfstrings : Flag<"-fconstant-cfstrings">, Group<f_Group>;
339def fconstant_string_class_EQ : Joined<"-fconstant-string-class=">, Group<f_Group>;
340def fconstexpr_depth_EQ : Joined<"-fconstexpr-depth=">, Group<f_Group>;
341def fconstexpr_backtrace_limit_EQ : Joined<"-fconstexpr-backtrace-limit=">,
342                                    Group<f_Group>;
343def fno_crash_diagnostics : Flag<"-fno-crash-diagnostics">, Group<f_clang_Group>, Flags<[NoArgumentUnused]>;
344def fcreate_profile : Flag<"-fcreate-profile">, Group<f_Group>;
345def fcxx_exceptions: Flag<"-fcxx-exceptions">, Group<f_Group>,
346  HelpText<"Enable C++ exceptions">, Flags<[CC1Option]>;
347def fcxx_modules : Flag <"-fcxx-modules">, Group<f_Group>, Flags<[NoForward]>;
348def fdebug_pass_arguments : Flag<"-fdebug-pass-arguments">, Group<f_Group>;
349def fdebug_pass_structure : Flag<"-fdebug-pass-structure">, Group<f_Group>;
350def fdiagnostics_fixit_info : Flag<"-fdiagnostics-fixit-info">, Group<f_clang_Group>;
351def fdiagnostics_parseable_fixits : Flag<"-fdiagnostics-parseable-fixits">, Group<f_clang_Group>,
352    Flags<[CC1Option]>, HelpText<"Print fix-its in machine parseable form">;
353def fdiagnostics_print_source_range_info : Flag<"-fdiagnostics-print-source-range-info">,
354    Group<f_clang_Group>,  Flags<[CC1Option]>,
355    HelpText<"Print source range spans in numeric form">;
356def fdiagnostics_show_option : Flag<"-fdiagnostics-show-option">, Group<f_Group>,
357    Flags<[CC1Option]>, HelpText<"Print option name with mappable diagnostics">;
358def fdiagnostics_show_name : Flag<"-fdiagnostics-show-name">, Group<f_Group>,
359    Flags<[CC1Option]>, HelpText<"Print diagnostic name">;
360def fdiagnostics_show_note_include_stack : Flag<"-fdiagnostics-show-note-include-stack">,
361    Group<f_Group>,  Flags<[CC1Option]>, HelpText<"Display include stacks for diagnostic notes">;
362def fdiagnostics_format_EQ : Joined<"-fdiagnostics-format=">, Group<f_clang_Group>;
363def fdiagnostics_show_category_EQ : Joined<"-fdiagnostics-show-category=">, Group<f_clang_Group>;
364def fdiagnostics_show_template_tree : Flag<"-fdiagnostics-show-template-tree">,
365    Group<f_Group>, Flags<[CC1Option]>,
366    HelpText<"Print a template comparison tree for differing templates">;
367def fdollars_in_identifiers : Flag<"-fdollars-in-identifiers">, Group<f_Group>,
368  HelpText<"Allow '$' in identifiers">, Flags<[CC1Option]>;
369def fdwarf2_cfi_asm : Flag<"-fdwarf2-cfi-asm">, Group<f_Group>;
370def fno_dwarf2_cfi_asm : Flag<"-fno-dwarf2-cfi-asm">, Group<f_Group>,  Flags<[CC1Option]>;
371def fdwarf_directory_asm : Flag<"-fdwarf-directory-asm">, Group<f_Group>;
372def fno_dwarf_directory_asm : Flag<"-fno-dwarf-directory-asm">, Group<f_Group>, Flags<[CC1Option]>;
373def felide_constructors : Flag<"-felide-constructors">, Group<f_Group>;
374def fno_elide_type : Flag<"-fno-elide-type">, Group<f_Group>,
375    Flags<[CC1Option]>,
376    HelpText<"Do not elide types when printing diagnostics">;
377def feliminate_unused_debug_symbols : Flag<"-feliminate-unused-debug-symbols">, Group<f_Group>;
378def femit_all_decls : Flag<"-femit-all-decls">, Group<f_Group>, Flags<[CC1Option]>,
379  HelpText<"Emit all declarations, even if unused">;
380def fencoding_EQ : Joined<"-fencoding=">, Group<f_Group>;
381def ferror_limit_EQ : Joined<"-ferror-limit=">, Group<f_Group>;
382def fexceptions : Flag<"-fexceptions">, Group<f_Group>, Flags<[CC1Option]>,
383  HelpText<"Enable support for exception handling">;
384def fextdirs_EQ : Joined<"-fextdirs=">, Group<f_Group>;
385def fhosted : Flag<"-fhosted">, Group<f_Group>;
386def ffast_math : Flag<"-ffast-math">, Group<f_Group>, Flags<[CC1Option]>,
387  HelpText<"Enable the *frontend*'s 'fast-math' mode. This has no effect on "
388           "optimizations, but provides a preprocessor macro __FAST_MATH__ the "
389           "same as GCC's -ffast-math flag.">;
390def fmath_errno : Flag<"-fmath-errno">, Group<f_Group>, Flags<[CC1Option]>,
391  HelpText<"Require math functions to indicate errors by setting errno">;
392def fno_math_errno : Flag<"-fno-math-errno">, Group<f_Group>;
393def fsignaling_math : Flag<"-fsignaling-math">, Group<f_Group>;
394def fno_signaling_math : Flag<"-fno-signaling-math">, Group<f_Group>;
395def funsafe_math_optimizations : Flag<"-funsafe-math-optimizations">,
396  Group<f_Group>;
397def fno_unsafe_math_optimizations : Flag<"-fno-unsafe-math-optimizations">,
398  Group<f_Group>;
399def fassociative_math : Flag<"-fassociative-math">, Group<f_Group>;
400def fno_associative_math : Flag<"-fno-associative-math">, Group<f_Group>;
401def freciprocal_math : Flag<"-freciprocal-math">, Group<f_Group>;
402def fno_reciprocal_math : Flag<"-fno-reciprocal-math">, Group<f_Group>;
403def ffinite_math_only : Flag<"-ffinite-math-only">, Group<f_Group>, Flags<[CC1Option]>;
404def fno_finite_math_only : Flag<"-fno-finite-math-only">, Group<f_Group>;
405def fsigned_zeros : Flag<"-fsigned-zeros">, Group<f_Group>;
406def fno_signed_zeros : Flag<"-fno-signed-zeros">, Group<f_Group>;
407def fhonor_nans : Flag<"-fhonor-nans">, Group<f_Group>;
408def fno_honor_nans : Flag<"-fno-honor-nans">, Group<f_Group>;
409def fhonor_infinities : Flag<"-fhonor-infinities">, Group<f_Group>;
410def fno_honor_infinities : Flag<"-fno-honor-infinities">, Group<f_Group>;
411// Sic. This option was misspelled originally.
412def fhonor_infinites : Flag<"-fhonor-infinites">, Alias<fhonor_infinities>;
413def fno_honor_infinites : Flag<"-fno-honor-infinites">, Alias<fno_honor_infinities>;
414def ftrapping_math : Flag<"-ftrapping-math">, Group<f_Group>;
415def fno_trapping_math : Flag<"-fno-trapping-math">, Group<f_Group>;
416def ffp_contract : Joined<"-ffp-contract=">, Group<f_Group>,
417  Flags<[CC1Option]>, HelpText<"Form fused FP ops (e.g. FMAs): fast (everywhere)"
418  " | on (according to FP_CONTRACT pragma, default) | off (never fuse)">;
419
420def ffor_scope : Flag<"-ffor-scope">, Group<f_Group>;
421def fno_for_scope : Flag<"-fno-for-scope">, Group<f_Group>;
422
423def frewrite_includes : Flag<"-frewrite-includes">, Group<f_Group>,
424  Flags<[CC1Option]>;
425def fno_rewrite_includes : Flag<"-fno-rewrite-includes">, Group<f_Group>;
426
427def ffreestanding : Flag<"-ffreestanding">, Group<f_Group>, Flags<[CC1Option]>,
428  HelpText<"Assert that the compilation takes place in a freestanding environment">;
429def fgnu_keywords : Flag<"-fgnu-keywords">, Group<f_Group>, Flags<[CC1Option]>,
430  HelpText<"Allow GNU-extension keywords regardless of language standard">;
431def fgnu89_inline : Flag<"-fgnu89-inline">, Group<f_Group>, Flags<[CC1Option]>,
432  HelpText<"Use the gnu89 inline semantics">;
433def fno_gnu89_inline : Flag<"-fno-gnu89-inline">, Group<f_Group>;
434def fgnu_runtime : Flag<"-fgnu-runtime">, Group<f_Group>,
435  HelpText<"Generate output compatible with the standard GNU Objective-C runtime">;
436def fheinous_gnu_extensions : Flag<"-fheinous-gnu-extensions">, Flags<[CC1Option]>;
437def filelist : Separate<"-filelist">, Flags<[LinkerInput]>;
438def findirect_virtual_calls : Flag<"-findirect-virtual-calls">, Alias<fapple_kext>;
439def finline_functions : Flag<"-finline-functions">, Group<clang_ignored_f_Group>;
440def finline : Flag<"-finline">, Group<clang_ignored_f_Group>;
441def finstrument_functions : Flag<"-finstrument-functions">, Group<f_Group>, Flags<[CC1Option]>,
442  HelpText<"Generate calls to instrument function entry and exit">;
443def fkeep_inline_functions : Flag<"-fkeep-inline-functions">, Group<clang_ignored_f_Group>;
444def flat__namespace : Flag<"-flat_namespace">;
445def flax_vector_conversions : Flag<"-flax-vector-conversions">, Group<f_Group>;
446def flimit_debug_info : Flag<"-flimit-debug-info">, Group<f_Group>, Flags<[CC1Option]>,
447  HelpText<"Limit debug information produced to reduce size of debug binary">;
448def flimited_precision_EQ : Joined<"-flimited-precision=">, Group<f_Group>;
449def flto : Flag<"-flto">, Group<f_Group>;
450def fno_lto : Flag<"-fno-lto">, Group<f_Group>;
451def fmacro_backtrace_limit_EQ : Joined<"-fmacro-backtrace-limit=">,
452                                Group<f_Group>;
453def fmerge_all_constants : Flag<"-fmerge-all-constants">, Group<f_Group>;
454def fmessage_length_EQ : Joined<"-fmessage-length=">, Group<f_Group>;
455def fms_extensions : Flag<"-fms-extensions">, Group<f_Group>, Flags<[CC1Option]>,
456  HelpText<"Accept some non-standard constructs supported by the Microsoft compiler">;
457def fms_inline_asm : Flag<"-fms-inline-asm">, Group<f_Group>, Flags<[CC1Option]>,
458  HelpText<"Enable support for Microsoft style inine assembly">;
459def fms_compatibility : Flag<"-fms-compatibility">, Group<f_Group>, Flags<[CC1Option]>,
460  HelpText<"Enable Microsoft compatibility mode">;
461def fmsc_version : Joined<"-fmsc-version=">, Group<f_Group>, Flags<[CC1Option]>,
462  HelpText<"Version of the Microsoft C/C++ compiler to report in _MSC_VER (0 = don't define it (default))">;
463def fdelayed_template_parsing : Flag<"-fdelayed-template-parsing">, Group<f_Group>,
464  HelpText<"Parse templated function definitions at the end of the "
465           "translation unit ">,  Flags<[CC1Option]>;
466def fmodule_cache_path : Separate<"-fmodule-cache-path">, Group<i_Group>, 
467  Flags<[NoForward,CC1Option]>, MetaVarName<"<directory>">,
468  HelpText<"Specify the module cache path">;
469def fmodules : Flag <"-fmodules">, Group<f_Group>, Flags<[NoForward,CC1Option]>,
470  HelpText<"Enable the 'modules' language feature">;
471  
472def fmudflapth : Flag<"-fmudflapth">, Group<f_Group>;
473def fmudflap : Flag<"-fmudflap">, Group<f_Group>;
474def fnested_functions : Flag<"-fnested-functions">, Group<f_Group>;
475def fnext_runtime : Flag<"-fnext-runtime">, Group<f_Group>;
476def fno_access_control : Flag<"-fno-access-control">, Group<f_Group>, Flags<[CC1Option]>,
477  HelpText<"Disable C++ access control">;
478def fno_apple_pragma_pack : Flag<"-fno-apple-pragma-pack">, Group<f_Group>;
479def fno_asm : Flag<"-fno-asm">, Group<f_Group>;
480def fno_asynchronous_unwind_tables : Flag<"-fno-asynchronous-unwind-tables">, Group<f_Group>;
481def fno_assume_sane_operator_new : Flag<"-fno-assume-sane-operator-new">, Group<f_Group>,
482  HelpText<"Don't assume that C++'s global operator new can't alias any pointer">,
483  Flags<[CC1Option]>;
484def fno_blocks : Flag<"-fno-blocks">, Group<f_Group>;
485def fno_borland_extensions : Flag<"-fno-borland-extensions">, Group<f_Group>;
486def fno_builtin_strcat : Flag<"-fno-builtin-strcat">, Group<f_Group>;
487def fno_builtin_strcpy : Flag<"-fno-builtin-strcpy">, Group<f_Group>;
488def fno_builtin : Flag<"-fno-builtin">, Group<f_Group>, Flags<[CC1Option]>,
489  HelpText<"Disable implicit builtin knowledge of functions">;
490def fno_caret_diagnostics : Flag<"-fno-caret-diagnostics">, Group<f_Group>,
491 Flags<[CC1Option]>;
492def fno_color_diagnostics : Flag<"-fno-color-diagnostics">, Group<f_Group>;
493def fno_common : Flag<"-fno-common">, Group<f_Group>, Flags<[CC1Option]>,
494    HelpText<"Compile common globals like normal definitions">;
495def fno_constant_cfstrings : Flag<"-fno-constant-cfstrings">, Group<f_Group>,
496  Flags<[CC1Option]>,
497  HelpText<"Disable creation of CodeFoundation-type constant strings">;
498def fno_cxx_exceptions: Flag<"-fno-cxx-exceptions">, Group<f_Group>;
499def fno_cxx_modules : Flag <"-fno-cxx-modules">, Group<f_Group>, Flags<[NoForward]>;
500def fno_diagnostics_fixit_info : Flag<"-fno-diagnostics-fixit-info">, Group<f_Group>,
501  Flags<[CC1Option]>, HelpText<"Do not include fixit information in diagnostics">;
502def fno_diagnostics_show_name : Flag<"-fno-diagnostics-show-name">, Group<f_Group>;
503def fno_diagnostics_show_option : Flag<"-fno-diagnostics-show-option">, Group<f_Group>;
504def fno_diagnostics_show_note_include_stack : Flag<"-fno-diagnostics-show-note-include-stack">,
505    Flags<[CC1Option]>, Group<f_Group>, HelpText<"Display include stacks for diagnostic notes">;
506def fno_dollars_in_identifiers : Flag<"-fno-dollars-in-identifiers">, Group<f_Group>,
507  HelpText<"Disallow '$' in identifiers">, Flags<[CC1Option]>;
508def fno_elide_constructors : Flag<"-fno-elide-constructors">, Group<f_Group>,
509  HelpText<"Disable C++ copy constructor elision">, Flags<[CC1Option]>;
510def fno_eliminate_unused_debug_symbols : Flag<"-fno-eliminate-unused-debug-symbols">, Group<f_Group>;
511def fno_exceptions : Flag<"-fno-exceptions">, Group<f_Group>;
512def fno_gnu_keywords : Flag<"-fno-gnu-keywords">, Group<f_Group>, Flags<[CC1Option]>;
513def fno_inline_functions : Flag<"-fno-inline-functions">, Group<f_clang_Group>, Flags<[CC1Option]>;
514def fno_inline : Flag<"-fno-inline">, Group<f_clang_Group>, Flags<[CC1Option]>;
515def fno_keep_inline_functions : Flag<"-fno-keep-inline-functions">, Group<clang_ignored_f_Group>;
516def fno_lax_vector_conversions : Flag<"-fno-lax-vector-conversions">, Group<f_Group>,
517  HelpText<"Disallow implicit conversions between vectors with a different number of elements or different element types">, Flags<[CC1Option]>;
518def fno_limit_debug_info : Flag<"-fno-limit-debug-info">, Group<f_Group>, Flags<[CC1Option]>,
519  HelpText<"Do not limit debug information produced to reduce size of debug binary">;
520def fno_merge_all_constants : Flag<"-fno-merge-all-constants">, Group<f_Group>,
521    Flags<[CC1Option]>, HelpText<"Disallow merging of constants.">;
522def fno_modules : Flag <"-fno-modules">, Group<f_Group>, Flags<[NoForward]>;
523def fno_ms_extensions : Flag<"-fno-ms-extensions">, Group<f_Group>;
524def fno_ms_compatibility : Flag<"-fno-ms-compatibility">, Group<f_Group>;
525def fno_delayed_template_parsing : Flag<"-fno-delayed-template-parsing">, Group<f_Group>;
526def fno_objc_exceptions: Flag<"-fno-objc-exceptions">, Group<f_Group>;
527def fno_objc_legacy_dispatch : Flag<"-fno-objc-legacy-dispatch">, Group<f_Group>;
528def fno_omit_frame_pointer : Flag<"-fno-omit-frame-pointer">, Group<f_Group>;
529def fno_operator_names : Flag<"-fno-operator-names">, Group<f_Group>,
530  HelpText<"Do not treat C++ operator name keywords as synonyms for operators">,
531  Flags<[CC1Option]>;
532def fno_pascal_strings : Flag<"-fno-pascal-strings">, Group<f_Group>;
533def fno_rtti : Flag<"-fno-rtti">, Group<f_Group>, Flags<[CC1Option]>,
534  HelpText<"Disable generation of rtti information">;
535def fno_short_enums : Flag<"-fno-short-enums">, Group<f_Group>;
536def fno_show_column : Flag<"-fno-show-column">, Group<f_Group>, Flags<[CC1Option]>,
537  HelpText<"Do not include column number on diagnostics">;
538def fno_show_source_location : Flag<"-fno-show-source-location">, Group<f_Group>,
539  Flags<[CC1Option]>, HelpText<"Do not include source location information with diagnostics">;
540def fno_spell_checking : Flag<"-fno-spell-checking">, Group<f_Group>,
541  Flags<[CC1Option]>, HelpText<"Disable spell-checking">;
542def fno_stack_protector : Flag<"-fno-stack-protector">, Group<f_Group>;
543def fno_strict_aliasing : Flag<"-fno-strict-aliasing">, Group<f_Group>;
544def fno_strict_enums : Flag<"-fno-strict-enums">, Group<f_Group>;
545def fno_strict_overflow : Flag<"-fno-strict-overflow">, Group<f_Group>;
546def fno_threadsafe_statics : Flag<"-fno-threadsafe-statics">, Group<f_Group>,
547  Flags<[CC1Option]>, HelpText<"Do not emit code to make initialization of local statics thread safe">;
548def fno_use_cxa_atexit : Flag<"-fno-use-cxa-atexit">, Group<f_Group>, Flags<[CC1Option]>,
549  HelpText<"Don't use __cxa_atexit for calling destructors">;
550def fno_unit_at_a_time : Flag<"-fno-unit-at-a-time">, Group<f_Group>;
551def fno_unwind_tables : Flag<"-fno-unwind-tables">, Group<f_Group>;
552def fno_verbose_asm : Flag<"-fno-verbose-asm">, Group<f_Group>;
553def fno_working_directory : Flag<"-fno-working-directory">, Group<f_Group>;
554def fno_wrapv : Flag<"-fno-wrapv">, Group<f_Group>;
555def fno_zero_initialized_in_bss : Flag<"-fno-zero-initialized-in-bss">, Group<f_Group>;
556def fobjc_arc : Flag<"-fobjc-arc">, Group<f_Group>, Flags<[CC1Option]>,
557  HelpText<"Synthesize retain and release calls for Objective-C pointers">;
558def fno_objc_arc : Flag<"-fno-objc-arc">, Group<f_Group>;
559def fobjc_arc_exceptions : Flag<"-fobjc-arc-exceptions">, Group<f_Group>, Flags<[CC1Option]>,
560  HelpText<"Use EH-safe code when synthesizing retains and releases in -fobjc-arc">;
561def fno_objc_arc_exceptions : Flag<"-fno-objc-arc-exceptions">, Group<f_Group>;
562def fobjc_atdefs : Flag<"-fobjc-atdefs">, Group<clang_ignored_f_Group>;
563def fobjc_call_cxx_cdtors : Flag<"-fobjc-call-cxx-cdtors">, Group<clang_ignored_f_Group>;
564def fobjc_exceptions: Flag<"-fobjc-exceptions">, Group<f_Group>,
565  HelpText<"Enable Objective-C exceptions">, Flags<[CC1Option]>;
566
567def fobjc_gc_only : Flag<"-fobjc-gc-only">, Group<f_Group>, Flags<[CC1Option]>,
568  HelpText<"Use GC exclusively for Objective-C related memory management">;
569def fobjc_gc : Flag<"-fobjc-gc">, Group<f_Group>, Flags<[CC1Option]>,
570  HelpText<"Enable Objective-C garbage collection">;
571def fobjc_legacy_dispatch : Flag<"-fobjc-legacy-dispatch">, Group<f_Group>;
572def fobjc_new_property : Flag<"-fobjc-new-property">, Group<clang_ignored_f_Group>;
573def fobjc_infer_related_result_type : Flag<"-fobjc-infer-related-result-type">, 
574                                      Group<f_Group>;
575def fno_objc_infer_related_result_type : Flag<
576  "-fno-objc-infer-related-result-type">, Group<f_Group>,
577  HelpText<
578    "do not infer Objective-C related result type based on method family">,
579  Flags<[CC1Option]>;
580def fobjc_link_runtime: Flag<"-fobjc-link-runtime">, Group<f_Group>;
581
582// Objective-C ABI options.
583def fobjc_runtime_EQ : Joined<"-fobjc-runtime=">, Group<f_Group>, Flags<[CC1Option]>,
584  HelpText<"Specify the target Objective-C runtime kind and version">;
585def fobjc_abi_version_EQ : Joined<"-fobjc-abi-version=">, Group<f_Group>;
586def fobjc_nonfragile_abi_version_EQ : Joined<"-fobjc-nonfragile-abi-version=">, Group<f_Group>;
587def fobjc_nonfragile_abi : Flag<"-fobjc-nonfragile-abi">, Group<f_Group>;
588def fno_objc_nonfragile_abi : Flag<"-fno-objc-nonfragile-abi">, Group<f_Group>;
589
590def fobjc_sender_dependent_dispatch : Flag<"-fobjc-sender-dependent-dispatch">, Group<f_Group>;
591def fobjc : Flag<"-fobjc">, Group<f_Group>;
592def fomit_frame_pointer : Flag<"-fomit-frame-pointer">, Group<f_Group>;
593def fopenmp : Flag<"-fopenmp">, Group<f_Group>;
594def fno_optimize_sibling_calls : Flag<"-fno-optimize-sibling-calls">, Group<f_Group>;
595def foptimize_sibling_calls : Flag<"-foptimize-sibling-calls">, Group<f_Group>;
596def force__cpusubtype__ALL : Flag<"-force_cpusubtype_ALL">;
597def force__flat__namespace : Flag<"-force_flat_namespace">;
598def force__load : Separate<"-force_load">;
599def foutput_class_dir_EQ : Joined<"-foutput-class-dir=">, Group<f_Group>;
600def fpack_struct : Flag<"-fpack-struct">, Group<f_Group>;
601def fno_pack_struct : Flag<"-fno-pack-struct">, Group<f_Group>;
602def fpack_struct_EQ : Joined<"-fpack-struct=">, Group<f_Group>, Flags<[CC1Option]>,
603  HelpText<"Specify the default maximum struct packing alignment">;
604def fpascal_strings : Flag<"-fpascal-strings">, Group<f_Group>, Flags<[CC1Option]>,
605  HelpText<"Recognize and construct Pascal-style string literals">;
606def fpch_preprocess : Flag<"-fpch-preprocess">, Group<f_Group>;
607def fpic : Flag<"-fpic">, Group<f_Group>;
608def fno_pic : Flag<"-fno-pic">, Group<f_Group>;
609def fpie : Flag<"-fpie">, Group<f_Group>;
610def fno_pie : Flag<"-fno-pie">, Group<f_Group>;
611def fprofile_arcs : Flag<"-fprofile-arcs">, Group<f_Group>;
612def fprofile_generate : Flag<"-fprofile-generate">, Group<f_Group>;
613def framework : Separate<"-framework">, Flags<[LinkerInput]>;
614def frandom_seed_EQ : Joined<"-frandom-seed=">, Group<clang_ignored_f_Group>;
615def frtti : Flag<"-frtti">, Group<f_Group>;
616def fsched_interblock : Flag<"-fsched-interblock">, Group<clang_ignored_f_Group>;
617def fshort_enums : Flag<"-fshort-enums">, Group<f_Group>, Flags<[CC1Option]>,
618  HelpText<"Allocate to an enum type only as many bytes as it needs for the declared range of possible values">;
619def freorder_blocks : Flag<"-freorder-blocks">, Group<clang_ignored_f_Group>;
620def fshort_wchar : Flag<"-fshort-wchar">, Group<f_Group>, Flags<[CC1Option]>,
621  HelpText<"Force wchar_t to be a short unsigned int">;
622def fshow_overloads_EQ : Joined<"-fshow-overloads=">, Group<f_Group>, Flags<[CC1Option]>,
623  HelpText<"Which overload candidates to show when overload resolution fails: "
624           "best|all; defaults to all">;
625def fshow_column : Flag<"-fshow-column">, Group<f_Group>, Flags<[CC1Option]>;
626def fshow_source_location : Flag<"-fshow-source-location">, Group<f_Group>;
627def fspell_checking : Flag<"-fspell-checking">, Group<f_Group>;
628def fsigned_bitfields : Flag<"-fsigned-bitfields">, Group<f_Group>;
629def fsigned_char : Flag<"-fsigned-char">, Group<f_Group>;
630def fstack_protector_all : Flag<"-fstack-protector-all">, Group<f_Group>;
631def fstack_protector : Flag<"-fstack-protector">, Group<f_Group>;
632def fstrict_aliasing : Flag<"-fstrict-aliasing">, Group<f_Group>;
633def fstrict_enums : Flag<"-fstrict-enums">, Group<f_Group>, Flags<[CC1Option]>,
634  HelpText<"Enable optimizations based on the strict definition of an enum's "
635           "value range.">;
636def fstrict_overflow : Flag<"-fstrict-overflow">, Group<f_Group>;
637def fsyntax_only : Flag<"-fsyntax-only">, Flags<[DriverOption,CC1Option]>, Group<Action_Group>;
638def ftabstop_EQ : Joined<"-ftabstop=">, Group<f_Group>;
639def ftemplate_depth_EQ : Joined<"-ftemplate-depth=">, Group<f_Group>;
640def ftemplate_depth_ : Joined<"-ftemplate-depth-">, Group<f_Group>;
641def ftemplate_backtrace_limit_EQ : Joined<"-ftemplate-backtrace-limit=">,
642                                   Group<f_Group>;
643def ftest_coverage : Flag<"-ftest-coverage">, Group<f_Group>;
644def Wlarge_by_value_copy_def : Flag<"-Wlarge-by-value-copy">,
645  HelpText<"Warn if a function definition returns or accepts an object larger "
646           "in bytes that a given value">;
647def Wlarge_by_value_copy_EQ : Joined<"-Wlarge-by-value-copy=">, Flags<[CC1Option]>;
648
649// Just silence warnings about -Wlarger-than,  -Wframe-larger-than for now.
650def Wlarger_than : Separate<"-Wlarger-than">, Group<clang_ignored_f_Group>;
651def Wlarger_than_EQ : Joined<"-Wlarger-than=">, Alias<Wlarger_than>;
652def Wlarger_than_ : Joined<"-Wlarger-than-">, Alias<Wlarger_than>;
653def Wframe_larger_than : Separate<"-Wframe-larger-than">, Group<clang_ignored_f_Group>;
654def Wframe_larger_than_EQ : Joined<"-Wframe-larger-than=">, Alias<Wframe_larger_than>;
655
656def fterminated_vtables : Flag<"-fterminated-vtables">, Alias<fapple_kext>;
657def fthreadsafe_statics : Flag<"-fthreadsafe-statics">, Group<f_Group>;
658def ftime_report : Flag<"-ftime-report">, Group<f_Group>, Flags<[CC1Option]>;
659def ftlsmodel_EQ : Joined<"-ftls-model=">, Group<f_Group>, Flags<[CC1Option]>;
660def ftrapv : Flag<"-ftrapv">, Group<f_Group>, Flags<[CC1Option]>,
661  HelpText<"Trap on integer overflow">;
662def ftrapv_handler_EQ : Joined<"-ftrapv-handler=">, Group<f_Group>,
663  MetaVarName<"<function name>">,
664  HelpText<"Specify the function to be called on overflow.">;
665def ftrapv_handler : Separate<"-ftrapv-handler">, Group<f_Group>, Flags<[CC1Option]>;
666def ftrap_function_EQ : Joined<"-ftrap-function=">, Group<f_Group>, Flags<[CC1Option]>,
667  HelpText<"Issue call to specified function rather than a trap instruction">;
668def funit_at_a_time : Flag<"-funit-at-a-time">, Group<f_Group>;
669def funroll_loops : Flag<"-funroll-loops">, Group<f_Group>,
670  HelpText<"Turn on loop unroller">, Flags<[CC1Option]>;
671def funsigned_bitfields : Flag<"-funsigned-bitfields">, Group<f_Group>;
672def funsigned_char : Flag<"-funsigned-char">, Group<f_Group>;
673def funwind_tables : Flag<"-funwind-tables">, Group<f_Group>;
674def fuse_cxa_atexit : Flag<"-fuse-cxa-atexit">, Group<f_Group>;
675def fverbose_asm : Flag<"-fverbose-asm">, Group<f_Group>;
676def fvisibility_EQ : Joined<"-fvisibility=">, Group<f_Group>;
677def fvisibility_inlines_hidden : Flag<"-fvisibility-inlines-hidden">, Group<f_Group>,
678  HelpText<"Give inline C++ member functions default visibility by default">,
679  Flags<[CC1Option]>;
680def fwrapv : Flag<"-fwrapv">, Group<f_Group>, Flags<[CC1Option]>,
681  HelpText<"Treat signed integer overflow as two's complement">;
682def fwritable_strings : Flag<"-fwritable-strings">, Group<f_Group>, Flags<[CC1Option]>,
683  HelpText<"Store string literals as writable data">;
684def fzero_initialized_in_bss : Flag<"-fzero-initialized-in-bss">, Group<f_Group>;
685def ffunction_sections: Flag <"-ffunction-sections">, Group<f_Group>,
686  Flags<[CC1Option]>, HelpText<"Place each function in its own section (ELF Only)">;
687def fdata_sections : Flag <"-fdata-sections">, Group<f_Group>, Flags<[CC1Option]>,
688  HelpText<"Place each data in its own section (ELF Only)">;
689def f : Joined<"-f">, Group<f_Group>;
690def g_Flag : Flag<"-g">, Group<g_Group>,
691  HelpText<"Generate source level debug information">, Flags<[CC1Option]>;
692def gline_tables_only : Flag<"-gline-tables-only">, Group<g_Group>,
693  HelpText<"Emit debug line number tables only">, Flags<[CC1Option]>;
694def g0 : Flag<"-g0">, Group<g_Group>;
695def g1 : Flag<"-g1">, Group<g_Group>;
696def g2 : Flag<"-g2">, Group<g_Group>;
697def g3 : Flag<"-g3">, Group<g_Group>;
698def ggdb : Flag<"-ggdb">, Group<g_Group>;
699def ggdb0 : Flag<"-ggdb0">, Group<g_Group>;
700def ggdb1 : Flag<"-ggdb1">, Group<g_Group>;
701def ggdb2 : Flag<"-ggdb2">, Group<g_Group>;
702def ggdb3 : Flag<"-ggdb3">, Group<g_Group>;
703def gdwarf_2 : Flag<"-gdwarf-2">, Group<g_Group>;
704def gdwarf_3 : Flag<"-gdwarf-3">, Group<g_Group>;
705def gdwarf_4 : Flag<"-gdwarf-4">, Group<g_Group>;
706def gfull : Flag<"-gfull">, Group<g_Group>;
707def gused : Flag<"-gused">, Group<g_Group>;
708def gstabs : Joined<"-gstabs">, Group<g_Group>, Flags<[Unsupported]>;
709def gcoff : Joined<"-gcoff">, Group<g_Group>, Flags<[Unsupported]>;
710def gxcoff : Joined<"-gxcoff">, Group<g_Group>, Flags<[Unsupported]>;
711def gvms : Joined<"-gvms">, Group<g_Group>, Flags<[Unsupported]>;
712def gtoggle : Flag<"-gtoggle">, Group<g_flags_Group>, Flags<[Unsupported]>;
713def grecord_gcc_switches : Flag<"-grecord-gcc-switches">, Group<g_flags_Group>;
714def gno_record_gcc_switches : Flag<"-gno-record-gcc-switches">,
715  Group<g_flags_Group>;
716def gstrict_dwarf : Flag<"-gstrict-dwarf">, Group<g_flags_Group>;
717def gno_strict_dwarf : Flag<"-gno-strict-dwarf">, Group<g_flags_Group>;
718def headerpad__max__install__names : Joined<"-headerpad_max_install_names">;
719def help : Flag<"-help">, Flags<[CC1Option]>,
720  HelpText<"Display available options">;
721def index_header_map : Flag<"-index-header-map">, Flags<[CC1Option]>,
722  HelpText<"Make the next included directory (-I or -F) an indexer header map">;
723def idirafter : JoinedOrSeparate<"-idirafter">, Group<clang_i_Group>, Flags<[CC1Option]>,
724  HelpText<"Add directory to AFTER include search path">;
725def iframework : Joined<"-iframework">, Group<clang_i_Group>, Flags<[CC1Option]>,
726  HelpText<"Add directory to SYSTEM framework search path">;
727def imacros : JoinedOrSeparate<"-imacros">, Group<clang_i_Group>, Flags<[CC1Option]>,
728  HelpText<"Include macros from file before parsing">, MetaVarName<"<file>">;
729def image__base : Separate<"-image_base">;
730def include_ : JoinedOrSeparate<"-include">, Group<clang_i_Group>, EnumName<"include">,
731    MetaVarName<"<file>">, HelpText<"Include file before parsing">, Flags<[CC1Option]>;
732def include_pch : Separate<"-include-pch">, Group<clang_i_Group>, Flags<[CC1Option]>,
733  HelpText<"Include precompiled header file">, MetaVarName<"<file>">;
734def init : Separate<"-init">;
735def install__name : Separate<"-install_name">;
736def integrated_as : Flag<"-integrated-as">, Flags<[DriverOption]>;
737def iprefix : JoinedOrSeparate<"-iprefix">, Group<clang_i_Group>, Flags<[CC1Option]>,
738  HelpText<"Set the -iwithprefix/-iwithprefixbefore prefix">, MetaVarName<"<dir>">;
739def iquote : JoinedOrSeparate<"-iquote">, Group<clang_i_Group>, Flags<[CC1Option]>,
740  HelpText<"Add directory to QUOTE include search path">, MetaVarName<"<directory>">;
741def isysroot : JoinedOrSeparate<"-isysroot">, Group<clang_i_Group>, Flags<[CC1Option]>,
742  HelpText<"Set the system root directory (usually /)">, MetaVarName<"<dir>">;
743def isystem : JoinedOrSeparate<"-isystem">, Group<clang_i_Group>, Flags<[CC1Option]>,
744  HelpText<"Add directory to SYSTEM include search path">, MetaVarName<"<directory>">;
745def iwithprefixbefore : JoinedOrSeparate<"-iwithprefixbefore">, Group<clang_i_Group>,
746  HelpText<"Set directory to include search path with prefix">, MetaVarName<"<dir>">,
747  Flags<[CC1Option]>;
748def iwithprefix : JoinedOrSeparate<"-iwithprefix">, Group<clang_i_Group>, Flags<[CC1Option]>,
749  HelpText<"Set directory to SYSTEM include search path with prefix">, MetaVarName<"<dir>">;
750def iwithsysroot : JoinedOrSeparate<"-iwithsysroot">, Group<clang_i_Group>,
751  HelpText<"Add directory to SYSTEM include search path, "
752           "absolute paths are relative to -isysroot">, MetaVarName<"<directory>">,
753  Flags<[CC1Option]>;
754def i : Joined<"-i">, Group<i_Group>;
755def keep__private__externs : Flag<"-keep_private_externs">;
756def l : JoinedOrSeparate<"-l">, Flags<[LinkerInput, RenderJoined]>;
757def lazy__framework : Separate<"-lazy_framework">, Flags<[LinkerInput]>;
758def lazy__library : Separate<"-lazy_library">, Flags<[LinkerInput]>;
759def m32 : Flag<"-m32">, Group<m_Group>, Flags<[DriverOption]>;
760def mqdsp6_compat : Flag<"-mqdsp6-compat">, Group<m_Group>, Flags<[DriverOption,CC1Option]>,
761  HelpText<"Enable hexagon-qdsp6 backward compatibility">;
762def m3dnowa : Flag<"-m3dnowa">, Group<m_x86_Features_Group>;
763def m3dnow : Flag<"-m3dnow">, Group<m_x86_Features_Group>;
764def m64 : Flag<"-m64">, Group<m_Group>, Flags<[DriverOption]>;
765def mabi_EQ : Joined<"-mabi=">, Group<m_Group>;
766def march_EQ : Joined<"-march=">, Group<m_Group>;
767def maltivec : Flag<"-maltivec">, Alias<faltivec>;
768def mcmodel_EQ : Joined<"-mcmodel=">, Group<m_Group>;
769def mconstant_cfstrings : Flag<"-mconstant-cfstrings">, Group<clang_ignored_m_Group>;
770def mcpu_EQ : Joined<"-mcpu=">, Group<m_Group>;
771def mdynamic_no_pic : Joined<"-mdynamic-no-pic">, Group<m_Group>;
772def mfix_and_continue : Flag<"-mfix-and-continue">, Group<clang_ignored_m_Group>;
773def mfloat_abi_EQ : Joined<"-mfloat-abi=">, Group<m_Group>;
774def mfpmath_EQ : Joined<"-mfpmath=">, Group<m_Group>;
775def mfpu_EQ : Joined<"-mfpu=">, Group<m_Group>;
776def mglobal_merge : Flag<"-mglobal-merge">, Group<m_Group>;
777def mhard_float : Flag<"-mhard-float">, Group<m_Group>;
778def miphoneos_version_min_EQ : Joined<"-miphoneos-version-min=">, Group<m_Group>;
779def mios_version_min_EQ : Joined<"-mios-version-min=">, Alias<miphoneos_version_min_EQ>;
780def mios_simulator_version_min_EQ : Joined<"-mios-simulator-version-min=">, Group<m_Group>;
781def mkernel : Flag<"-mkernel">, Group<m_Group>;
782def mlinker_version_EQ : Joined<"-mlinker-version=">, Flags<[NoForward]>;
783def mllvm : Separate<"-mllvm">, Flags<[CC1Option]>,
784  HelpText<"Additional arguments to forward to LLVM's option processing">;
785def mmacosx_version_min_EQ : Joined<"-mmacosx-version-min=">, Group<m_Group>;
786def mms_bitfields : Flag<"-mms-bitfields">, Group<m_Group>, Flags<[CC1Option]>,
787  HelpText<"Set the default structure layout to be compatible with the Microsoft compiler standard.">;
788def mstackrealign : Flag<"-mstackrealign">, Group<m_Group>, Flags<[CC1Option]>,
789  HelpText<"Force realign the stack at entry to every function.">;
790def mstack_alignment : Joined<"-mstack-alignment=">, Group<m_Group>, Flags<[CC1Option]>,
791  HelpText<"Set the stack alignment">;
792def mmmx : Flag<"-mmmx">, Group<m_x86_Features_Group>;
793def mno_3dnowa : Flag<"-mno-3dnowa">, Group<m_x86_Features_Group>;
794def mno_3dnow : Flag<"-mno-3dnow">, Group<m_x86_Features_Group>;
795def mno_constant_cfstrings : Flag<"-mno-constant-cfstrings">, Group<m_Group>;
796def mno_global_merge : Flag<"-mno-global-merge">, Group<m_Group>, Flags<[CC1Option]>,
797  HelpText<"Disable merging of globals">;
798def mno_mmx : Flag<"-mno-mmx">, Group<m_x86_Features_Group>;
799def mno_pascal_strings : Flag<"-mno-pascal-strings">, Group<m_Group>;
800def mno_red_zone : Flag<"-mno-red-zone">, Group<m_Group>;
801def mno_relax_all : Flag<"-mno-relax-all">, Group<m_Group>;
802def mno_rtd: Flag<"-mno-rtd">, Group<m_Group>;
803def mno_soft_float : Flag<"-mno-soft-float">, Group<m_Group>;
804def mno_stackrealign : Flag<"-mno-stackrealign">, Group<m_Group>;
805def mno_sse2 : Flag<"-mno-sse2">, Group<m_x86_Features_Group>;
806def mno_sse3 : Flag<"-mno-sse3">, Group<m_x86_Features_Group>;
807def mno_sse4a : Flag<"-mno-sse4a">, Group<m_x86_Features_Group>;
808def mno_sse4 : Flag<"-mno-sse4">, Group<m_x86_Features_Group>;
809def mno_sse4_1 : Flag<"-mno-sse4.1">, Group<m_x86_Features_Group>;
810def mno_sse4_2 : Flag<"-mno-sse4.2">, Group<m_x86_Features_Group>;
811def mno_sse : Flag<"-mno-sse">, Group<m_x86_Features_Group>;
812def mno_ssse3 : Flag<"-mno-ssse3">, Group<m_x86_Features_Group>;
813def mno_aes : Flag<"-mno-aes">, Group<m_x86_Features_Group>;
814def mno_avx : Flag<"-mno-avx">, Group<m_x86_Features_Group>;
815def mno_avx2 : Flag<"-mno-avx2">, Group<m_x86_Features_Group>;
816def mno_pclmul : Flag<"-mno-pclmul">, Group<m_x86_Features_Group>;
817def mno_lzcnt : Flag<"-mno-lzcnt">, Group<m_x86_Features_Group>;
818def mno_rdrnd : Flag<"-mno-rdrnd">, Group<m_x86_Features_Group>;
819def mno_bmi : Flag<"-mno-bmi">, Group<m_x86_Features_Group>;
820def mno_bmi2 : Flag<"-mno-bmi2">, Group<m_x86_Features_Group>;
821def mno_popcnt : Flag<"-mno-popcnt">, Group<m_x86_Features_Group>;
822def mno_fma4 : Flag<"-mno-fma4">, Group<m_x86_Features_Group>;
823def mno_fma : Flag<"-mno-fma">, Group<m_x86_Features_Group>;
824def mno_xop : Flag<"-mno-xop">, Group<m_x86_Features_Group>;
825
826def mno_thumb : Flag<"-mno-thumb">, Group<m_Group>;
827def marm : Flag<"-marm">, Alias<mno_thumb>;
828
829def mno_warn_nonportable_cfstrings : Flag<"-mno-warn-nonportable-cfstrings">, Group<m_Group>;
830def mno_omit_leaf_frame_pointer : Flag<"-mno-omit-leaf-frame-pointer">, Group<f_Group>;
831def momit_leaf_frame_pointer : Flag<"-momit-leaf-frame-pointer">, Group<f_Group>,
832  HelpText<"Omit frame pointer setup for leaf functions.">, Flags<[CC1Option]>;
833def mpascal_strings : Flag<"-mpascal-strings">, Group<m_Group>;
834def mred_zone : Flag<"-mred-zone">, Group<m_Group>;
835def mregparm_EQ : Joined<"-mregparm=">, Group<m_Group>;
836def mrelax_all : Flag<"-mrelax-all">, Group<m_Group>, Flags<[CC1Option]>,
837  HelpText<"(integrated-as) Relax all machine instructions">;
838def mrtd : Flag<"-mrtd">, Group<m_Group>, Flags<[CC1Option]>,
839  HelpText<"Make StdCall calling convention the default">;
840def msmall_data_threshold_EQ : Joined <"-msmall-data-threshold=">, Group<m_Group>;
841def msoft_float : Flag<"-msoft-float">, Group<m_Group>, Flags<[CC1Option]>,
842  HelpText<"Use software floating point">;
843def mno_implicit_float : Flag<"-mno-implicit-float">, Group<m_Group>,
844  HelpText<"Don't generate implicit floating point instructions">;
845def msse2 : Flag<"-msse2">, Group<m_x86_Features_Group>;
846def msse3 : Flag<"-msse3">, Group<m_x86_Features_Group>;
847def msse4a : Flag<"-msse4a">, Group<m_x86_Features_Group>;
848def msse4 : Flag<"-msse4">, Group<m_x86_Features_Group>;
849def msse4_1 : Flag<"-msse4.1">, Group<m_x86_Features_Group>;
850def msse4_2 : Flag<"-msse4.2">, Group<m_x86_Features_Group>;
851def msse : Flag<"-msse">, Group<m_x86_Features_Group>;
852def mssse3 : Flag<"-mssse3">, Group<m_x86_Features_Group>;
853def maes : Flag<"-maes">, Group<m_x86_Features_Group>;
854def mavx : Flag<"-mavx">, Group<m_x86_Features_Group>;
855def mavx2 : Flag<"-mavx2">, Group<m_x86_Features_Group>;
856def mpclmul : Flag<"-mpclmul">, Group<m_x86_Features_Group>;
857def mlzcnt : Flag<"-mlzcnt">, Group<m_x86_Features_Group>;
858def mrdrnd : Flag<"-mrdrnd">, Group<m_x86_Features_Group>;
859def mbmi : Flag<"-mbmi">, Group<m_x86_Features_Group>;
860def mbmi2 : Flag<"-mbmi2">, Group<m_x86_Features_Group>;
861def mpopcnt : Flag<"-mpopcnt">, Group<m_x86_Features_Group>;
862def mfma4 : Flag<"-mfma4">, Group<m_x86_Features_Group>;
863def mfma : Flag<"-mfma">, Group<m_x86_Features_Group>;
864def mxop : Flag<"-mxop">, Group<m_x86_Features_Group>;
865def mips16 : Flag<"-mips16">, Group<m_Group>;
866def mno_mips16 : Flag<"-mno-mips16">, Group<m_Group>;
867def mdsp : Flag<"-mdsp">, Group<m_Group>;
868def mno_dsp : Flag<"-mno-dsp">, Group<m_Group>;
869def mdspr2 : Flag<"-mdspr2">, Group<m_Group>;
870def mno_dspr2 : Flag<"-mno-dspr2">, Group<m_Group>;
871def mthumb : Flag<"-mthumb">, Group<m_Group>;
872def mtune_EQ : Joined<"-mtune=">, Group<m_Group>;
873def multi__module : Flag<"-multi_module">;
874def multiply__defined__unused : Separate<"-multiply_defined_unused">;
875def multiply__defined : Separate<"-multiply_defined">;
876def mwarn_nonportable_cfstrings : Flag<"-mwarn-nonportable-cfstrings">, Group<m_Group>;
877def m_Separate : Separate<"-m">, Group<m_Group>;
878def m_Joined : Joined<"-m">, Group<m_Group>;
879def no_canonical_prefixes : Flag<"-no-canonical-prefixes">, Flags<[HelpHidden]>,
880  HelpText<"Use relative instead of canonical paths">;
881def no_cpp_precomp : Flag<"-no-cpp-precomp">, Group<clang_ignored_f_Group>;
882def no_integrated_as : Flag<"-no-integrated-as">, Flags<[DriverOption]>;
883def no_integrated_cpp : Flag<"-no-integrated-cpp">, Flags<[DriverOption]>;
884def no_pedantic : Flag<"-no-pedantic">, Group<pedantic_Group>;
885def no__dead__strip__inits__and__terms : Flag<"-no_dead_strip_inits_and_terms">;
886def nobuiltininc : Flag<"-nobuiltininc">, Flags<[CC1Option]>,
887  HelpText<"Disable builtin #include directories">;
888def nodefaultlibs : Flag<"-nodefaultlibs">;
889def nofixprebinding : Flag<"-nofixprebinding">;
890def nolibc : Flag<"-nolibc">;
891def nomultidefs : Flag<"-nomultidefs">;
892def noprebind : Flag<"-noprebind">;
893def noseglinkedit : Flag<"-noseglinkedit">;
894def nostartfiles : Flag<"-nostartfiles">;
895def nostdinc : Flag<"-nostdinc">;
896def nostdlibinc : Flag<"-nostdlibinc">;
897def nostdincxx : Flag<"-nostdinc++">, Flags<[CC1Option]>,
898  HelpText<"Disable standard #include directories for the C++ standard library">;
899def nostdlib : Flag<"-nostdlib">;
900def object : Flag<"-object">;
901def o : JoinedOrSeparate<"-o">, Flags<[DriverOption, RenderAsInput, CC1Option]>,
902  HelpText<"Write output to <file>">, MetaVarName<"<file>">;
903def pagezero__size : JoinedOrSeparate<"-pagezero_size">;
904def pass_exit_codes : Flag<"-pass-exit-codes">, Flags<[Unsupported]>;
905def pedantic_errors : Flag<"-pedantic-errors">, Group<pedantic_Group>, Flags<[CC1Option]>;
906def pedantic : Flag<"-pedantic">, Group<pedantic_Group>, Flags<[CC1Option]>;
907def pg : Flag<"-pg">, HelpText<"Enable mcount instrumentation">, Flags<[CC1Option]>;
908def pipe : Flag<"-pipe">,
909  HelpText<"Use pipes between commands, when possible">;
910def prebind__all__twolevel__modules : Flag<"-prebind_all_twolevel_modules">;
911def prebind : Flag<"-prebind">;
912def preload : Flag<"-preload">;
913def print_file_name_EQ : Joined<"-print-file-name=">,
914  HelpText<"Print the full library path of <file>">, MetaVarName<"<file>">;
915def print_ivar_layout : Flag<"-print-ivar-layout">, Flags<[CC1Option]>,
916  HelpText<"Enable Objective-C Ivar layout bitmap print trace">;
917def print_libgcc_file_name : Flag<"-print-libgcc-file-name">,
918  HelpText<"Print the library path for \"libgcc.a\"">;
919def print_multi_directory : Flag<"-print-multi-directory">;
920def print_multi_lib : Flag<"-print-multi-lib">;
921def print_multi_os_directory : Flag<"-print-multi-os-directory">;
922def print_prog_name_EQ : Joined<"-print-prog-name=">,
923  HelpText<"Print the full program path of <name>">, MetaVarName<"<name>">;
924def print_search_dirs : Flag<"-print-search-dirs">,
925  HelpText<"Print the paths used for finding libraries and programs">;
926def private__bundle : Flag<"-private_bundle">;
927def pthreads : Flag<"-pthreads">;
928def pthread : Flag<"-pthread">, Flags<[CC1Option]>,
929  HelpText<"Support POSIX threads in generated code">;
930def p : Flag<"-p">;
931def pie : Flag<"-pie">;
932def read__only__relocs : Separate<"-read_only_relocs">;
933def remap : Flag<"-remap">;
934def rewrite_objc : Flag<"-rewrite-objc">, Flags<[DriverOption,CC1Option]>,
935  HelpText<"Rewrite Objective-C source to C++">, Group<Action_Group>;
936def rewrite_legacy_objc : Flag<"-rewrite-legacy-objc">, Flags<[DriverOption]>,
937  HelpText<"Rewrite Legacy Objective-C source to C++">;
938def rdynamic : Flag<"-rdynamic">;
939def rpath : Separate<"-rpath">, Flags<[LinkerInput]>;
940def rtlib_EQ : Joined<"-rtlib=">;
941def r : Flag<"-r">;
942def save_temps : Flag<"-save-temps">, Flags<[DriverOption]>,
943  HelpText<"Save intermediate compilation results">;
944def sectalign : MultiArg<"-sectalign", 3>;
945def sectcreate : MultiArg<"-sectcreate", 3>;
946def sectobjectsymbols : MultiArg<"-sectobjectsymbols", 2>;
947def sectorder : MultiArg<"-sectorder", 3>;
948def seg1addr : JoinedOrSeparate<"-seg1addr">;
949def seg__addr__table__filename : Separate<"-seg_addr_table_filename">;
950def seg__addr__table : Separate<"-seg_addr_table">;
951def segaddr : MultiArg<"-segaddr", 2>;
952def segcreate : MultiArg<"-segcreate", 3>;
953def seglinkedit : Flag<"-seglinkedit">;
954def segprot : MultiArg<"-segprot", 3>;
955def segs__read__only__addr : Separate<"-segs_read_only_addr">;
956def segs__read__write__addr : Separate<"-segs_read_write_addr">;
957def segs__read__ : Joined<"-segs_read_">;
958def shared_libgcc : Flag<"-shared-libgcc">;
959def shared : Flag<"-shared">;
960def single__module : Flag<"-single_module">;
961def specs_EQ : Joined<"-specs=">;
962def specs : Separate<"-specs">, Flags<[Unsupported]>;
963def static_libgcc : Flag<"-static-libgcc">;
964def static_libstdcxx : Flag<"-static-libstdc++">;
965def static : Flag<"-static">, Flags<[NoArgumentUnused]>;
966def std_default_EQ : Joined<"-std-default=">;
967def std_EQ : Joined<"-std=">, Flags<[CC1Option]>, Group<L_Group>,
968  HelpText<"Language standard to compile for">;
969def stdlib_EQ : Joined<"-stdlib=">, Flags<[CC1Option]>,
970  HelpText<"C++ standard library to use">;
971def sub__library : JoinedOrSeparate<"-sub_library">;
972def sub__umbrella : JoinedOrSeparate<"-sub_umbrella">;
973def s : Flag<"-s">;
974def target : Separate<"-target">, Flags<[DriverOption]>,
975  HelpText<"Generate code for the given target">;
976def gcc_toolchain : Separate<"-gcc-toolchain">, Flags<[DriverOption]>,
977  HelpText<"Use the gcc toolchain at the given directory">;
978// We should deprecate the use of -ccc-host-triple, and then remove.
979def ccc_host_triple : Separate<"-ccc-host-triple">, Alias<target>;
980def time : Flag<"-time">,
981  HelpText<"Time individual commands">;
982def traditional_cpp : Flag<"-traditional-cpp">, Flags<[CC1Option]>,
983  HelpText<"Enable some traditional CPP emulation">;
984def traditional : Flag<"-traditional">;
985def trigraphs : Flag<"-trigraphs">, Flags<[CC1Option]>,
986  HelpText<"Process trigraph sequences">;
987def twolevel__namespace__hints : Flag<"-twolevel_namespace_hints">;
988def twolevel__namespace : Flag<"-twolevel_namespace">;
989def t : Flag<"-t">;
990def umbrella : Separate<"-umbrella">;
991def undefined : JoinedOrSeparate<"-undefined">, Group<u_Group>;
992def undef : Flag<"-undef">, Group<u_Group>, Flags<[CC1Option]>,
993  HelpText<"undef all system defines">;
994def unexported__symbols__list : Separate<"-unexported_symbols_list">;
995def u : JoinedOrSeparate<"-u">, Group<u_Group>;
996def use_gold_plugin : Flag<"-use-gold-plugin">;
997def v : Flag<"-v">, Flags<[CC1Option]>,
998  HelpText<"Show commands to run and use verbose output">;
999def verify : Flag<"-verify">, Flags<[DriverOption,CC1Option]>,
1000  HelpText<"Verify output using a verifier.">;
1001def weak_l : Joined<"-weak-l">, Flags<[LinkerInput]>;
1002def weak__framework : Separate<"-weak_framework">, Flags<[LinkerInput]>;
1003def weak__library : Separate<"-weak_library">, Flags<[LinkerInput]>;
1004def weak__reference__mismatches : Separate<"-weak_reference_mismatches">;
1005def whatsloaded : Flag<"-whatsloaded">;
1006def whyload : Flag<"-whyload">;
1007def w : Flag<"-w">, HelpText<"Suppress all warnings.">, Flags<[CC1Option]>;
1008def x : JoinedOrSeparate<"-x">, Flags<[DriverOption,CC1Option]>,
1009  HelpText<"Treat subsequent input files as having type <language>">,
1010  MetaVarName<"<language>">;
1011def y : Joined<"-y">;
1012
1013def working_directory : JoinedOrSeparate<"-working-directory">, Flags<[CC1Option]>,
1014  HelpText<"Resolve file paths relative to the specified directory">;
1015def working_directory_EQ : Joined<"-working-directory=">, Flags<[CC1Option]>,
1016  Alias<working_directory>;
1017
1018// Double dash options, which are usually an alias for one of the previous
1019// options.
1020
1021def _CLASSPATH_EQ : Joined<"--CLASSPATH=">, Alias<fclasspath_EQ>;
1022def _CLASSPATH : Separate<"--CLASSPATH">, Alias<fclasspath_EQ>;
1023def _all_warnings : Flag<"--all-warnings">, Alias<Wall>;
1024def _analyze_auto : Flag<"--analyze-auto">, Flags<[DriverOption]>;
1025def _analyzer_no_default_checks : Flag<"--analyzer-no-default-checks">, Flags<[DriverOption]>;
1026def _analyzer_output : JoinedOrSeparate<"--analyzer-output">, Flags<[DriverOption]>;
1027def _analyze : Flag<"--analyze">, Flags<[DriverOption]>,
1028  HelpText<"Run the static analyzer">;
1029def _ansi : Flag<"--ansi">, Alias<ansi>;
1030def _assemble : Flag<"--assemble">, Alias<S>;
1031def _assert_EQ : Joined<"--assert=">, Alias<A>;
1032def _assert : Separate<"--assert">, Alias<A>;
1033def _bootclasspath_EQ : Joined<"--bootclasspath=">, Alias<fbootclasspath_EQ>;
1034def _bootclasspath : Separate<"--bootclasspath">, Alias<fbootclasspath_EQ>;
1035def _classpath_EQ : Joined<"--classpath=">, Alias<fclasspath_EQ>;
1036def _classpath : Separate<"--classpath">, Alias<fclasspath_EQ>;
1037def _combine : Flag<"--combine">, Alias<combine>;
1038def _comments_in_macros : Flag<"--comments-in-macros">, Alias<CC>;
1039def _comments : Flag<"--comments">, Alias<C>;
1040def _compile : Flag<"--compile">, Alias<c>;
1041def _constant_cfstrings : Flag<"--constant-cfstrings">;
1042def _coverage : Flag<"--coverage">, Alias<coverage>;
1043def _debug_EQ : Joined<"--debug=">, Alias<g_Flag>;
1044def _debug : Flag<"--debug">, Alias<g_Flag>;
1045def _define_macro_EQ : Joined<"--define-macro=">, Alias<D>;
1046def _define_macro : Separate<"--define-macro">, Alias<D>;
1047def _dependencies : Flag<"--dependencies">, Alias<M>;
1048def _encoding_EQ : Joined<"--encoding=">, Alias<fencoding_EQ>;
1049def _encoding : Separate<"--encoding">, Alias<fencoding_EQ>;
1050def _entry : Flag<"--entry">, Alias<e>;
1051def _extdirs_EQ : Joined<"--extdirs=">, Alias<fextdirs_EQ>;
1052def _extdirs : Separate<"--extdirs">, Alias<fextdirs_EQ>;
1053def _extra_warnings : Flag<"--extra-warnings">, Alias<W_Joined>;
1054def _for_linker_EQ : Joined<"--for-linker=">, Alias<Xlinker>;
1055def _for_linker : Separate<"--for-linker">, Alias<Xlinker>;
1056def _force_link_EQ : Joined<"--force-link=">, Alias<u>;
1057def _force_link : Separate<"--force-link">, Alias<u>;
1058def _help_hidden : Flag<"--help-hidden">;
1059def _help : Flag<"--help">, Alias<help>;
1060def _imacros_EQ : Joined<"--imacros=">, Alias<imacros>;
1061def _imacros : Separate<"--imacros">, Alias<imacros>;
1062def _include_barrier : Flag<"--include-barrier">, Alias<I_>;
1063def _include_directory_after_EQ : Joined<"--include-directory-after=">, Alias<idirafter>;
1064def _include_directory_after : Separate<"--include-directory-after">, Alias<idirafter>;
1065def _include_directory_EQ : Joined<"--include-directory=">, Alias<I>;
1066def _include_directory : Separate<"--include-directory">, Alias<I>;
1067def _include_prefix_EQ : Joined<"--include-prefix=">, Alias<iprefix>;
1068def _include_prefix : Separate<"--include-prefix">, Alias<iprefix>;
1069def _include_with_prefix_after_EQ : Joined<"--include-with-prefix-after=">, Alias<iwithprefix>;
1070def _include_with_prefix_after : Separate<"--include-with-prefix-after">, Alias<iwithprefix>;
1071def _include_with_prefix_before_EQ : Joined<"--include-with-prefix-before=">, Alias<iwithprefixbefore>;
1072def _include_with_prefix_before : Separate<"--include-with-prefix-before">, Alias<iwithprefixbefore>;
1073def _include_with_prefix_EQ : Joined<"--include-with-prefix=">, Alias<iwithprefix>;
1074def _include_with_prefix : Separate<"--include-with-prefix">, Alias<iwithprefix>;
1075def _include_EQ : Joined<"--include=">, Alias<include_>;
1076def _include : Separate<"--include">, Alias<include_>;
1077def _language_EQ : Joined<"--language=">, Alias<x>;
1078def _language : Separate<"--language">, Alias<x>;
1079def _library_directory_EQ : Joined<"--library-directory=">, Alias<L>;
1080def _library_directory : Separate<"--library-directory">, Alias<L>;
1081def _machine__EQ : Joined<"--machine-=">, Alias<m_Joined>;
1082def _machine_ : Joined<"--machine-">, Alias<m_Joined>;
1083def _machine_EQ : Joined<"--machine=">, Alias<m_Joined>;
1084def _machine : Separate<"--machine">, Alias<m_Joined>;
1085def _no_integrated_cpp : Flag<"--no-integrated-cpp">, Alias<no_integrated_cpp>;
1086def _no_line_commands : Flag<"--no-line-commands">, Alias<P>;
1087def _no_pedantic : Flag<"--no-pedantic">, Alias<no_pedantic>;
1088def _no_standard_includes : Flag<"--no-standard-includes">, Alias<nostdinc>;
1089def _no_standard_libraries : Flag<"--no-standard-libraries">, Alias<nostdlib>;
1090def _no_undefined : Flag<"--no-undefined">, Flags<[LinkerInput]>;
1091def _no_warnings : Flag<"--no-warnings">, Alias<w>;
1092def _optimize_EQ : Joined<"--optimize=">, Alias<O>;
1093def _optimize : Flag<"--optimize">, Alias<O>;
1094def _output_class_directory_EQ : Joined<"--output-class-directory=">, Alias<foutput_class_dir_EQ>;
1095def _output_class_directory : Separate<"--output-class-directory">, Alias<foutput_class_dir_EQ>;
1096def _output_EQ : Joined<"--output=">, Alias<o>;
1097def _output : Separate<"--output">, Alias<o>;
1098def _param : Separate<"--param">;
1099def _param_EQ : Joined<"--param=">, Alias<_param>;
1100def _pass_exit_codes : Flag<"--pass-exit-codes">, Alias<pass_exit_codes>;
1101def _pedantic_errors : Flag<"--pedantic-errors">, Alias<pedantic_errors>;
1102def _pedantic : Flag<"--pedantic">, Alias<pedantic>;
1103def _pipe : Flag<"--pipe">, Alias<pipe>;
1104def _prefix_EQ : Joined<"--prefix=">, Alias<B>;
1105def _prefix : Separate<"--prefix">, Alias<B>;
1106def _preprocess : Flag<"--preprocess">, Alias<E>;
1107def _print_diagnostic_categories : Flag<"--print-diagnostic-categories">;
1108def _print_file_name_EQ : Joined<"--print-file-name=">, Alias<print_file_name_EQ>;
1109def _print_file_name : Separate<"--print-file-name">, Alias<print_file_name_EQ>;
1110def _print_libgcc_file_name : Flag<"--print-libgcc-file-name">, Alias<print_libgcc_file_name>;
1111def _print_missing_file_dependencies : Flag<"--print-missing-file-dependencies">, Alias<MG>;
1112def _print_multi_directory : Flag<"--print-multi-directory">, Alias<print_multi_directory>;
1113def _print_multi_lib : Flag<"--print-multi-lib">, Alias<print_multi_lib>;
1114def _print_multi_os_directory : Flag<"--print-multi-os-directory">, Alias<print_multi_os_directory>;
1115def _print_prog_name_EQ : Joined<"--print-prog-name=">, Alias<print_prog_name_EQ>;
1116def _print_prog_name : Separate<"--print-prog-name">, Alias<print_prog_name_EQ>;
1117def _print_search_dirs : Flag<"--print-search-dirs">, Alias<print_search_dirs>;
1118def _profile_blocks : Flag<"--profile-blocks">, Alias<a>;
1119def _profile : Flag<"--profile">, Alias<p>;
1120def _relocatable_pch : Flag<"--relocatable-pch">,
1121  HelpText<"Build a relocatable precompiled header">;
1122def _resource_EQ : Joined<"--resource=">, Alias<fcompile_resource_EQ>;
1123def _resource : Separate<"--resource">, Alias<fcompile_resource_EQ>;
1124def _rtlib_EQ : Joined<"--rtlib=">, Alias<rtlib_EQ>;
1125def _rtlib : Separate<"--rtlib">, Alias<rtlib_EQ>;
1126def _save_temps : Flag<"--save-temps">, Alias<save_temps>;
1127def _serialize_diags : Separate<"--serialize-diagnostics">, Flags<[DriverOption]>,
1128  HelpText<"Serialize compiler diagnostics to a file">;
1129def _shared : Flag<"--shared">, Alias<shared>;
1130def _signed_char : Flag<"--signed-char">, Alias<fsigned_char>;
1131def _specs_EQ : Joined<"--specs=">, Alias<specs_EQ>;
1132def _specs : Separate<"--specs">, Alias<specs_EQ>;
1133def _static : Flag<"--static">, Alias<static>;
1134def _std_EQ : Joined<"--std=">, Alias<std_EQ>;
1135def _std : Separate<"--std">, Alias<std_EQ>;
1136def _stdlib_EQ : Joined<"--stdlib=">, Alias<stdlib_EQ>;
1137def _stdlib : Separate<"--stdlib">, Alias<stdlib_EQ>;
1138def _sysroot_EQ : Joined<"--sysroot=">;
1139def _sysroot : Separate<"--sysroot">, Alias<_sysroot_EQ>;
1140def _target_help : Flag<"--target-help">;
1141def _trace_includes : Flag<"--trace-includes">, Alias<H>;
1142def _traditional_cpp : Flag<"--traditional-cpp">, Alias<traditional_cpp>;
1143def _traditional : Flag<"--traditional">, Alias<traditional>;
1144def _trigraphs : Flag<"--trigraphs">, Alias<trigraphs>;
1145def _undefine_macro_EQ : Joined<"--undefine-macro=">, Alias<U>;
1146def _undefine_macro : Separate<"--undefine-macro">, Alias<U>;
1147def _unsigned_char : Flag<"--unsigned-char">, Alias<funsigned_char>;
1148def _user_dependencies : Flag<"--user-dependencies">, Alias<MM>;
1149def _verbose : Flag<"--verbose">, Alias<v>;
1150def _version : Flag<"--version">,  Flags<[CC1Option]>;
1151def _warn__EQ : Joined<"--warn-=">, Alias<W_Joined>;
1152def _warn_ : Joined<"--warn-">, Alias<W_Joined>;
1153def _write_dependencies : Flag<"--write-dependencies">, Alias<MD>;
1154def _write_user_dependencies : Flag<"--write-user-dependencies">, Alias<MMD>;
1155def _ : Joined<"--">, Flags<[Unsupported]>;
1156def mieee_rnd_near : Flag<"-mieee-rnd-near">, Group<m_hexagon_Features_Group>;
1157def serialize_diags : Separate<"-serialize-diagnostics">, Alias<_serialize_diags>;
1158
1159// Special internal option to handle -Xlinker --no-demangle.
1160def Z_Xlinker__no_demangle : Flag<"-Z-Xlinker-no-demangle">,
1161    Flags<[Unsupported, NoArgumentUnused]>;
1162
1163// Special internal option to allow forwarding arbitrary arguments to linker.
1164def Zlinker_input : Separate<"-Zlinker-input">,
1165    Flags<[Unsupported, NoArgumentUnused]>;
1166
1167// Reserved library options.
1168def Z_reserved_lib_stdcxx : Flag<"-Z-reserved-lib-stdc++">,
1169    Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, Group<reserved_lib_Group>;
1170def Z_reserved_lib_cckext : Flag<"-Z-reserved-lib-cckext">,
1171    Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, Group<reserved_lib_Group>;
1172
1173include "CC1Options.td"
1174