]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / include / clang / Driver / CC1Options.td
1 //===--- CC1Options.td - Options for clang -cc1 ---------------------------===//
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 -cc1 and clang -cc1as.
11 //
12 //===----------------------------------------------------------------------===//
13
14 let Flags = [CC1Option, NoDriverOption] in {
15
16 //===----------------------------------------------------------------------===//
17 // Target Options
18 //===----------------------------------------------------------------------===//
19
20 let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
21
22 def target_cpu : Separate<["-"], "target-cpu">,
23   HelpText<"Target a specific cpu type">;
24 def target_feature : Separate<["-"], "target-feature">,
25   HelpText<"Target specific attributes">;
26 def triple : Separate<["-"], "triple">,
27   HelpText<"Specify target triple (e.g. i686-apple-darwin9)">;
28 def target_abi : Separate<["-"], "target-abi">,
29   HelpText<"Target a particular ABI type">;
30 def target_sdk_version_EQ : Joined<["-"], "target-sdk-version=">,
31   HelpText<"The version of target SDK used for compilation">;
32
33 }
34
35 def target_linker_version : Separate<["-"], "target-linker-version">,
36   HelpText<"Target linker version">;
37 def triple_EQ : Joined<["-"], "triple=">, Alias<triple>;
38 def mfpmath : Separate<["-"], "mfpmath">,
39   HelpText<"Which unit to use for fp math">;
40
41 def fpadding_on_unsigned_fixed_point : Flag<["-"], "fpadding-on-unsigned-fixed-point">,
42   HelpText<"Force each unsigned fixed point type to have an extra bit of padding to align their scales with those of signed fixed point types">;
43 def fno_padding_on_unsigned_fixed_point : Flag<["-"], "fno-padding-on-unsigned-fixed-point">;
44
45 //===----------------------------------------------------------------------===//
46 // Analyzer Options
47 //===----------------------------------------------------------------------===//
48
49 def analysis_UnoptimizedCFG : Flag<["-"], "unoptimized-cfg">,
50   HelpText<"Generate unoptimized CFGs for all analyses">;
51 def analysis_CFGAddImplicitDtors : Flag<["-"], "cfg-add-implicit-dtors">,
52   HelpText<"Add C++ implicit destructors to CFGs for all analyses">;
53
54 def analyzer_store : Separate<["-"], "analyzer-store">,
55   HelpText<"Source Code Analysis - Abstract Memory Store Models">;
56 def analyzer_store_EQ : Joined<["-"], "analyzer-store=">, Alias<analyzer_store>;
57
58 def analyzer_constraints : Separate<["-"], "analyzer-constraints">,
59   HelpText<"Source Code Analysis - Symbolic Constraint Engines">;
60 def analyzer_constraints_EQ : Joined<["-"], "analyzer-constraints=">,
61   Alias<analyzer_constraints>;
62
63 def analyzer_output : Separate<["-"], "analyzer-output">,
64   HelpText<"Source Code Analysis - Output Options">;
65 def analyzer_output_EQ : Joined<["-"], "analyzer-output=">,
66   Alias<analyzer_output>;
67
68 def analyzer_purge : Separate<["-"], "analyzer-purge">,
69   HelpText<"Source Code Analysis - Dead Symbol Removal Frequency">;
70 def analyzer_purge_EQ : Joined<["-"], "analyzer-purge=">, Alias<analyzer_purge>;
71
72 def analyzer_opt_analyze_headers : Flag<["-"], "analyzer-opt-analyze-headers">,
73   HelpText<"Force the static analyzer to analyze functions defined in header files">;
74 def analyzer_opt_analyze_nested_blocks : Flag<["-"], "analyzer-opt-analyze-nested-blocks">,
75   HelpText<"Analyze the definitions of blocks in addition to functions">;
76 def analyzer_display_progress : Flag<["-"], "analyzer-display-progress">,
77   HelpText<"Emit verbose output about the analyzer's progress">;
78 def analyze_function : Separate<["-"], "analyze-function">,
79   HelpText<"Run analysis on specific function (for C++ include parameters in name)">;
80 def analyze_function_EQ : Joined<["-"], "analyze-function=">, Alias<analyze_function>;
81 def trim_egraph : Flag<["-"], "trim-egraph">,
82   HelpText<"Only show error-related paths in the analysis graph">;
83 def analyzer_viz_egraph_graphviz : Flag<["-"], "analyzer-viz-egraph-graphviz">,
84   HelpText<"Display exploded graph using GraphViz">;
85 def analyzer_dump_egraph : Separate<["-"], "analyzer-dump-egraph">,
86   HelpText<"Dump exploded graph to the specified file">;
87 def analyzer_dump_egraph_EQ : Joined<["-"], "analyzer-dump-egraph=">, Alias<analyzer_dump_egraph>;
88
89 def analyzer_inline_max_stack_depth : Separate<["-"], "analyzer-inline-max-stack-depth">,
90   HelpText<"Bound on stack depth while inlining (4 by default)">;
91 def analyzer_inline_max_stack_depth_EQ : Joined<["-"], "analyzer-inline-max-stack-depth=">,
92   Alias<analyzer_inline_max_stack_depth>;
93
94 def analyzer_inlining_mode : Separate<["-"], "analyzer-inlining-mode">,
95   HelpText<"Specify the function selection heuristic used during inlining">;
96 def analyzer_inlining_mode_EQ : Joined<["-"], "analyzer-inlining-mode=">, Alias<analyzer_inlining_mode>;
97
98 def analyzer_disable_retry_exhausted : Flag<["-"], "analyzer-disable-retry-exhausted">,
99   HelpText<"Do not re-analyze paths leading to exhausted nodes with a different strategy (may decrease code coverage)">;
100
101 def analyzer_max_loop : Separate<["-"], "analyzer-max-loop">,
102   HelpText<"The maximum number of times the analyzer will go through a loop">;
103 def analyzer_stats : Flag<["-"], "analyzer-stats">,
104   HelpText<"Print internal analyzer statistics.">;
105
106 def analyzer_checker : Separate<["-"], "analyzer-checker">,
107   HelpText<"Choose analyzer checkers to enable">,
108   ValuesCode<[{
109     const char *Values =
110     #define GET_CHECKERS
111     #define CHECKER(FULLNAME, CLASS, HT, DOC_URI)  FULLNAME ","
112     #include "clang/StaticAnalyzer/Checkers/Checkers.inc"
113     #undef GET_CHECKERS
114     #define GET_PACKAGES
115     #define PACKAGE(FULLNAME)  FULLNAME ","
116     #include "clang/StaticAnalyzer/Checkers/Checkers.inc"
117     #undef GET_PACKAGES
118     ;
119   }]>;
120 def analyzer_checker_EQ : Joined<["-"], "analyzer-checker=">,
121   Alias<analyzer_checker>;
122
123 def analyzer_disable_checker : Separate<["-"], "analyzer-disable-checker">,
124   HelpText<"Choose analyzer checkers to disable">;
125 def analyzer_disable_checker_EQ : Joined<["-"], "analyzer-disable-checker=">,
126   Alias<analyzer_disable_checker>;
127
128 def analyzer_disable_all_checks : Flag<["-"], "analyzer-disable-all-checks">,
129   HelpText<"Disable all static analyzer checks">;
130
131 def analyzer_checker_help : Flag<["-"], "analyzer-checker-help">,
132   HelpText<"Display the list of analyzer checkers that are available">;
133
134 def analyzer_config_help : Flag<["-"], "analyzer-config-help">,
135   HelpText<"Display the list of -analyzer-config options">;
136
137 def analyzer_list_enabled_checkers : Flag<["-"], "analyzer-list-enabled-checkers">,
138   HelpText<"Display the list of enabled analyzer checkers">;
139
140 def analyzer_config : Separate<["-"], "analyzer-config">,
141   HelpText<"Choose analyzer options to enable">;
142
143 def analyzer_config_compatibility_mode : Separate<["-"], "analyzer-config-compatibility-mode">,
144   HelpText<"Don't emit errors on invalid analyzer-config inputs">;
145
146 def analyzer_config_compatibility_mode_EQ : Joined<["-"], "analyzer-config-compatibility-mode=">,
147   Alias<analyzer_config_compatibility_mode>;
148
149 //===----------------------------------------------------------------------===//
150 // Migrator Options
151 //===----------------------------------------------------------------------===//
152 def migrator_no_nsalloc_error : Flag<["-"], "no-ns-alloc-error">,
153   HelpText<"Do not error on use of NSAllocateCollectable/NSReallocateCollectable">;
154
155 def migrator_no_finalize_removal : Flag<["-"], "no-finalize-removal">,
156   HelpText<"Do not remove finalize method in gc mode">;
157
158 //===----------------------------------------------------------------------===//
159 // CodeGen Options
160 //===----------------------------------------------------------------------===//
161
162 let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
163 def debug_info_kind_EQ : Joined<["-"], "debug-info-kind=">;
164 def debug_info_macro : Flag<["-"], "debug-info-macro">,
165   HelpText<"Emit macro debug information">;
166 def default_function_attr : Separate<["-"], "default-function-attr">,
167   HelpText<"Apply given attribute to all functions">;
168 def dwarf_version_EQ : Joined<["-"], "dwarf-version=">;
169 def debugger_tuning_EQ : Joined<["-"], "debugger-tuning=">;
170 def fdebug_compilation_dir : Separate<["-"], "fdebug-compilation-dir">,
171   HelpText<"The compilation directory to embed in the debug info.">;
172 def dwarf_debug_flags : Separate<["-"], "dwarf-debug-flags">,
173   HelpText<"The string to embed in the Dwarf debug flags record.">;
174 def record_command_line : Separate<["-"], "record-command-line">,
175   HelpText<"The string to embed in the .LLVM.command.line section.">;
176 def compress_debug_sections : Flag<["-", "--"], "compress-debug-sections">,
177     HelpText<"DWARF debug sections compression">;
178 def compress_debug_sections_EQ : Joined<["-"], "compress-debug-sections=">,
179     HelpText<"DWARF debug sections compression type">;
180 def mno_exec_stack : Flag<["-"], "mnoexecstack">,
181   HelpText<"Mark the file as not needing an executable stack">;
182 def massembler_fatal_warnings : Flag<["-"], "massembler-fatal-warnings">,
183   HelpText<"Make assembler warnings fatal">;
184 def mrelax_relocations : Flag<["--"], "mrelax-relocations">,
185     HelpText<"Use relaxable elf relocations">;
186 def msave_temp_labels : Flag<["-"], "msave-temp-labels">,
187   HelpText<"Save temporary labels in the symbol table. "
188            "Note this may change .s semantics and shouldn't generally be used "
189            "on compiler-generated code.">;
190 def mrelocation_model : Separate<["-"], "mrelocation-model">,
191   HelpText<"The relocation model to use">, Values<"static,pic,ropi,rwpi,ropi-rwpi,dynamic-no-pic">;
192 def fno_math_builtin : Flag<["-"], "fno-math-builtin">,
193   HelpText<"Disable implicit builtin knowledge of math functions">;
194 }
195
196 def disable_llvm_verifier : Flag<["-"], "disable-llvm-verifier">,
197   HelpText<"Don't run the LLVM IR verifier pass">;
198 def disable_llvm_passes : Flag<["-"], "disable-llvm-passes">,
199   HelpText<"Use together with -emit-llvm to get pristine LLVM IR from the "
200            "frontend by not running any LLVM passes at all">;
201 def disable_llvm_optzns : Flag<["-"], "disable-llvm-optzns">,
202   Alias<disable_llvm_passes>;
203 def disable_lifetimemarkers : Flag<["-"], "disable-lifetime-markers">,
204   HelpText<"Disable lifetime-markers emission even when optimizations are "
205            "enabled">;
206 def disable_O0_optnone : Flag<["-"], "disable-O0-optnone">,
207   HelpText<"Disable adding the optnone attribute to functions at O0">;
208 def disable_red_zone : Flag<["-"], "disable-red-zone">,
209   HelpText<"Do not emit code that uses the red zone.">;
210 def dwarf_column_info : Flag<["-"], "dwarf-column-info">,
211   HelpText<"Turn on column location information.">;
212 def split_dwarf : Flag<["-"], "split-dwarf">,
213   HelpText<"Split out the dwarf .dwo sections">;
214 def dwarf_ext_refs : Flag<["-"], "dwarf-ext-refs">,
215   HelpText<"Generate debug info with external references to clang modules"
216            " or precompiled headers">;
217 def dwarf_explicit_import : Flag<["-"], "dwarf-explicit-import">,
218   HelpText<"Generate explicit import from anonymous namespace to containing"
219            " scope">;
220 def debug_forward_template_params : Flag<["-"], "debug-forward-template-params">,
221   HelpText<"Emit complete descriptions of template parameters in forward"
222            " declarations">;
223 def fforbid_guard_variables : Flag<["-"], "fforbid-guard-variables">,
224   HelpText<"Emit an error if a C++ static local initializer would need a guard variable">;
225 def no_implicit_float : Flag<["-"], "no-implicit-float">,
226   HelpText<"Don't generate implicit floating point instructions">;
227 def fdump_vtable_layouts : Flag<["-"], "fdump-vtable-layouts">,
228   HelpText<"Dump the layouts of all vtables that will be emitted in a translation unit">;
229 def fmerge_functions : Flag<["-"], "fmerge-functions">,
230   HelpText<"Permit merging of identical functions when optimizing.">;
231 def femit_coverage_notes : Flag<["-"], "femit-coverage-notes">,
232   HelpText<"Emit a gcov coverage notes file when compiling.">;
233 def femit_coverage_data: Flag<["-"], "femit-coverage-data">,
234   HelpText<"Instrument the program to emit gcov coverage data when run.">;
235 def coverage_data_file : Separate<["-"], "coverage-data-file">,
236   HelpText<"Emit coverage data to this filename.">;
237 def coverage_data_file_EQ : Joined<["-"], "coverage-data-file=">,
238   Alias<coverage_data_file>;
239 def coverage_notes_file : Separate<["-"], "coverage-notes-file">,
240   HelpText<"Emit coverage notes to this filename.">;
241 def coverage_notes_file_EQ : Joined<["-"], "coverage-notes-file=">,
242   Alias<coverage_notes_file>;
243 def coverage_cfg_checksum : Flag<["-"], "coverage-cfg-checksum">,
244   HelpText<"Emit CFG checksum for functions in .gcno files.">;
245 def coverage_no_function_names_in_data : Flag<["-"], "coverage-no-function-names-in-data">,
246   HelpText<"Emit function names in .gcda files.">;
247 def coverage_exit_block_before_body : Flag<["-"], "coverage-exit-block-before-body">,
248   HelpText<"Emit the exit block before the body blocks in .gcno files.">;
249 def coverage_version_EQ : Joined<["-"], "coverage-version=">,
250   HelpText<"Four-byte version string for gcov files.">;
251 def test_coverage : Flag<["-"], "test-coverage">,
252   HelpText<"Do not generate coverage files or remove coverage changes from IR">;
253 def dump_coverage_mapping : Flag<["-"], "dump-coverage-mapping">,
254   HelpText<"Dump the coverage mapping records, for testing">;
255 def fuse_register_sized_bitfield_access: Flag<["-"], "fuse-register-sized-bitfield-access">,
256   HelpText<"Use register sized accesses to bit-fields, when possible.">;
257 def relaxed_aliasing : Flag<["-"], "relaxed-aliasing">,
258   HelpText<"Turn off Type Based Alias Analysis">;
259 def no_struct_path_tbaa : Flag<["-"], "no-struct-path-tbaa">,
260   HelpText<"Turn off struct-path aware Type Based Alias Analysis">;
261 def new_struct_path_tbaa : Flag<["-"], "new-struct-path-tbaa">,
262   HelpText<"Enable enhanced struct-path aware Type Based Alias Analysis">;
263 def masm_verbose : Flag<["-"], "masm-verbose">,
264   HelpText<"Generate verbose assembly output">;
265 def mcode_model : Separate<["-"], "mcode-model">,
266   HelpText<"The code model to use">, Values<"tiny,small,kernel,medium,large">;
267 def mdebug_pass : Separate<["-"], "mdebug-pass">,
268   HelpText<"Enable additional debug output">;
269 def mdisable_fp_elim : Flag<["-"], "mdisable-fp-elim">,
270   HelpText<"Disable frame pointer elimination optimization">;
271 def mdisable_tail_calls : Flag<["-"], "mdisable-tail-calls">,
272   HelpText<"Disable tail call optimization, keeping the call stack accurate">;
273 def menable_no_infinities : Flag<["-"], "menable-no-infs">,
274   HelpText<"Allow optimization to assume there are no infinities.">;
275 def menable_no_nans : Flag<["-"], "menable-no-nans">,
276   HelpText<"Allow optimization to assume there are no NaNs.">;
277 def menable_unsafe_fp_math : Flag<["-"], "menable-unsafe-fp-math">,
278   HelpText<"Allow unsafe floating-point math optimizations which may decrease "
279            "precision">;
280 def mreassociate : Flag<["-"], "mreassociate">,
281   HelpText<"Allow reassociation transformations for floating-point instructions">;
282 def mfloat_abi : Separate<["-"], "mfloat-abi">,
283   HelpText<"The float ABI to use">;
284 def mtp : Separate<["-"], "mtp">,
285   HelpText<"Mode for reading thread pointer">;
286 def mlimit_float_precision : Separate<["-"], "mlimit-float-precision">,
287   HelpText<"Limit float precision to the given value">;
288 def split_stacks : Flag<["-"], "split-stacks">,
289   HelpText<"Try to use a split stack if possible.">;
290 def mno_zero_initialized_in_bss : Flag<["-"], "mno-zero-initialized-in-bss">,
291   HelpText<"Do not put zero initialized data in the BSS">;
292 def mregparm : Separate<["-"], "mregparm">,
293   HelpText<"Limit the number of registers available for integer arguments">;
294 def munwind_tables : Flag<["-"], "munwind-tables">,
295   HelpText<"Generate unwinding tables for all functions">;
296 def mconstructor_aliases : Flag<["-"], "mconstructor-aliases">,
297   HelpText<"Emit complete constructors and destructors as aliases when possible">;
298 def mlink_bitcode_file : Separate<["-"], "mlink-bitcode-file">,
299   HelpText<"Link the given bitcode file before performing optimizations.">;
300 def mlink_builtin_bitcode : Separate<["-"], "mlink-builtin-bitcode">,
301   HelpText<"Link and internalize needed symbols from the given bitcode file "
302            "before performing optimizations.">;
303 def mlink_cuda_bitcode : Separate<["-"], "mlink-cuda-bitcode">,
304   Alias<mlink_builtin_bitcode>;
305 def vectorize_loops : Flag<["-"], "vectorize-loops">,
306   HelpText<"Run the Loop vectorization passes">;
307 def vectorize_slp : Flag<["-"], "vectorize-slp">,
308   HelpText<"Run the SLP vectorization passes">;
309 def dependent_lib : Joined<["--"], "dependent-lib=">,
310   HelpText<"Add dependent library">;
311 def linker_option : Joined<["--"], "linker-option=">,
312   HelpText<"Add linker option">;
313 def fsanitize_coverage_type : Joined<["-"], "fsanitize-coverage-type=">,
314                               HelpText<"Sanitizer coverage type">;
315 def fsanitize_coverage_indirect_calls
316     : Flag<["-"], "fsanitize-coverage-indirect-calls">,
317       HelpText<"Enable sanitizer coverage for indirect calls">;
318 def fsanitize_coverage_trace_bb
319     : Flag<["-"], "fsanitize-coverage-trace-bb">,
320       HelpText<"Enable basic block tracing in sanitizer coverage">;
321 def fsanitize_coverage_trace_cmp
322     : Flag<["-"], "fsanitize-coverage-trace-cmp">,
323       HelpText<"Enable cmp instruction tracing in sanitizer coverage">;
324 def fsanitize_coverage_trace_div
325     : Flag<["-"], "fsanitize-coverage-trace-div">,
326       HelpText<"Enable div instruction tracing in sanitizer coverage">;
327 def fsanitize_coverage_trace_gep
328     : Flag<["-"], "fsanitize-coverage-trace-gep">,
329       HelpText<"Enable gep instruction tracing in sanitizer coverage">;
330 def fsanitize_coverage_8bit_counters
331     : Flag<["-"], "fsanitize-coverage-8bit-counters">,
332       HelpText<"Enable frequency counters in sanitizer coverage">;
333 def fsanitize_coverage_inline_8bit_counters
334     : Flag<["-"], "fsanitize-coverage-inline-8bit-counters">,
335       HelpText<"Enable inline 8-bit counters in sanitizer coverage">;
336 def fsanitize_coverage_pc_table
337     : Flag<["-"], "fsanitize-coverage-pc-table">,
338       HelpText<"Create a table of coverage-instrumented PCs">;
339 def fsanitize_coverage_trace_pc
340     : Flag<["-"], "fsanitize-coverage-trace-pc">,
341       HelpText<"Enable PC tracing in sanitizer coverage">;
342 def fsanitize_coverage_trace_pc_guard
343     : Flag<["-"], "fsanitize-coverage-trace-pc-guard">,
344       HelpText<"Enable PC tracing with guard in sanitizer coverage">;
345 def fsanitize_coverage_no_prune
346     : Flag<["-"], "fsanitize-coverage-no-prune">,
347       HelpText<"Disable coverage pruning (i.e. instrument all blocks/edges)">;
348 def fsanitize_coverage_stack_depth
349     : Flag<["-"], "fsanitize-coverage-stack-depth">,
350       HelpText<"Enable max stack depth tracing">;
351 def fprofile_instrument_EQ : Joined<["-"], "fprofile-instrument=">,
352     HelpText<"Enable PGO instrumentation. The accepted value is clang, llvm, "
353              "or none">, Values<"none,clang,llvm">;
354 def fprofile_instrument_path_EQ : Joined<["-"], "fprofile-instrument-path=">,
355     HelpText<"Generate instrumented code to collect execution counts into "
356              "<file> (overridden by LLVM_PROFILE_FILE env var)">;
357 def fprofile_instrument_use_path_EQ :
358     Joined<["-"], "fprofile-instrument-use-path=">,
359     HelpText<"Specify the profile path in PGO use compilation">;
360 def flto_visibility_public_std:
361     Flag<["-"], "flto-visibility-public-std">,
362     HelpText<"Use public LTO visibility for classes in std and stdext namespaces">;
363 def flto_unit: Flag<["-"], "flto-unit">,
364     HelpText<"Emit IR to support LTO unit features (CFI, whole program vtable opt)">;
365 def fno_lto_unit: Flag<["-"], "fno-lto-unit">;
366 def fthin_link_bitcode_EQ : Joined<["-"], "fthin-link-bitcode=">,
367     HelpText<"Write minimized bitcode to <file> for the ThinLTO thin link only">;
368 def fdebug_pass_manager : Flag<["-"], "fdebug-pass-manager">,
369     HelpText<"Prints debug information for the new pass manager">;
370 def fno_debug_pass_manager : Flag<["-"], "fno-debug-pass-manager">,
371     HelpText<"Disables debug printing for the new pass manager">;
372 // The driver option takes the key as a parameter to the -msign-return-address=
373 // and -mbranch-protection= options, but CC1 has a separate option so we
374 // don't have to parse the parameter twice.
375 def msign_return_address_key_EQ : Joined<["-"], "msign-return-address-key=">,
376     Values<"a_key,b_key">;
377 def mbranch_target_enforce : Flag<["-"], "mbranch-target-enforce">;
378 def fno_dllexport_inlines : Flag<["-"], "fno-dllexport-inlines">;
379
380 //===----------------------------------------------------------------------===//
381 // Dependency Output Options
382 //===----------------------------------------------------------------------===//
383
384 def sys_header_deps : Flag<["-"], "sys-header-deps">,
385   HelpText<"Include system headers in dependency output">;
386 def module_file_deps : Flag<["-"], "module-file-deps">,
387   HelpText<"Include module files in dependency output">;
388 def header_include_file : Separate<["-"], "header-include-file">,
389   HelpText<"Filename (or -) to write header include output to">;
390 def show_includes : Flag<["--"], "show-includes">,
391   HelpText<"Print cl.exe style /showIncludes to stdout">;
392
393 //===----------------------------------------------------------------------===//
394 // Diagnostic Options
395 //===----------------------------------------------------------------------===//
396
397 def diagnostic_log_file : Separate<["-"], "diagnostic-log-file">,
398   HelpText<"Filename (or -) to log diagnostics to">;
399 def diagnostic_serialized_file : Separate<["-"], "serialize-diagnostic-file">,
400   MetaVarName<"<filename>">,
401   HelpText<"File for serializing diagnostics in a binary format">;
402
403 def fdiagnostics_format : Separate<["-"], "fdiagnostics-format">,
404   HelpText<"Change diagnostic formatting to match IDE and command line tools">, Values<"clang,msvc,msvc-fallback,vi">;
405 def fdiagnostics_show_category : Separate<["-"], "fdiagnostics-show-category">,
406   HelpText<"Print diagnostic category">, Values<"none,id,name">;
407 def fno_diagnostics_use_presumed_location : Flag<["-"], "fno-diagnostics-use-presumed-location">,
408   HelpText<"Ignore #line directives when displaying diagnostic locations">;
409 def ftabstop : Separate<["-"], "ftabstop">, MetaVarName<"<N>">,
410   HelpText<"Set the tab stop distance.">;
411 def ferror_limit : Separate<["-"], "ferror-limit">, MetaVarName<"<N>">,
412   HelpText<"Set the maximum number of errors to emit before stopping (0 = no limit).">;
413 def fmacro_backtrace_limit : Separate<["-"], "fmacro-backtrace-limit">, MetaVarName<"<N>">,
414   HelpText<"Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit).">;
415 def ftemplate_backtrace_limit : Separate<["-"], "ftemplate-backtrace-limit">, MetaVarName<"<N>">,
416   HelpText<"Set the maximum number of entries to print in a template instantiation backtrace (0 = no limit).">;
417 def fconstexpr_backtrace_limit : Separate<["-"], "fconstexpr-backtrace-limit">, MetaVarName<"<N>">,
418   HelpText<"Set the maximum number of entries to print in a constexpr evaluation backtrace (0 = no limit).">;
419 def fspell_checking_limit : Separate<["-"], "fspell-checking-limit">, MetaVarName<"<N>">,
420   HelpText<"Set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit).">;
421 def fcaret_diagnostics_max_lines :
422   Separate<["-"], "fcaret-diagnostics-max-lines">, MetaVarName<"<N>">,
423   HelpText<"Set the maximum number of source lines to show in a caret diagnostic">;
424 def fmessage_length : Separate<["-"], "fmessage-length">, MetaVarName<"<N>">,
425   HelpText<"Format message diagnostics so that they fit within N columns or fewer, when possible.">;
426 def verify_EQ : CommaJoined<["-"], "verify=">,
427   MetaVarName<"<prefixes>">,
428   HelpText<"Verify diagnostic output using comment directives that start with"
429            " prefixes in the comma-separated sequence <prefixes>">;
430 def verify : Flag<["-"], "verify">,
431   HelpText<"Equivalent to -verify=expected">;
432 def verify_ignore_unexpected : Flag<["-"], "verify-ignore-unexpected">,
433   HelpText<"Ignore unexpected diagnostic messages">;
434 def verify_ignore_unexpected_EQ : CommaJoined<["-"], "verify-ignore-unexpected=">,
435   HelpText<"Ignore unexpected diagnostic messages">;
436 def Wno_rewrite_macros : Flag<["-"], "Wno-rewrite-macros">,
437   HelpText<"Silence ObjC rewriting warnings">;
438
439 //===----------------------------------------------------------------------===//
440 // Frontend Options
441 //===----------------------------------------------------------------------===//
442
443 // This isn't normally used, it is just here so we can parse a
444 // CompilerInvocation out of a driver-derived argument vector.
445 def cc1 : Flag<["-"], "cc1">;
446 def cc1as : Flag<["-"], "cc1as">;
447
448 def ast_merge : Separate<["-"], "ast-merge">,
449   MetaVarName<"<ast file>">,
450   HelpText<"Merge the given AST file into the translation unit being compiled.">;
451 def aux_triple : Separate<["-"], "aux-triple">,
452   HelpText<"Auxiliary target triple.">;
453 def code_completion_at : Separate<["-"], "code-completion-at">,
454   MetaVarName<"<file>:<line>:<column>">,
455   HelpText<"Dump code-completion information at a location">;
456 def remap_file : Separate<["-"], "remap-file">,
457   MetaVarName<"<from>;<to>">,
458   HelpText<"Replace the contents of the <from> file with the contents of the <to> file">;
459 def code_completion_at_EQ : Joined<["-"], "code-completion-at=">,
460   Alias<code_completion_at>;
461 def code_completion_macros : Flag<["-"], "code-completion-macros">,
462   HelpText<"Include macros in code-completion results">;
463 def code_completion_patterns : Flag<["-"], "code-completion-patterns">,
464   HelpText<"Include code patterns in code-completion results">;
465 def no_code_completion_globals : Flag<["-"], "no-code-completion-globals">,
466   HelpText<"Do not include global declarations in code-completion results.">;
467 def no_code_completion_ns_level_decls : Flag<["-"], "no-code-completion-ns-level-decls">,
468   HelpText<"Do not include declarations inside namespaces (incl. global namespace) in the code-completion results.">;
469 def code_completion_brief_comments : Flag<["-"], "code-completion-brief-comments">,
470   HelpText<"Include brief documentation comments in code-completion results.">;
471 def code_completion_with_fixits : Flag<["-"], "code-completion-with-fixits">,
472   HelpText<"Include code completion results which require small fix-its.">;
473 def disable_free : Flag<["-"], "disable-free">,
474   HelpText<"Disable freeing of memory on exit">;
475 def discard_value_names : Flag<["-"], "discard-value-names">,
476   HelpText<"Discard value names in LLVM IR">;
477 def load : Separate<["-"], "load">, MetaVarName<"<dsopath>">,
478   HelpText<"Load the named plugin (dynamic shared object)">;
479 def plugin : Separate<["-"], "plugin">, MetaVarName<"<name>">,
480   HelpText<"Use the named plugin action instead of the default action (use \"help\" to list available options)">;
481 def plugin_arg : JoinedAndSeparate<["-"], "plugin-arg-">,
482     MetaVarName<"<name> <arg>">,
483     HelpText<"Pass <arg> to plugin <name>">;
484 def add_plugin : Separate<["-"], "add-plugin">, MetaVarName<"<name>">,
485   HelpText<"Use the named plugin action in addition to the default action">;
486 def ast_dump_filter : Separate<["-"], "ast-dump-filter">,
487   MetaVarName<"<dump_filter>">,
488   HelpText<"Use with -ast-dump or -ast-print to dump/print only AST declaration"
489            " nodes having a certain substring in a qualified name. Use"
490            " -ast-list to list all filterable declaration node names.">;
491 def fno_modules_global_index : Flag<["-"], "fno-modules-global-index">,
492   HelpText<"Do not automatically generate or update the global module index">;
493 def fno_modules_error_recovery : Flag<["-"], "fno-modules-error-recovery">,
494   HelpText<"Do not automatically import modules for error recovery">;
495 def fmodule_map_file_home_is_cwd : Flag<["-"], "fmodule-map-file-home-is-cwd">,
496   HelpText<"Use the current working directory as the home directory of "
497            "module maps specified by -fmodule-map-file=<FILE>">;
498 def fmodule_feature : Separate<["-"], "fmodule-feature">,
499   MetaVarName<"<feature>">,
500   HelpText<"Enable <feature> in module map requires declarations">;
501 def fmodules_embed_file_EQ : Joined<["-"], "fmodules-embed-file=">,
502   MetaVarName<"<file>">,
503   HelpText<"Embed the contents of the specified file into the module file "
504            "being compiled.">;
505 def fmodules_embed_all_files : Joined<["-"], "fmodules-embed-all-files">,
506   HelpText<"Embed the contents of all files read by this compilation into "
507            "the produced module file.">;
508 def fmodules_local_submodule_visibility :
509   Flag<["-"], "fmodules-local-submodule-visibility">,
510   HelpText<"Enforce name visibility rules across submodules of the same "
511            "top-level module.">;
512 def fmodules_codegen :
513   Flag<["-"], "fmodules-codegen">,
514   HelpText<"Generate code for uses of this module that assumes an explicit "
515            "object file will be built for the module">;
516 def fmodules_debuginfo :
517   Flag<["-"], "fmodules-debuginfo">,
518   HelpText<"Generate debug info for types in an object file built from this "
519            "module and do not generate them elsewhere">;
520 def fmodule_format_EQ : Joined<["-"], "fmodule-format=">,
521   HelpText<"Select the container format for clang modules and PCH. "
522            "Supported options are 'raw' and 'obj'.">;
523 def ftest_module_file_extension_EQ :
524   Joined<["-"], "ftest-module-file-extension=">,
525   HelpText<"introduce a module file extension for testing purposes. "
526            "The argument is parsed as blockname:major:minor:hashed:user info">;
527 def fconcepts_ts : Flag<["-"], "fconcepts-ts">,
528   HelpText<"Enable C++ Extensions for Concepts.">;
529
530 let Group = Action_Group in {
531
532 def Eonly : Flag<["-"], "Eonly">,
533   HelpText<"Just run preprocessor, no output (for timings)">;
534 def dump_raw_tokens : Flag<["-"], "dump-raw-tokens">,
535   HelpText<"Lex file in raw mode and dump raw tokens">;
536 def analyze : Flag<["-"], "analyze">,
537   HelpText<"Run static analysis engine">;
538 def dump_tokens : Flag<["-"], "dump-tokens">,
539   HelpText<"Run preprocessor, dump internal rep of tokens">;
540 def init_only : Flag<["-"], "init-only">,
541   HelpText<"Only execute frontend initialization">;
542 def fixit : Flag<["-"], "fixit">,
543   HelpText<"Apply fix-it advice to the input source">;
544 def fixit_EQ : Joined<["-"], "fixit=">,
545   HelpText<"Apply fix-it advice creating a file with the given suffix">;
546 def print_preamble : Flag<["-"], "print-preamble">,
547   HelpText<"Print the \"preamble\" of a file, which is a candidate for implicit"
548            " precompiled headers.">;
549 def emit_html : Flag<["-"], "emit-html">,
550   HelpText<"Output input source as HTML">;
551 def ast_print : Flag<["-"], "ast-print">,
552   HelpText<"Build ASTs and then pretty-print them">;
553 def ast_list : Flag<["-"], "ast-list">,
554   HelpText<"Build ASTs and print the list of declaration node qualified names">;
555 def ast_dump : Flag<["-"], "ast-dump">,
556   HelpText<"Build ASTs and then debug dump them">;
557 def ast_dump_all : Flag<["-"], "ast-dump-all">,
558   HelpText<"Build ASTs and then debug dump them, forcing deserialization">;
559 def templight_dump : Flag<["-"], "templight-dump">,
560   HelpText<"Dump templight information to stdout">;
561 def ast_dump_lookups : Flag<["-"], "ast-dump-lookups">,
562   HelpText<"Build ASTs and then debug dump their name lookup tables">;
563 def ast_view : Flag<["-"], "ast-view">,
564   HelpText<"Build ASTs and view them with GraphViz">;
565 def emit_module : Flag<["-"], "emit-module">,
566   HelpText<"Generate pre-compiled module file from a module map">;
567 def emit_module_interface : Flag<["-"], "emit-module-interface">,
568   HelpText<"Generate pre-compiled module file from a C++ module interface">;
569 def emit_header_module : Flag<["-"], "emit-header-module">,
570   HelpText<"Generate pre-compiled module file from a set of header files">;
571 def emit_pch : Flag<["-"], "emit-pch">,
572   HelpText<"Generate pre-compiled header file">;
573 def emit_llvm_bc : Flag<["-"], "emit-llvm-bc">,
574   HelpText<"Build ASTs then convert to LLVM, emit .bc file">;
575 def emit_llvm_only : Flag<["-"], "emit-llvm-only">,
576   HelpText<"Build ASTs and convert to LLVM, discarding output">;
577 def emit_codegen_only : Flag<["-"], "emit-codegen-only">,
578   HelpText<"Generate machine code, but discard output">;
579 def emit_obj : Flag<["-"], "emit-obj">,
580   HelpText<"Emit native object files">;
581 def rewrite_test : Flag<["-"], "rewrite-test">,
582   HelpText<"Rewriter playground">;
583 def rewrite_macros : Flag<["-"], "rewrite-macros">,
584   HelpText<"Expand macros without full preprocessing">;
585 def migrate : Flag<["-"], "migrate">,
586   HelpText<"Migrate source code">;
587 def compiler_options_dump : Flag<["-"], "compiler-options-dump">,
588   HelpText<"Dump the compiler configuration options">;
589 }
590
591 def emit_llvm_uselists : Flag<["-"], "emit-llvm-uselists">,
592   HelpText<"Preserve order of LLVM use-lists when serializing">;
593 def no_emit_llvm_uselists : Flag<["-"], "no-emit-llvm-uselists">,
594   HelpText<"Don't preserve order of LLVM use-lists when serializing">;
595
596 def mt_migrate_directory : Separate<["-"], "mt-migrate-directory">,
597   HelpText<"Directory for temporary files produced during ARC or ObjC migration">;
598 def arcmt_check : Flag<["-"], "arcmt-check">,
599   HelpText<"Check for ARC migration issues that need manual handling">;
600 def arcmt_modify : Flag<["-"], "arcmt-modify">,
601   HelpText<"Apply modifications to files to conform to ARC">;
602 def arcmt_migrate : Flag<["-"], "arcmt-migrate">,
603   HelpText<"Apply modifications and produces temporary files that conform to ARC">;
604
605 def opt_record_file : Separate<["-"], "opt-record-file">,
606   HelpText<"File name to use for YAML optimization record output">;
607
608 def print_stats : Flag<["-"], "print-stats">,
609   HelpText<"Print performance metrics and statistics">;
610 def stats_file : Joined<["-"], "stats-file=">,
611   HelpText<"Filename to write statistics to">;
612 def fdump_record_layouts : Flag<["-"], "fdump-record-layouts">,
613   HelpText<"Dump record layout information">;
614 def fdump_record_layouts_simple : Flag<["-"], "fdump-record-layouts-simple">,
615   HelpText<"Dump record layout information in a simple form used for testing">;
616 def fix_what_you_can : Flag<["-"], "fix-what-you-can">,
617   HelpText<"Apply fix-it advice even in the presence of unfixable errors">;
618 def fix_only_warnings : Flag<["-"], "fix-only-warnings">,
619   HelpText<"Apply fix-it advice only for warnings, not errors">;
620 def fixit_recompile : Flag<["-"], "fixit-recompile">,
621   HelpText<"Apply fix-it changes and recompile">;
622 def fixit_to_temp : Flag<["-"], "fixit-to-temporary">,
623   HelpText<"Apply fix-it changes to temporary files">;
624
625 def foverride_record_layout_EQ : Joined<["-"], "foverride-record-layout=">,
626   HelpText<"Override record layouts with those in the given file">;
627 def pch_through_header_EQ : Joined<["-"], "pch-through-header=">,
628   HelpText<"Stop PCH generation after including this file.  When using a PCH, "
629            "skip tokens until after this file is included.">;
630 def pch_through_hdrstop_create : Flag<["-"], "pch-through-hdrstop-create">,
631   HelpText<"When creating a PCH, stop PCH generation after #pragma hdrstop.">;
632 def pch_through_hdrstop_use : Flag<["-"], "pch-through-hdrstop-use">,
633   HelpText<"When using a PCH, skip tokens until after a #pragma hdrstop.">;
634 def fno_pch_timestamp : Flag<["-"], "fno-pch-timestamp">,
635   HelpText<"Disable inclusion of timestamp in precompiled headers">;
636 def building_pch_with_obj : Flag<["-"], "building-pch-with-obj">,
637   HelpText<"This compilation is part of building a PCH with corresponding object file.">;
638
639 def aligned_alloc_unavailable : Flag<["-"], "faligned-alloc-unavailable">,
640   HelpText<"Aligned allocation/deallocation functions are unavailable">;
641
642 //===----------------------------------------------------------------------===//
643 // Language Options
644 //===----------------------------------------------------------------------===//
645
646 let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
647
648 def version : Flag<["-"], "version">,
649   HelpText<"Print the compiler version">;
650 def main_file_name : Separate<["-"], "main-file-name">,
651   HelpText<"Main file name to use for debug info">;
652 def split_dwarf_file : Separate<["-"], "split-dwarf-file">,
653   HelpText<"File name to use for split dwarf debug info output">;
654
655 }
656
657 def fblocks_runtime_optional : Flag<["-"], "fblocks-runtime-optional">,
658   HelpText<"Weakly link in the blocks runtime">;
659 def fexternc_nounwind : Flag<["-"], "fexternc-nounwind">,
660   HelpText<"Assume all functions with C linkage do not unwind">;
661 def enable_split_dwarf : Flag<["-"], "enable-split-dwarf">,
662   HelpText<"Use DWARF fission in 'split' mode">;
663 def enable_split_dwarf_EQ : Joined<["-"], "enable-split-dwarf=">,
664   HelpText<"Set DWARF fission mode to either 'split' or 'single'">, Values<"split,single">;
665 def fno_wchar : Flag<["-"], "fno-wchar">,
666   HelpText<"Disable C++ builtin type wchar_t">;
667 def fconstant_string_class : Separate<["-"], "fconstant-string-class">,
668   MetaVarName<"<class name>">,
669   HelpText<"Specify the class to use for constant Objective-C string objects.">;
670 def fobjc_arc_cxxlib_EQ : Joined<["-"], "fobjc-arc-cxxlib=">,
671   HelpText<"Objective-C++ Automatic Reference Counting standard library kind">, Values<"libc++,libstdc++,none">;
672 def fobjc_runtime_has_weak : Flag<["-"], "fobjc-runtime-has-weak">,
673   HelpText<"The target Objective-C runtime supports ARC weak operations">;
674 def fobjc_dispatch_method_EQ : Joined<["-"], "fobjc-dispatch-method=">,
675   HelpText<"Objective-C dispatch method to use">, Values<"legacy,non-legacy,mixed">;
676 def disable_objc_default_synthesize_properties : Flag<["-"], "disable-objc-default-synthesize-properties">,
677   HelpText<"disable the default synthesis of Objective-C properties">;
678 def fencode_extended_block_signature : Flag<["-"], "fencode-extended-block-signature">,
679   HelpText<"enable extended encoding of block type signature">;
680 def function_alignment : Separate<["-"], "function-alignment">,
681     HelpText<"default alignment for functions">;
682 def pic_level : Separate<["-"], "pic-level">,
683   HelpText<"Value for __PIC__">;
684 def pic_is_pie : Flag<["-"], "pic-is-pie">,
685   HelpText<"File is for a position independent executable">;
686 def fno_validate_pch : Flag<["-"], "fno-validate-pch">,
687   HelpText<"Disable validation of precompiled headers">;
688 def fallow_pch_with_errors : Flag<["-"], "fallow-pch-with-compiler-errors">,
689   HelpText<"Accept a PCH file that was created with compiler errors">;
690 def dump_deserialized_pch_decls : Flag<["-"], "dump-deserialized-decls">,
691   HelpText<"Dump declarations that are deserialized from PCH, for testing">;
692 def error_on_deserialized_pch_decl : Separate<["-"], "error-on-deserialized-decl">,
693   HelpText<"Emit error if a specific declaration is deserialized from PCH, for testing">;
694 def error_on_deserialized_pch_decl_EQ : Joined<["-"], "error-on-deserialized-decl=">,
695   Alias<error_on_deserialized_pch_decl>;
696 def static_define : Flag<["-"], "static-define">,
697   HelpText<"Should __STATIC__ be defined">;
698 def stack_protector : Separate<["-"], "stack-protector">,
699   HelpText<"Enable stack protectors">;
700 def stack_protector_buffer_size : Separate<["-"], "stack-protector-buffer-size">,
701   HelpText<"Lower bound for a buffer to be considered for stack protection">;
702 def fvisibility : Separate<["-"], "fvisibility">,
703   HelpText<"Default type and symbol visibility">;
704 def ftype_visibility : Separate<["-"], "ftype-visibility">,
705   HelpText<"Default type visibility">;
706 def ftemplate_depth : Separate<["-"], "ftemplate-depth">,
707   HelpText<"Maximum depth of recursive template instantiation">;
708 def foperator_arrow_depth : Separate<["-"], "foperator-arrow-depth">,
709   HelpText<"Maximum number of 'operator->'s to call for a member access">;
710 def fconstexpr_depth : Separate<["-"], "fconstexpr-depth">,
711   HelpText<"Maximum depth of recursive constexpr function calls">;
712 def fconstexpr_steps : Separate<["-"], "fconstexpr-steps">,
713   HelpText<"Maximum number of steps in constexpr function evaluation">;
714 def fbracket_depth : Separate<["-"], "fbracket-depth">,
715   HelpText<"Maximum nesting level for parentheses, brackets, and braces">;
716 def fconst_strings : Flag<["-"], "fconst-strings">,
717   HelpText<"Use a const qualified type for string literals in C and ObjC">;
718 def fno_const_strings : Flag<["-"], "fno-const-strings">,
719   HelpText<"Don't use a const qualified type for string literals in C and ObjC">;
720 def fno_bitfield_type_align : Flag<["-"], "fno-bitfield-type-align">,
721   HelpText<"Ignore bit-field types when aligning structures">;
722 def ffake_address_space_map : Flag<["-"], "ffake-address-space-map">,
723   HelpText<"Use a fake address space map; OpenCL testing purposes only">;
724 def faddress_space_map_mangling_EQ : Joined<["-"], "faddress-space-map-mangling=">, MetaVarName<"<yes|no|target>">,
725   HelpText<"Set the mode for address space map based mangling; OpenCL testing purposes only">;
726 def funknown_anytype : Flag<["-"], "funknown-anytype">,
727   HelpText<"Enable parser support for the __unknown_anytype type; for testing purposes only">;
728 def fdebugger_support : Flag<["-"], "fdebugger-support">,
729   HelpText<"Enable special debugger support behavior">;
730 def fdebugger_cast_result_to_id : Flag<["-"], "fdebugger-cast-result-to-id">,
731   HelpText<"Enable casting unknown expression results to id">;
732 def fdebugger_objc_literal : Flag<["-"], "fdebugger-objc-literal">,
733   HelpText<"Enable special debugger support for Objective-C subscripting and literals">;
734 def fdeprecated_macro : Flag<["-"], "fdeprecated-macro">,
735   HelpText<"Defines the __DEPRECATED macro">;
736 def fno_deprecated_macro : Flag<["-"], "fno-deprecated-macro">,
737   HelpText<"Undefines the __DEPRECATED macro">;
738 def fobjc_subscripting_legacy_runtime : Flag<["-"], "fobjc-subscripting-legacy-runtime">,
739   HelpText<"Allow Objective-C array and dictionary subscripting in legacy runtime">;
740 def vtordisp_mode_EQ : Joined<["-"], "vtordisp-mode=">,
741   HelpText<"Control vtordisp placement on win32 targets">;
742 def fnative_half_type: Flag<["-"], "fnative-half-type">,
743   HelpText<"Use the native half type for __fp16 instead of promoting to float">;
744 def fnative_half_arguments_and_returns : Flag<["-"], "fnative-half-arguments-and-returns">,
745   HelpText<"Use the native __fp16 type for arguments and returns (and skip ABI-specific lowering)">;
746 def fallow_half_arguments_and_returns : Flag<["-"], "fallow-half-arguments-and-returns">,
747   HelpText<"Allow function arguments and returns of type half">;
748 def fdefault_calling_conv_EQ : Joined<["-"], "fdefault-calling-conv=">,
749   HelpText<"Set default calling convention">, Values<"cdecl,fastcall,stdcall,vectorcall,regcall">;
750 def finclude_default_header : Flag<["-"], "finclude-default-header">,
751   HelpText<"Include the default header file for OpenCL">;
752 def fpreserve_vec3_type : Flag<["-"], "fpreserve-vec3-type">,
753   HelpText<"Preserve 3-component vector type">;
754 def fwchar_type_EQ : Joined<["-"], "fwchar-type=">,
755   HelpText<"Select underlying type for wchar_t">, Values<"char,short,int">;
756 def fsigned_wchar : Flag<["-"], "fsigned-wchar">,
757   HelpText<"Use a signed type for wchar_t">;
758 def fno_signed_wchar : Flag<["-"], "fno-signed-wchar">,
759   HelpText<"Use an unsigned type for wchar_t">;
760
761 // FIXME: Remove these entirely once functionality/tests have been excised.
762 def fobjc_gc_only : Flag<["-"], "fobjc-gc-only">, Group<f_Group>,
763   HelpText<"Use GC exclusively for Objective-C related memory management">;
764 def fobjc_gc : Flag<["-"], "fobjc-gc">, Group<f_Group>,
765   HelpText<"Enable Objective-C garbage collection">;
766
767 //===----------------------------------------------------------------------===//
768 // Header Search Options
769 //===----------------------------------------------------------------------===//
770
771 def nostdsysteminc : Flag<["-"], "nostdsysteminc">,
772   HelpText<"Disable standard system #include directories">;
773 def fdisable_module_hash : Flag<["-"], "fdisable-module-hash">,
774   HelpText<"Disable the module hash">;
775 def fmodules_hash_content : Flag<["-"], "fmodules-hash-content">,
776   HelpText<"Enable hashing the content of a module file">;
777 def c_isystem : JoinedOrSeparate<["-"], "c-isystem">, MetaVarName<"<directory>">,
778   HelpText<"Add directory to the C SYSTEM include search path">;
779 def objc_isystem : JoinedOrSeparate<["-"], "objc-isystem">,
780   MetaVarName<"<directory>">,
781   HelpText<"Add directory to the ObjC SYSTEM include search path">;
782 def objcxx_isystem : JoinedOrSeparate<["-"], "objcxx-isystem">,
783   MetaVarName<"<directory>">,
784   HelpText<"Add directory to the ObjC++ SYSTEM include search path">;
785 def internal_isystem : JoinedOrSeparate<["-"], "internal-isystem">,
786   MetaVarName<"<directory>">,
787   HelpText<"Add directory to the internal system include search path; these "
788            "are assumed to not be user-provided and are used to model system "
789            "and standard headers' paths.">;
790 def internal_externc_isystem : JoinedOrSeparate<["-"], "internal-externc-isystem">,
791   MetaVarName<"<directory>">,
792   HelpText<"Add directory to the internal system include search path with "
793            "implicit extern \"C\" semantics; these are assumed to not be "
794            "user-provided and are used to model system and standard headers' "
795            "paths.">;
796
797 //===----------------------------------------------------------------------===//
798 // Preprocessor Options
799 //===----------------------------------------------------------------------===//
800
801 def chain_include : Separate<["-"], "chain-include">, MetaVarName<"<file>">,
802   HelpText<"Include and chain a header file after turning it into PCH">;
803 def preamble_bytes_EQ : Joined<["-"], "preamble-bytes=">,
804   HelpText<"Assume that the precompiled header is a precompiled preamble "
805            "covering the first N bytes of the main file">;
806 def detailed_preprocessing_record : Flag<["-"], "detailed-preprocessing-record">,
807   HelpText<"include a detailed record of preprocessing actions">;
808
809 //===----------------------------------------------------------------------===//
810 // OpenCL Options
811 //===----------------------------------------------------------------------===//
812
813 def cl_ext_EQ : CommaJoined<["-"], "cl-ext=">,
814   HelpText<"OpenCL only. Enable or disable OpenCL extensions. The argument is a comma-separated sequence of one or more extension names, each prefixed by '+' or '-'.">;
815
816 //===----------------------------------------------------------------------===//
817 // CUDA Options
818 //===----------------------------------------------------------------------===//
819
820 def fcuda_is_device : Flag<["-"], "fcuda-is-device">,
821   HelpText<"Generate code for CUDA device">;
822 def fcuda_include_gpubinary : Separate<["-"], "fcuda-include-gpubinary">,
823   HelpText<"Incorporate CUDA device-side binary into host object file.">;
824 def fcuda_allow_variadic_functions : Flag<["-"], "fcuda-allow-variadic-functions">,
825   HelpText<"Allow variadic functions in CUDA device code.">;
826 def fno_cuda_host_device_constexpr : Flag<["-"], "fno-cuda-host-device-constexpr">,
827   HelpText<"Don't treat unattributed constexpr functions as __host__ __device__.">;
828
829 //===----------------------------------------------------------------------===//
830 // OpenMP Options
831 //===----------------------------------------------------------------------===//
832
833 def fopenmp_is_device : Flag<["-"], "fopenmp-is-device">,
834   HelpText<"Generate code only for an OpenMP target device.">;
835 def fopenmp_host_ir_file_path : Separate<["-"], "fopenmp-host-ir-file-path">,
836   HelpText<"Path to the IR file produced by the frontend for the host.">;
837
838 } // let Flags = [CC1Option]
839
840
841 //===----------------------------------------------------------------------===//
842 // cc1as-only Options
843 //===----------------------------------------------------------------------===//
844
845 let Flags = [CC1AsOption, NoDriverOption] in {
846
847 // Language Options
848 def n : Flag<["-"], "n">,
849   HelpText<"Don't automatically start assembly file with a text section">;
850
851 // Frontend Options
852 def filetype : Separate<["-"], "filetype">,
853     HelpText<"Specify the output file type ('asm', 'null', or 'obj')">;
854
855 // Transliterate Options
856 def output_asm_variant : Separate<["-"], "output-asm-variant">,
857     HelpText<"Select the asm variant index to use for output">;
858 def show_encoding : Flag<["-"], "show-encoding">,
859     HelpText<"Show instruction encoding information in transliterate mode">;
860 def show_inst : Flag<["-"], "show-inst">,
861     HelpText<"Show internal instruction representation in transliterate mode">;
862
863 // Assemble Options
864 def dwarf_debug_producer : Separate<["-"], "dwarf-debug-producer">,
865   HelpText<"The string to embed in the Dwarf debug AT_producer record.">;
866
867 def defsym : Separate<["-"], "defsym">,
868   HelpText<"Define a value for a symbol">;
869 } // let Flags = [CC1AsOption]