Skip to content

Commit 164ac10

Browse files
committed
More content.
llvm-svn: 71088
1 parent f35c5a5 commit 164ac10

File tree

1 file changed

+82
-23
lines changed

1 file changed

+82
-23
lines changed

clang/docs/tools/clang.pod

Lines changed: 82 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ This stage translates an AST into low-level intermediate code or machine code
5454
the generated code and handling target-specfic code generation. The output of
5555
this stage is typically called a ".s" file.
5656

57-
=item B<Assembly>
57+
=item B<Assembler>
5858

5959
This stage runs the target assembler to translate the output of the compiler
6060
into a target object file. The output of this stage is typically called a ".o"
6161
file.
6262

63-
=item B<Linking>
63+
=item B<Linker>
6464

6565
This stage runs the target linker to merge multiple object files into an
6666
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
6969
=back
7070

7171
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.
7373

74-
=head1 OPTIONS
74+
B<Clang Static Analyzer>
7575

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.
7679

77-
=head2 Stage Selection Options
7880

79-
=over
81+
=head1 OPTIONS
8082

81-
=item B<--help>
83+
=head2 Stage Selection Options
8284

83-
Display available options.
85+
=over
8486

87+
=item B<-E>
8588

86-
=item B<-###>
89+
Run the preprocessor stage.
8790

88-
Print the commands to run for this compilation.
91+
=item B<-fsyntax-only>
8992

93+
Run the preprocessor, parser and type checking stages.
9094

91-
=item B<-E>
95+
=item B<-emit-llvm>
9296

93-
Only run the preprocessor.
97+
Run the preprocessor, parser, type checking stages, LLVM generation and
98+
optimization stages.
9499

95100
=item B<-S>
96101

97-
Only run preprocess and compilation steps.
102+
Run all of the above, plus target-specific code generation, producing an
103+
assembly file.
98104

99105
=item B<-c>
100106

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.
104108

105-
Use the LLVM representation for assembler and object files.
109+
=item B<no stage selection option>
106110

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.
107113

114+
=item B<--analyze>
108115

116+
Run the Clang Static Analyzer.
109117

110118
=back
111119

112120

113121

122+
=head2 Driver Options
114123

124+
=over
115125

126+
=item B<-###>
116127

117-
=over
128+
Print the commands to run for this compilation.
118129

119-
=item B<--analyze>
130+
=item B<--help>
131+
132+
Display available options.
120133

121-
Run the static analyzer.
122134
=item B<-ObjC++>
123135

124136
Treat source input files as Objective-C++ inputs.
@@ -169,6 +181,7 @@ Write output to I<file>.
169181

170182
=item B<-pipe>
171183

184+
FIXME: WHY DOCUMENT THIS.
172185
Use pipes between commands, when possible.
173186

174187
=item B<-print-file-name>=I<file>
@@ -203,19 +216,65 @@ Show commands to run and use verbose output.
203216

204217
Treat subsequent input files as having type I<language>.
205218

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+
206239
=back
207240

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+
208264
=head1 ENVIRONMENT
209265

210-
FIXME: Fill in environment.
266+
No environment variables read.
211267

212268
=head1 BUGS
213269

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.
215274

216275
=head1 SEE ALSO
217276

218-
FIXME: See also?
277+
as(1), ld(1)
219278

220279
=head1 AUTHOR
221280

0 commit comments

Comments
 (0)