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 | |
| 17 | // Target Options |
| 18 | |
| 19 | def target_abi : Separate<"-target-abi">, |
| 20 | HelpText<"Target a particular ABI type">; |
Daniel Dunbar | 31db76c | 2009-11-20 01:46:44 +0000 | [diff] [blame] | 21 | def mcpu : Separate<"-mcpu">, |
Daniel Dunbar | a31100e | 2009-11-20 22:21:52 +0000 | [diff] [blame] | 22 | HelpText<"Target a specific cpu type ('-mcpu help' for details)">; |
Daniel Dunbar | 31db76c | 2009-11-20 01:46:44 +0000 | [diff] [blame] | 23 | def target_feature : Separate<"-target-feature">, |
Daniel Dunbar | 8adfcff | 2009-11-19 07:19:04 +0000 | [diff] [blame] | 24 | HelpText<"Target specific attributes">; |
Daniel Dunbar | 31db76c | 2009-11-20 01:46:44 +0000 | [diff] [blame] | 25 | def triple : Separate<"-triple">, |
Daniel Dunbar | 8adfcff | 2009-11-19 07:19:04 +0000 | [diff] [blame] | 26 | HelpText<"Specify target triple (e.g. i686-apple-darwin9)">; |
Daniel Dunbar | 50a4487 | 2009-11-20 17:23:30 +0000 | [diff] [blame] | 27 | |
Daniel Dunbar | e2814d8 | 2009-11-22 22:08:20 +0000 | [diff] [blame^] | 28 | // Analyzer Options |
| 29 | |
| 30 | def analysis_CFGDump : Flag<"-cfg-dump">, |
| 31 | HelpText<"Display Control-Flow Graphs">; |
| 32 | def analysis_CFGView : Flag<"-cfg-view">, |
| 33 | HelpText<"View Control-Flow Graphs using GraphViz">; |
| 34 | def analysis_DisplayLiveVariables : Flag<"-dump-live-variables">, |
| 35 | HelpText<"Print results of live variable analysis">; |
| 36 | def analysis_SecuritySyntacticChecks : Flag<"-warn-security-syntactic">, |
| 37 | HelpText<"Perform quick security checks that require no data flow">; |
| 38 | def analysis_WarnDeadStores : Flag<"-warn-dead-stores">, |
| 39 | HelpText<"Warn about stores to dead variables">; |
| 40 | def analysis_WarnUninitVals : Flag<"-warn-uninit-values">, |
| 41 | HelpText<"Warn about uses of uninitialized variables">; |
| 42 | def analysis_WarnObjCMethSigs : Flag<"-warn-objc-methodsigs">, |
| 43 | HelpText<"Warn about Objective-C method signatures with type incompatibilities">; |
| 44 | def analysis_WarnObjCDealloc : Flag<"-warn-objc-missing-dealloc">, |
| 45 | HelpText<"Warn about Objective-C classes that lack a correct implementation of -dealloc">; |
| 46 | def analysis_WarnObjCUnusedIvars : Flag<"-warn-objc-unused-ivars">, |
| 47 | HelpText<"Warn about private ivars that are never used">; |
| 48 | def analysis_CheckerCFRef : Flag<"-checker-cfref">, |
| 49 | HelpText<"Run the [Core] Foundation reference count checker">; |
| 50 | def analysis_WarnSizeofPointer : Flag<"-warn-sizeof-pointer">, |
| 51 | HelpText<"Warn about unintended use of sizeof() on pointer expressions">; |
| 52 | def analysis_InlineCall : Flag<"-inline-call">, |
| 53 | HelpText<"Experimental transfer function inling callees when its definition is available.">; |
| 54 | |
| 55 | def analyzer_store : Separate<"-analyzer-store">, |
| 56 | HelpText<"Source Code Analysis - Abstract Memory Store Models">; |
| 57 | def analyzer_store_EQ : Joined<"-analyzer-store=">, Alias<analyzer_store>; |
| 58 | |
| 59 | def analyzer_constraints : Separate<"-analyzer-constraints">, |
| 60 | HelpText<"Source Code Analysis - Symbolic Constraint Engines">; |
| 61 | def analyzer_constraints_EQ : Joined<"-analyzer-constraints=">, |
| 62 | Alias<analyzer_constraints>; |
| 63 | |
| 64 | def analyzer_output : Separate<"-analyzer-output">, |
| 65 | HelpText<"Source Code Analysis - Output Options">; |
| 66 | def analyzer_output_EQ : Joined<"-analyzer-output=">, |
| 67 | Alias<analyzer_output>; |
| 68 | |
| 69 | def analyzer_opt_analyze_headers : Flag<"-analyzer-opt-analyze-headers">, |
| 70 | HelpText<"Force the static analyzer to analyze functions defined in header files">; |
| 71 | def analyzer_display_progress : Flag<"-analyzer-display-progress">, |
| 72 | HelpText<"Emit verbose output about the analyzer's progress">; |
| 73 | def analyzer_experimental_checks : Flag<"-analyzer-experimental-checks">, |
| 74 | HelpText<"Use experimental path-sensitive checks">; |
| 75 | def analyzer_experimental_internal_checks : |
| 76 | Flag<"-analyzer-experimental-internal-checks">, |
| 77 | HelpText<"Use new default path-sensitive checks currently in testing">; |
| 78 | def analyze_function : Separate<"-analyze-function">, |
| 79 | HelpText<"Run analysis on specific function">; |
| 80 | def analyze_function_EQ : Joined<"-analyze-function=">, Alias<analyze_function>; |
| 81 | def analyzer_eagerly_assume : Flag<"-analyzer-eagerly-assume">, |
| 82 | HelpText<"Eagerly assume the truth/falseness of some symbolic constraints">; |
| 83 | def analyzer_no_purge_dead : Flag<"-analyzer-no-purge-dead">, |
| 84 | HelpText<"Don't remove dead symbols, bindings, and constraints before processing a statement">; |
| 85 | def trim_egraph : Flag<"-trim-egraph">, |
| 86 | HelpText<"Only show error-related paths in the analysis graph">; |
| 87 | def analyzer_viz_egraph_graphviz : Flag<"-analyzer-viz-egraph-graphviz">, |
| 88 | HelpText<"Display exploded graph using GraphViz">; |
| 89 | def analyzer_viz_egraph_ubigraph : Flag<"-analyzer-viz-egraph-ubigraph">, |
| 90 | HelpText<"Display exploded graph using Ubigraph">; |
| 91 | |
Daniel Dunbar | 50a4487 | 2009-11-20 17:23:30 +0000 | [diff] [blame] | 92 | // CodeGen Options |
| 93 | |
| 94 | def disable_llvm_optzns : Flag<"-disable-llvm-optzns">, |
| 95 | HelpText<"Don't run LLVM optimization passes">; |
| 96 | def disable_red_zone : Flag<"-disable-red-zone">, |
| 97 | HelpText<"Do not emit code that uses the red zone.">; |
| 98 | def g : Flag<"-g">, HelpText<"Generate source level debug information">; |
| 99 | def fno_common : Flag<"-fno-common">, |
| 100 | HelpText<"Compile common globals like normal definitions">; |
| 101 | def no_implicit_float : Flag<"-no-implicit-float">, |
| 102 | HelpText<"Don't generate implicit floating point instructions (x86-only)">; |
| 103 | def fno_merge_all_constants : Flag<"-fno-merge-all-constants">, |
| 104 | HelpText<"Disallow merging of constants.">; |
| 105 | def O : Joined<"-O">, HelpText<"Optimization level">; |
| 106 | def Os : Flag<"-Os">, HelpText<"Optimize for size">; |
Daniel Dunbar | 1bed0c3 | 2009-11-20 23:28:07 +0000 | [diff] [blame] | 107 | |
| 108 | // Dependency Output Options |
| 109 | def dependency_file : Separate<"-dependency-file">, |
| 110 | HelpText<"Filename (or -) to write dependency output to">; |
| 111 | def sys_header_deps : Flag<"-sys-header-deps">, |
| 112 | HelpText<"Include system headers in dependency output">; |
| 113 | def MT : Separate<"-MT">, HelpText<"Specify target for dependency">; |
| 114 | def MP : Flag<"-MP">, |
| 115 | HelpText<"Create phony target for each dependency (other than main file)">; |