Daniel Dunbar | 8adfcff | 2009-11-19 07:19:04 +0000 | [diff] [blame] | 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. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | // Include the common option parsing interfaces. |
| 15 | include "OptParser.td" |
| 16 | |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 17 | //===----------------------------------------------------------------------===// |
Daniel Dunbar | 8adfcff | 2009-11-19 07:19:04 +0000 | [diff] [blame] | 18 | // Target Options |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 19 | //===----------------------------------------------------------------------===// |
Daniel Dunbar | 8adfcff | 2009-11-19 07:19:04 +0000 | [diff] [blame] | 20 | |
| 21 | def target_abi : Separate<"-target-abi">, |
| 22 | HelpText<"Target a particular ABI type">; |
Daniel Dunbar | 38b48af | 2009-12-18 06:30:12 +0000 | [diff] [blame] | 23 | def target_cpu : Separate<"-target-cpu">, |
| 24 | HelpText<"Target a specific cpu type">; |
Daniel Dunbar | 31db76c | 2009-11-20 01:46:44 +0000 | [diff] [blame] | 25 | def target_feature : Separate<"-target-feature">, |
Daniel Dunbar | 8adfcff | 2009-11-19 07:19:04 +0000 | [diff] [blame] | 26 | HelpText<"Target specific attributes">; |
Daniel Dunbar | 31db76c | 2009-11-20 01:46:44 +0000 | [diff] [blame] | 27 | def triple : Separate<"-triple">, |
Daniel Dunbar | 8adfcff | 2009-11-19 07:19:04 +0000 | [diff] [blame] | 28 | HelpText<"Specify target triple (e.g. i686-apple-darwin9)">; |
Daniel Dunbar | ce6bf1e | 2009-11-29 09:32:20 +0000 | [diff] [blame] | 29 | def triple_EQ : Joined<"-triple=">, Alias<triple>; |
Daniel Dunbar | 50a4487 | 2009-11-20 17:23:30 +0000 | [diff] [blame] | 30 | |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 31 | //===----------------------------------------------------------------------===// |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 32 | // Analyzer Options |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 33 | //===----------------------------------------------------------------------===// |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 34 | |
| 35 | def analysis_CFGDump : Flag<"-cfg-dump">, |
| 36 | HelpText<"Display Control-Flow Graphs">; |
| 37 | def analysis_CFGView : Flag<"-cfg-view">, |
| 38 | HelpText<"View Control-Flow Graphs using GraphViz">; |
| 39 | def analysis_DisplayLiveVariables : Flag<"-dump-live-variables">, |
| 40 | HelpText<"Print results of live variable analysis">; |
Ted Kremenek | 6dd66ed | 2010-02-14 02:45:18 +0000 | [diff] [blame] | 41 | def analysis_LLVMConventionChecker : Flag<"-analyzer-check-llvm-conventions">, |
| 42 | HelpText<"Check code for LLVM codebase conventions (domain-specific)">; |
Ted Kremenek | fb3f893 | 2010-02-05 01:50:36 +0000 | [diff] [blame] | 43 | def analysis_SecuritySyntacticChecks : Flag<"-analyzer-check-security-syntactic">, |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 44 | HelpText<"Perform quick security checks that require no data flow">; |
Ted Kremenek | cd9902b | 2010-02-05 01:52:40 +0000 | [diff] [blame] | 45 | def analysis_WarnDeadStores : Flag<"-analyzer-check-dead-stores">, |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 46 | HelpText<"Warn about stores to dead variables">; |
| 47 | def analysis_WarnUninitVals : Flag<"-warn-uninit-values">, |
| 48 | HelpText<"Warn about uses of uninitialized variables">; |
Ted Kremenek | fa15be4 | 2010-02-05 01:57:44 +0000 | [diff] [blame] | 49 | def analysis_WarnObjCMethSigs : Flag<"-analyzer-check-objc-methodsigs">, |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 50 | HelpText<"Warn about Objective-C method signatures with type incompatibilities">; |
Ted Kremenek | 7909fc8 | 2010-02-05 01:59:21 +0000 | [diff] [blame] | 51 | def analysis_WarnObjCDealloc : Flag<"-analyzer-check-objc-missing-dealloc">, |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 52 | HelpText<"Warn about Objective-C classes that lack a correct implementation of -dealloc">; |
Ted Kremenek | 2ade536 | 2010-02-05 01:55:01 +0000 | [diff] [blame] | 53 | def analysis_WarnObjCUnusedIvars : Flag<"-analyzer-check-objc-unused-ivars">, |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 54 | HelpText<"Warn about private ivars that are never used">; |
Ted Kremenek | 565e465 | 2010-02-05 02:06:54 +0000 | [diff] [blame] | 55 | def analysis_ObjCMemChecker : Flag<"-analyzer-check-objc-mem">, |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 56 | HelpText<"Run the [Core] Foundation reference count checker">; |
| 57 | def analysis_WarnSizeofPointer : Flag<"-warn-sizeof-pointer">, |
| 58 | HelpText<"Warn about unintended use of sizeof() on pointer expressions">; |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 59 | |
| 60 | def analyzer_store : Separate<"-analyzer-store">, |
| 61 | HelpText<"Source Code Analysis - Abstract Memory Store Models">; |
| 62 | def analyzer_store_EQ : Joined<"-analyzer-store=">, Alias<analyzer_store>; |
| 63 | |
| 64 | def analyzer_constraints : Separate<"-analyzer-constraints">, |
| 65 | HelpText<"Source Code Analysis - Symbolic Constraint Engines">; |
| 66 | def analyzer_constraints_EQ : Joined<"-analyzer-constraints=">, |
| 67 | Alias<analyzer_constraints>; |
| 68 | |
| 69 | def analyzer_output : Separate<"-analyzer-output">, |
| 70 | HelpText<"Source Code Analysis - Output Options">; |
| 71 | def analyzer_output_EQ : Joined<"-analyzer-output=">, |
| 72 | Alias<analyzer_output>; |
| 73 | |
| 74 | def analyzer_opt_analyze_headers : Flag<"-analyzer-opt-analyze-headers">, |
| 75 | HelpText<"Force the static analyzer to analyze functions defined in header files">; |
Ted Kremenek | fc57651 | 2009-12-07 22:06:12 +0000 | [diff] [blame] | 76 | def analyzer_opt_analyze_nested_blocks : Flag<"-analyzer-opt-analyze-nested-blocks">, |
| 77 | HelpText<"Analyze the definitions of blocks in addition to functions">; |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 78 | def analyzer_display_progress : Flag<"-analyzer-display-progress">, |
| 79 | HelpText<"Emit verbose output about the analyzer's progress">; |
| 80 | def analyzer_experimental_checks : Flag<"-analyzer-experimental-checks">, |
| 81 | HelpText<"Use experimental path-sensitive checks">; |
| 82 | def analyzer_experimental_internal_checks : |
| 83 | Flag<"-analyzer-experimental-internal-checks">, |
| 84 | HelpText<"Use new default path-sensitive checks currently in testing">; |
| 85 | def analyze_function : Separate<"-analyze-function">, |
| 86 | HelpText<"Run analysis on specific function">; |
| 87 | def analyze_function_EQ : Joined<"-analyze-function=">, Alias<analyze_function>; |
| 88 | def analyzer_eagerly_assume : Flag<"-analyzer-eagerly-assume">, |
| 89 | HelpText<"Eagerly assume the truth/falseness of some symbolic constraints">; |
| 90 | def analyzer_no_purge_dead : Flag<"-analyzer-no-purge-dead">, |
| 91 | HelpText<"Don't remove dead symbols, bindings, and constraints before processing a statement">; |
| 92 | def trim_egraph : Flag<"-trim-egraph">, |
| 93 | HelpText<"Only show error-related paths in the analysis graph">; |
| 94 | def analyzer_viz_egraph_graphviz : Flag<"-analyzer-viz-egraph-graphviz">, |
| 95 | HelpText<"Display exploded graph using GraphViz">; |
| 96 | def analyzer_viz_egraph_ubigraph : Flag<"-analyzer-viz-egraph-ubigraph">, |
| 97 | HelpText<"Display exploded graph using Ubigraph">; |
Zhongxing Xu | 7b99d12 | 2010-05-06 02:59:29 +0000 | [diff] [blame] | 98 | def analyzer_inline_call : Flag<"-analyzer-inline-call">, |
| 99 | HelpText<"Experimental transfer function inlining callees when its definition is available.">; |
Zhongxing Xu | c09289d | 2010-04-13 06:44:31 +0000 | [diff] [blame] | 100 | def analyzer_max_nodes : Separate<"-analyzer-max-nodes">, |
| 101 | HelpText<"The maximum number of nodes the analyzer can generate">; |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame] | 102 | |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 103 | //===----------------------------------------------------------------------===// |
Daniel Dunbar | 50a4487 | 2009-11-20 17:23:30 +0000 | [diff] [blame] | 104 | // CodeGen Options |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 105 | //===----------------------------------------------------------------------===// |
Daniel Dunbar | 50a4487 | 2009-11-20 17:23:30 +0000 | [diff] [blame] | 106 | |
| 107 | def disable_llvm_optzns : Flag<"-disable-llvm-optzns">, |
| 108 | HelpText<"Don't run LLVM optimization passes">; |
John McCall | 824e19e | 2010-02-12 23:47:27 +0000 | [diff] [blame] | 109 | def disable_llvm_verifier : Flag<"-disable-llvm-verifier">, |
| 110 | HelpText<"Don't run the LLVM IR verifier pass">; |
Daniel Dunbar | 50a4487 | 2009-11-20 17:23:30 +0000 | [diff] [blame] | 111 | def disable_red_zone : Flag<"-disable-red-zone">, |
| 112 | HelpText<"Do not emit code that uses the red zone.">; |
Daniel Dunbar | f2d8b9f | 2009-12-18 02:43:17 +0000 | [diff] [blame] | 113 | def dwarf_debug_flags : Separate<"-dwarf-debug-flags">, |
| 114 | HelpText<"The string to embed in the Dwarf debug flags record.">; |
Daniel Dunbar | 50a4487 | 2009-11-20 17:23:30 +0000 | [diff] [blame] | 115 | def g : Flag<"-g">, HelpText<"Generate source level debug information">; |
Mike Stump | 9c276ae | 2009-12-12 01:27:46 +0000 | [diff] [blame] | 116 | def fcatch_undefined_behavior : Flag<"-fcatch-undefined-behavior">, |
| 117 | HelpText<"Generate runtime checks for undefined behavior.">; |
Daniel Dunbar | 50a4487 | 2009-11-20 17:23:30 +0000 | [diff] [blame] | 118 | def fno_common : Flag<"-fno-common">, |
| 119 | HelpText<"Compile common globals like normal definitions">; |
| 120 | def no_implicit_float : Flag<"-no-implicit-float">, |
| 121 | HelpText<"Don't generate implicit floating point instructions (x86-only)">; |
| 122 | def fno_merge_all_constants : Flag<"-fno-merge-all-constants">, |
| 123 | HelpText<"Disallow merging of constants.">; |
Anders Carlsson | a508b7d | 2010-02-06 23:23:06 +0000 | [diff] [blame] | 124 | def fno_threadsafe_statics : Flag<"-fno-threadsafe-statics">, |
| 125 | HelpText<"Do not emit code to make initialization of local statics thread safe">; |
Anders Carlsson | 824d7ea | 2010-02-11 08:02:13 +0000 | [diff] [blame] | 126 | def fdump_vtable_layouts : Flag<"-fdump-vtable-layouts">, |
| 127 | HelpText<"Dump the layouts of all vtables that will be emitted in a translation unit">; |
Chris Lattner | bbea716 | 2010-04-13 00:38:24 +0000 | [diff] [blame] | 128 | def ffunction_sections : Flag<"-ffunction-sections">, |
| 129 | HelpText<"Place each function in its own section (ELF Only)">; |
| 130 | def fdata_sections : Flag<"-fdata-sections">, |
| 131 | HelpText<"Place each data in its own section (ELF Only)">; |
Daniel Dunbar | f219e7c | 2009-11-29 07:18:39 +0000 | [diff] [blame] | 132 | def masm_verbose : Flag<"-masm-verbose">, |
| 133 | HelpText<"Generate verbose assembly output">; |
| 134 | def mcode_model : Separate<"-mcode-model">, |
| 135 | HelpText<"The code model to use">; |
| 136 | def mdebug_pass : Separate<"-mdebug-pass">, |
| 137 | HelpText<"Enable additional debug output">; |
| 138 | def mdisable_fp_elim : Flag<"-mdisable-fp-elim">, |
| 139 | HelpText<"Disable frame pointer elimination optimization">; |
Daniel Dunbar | 87667aa | 2009-12-08 19:49:51 +0000 | [diff] [blame] | 140 | def mfloat_abi : Separate<"-mfloat-abi">, |
Daniel Dunbar | 3b31526 | 2009-11-30 08:42:00 +0000 | [diff] [blame] | 141 | HelpText<"The float ABI to use">; |
Daniel Dunbar | f219e7c | 2009-11-29 07:18:39 +0000 | [diff] [blame] | 142 | def mlimit_float_precision : Separate<"-mlimit-float-precision">, |
| 143 | HelpText<"Limit float precision to the given value">; |
| 144 | def mno_zero_initialized_in_bss : Flag<"-mno-zero-initialized-in-bss">, |
| 145 | HelpText<"Do not put zero initialized data in the BSS">; |
Daniel Dunbar | 87667aa | 2009-12-08 19:49:51 +0000 | [diff] [blame] | 146 | def msoft_float : Flag<"-msoft-float">, |
Daniel Dunbar | 3b31526 | 2009-11-30 08:42:00 +0000 | [diff] [blame] | 147 | HelpText<"Use software floating point">; |
Daniel Dunbar | f219e7c | 2009-11-29 07:18:39 +0000 | [diff] [blame] | 148 | def mrelocation_model : Separate<"-mrelocation-model">, |
| 149 | HelpText<"The relocation model to use">; |
| 150 | def munwind_tables : Flag<"-munwind-tables">, |
| 151 | HelpText<"Generate unwinding tables for all functions">; |
John McCall | d46f985 | 2010-02-19 01:32:20 +0000 | [diff] [blame] | 152 | def mconstructor_aliases : Flag<"-mconstructor-aliases">, |
| 153 | HelpText<"Emit complete constructors and destructors as aliases when possible">; |
Daniel Dunbar | 50a4487 | 2009-11-20 17:23:30 +0000 | [diff] [blame] | 154 | def O : Joined<"-O">, HelpText<"Optimization level">; |
| 155 | def Os : Flag<"-Os">, HelpText<"Optimize for size">; |
Daniel Dunbar | 1bed0c3 | 2009-11-20 23:28:07 +0000 | [diff] [blame] | 156 | |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 157 | //===----------------------------------------------------------------------===// |
Daniel Dunbar | 1bed0c3 | 2009-11-20 23:28:07 +0000 | [diff] [blame] | 158 | // Dependency Output Options |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 159 | //===----------------------------------------------------------------------===// |
| 160 | |
Daniel Dunbar | 1bed0c3 | 2009-11-20 23:28:07 +0000 | [diff] [blame] | 161 | def dependency_file : Separate<"-dependency-file">, |
| 162 | HelpText<"Filename (or -) to write dependency output to">; |
| 163 | def sys_header_deps : Flag<"-sys-header-deps">, |
| 164 | HelpText<"Include system headers in dependency output">; |
Chris Lattner | 3edbeb7 | 2010-03-29 17:55:58 +0000 | [diff] [blame] | 165 | def MQ : Separate<"-MQ">, HelpText<"Specify target to quote for dependency">; |
Daniel Dunbar | 1bed0c3 | 2009-11-20 23:28:07 +0000 | [diff] [blame] | 166 | def MT : Separate<"-MT">, HelpText<"Specify target for dependency">; |
| 167 | def MP : Flag<"-MP">, |
| 168 | HelpText<"Create phony target for each dependency (other than main file)">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 169 | |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 170 | //===----------------------------------------------------------------------===// |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 171 | // Diagnostic Options |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 172 | //===----------------------------------------------------------------------===// |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 173 | |
| 174 | def dump_build_information : Separate<"-dump-build-information">, |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 175 | MetaVarName<"<filename>">, |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 176 | HelpText<"output a dump of some build information to a file">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 177 | def fno_show_column : Flag<"-fno-show-column">, |
| 178 | HelpText<"Do not include column number on diagnostics">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 179 | def fno_show_source_location : Flag<"-fno-show-source-location">, |
| 180 | HelpText<"Do not include source location information with diagnostics">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 181 | def fno_caret_diagnostics : Flag<"-fno-caret-diagnostics">, |
| 182 | HelpText<"Do not include source line and caret with diagnostics">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 183 | def fno_diagnostics_fixit_info : Flag<"-fno-diagnostics-fixit-info">, |
| 184 | HelpText<"Do not include fixit information in diagnostics">; |
Douglas Gregor | d93256e | 2010-01-28 06:00:51 +0000 | [diff] [blame] | 185 | def fdiagnostics_binary : Flag<"-fdiagnostics-binary">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 186 | def w : Flag<"-w">, HelpText<"Suppress all warnings">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 187 | def pedantic : Flag<"-pedantic">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 188 | def pedantic_errors : Flag<"-pedantic-errors">; |
| 189 | |
| 190 | // This gets all -W options, including -Werror, -W[no-]system-headers, etc. The |
| 191 | // driver has stripped off -Wa,foo etc. The driver has also translated -W to |
| 192 | // -Wextra, so we don't need to worry about it. |
| 193 | def W : Joined<"-W">; |
| 194 | |
| 195 | def fdiagnostics_print_source_range_info : Flag<"-fdiagnostics-print-source-range-info">, |
| 196 | HelpText<"Print source range spans in numeric form">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 197 | def fdiagnostics_show_option : Flag<"-fdiagnostics-show-option">, |
| 198 | HelpText<"Print diagnostic name with mappable diagnostics">; |
Chris Lattner | 6fbe839 | 2010-05-04 21:55:25 +0000 | [diff] [blame] | 199 | def fdiagnostics_show_category : Separate<"-fdiagnostics-show-category">, |
| 200 | HelpText<"Print diagnostic category">; |
| 201 | |
Chris Lattner | 124fca5 | 2010-01-09 21:54:33 +0000 | [diff] [blame] | 202 | def ftabstop : Separate<"-ftabstop">, MetaVarName<"<N>">, |
| 203 | HelpText<"Set the tab stop distance.">; |
Chris Lattner | c100214 | 2010-04-07 20:37:06 +0000 | [diff] [blame] | 204 | def ferror_limit : Separate<"-ferror-limit">, MetaVarName<"<N>">, |
| 205 | HelpText<"Set the maximum number of errors to emit before stopping (0 = no limit).">; |
Douglas Gregor | 6c1cb99 | 2010-05-04 17:13:42 +0000 | [diff] [blame] | 206 | def fmacro_backtrace_limit : Separate<"-fmacro-backtrace-limit">, MetaVarName<"<N>">, |
| 207 | HelpText<"Set the maximum number of entries to print in a macro instantiation backtrace (0 = no limit).">; |
Douglas Gregor | 575cf37 | 2010-04-20 07:18:24 +0000 | [diff] [blame] | 208 | def ftemplate_backtrace_limit : Separate<"-ftemplate-backtrace-limit">, MetaVarName<"<N>">, |
| 209 | HelpText<"Set the maximum number of entries to print in a template instantiation backtrace (0 = no limit).">; |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 210 | def fmessage_length : Separate<"-fmessage-length">, MetaVarName<"<N>">, |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 211 | HelpText<"Format message diagnostics so that they fit within N columns or fewer, when possible.">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 212 | def fcolor_diagnostics : Flag<"-fcolor-diagnostics">, |
| 213 | HelpText<"Use colors in diagnostics">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 214 | def Wno_rewrite_macros : Flag<"-Wno-rewrite-macros">, |
| 215 | HelpText<"Silence ObjC rewriting warnings">; |
John McCall | 4b7a834 | 2010-03-15 10:54:44 +0000 | [diff] [blame] | 216 | def Wwrite_strings : Flag<"-Wwrite-strings">, |
| 217 | HelpText<"Add const qualifier to string literals">; |
Daniel Dunbar | 21affc0 | 2009-11-23 23:41:17 +0000 | [diff] [blame] | 218 | def verify : Flag<"-verify">, |
| 219 | HelpText<"Verify emitted diagnostics and warnings">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 220 | |
| 221 | //===----------------------------------------------------------------------===// |
| 222 | // Frontend Options |
| 223 | //===----------------------------------------------------------------------===// |
| 224 | |
Daniel Dunbar | 8ff5b28 | 2009-12-11 23:00:49 +0000 | [diff] [blame] | 225 | // This isn't normally used, it is just here so we can parse a |
| 226 | // CompilerInvocation out of a driver-derived argument vector. |
| 227 | def cc1 : Flag<"-cc1">; |
| 228 | |
Douglas Gregor | 9bed879 | 2010-02-09 19:21:46 +0000 | [diff] [blame] | 229 | def ast_merge : Separate<"-ast-merge">, |
| 230 | MetaVarName<"<ast file>">, |
| 231 | HelpText<"Merge the given AST file into the translation unit being compiled.">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 232 | def code_completion_at : Separate<"-code-completion-at">, |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 233 | MetaVarName<"<file>:<line>:<column>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 234 | HelpText<"Dump code-completion information at a location">; |
Daniel Dunbar | e14b5f5 | 2009-12-03 05:11:16 +0000 | [diff] [blame] | 235 | def remap_file : Separate<"-remap-file">, |
| 236 | MetaVarName<"<from>;<to>">, |
| 237 | HelpText<"Replace the contents of the <from> file with the contents of the <to> file">; |
Daniel Dunbar | ce6bf1e | 2009-11-29 09:32:20 +0000 | [diff] [blame] | 238 | def code_completion_at_EQ : Joined<"-code-completion-at=">, |
| 239 | Alias<code_completion_at>; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 240 | def no_code_completion_debug_printer : Flag<"-no-code-completion-debug-printer">, |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 241 | HelpText<"Don't use the \"debug\" code-completion print">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 242 | def code_completion_macros : Flag<"-code-completion-macros">, |
| 243 | HelpText<"Include macros in code-completion results">; |
| 244 | def disable_free : Flag<"-disable-free">, |
| 245 | HelpText<"Disable freeing of memory on exit">; |
Daniel Dunbar | 9b5e9ae | 2009-12-03 07:01:58 +0000 | [diff] [blame] | 246 | def help : Flag<"-help">, |
| 247 | HelpText<"Print this help text">; |
| 248 | def _help : Flag<"--help">, Alias<help>; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 249 | def x : Separate<"-x">, HelpText<"Input language type">; |
| 250 | def cxx_inheritance_view : Separate<"-cxx-inheritance-view">, |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 251 | MetaVarName<"<class name>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 252 | HelpText<"View C++ inheritance for a specified class">; |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 253 | def o : Separate<"-o">, MetaVarName<"<path>">, HelpText<"Specify output file">; |
| 254 | def load : Separate<"-load">, MetaVarName<"<dsopath>">, |
Daniel Dunbar | efba227 | 2009-12-03 05:11:05 +0000 | [diff] [blame] | 255 | HelpText<"Load the named plugin (dynamic shared object)">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 256 | def plugin : Separate<"-plugin">, |
| 257 | HelpText<"Use the named plugin action (use \"help\" to list available options)">; |
Daniel Dunbar | 8b9adfe | 2009-12-15 00:06:45 +0000 | [diff] [blame] | 258 | def resource_dir : Separate<"-resource-dir">, |
| 259 | HelpText<"The directory which holds the compiler resource files">; |
Daniel Dunbar | 9b5e9ae | 2009-12-03 07:01:58 +0000 | [diff] [blame] | 260 | def version : Flag<"-version">, |
| 261 | HelpText<"Print the compiler version">; |
| 262 | def _version : Flag<"--version">, Alias<version>; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 263 | |
| 264 | def Action_Group : OptionGroup<"<action group>">; |
| 265 | let Group = Action_Group in { |
| 266 | |
| 267 | def Eonly : Flag<"-Eonly">, |
| 268 | HelpText<"Just run preprocessor, no output (for timings)">; |
| 269 | def E : Flag<"-E">, |
| 270 | HelpText<"Run preprocessor, emit preprocessed file">; |
| 271 | def dump_raw_tokens : Flag<"-dump-raw-tokens">, |
| 272 | HelpText<"Lex file in raw mode and dump raw tokens">; |
| 273 | def analyze : Flag<"-analyze">, |
| 274 | HelpText<"Run static analysis engine">; |
| 275 | def dump_tokens : Flag<"-dump-tokens">, |
| 276 | HelpText<"Run preprocessor, dump internal rep of tokens">; |
Daniel Dunbar | 2758595 | 2010-03-19 19:44:04 +0000 | [diff] [blame] | 277 | def init_only : Flag<"-init-only">, |
| 278 | HelpText<"Only execute frontend initialization">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 279 | def parse_noop : Flag<"-parse-noop">, |
| 280 | HelpText<"Run parser with noop callbacks (for timings)">; |
| 281 | def fsyntax_only : Flag<"-fsyntax-only">, |
| 282 | HelpText<"Run parser and perform semantic analysis">; |
| 283 | def fixit : Flag<"-fixit">, |
| 284 | HelpText<"Apply fix-it advice to the input source">; |
Nick Lewycky | ba5f6ec | 2010-04-24 01:30:46 +0000 | [diff] [blame] | 285 | def fixit_EQ : Joined<"-fixit=">, |
| 286 | HelpText<"Apply fix-it advice creating a file with the given suffix">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 287 | def parse_print_callbacks : Flag<"-parse-print-callbacks">, |
| 288 | HelpText<"Run parser and print each callback invoked">; |
| 289 | def emit_html : Flag<"-emit-html">, |
| 290 | HelpText<"Output input source as HTML">; |
| 291 | def ast_print : Flag<"-ast-print">, |
| 292 | HelpText<"Build ASTs and then pretty-print them">; |
| 293 | def ast_print_xml : Flag<"-ast-print-xml">, |
| 294 | HelpText<"Build ASTs and then print them in XML format">; |
| 295 | def ast_dump : Flag<"-ast-dump">, |
| 296 | HelpText<"Build ASTs and then debug dump them">; |
| 297 | def ast_view : Flag<"-ast-view">, |
| 298 | HelpText<"Build ASTs and view them with GraphViz">; |
Douglas Gregor | f78cc43 | 2010-05-07 15:41:56 +0000 | [diff] [blame] | 299 | def boostcon : Flag<"-boostcon">, |
| 300 | HelpText<"BoostCon workshop mode">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 301 | def print_decl_contexts : Flag<"-print-decl-contexts">, |
| 302 | HelpText<"Print DeclContexts and their Decls">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 303 | def emit_pth : Flag<"-emit-pth">, |
| 304 | HelpText<"Generate pre-tokenized header file">; |
| 305 | def emit_pch : Flag<"-emit-pch">, |
| 306 | HelpText<"Generate pre-compiled header file">; |
| 307 | def S : Flag<"-S">, |
| 308 | HelpText<"Emit native assembly code">; |
| 309 | def emit_llvm : Flag<"-emit-llvm">, |
| 310 | HelpText<"Build ASTs then convert to LLVM, emit .ll file">; |
| 311 | def emit_llvm_bc : Flag<"-emit-llvm-bc">, |
| 312 | HelpText<"Build ASTs then convert to LLVM, emit .bc file">; |
| 313 | def emit_llvm_only : Flag<"-emit-llvm-only">, |
| 314 | HelpText<"Build ASTs and convert to LLVM, discarding output">; |
Daniel Dunbar | da1573f | 2010-02-03 01:18:43 +0000 | [diff] [blame] | 315 | def emit_obj : Flag<"-emit-obj">, |
| 316 | HelpText<"Emit native object files">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 317 | def rewrite_test : Flag<"-rewrite-test">, |
| 318 | HelpText<"Rewriter playground">; |
| 319 | def rewrite_objc : Flag<"-rewrite-objc">, |
| 320 | HelpText<"Rewrite ObjC into C (code rewriter example)">; |
| 321 | def rewrite_macros : Flag<"-rewrite-macros">, |
| 322 | HelpText<"Expand macros without full preprocessing">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 323 | |
| 324 | } |
| 325 | |
| 326 | def relocatable_pch : Flag<"-relocatable-pch">, |
| 327 | HelpText<"Whether to build a relocatable precompiled header">; |
| 328 | def print_stats : Flag<"-print-stats">, |
| 329 | HelpText<"Print performance metrics and statistics">; |
| 330 | def ftime_report : Flag<"-ftime-report">, |
| 331 | HelpText<"Print the amount of time each phase of compilation takes">; |
| 332 | |
Anders Carlsson | 46116ce | 2010-04-10 19:09:13 +0000 | [diff] [blame] | 333 | def fdump_record_layouts : Flag<"-fdump-record-layouts">, |
Daniel Dunbar | b69eca5 | 2010-04-08 02:59:56 +0000 | [diff] [blame] | 334 | HelpText<"Dump record layout information">; |
| 335 | |
Daniel Dunbar | 3f87fb0 | 2010-04-15 06:09:03 +0000 | [diff] [blame] | 336 | // Generic forwarding to LLVM options. This should only be used for debugging |
| 337 | // and experimental features. |
| 338 | def mllvm : Separate<"-mllvm">, |
| 339 | HelpText<"Additional arguments to forward to LLVM's option processing">; |
| 340 | |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 341 | //===----------------------------------------------------------------------===// |
| 342 | // Language Options |
| 343 | //===----------------------------------------------------------------------===// |
| 344 | |
| 345 | def fno_builtin : Flag<"-fno-builtin">, |
| 346 | HelpText<"Disable implicit builtin knowledge of functions">; |
| 347 | def faltivec : Flag<"-faltivec">, |
| 348 | HelpText<"Enable AltiVec vector initializer syntax">; |
Benjamin Kramer | c53e365 | 2010-04-09 19:40:47 +0000 | [diff] [blame] | 349 | def fno_access_control : Flag<"-fno-access-control">, |
John McCall | 380509a | 2010-04-09 19:09:08 +0000 | [diff] [blame] | 350 | HelpText<"Disable C++ access control">; |
Nuno Lopes | fc28448 | 2009-12-16 16:59:22 +0000 | [diff] [blame] | 351 | def fno_assume_sane_operator_new : Flag<"-fno-assume-sane-operator-new">, |
Nuno Lopes | 9986017 | 2009-12-17 22:37:33 +0000 | [diff] [blame] | 352 | HelpText<"Don't assume that C++'s global operator new can't alias any pointer">; |
Chandler Carruth | eb5d7b7 | 2010-04-17 20:17:31 +0000 | [diff] [blame] | 353 | def fgnu_keywords : Flag<"-fgnu-keywords">, |
| 354 | HelpText<"Allow GNU-extension keywords regardless of language standard">; |
| 355 | def fno_gnu_keywords : Flag<"-fno-gnu-keywords">, |
| 356 | HelpText<"Disallow GNU-extension keywords regardless of language standard">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 357 | def fdollars_in_identifiers : Flag<"-fdollars-in-identifiers">, |
| 358 | HelpText<"Allow '$' in identifiers">; |
Daniel Dunbar | 8663b18 | 2009-12-16 20:10:18 +0000 | [diff] [blame] | 359 | def fno_dollars_in_identifiers : Flag<"-fno-dollars-in-identifiers">, |
| 360 | HelpText<"Disallow '$' in identifiers">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 361 | def femit_all_decls : Flag<"-femit-all-decls">, |
| 362 | HelpText<"Emit all declarations, even if unused">; |
| 363 | def fblocks : Flag<"-fblocks">, |
| 364 | HelpText<"enable the 'blocks' language feature">; |
| 365 | def fheinous_gnu_extensions : Flag<"-fheinous-gnu-extensions">; |
| 366 | def fexceptions : Flag<"-fexceptions">, |
| 367 | HelpText<"Enable support for exception handling">; |
Daniel Dunbar | 7348288 | 2010-02-10 18:48:44 +0000 | [diff] [blame] | 368 | def fsjlj_exceptions : Flag<"-fsjlj-exceptions">, |
| 369 | HelpText<"Use SjLj style exceptions">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 370 | def ffreestanding : Flag<"-ffreestanding">, |
| 371 | HelpText<"Assert that the compilation takes place in a freestanding environment">; |
| 372 | def fgnu_runtime : Flag<"-fgnu-runtime">, |
| 373 | HelpText<"Generate output compatible with the standard GNU Objective-C runtime">; |
Daniel Dunbar | ce6bf1e | 2009-11-29 09:32:20 +0000 | [diff] [blame] | 374 | def std_EQ : Joined<"-std=">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 375 | HelpText<"Language standard to compile for">; |
Dan Gohman | c31176d | 2010-01-08 02:20:44 +0000 | [diff] [blame] | 376 | def fmath_errno : Flag<"-fmath-errno">, |
| 377 | HelpText<"Require math functions to indicate errors by setting errno">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 378 | def fms_extensions : Flag<"-fms-extensions">, |
| 379 | HelpText<"Accept some non-standard constructs used in Microsoft header files ">; |
| 380 | def main_file_name : Separate<"-main-file-name">, |
| 381 | HelpText<"Main file name to use for debug info">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 382 | def fno_elide_constructors : Flag<"-fno-elide-constructors">, |
| 383 | HelpText<"Disable C++ copy constructor elision">; |
| 384 | def fno_lax_vector_conversions : Flag<"-fno-lax-vector-conversions">, |
| 385 | HelpText<"Disallow implicit conversions between vectors with a different number of elements or different element types">; |
| 386 | def fno_operator_names : Flag<"-fno-operator-names">, |
| 387 | HelpText<"Do not treat C++ operator name keywords as synonyms for operators">; |
Daniel Dunbar | efb0fa9 | 2010-03-20 04:15:41 +0000 | [diff] [blame] | 388 | def fno_signed_char : Flag<"-fno-signed-char">, |
| 389 | HelpText<"Char is unsigned">; |
| 390 | def fno_use_cxa_atexit : Flag<"-fno-use-cxa-atexit">, |
| 391 | HelpText<"Don't use __cxa_atexit for calling destructors">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 392 | def fconstant_string_class : Separate<"-fconstant-string-class">, |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 393 | MetaVarName<"<class name>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 394 | HelpText<"Specify the class to use for constant Objective-C string objects.">; |
Fariborz Jahanian | 33e982b | 2010-04-22 20:26:39 +0000 | [diff] [blame] | 395 | def fno_constant_cfstrings : Flag<"-fno-constant-cfstrings">, |
| 396 | HelpText<"Enable creation of CodeFoundation-type constant strings">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 397 | def fobjc_gc : Flag<"-fobjc-gc">, |
| 398 | HelpText<"Enable Objective-C garbage collection">; |
| 399 | def fobjc_gc_only : Flag<"-fobjc-gc-only">, |
| 400 | HelpText<"Use GC exclusively for Objective-C related memory management">; |
Daniel Dunbar | f643b9b | 2010-04-24 17:56:46 +0000 | [diff] [blame] | 401 | def fobjc_dispatch_method_EQ : Joined<"-fobjc-dispatch-method=">, |
| 402 | HelpText<"Objective-C dispatch method to use">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 403 | def print_ivar_layout : Flag<"-print-ivar-layout">, |
| 404 | HelpText<"Enable Objective-C Ivar layout bitmap print trace">; |
| 405 | def fobjc_nonfragile_abi : Flag<"-fobjc-nonfragile-abi">, |
| 406 | HelpText<"enable objective-c's nonfragile abi">; |
Fariborz Jahanian | 412e798 | 2010-02-09 19:31:38 +0000 | [diff] [blame] | 407 | def fobjc_nonfragile_abi2 : Flag<"-fobjc-nonfragile-abi2">, |
| 408 | HelpText<"enable objective-c's enhanced nonfragile abi">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 409 | def ftrapv : Flag<"-ftrapv">, |
| 410 | HelpText<"Trap on integer overflow">; |
Daniel Dunbar | 7674352 | 2009-11-29 02:39:08 +0000 | [diff] [blame] | 411 | def pic_level : Separate<"-pic-level">, |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 412 | HelpText<"Value for __PIC__">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 413 | def pthread : Flag<"-pthread">, |
| 414 | HelpText<"Support POSIX threads in generated code">; |
| 415 | def fpascal_strings : Flag<"-fpascal-strings">, |
| 416 | HelpText<"Recognize and construct Pascal-style string literals">; |
| 417 | def fno_rtti : Flag<"-fno-rtti">, |
| 418 | HelpText<"Disable generation of rtti information">; |
| 419 | def fshort_wchar : Flag<"-fshort-wchar">, |
| 420 | HelpText<"Force wchar_t to be a short unsigned int">; |
| 421 | def static_define : Flag<"-static-define">, |
| 422 | HelpText<"Should __STATIC__ be defined">; |
| 423 | def stack_protector : Separate<"-stack-protector">, |
| 424 | HelpText<"Enable stack protectors">; |
| 425 | def fvisibility : Separate<"-fvisibility">, |
| 426 | HelpText<"Default symbol visibility">; |
| 427 | def ftemplate_depth : Separate<"-ftemplate-depth">, |
| 428 | HelpText<"Maximum depth of recursive template instantiation">; |
| 429 | def trigraphs : Flag<"-trigraphs">, |
| 430 | HelpText<"Process trigraph sequences">; |
| 431 | def fwritable_strings : Flag<"-fwritable-strings">, |
| 432 | HelpText<"Store string literals as writable data">; |
Daniel Dunbar | fb937b8 | 2010-04-15 15:06:22 +0000 | [diff] [blame] | 433 | def fno_bitfield_type_align : Flag<"-fno-bitfield-type-align">, |
| 434 | HelpText<"Ignore bit-field types when aligning structures">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 435 | |
| 436 | //===----------------------------------------------------------------------===// |
| 437 | // Header Search Options |
| 438 | //===----------------------------------------------------------------------===// |
| 439 | |
| 440 | def nostdinc : Flag<"-nostdinc">, |
| 441 | HelpText<"Disable standard #include directories">; |
Douglas Gregor | 4c2bcad | 2010-03-24 20:13:48 +0000 | [diff] [blame] | 442 | def nostdincxx : Flag<"-nostdinc++">, |
| 443 | HelpText<"Disable standard #include directories for the C++ standard library">; |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 444 | def nobuiltininc : Flag<"-nobuiltininc">, |
| 445 | HelpText<"Disable builtin #include directories">; |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 446 | def F : JoinedOrSeparate<"-F">, MetaVarName<"<directory>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 447 | HelpText<"Add directory to framework include search path">; |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 448 | def I : JoinedOrSeparate<"-I">, MetaVarName<"<directory>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 449 | HelpText<"Add directory to include search path">; |
Daniel Dunbar | b94ffa4 | 2009-12-09 10:01:26 +0000 | [diff] [blame] | 450 | def idirafter : JoinedOrSeparate<"-idirafter">, MetaVarName<"<directory>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 451 | HelpText<"Add directory to AFTER include search path">; |
Daniel Dunbar | b94ffa4 | 2009-12-09 10:01:26 +0000 | [diff] [blame] | 452 | def iquote : JoinedOrSeparate<"-iquote">, MetaVarName<"<directory>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 453 | HelpText<"Add directory to QUOTE include search path">; |
Daniel Dunbar | b94ffa4 | 2009-12-09 10:01:26 +0000 | [diff] [blame] | 454 | def isystem : JoinedOrSeparate<"-isystem">, MetaVarName<"<directory>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 455 | HelpText<"Add directory to SYSTEM include search path">; |
Daniel Dunbar | b94ffa4 | 2009-12-09 10:01:26 +0000 | [diff] [blame] | 456 | def iprefix : JoinedOrSeparate<"-iprefix">, MetaVarName<"<prefix>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 457 | HelpText<"Set the -iwithprefix/-iwithprefixbefore prefix">; |
Daniel Dunbar | b94ffa4 | 2009-12-09 10:01:26 +0000 | [diff] [blame] | 458 | def iwithprefix : JoinedOrSeparate<"-iwithprefix">, MetaVarName<"<dir>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 459 | HelpText<"Set directory to SYSTEM include search path with prefix">; |
Mike Stump | e4cb2a4 | 2009-12-09 18:09:35 +0000 | [diff] [blame] | 460 | def iwithprefixbefore : JoinedOrSeparate<"-iwithprefixbefore">, |
| 461 | MetaVarName<"<dir>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 462 | HelpText<"Set directory to include search path with prefix">; |
Daniel Dunbar | b94ffa4 | 2009-12-09 10:01:26 +0000 | [diff] [blame] | 463 | def isysroot : JoinedOrSeparate<"-isysroot">, MetaVarName<"<dir>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 464 | HelpText<"Set the system root directory (usually /)">; |
| 465 | def v : Flag<"-v">, HelpText<"Enable verbose output">; |
| 466 | |
| 467 | //===----------------------------------------------------------------------===// |
| 468 | // Preprocessor Options |
| 469 | //===----------------------------------------------------------------------===// |
| 470 | |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 471 | def D : JoinedOrSeparate<"-D">, MetaVarName<"<macro>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 472 | HelpText<"Predefine the specified macro">; |
Daniel Dunbar | b94ffa4 | 2009-12-09 10:01:26 +0000 | [diff] [blame] | 473 | def include_ : JoinedOrSeparate<"-include">, MetaVarName<"<file>">, EnumName<"include">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 474 | HelpText<"Include file before parsing">; |
Daniel Dunbar | b94ffa4 | 2009-12-09 10:01:26 +0000 | [diff] [blame] | 475 | def imacros : JoinedOrSeparate<"-imacros">, MetaVarName<"<file>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 476 | HelpText<"Include macros from file before parsing">; |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 477 | def include_pch : Separate<"-include-pch">, MetaVarName<"<file>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 478 | HelpText<"Include precompiled header file">; |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 479 | def include_pth : Separate<"-include-pth">, MetaVarName<"<file>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 480 | HelpText<"Include file before parsing">; |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 481 | def token_cache : Separate<"-token-cache">, MetaVarName<"<path>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 482 | HelpText<"Use specified token cache file">; |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 483 | def U : JoinedOrSeparate<"-U">, MetaVarName<"<macro>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 484 | HelpText<"Undefine the specified macro">; |
Daniel Dunbar | b737fb1 | 2009-12-03 07:01:46 +0000 | [diff] [blame] | 485 | def undef : Flag<"-undef">, MetaVarName<"<macro>">, |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 486 | HelpText<"undef all system defines">; |
Douglas Gregor | 94dc8f6 | 2010-03-19 16:15:56 +0000 | [diff] [blame] | 487 | def detailed_preprocessing_record : Flag<"-detailed-preprocessing-record">, |
| 488 | HelpText<"include a detailed record of preprocessing actions">; |
| 489 | |
Daniel Dunbar | 33a33d8 | 2009-11-24 00:54:16 +0000 | [diff] [blame] | 490 | //===----------------------------------------------------------------------===// |
| 491 | // Preprocessed Output Options |
| 492 | //===----------------------------------------------------------------------===// |
| 493 | |
| 494 | def P : Flag<"-P">, |
| 495 | HelpText<"Disable linemarker output in -E mode">; |
| 496 | def C : Flag<"-C">, |
| 497 | HelpText<"Enable comment output in -E mode">; |
| 498 | def CC : Flag<"-CC">, |
| 499 | HelpText<"Enable comment output in -E mode, even from macro expansions">; |
| 500 | def dM : Flag<"-dM">, |
| 501 | HelpText<"Print macro definitions in -E mode instead of normal output">; |
| 502 | def dD : Flag<"-dD">, |
| 503 | HelpText<"Print macro definitions in -E mode in addition to normal output">; |