@@ -54,13 +54,13 @@ This stage translates an AST into low-level intermediate code or machine code
54
54
the generated code and handling target-specfic code generation. The output of
55
55
this stage is typically called a ".s" file.
56
56
57
- =item B<Assembly >
57
+ =item B<Assembler >
58
58
59
59
This stage runs the target assembler to translate the output of the compiler
60
60
into a target object file. The output of this stage is typically called a ".o"
61
61
file.
62
62
63
- =item B<Linking >
63
+ =item B<Linker >
64
64
65
65
This stage runs the target linker to merge multiple object files into an
66
66
executable or dynamic library. The output of this stage is typically called an
@@ -69,56 +69,68 @@ executable or dynamic library. The output of this stage is typically called an
69
69
=back
70
70
71
71
The Clang compiler supports a large number of options to control each of these
72
- stages.
72
+ stages. In addition to compilation of code, Clang also supports other tools.
73
73
74
- =head1 OPTIONS
74
+ B<Clang Static Analyzer>
75
75
76
+ The Clang Static Analyzer is a tool that scans source code to try to find bugs
77
+ though code analysis. This tool uses many parts of Clang and is built into the
78
+ same driver.
76
79
77
- =head2 Stage Selection Options
78
80
79
- =over
81
+ =head1 OPTIONS
80
82
81
- =item B<--help>
83
+ =head2 Stage Selection Options
82
84
83
- Display available options.
85
+ =over
84
86
87
+ =item B<-E>
85
88
86
- =item B<-###>
89
+ Run the preprocessor stage.
87
90
88
- Print the commands to run for this compilation.
91
+ =item B<-fsyntax-only>
89
92
93
+ Run the preprocessor, parser and type checking stages.
90
94
91
- =item B<-E >
95
+ =item B<-emit-llvm >
92
96
93
- Only run the preprocessor.
97
+ Run the preprocessor, parser, type checking stages, LLVM generation and
98
+ optimization stages.
94
99
95
100
=item B<-S>
96
101
97
- Only run preprocess and compilation steps.
102
+ Run all of the above, plus target-specific code generation, producing an
103
+ assembly file.
98
104
99
105
=item B<-c>
100
106
101
- Only run preprocess, compile, and assemble steps.
102
-
103
- =item B<-emit-llvm>
107
+ Run all of the above, plus the assembler, generating a target ".o" object file.
104
108
105
- Use the LLVM representation for assembler and object files.
109
+ =item B<no stage selection option>
106
110
111
+ If no stage selection option is specified, all stages above are run, and the
112
+ linker is run to combine the results into an executable or shared library.
107
113
114
+ =item B<--analyze>
108
115
116
+ Run the Clang Static Analyzer.
109
117
110
118
=back
111
119
112
120
113
121
122
+ =head2 Driver Options
114
123
124
+ =over
115
125
126
+ =item B<-###>
116
127
117
- =over
128
+ Print the commands to run for this compilation.
118
129
119
- =item B<--analyze>
130
+ =item B<--help>
131
+
132
+ Display available options.
120
133
121
- Run the static analyzer.
122
134
=item B<-ObjC++>
123
135
124
136
Treat source input files as Objective-C++ inputs.
@@ -169,6 +181,7 @@ Write output to I<file>.
169
181
170
182
=item B<-pipe>
171
183
184
+ FIXME: WHY DOCUMENT THIS.
172
185
Use pipes between commands, when possible.
173
186
174
187
=item B<-print-file-name>=I<file>
@@ -203,19 +216,65 @@ Show commands to run and use verbose output.
203
216
204
217
Treat subsequent input files as having type I<language>.
205
218
219
+
220
+ =back
221
+
222
+
223
+
224
+
225
+
226
+ =head2 Preprocessor Options
227
+
228
+ =over
229
+
230
+ =back
231
+
232
+
233
+
234
+
235
+ =head2 Parser and Semantic Analysis Options
236
+
237
+ =over
238
+
206
239
=back
207
240
241
+
242
+
243
+ =head2 Code Generation and Optimization Options
244
+
245
+ =over
246
+
247
+ =back
248
+
249
+
250
+ =head2 Assembler Options
251
+
252
+ =over
253
+
254
+ =back
255
+
256
+
257
+ =head2 Linker Options
258
+
259
+ =over
260
+
261
+ =back
262
+
263
+
208
264
=head1 ENVIRONMENT
209
265
210
- FIXME: Fill in environment .
266
+ No environment variables read .
211
267
212
268
=head1 BUGS
213
269
214
- It is inconceivable that Clang may have a bug.
270
+ Clang currently does not have C++ support, and this manual page is incomplete.
271
+ To report bugs, please visit L<http://llvm.org/bugs/>. Most bug reports should
272
+ include preprocessed source files (use the B<-E> option) along with information
273
+ to reproduce.
215
274
216
275
=head1 SEE ALSO
217
276
218
- FIXME: See also?
277
+ as(1), ld(1)
219
278
220
279
=head1 AUTHOR
221
280
0 commit comments