explain that NumElements in alloca and malloc defaults to one
[oota-llvm.git] / docs / CommandGuide / llvmgcc.pod
1 =pod
2
3 =head1 NAME
4
5 llvm-gcc - LLVM C front-end
6
7 =head1 SYNOPSIS
8
9 B<llvm-gcc> [I<options>] I<filename>
10
11 =head1 DESCRIPTION
12
13 The B<llvm-gcc> command is the LLVM C front end.  It is a modified
14 version of gcc that compiles C/ObjC programs into native objects, LLVM
15 bitcode or LLVM assembly language, depending upon the options.
16
17 By default, B<llvm-gcc> compiles to native objects just like GCC does. If the
18 B<-emit-llvm> option is given then it will generate LLVM bitcode files instead.
19 If B<-S> (assembly) is also given, then it will generate LLVM assembly. 
20
21 Being derived from the GNU Compiler Collection, B<llvm-gcc> has many
22 of gcc's features and accepts most of gcc's options.  It handles a
23 number of gcc's extensions to the C programming language.
24
25 =head1 OPTIONS
26
27 =over
28
29 =item B<--help>
30
31 Print a summary of command line options.
32
33 =item B<-S>
34
35 Do not generate an LLVM bitcode file.  Rather, compile the source
36 file into an LLVM assembly language file.
37
38 =item B<-c>
39
40 Do not generate a linked executable.  Rather, compile the source
41 file into an LLVM bitcode file.  This bitcode file can then be
42 linked with other bitcode files later on to generate a full LLVM
43 executable.
44
45 =item B<-o> I<filename>
46
47 Specify the output file to be I<filename>.
48
49 =item B<-I> I<directory>
50
51 Add a directory to the header file search path.  This option can be
52 repeated.
53
54 =item B<-L> I<directory>
55
56 Add I<directory> to the library search path.  This option can be
57 repeated.
58
59 =item B<-l>I<name>
60
61 Link in the library libI<name>.[bc | a | so].  This library should
62 be a bitcode library.
63
64 =item B<-emit-llvm>
65
66 Make the output be LLVM bitcode (or assembly) instead of native object (or
67 assembly).
68
69 =back
70
71 =head1 EXIT STATUS
72
73 If B<llvm-gcc> succeeds, it will exit with 0.  Otherwise, if an error
74 occurs, it will exit with a non-zero value.
75
76 =head1 SEE ALSO
77
78 L<llvm-g++|llvmgxx>
79
80 =head1 AUTHORS
81
82 Maintained by the LLVM Team (L<http://llvm.org>).
83
84 =cut
85