The llvm-dis.html page was a little out of date, but this pod file can supersede it.
[oota-llvm.git] / docs / CommandGuide / llvmgxx.html
1 <html>
2 <title>
3 LLVM: llvmg++ tool
4 </title>
5
6 <body bgcolor=white>
7
8 <center>
9 <h1>LLVM: <tt>llvmg++</tt> tool</h1>
10 </center>
11 <HR>
12
13 <h3>NAME</h3>
14 <tt>llvmg++</tt>
15
16 <h3>SYNOPSIS</h3>
17 <tt>llvmg++ [options] filename</tt>
18
19 <h3>DESCRIPTION</h3>
20
21 The <tt>llvmg++</tt> command is the LLVM C++ front end.  It is a modified
22 version of g++ that takes C++ programs and compiles them into LLVM bytecode or
23 assembly language, depending upon the options.
24 <p>
25
26 Unless the <tt>-S</tt> option is specified, <tt>llvmg++</tt> will use the
27 <a href="gccas.html"><tt>gccas</tt></a> program to perform some optimizations
28 and create an LLVM bytecode file. Unless the <tt>-c</tt> option is specified,
29 <tt>llvmg++</tt> will also use the <a href="gccld.html"><tt>gccld</tt></a>
30 program to perform further optimizations and link the resulting bytecode
31 file(s) with support libraries to create an executable program.
32 <p>
33
34 Being derived from the <a href="http://gcc.gnu.org">GNU Compiler Collection</a>,
35 <tt>llvmg++</tt> has many of g++'s features and accepts most of g++'s options.
36 It handles a number of g++'s extensions to the C++ programming language.
37 <p>
38
39 Below you will find several commonly used options:
40
41 <h3>
42 OPTIONS
43 </h3>
44
45 <ul>
46         <li> -S
47         <br>
48         Do not generate an LLVM bytecode file.  Rather, compile the source file
49         into an LLVM assembly language file.
50         <p>
51
52         <li> -c
53         <br>
54         Do not generate a linked executable.  Rather, compile the source file
55         into an LLVM bytecode file.  This bytecode file can then be linked with
56         other bytecode files later on to generate a full LLVM executable.
57         <p>
58
59         <li> -o <i>filename</i>
60         <br>
61         Specify the output file to be <i>filename</i>.
62         <p>
63
64         <li> -I <i>directory</i>
65         <br>
66         Add a directory to the header file search path.  This option can be
67         repeated.
68         <p>
69
70         <li> -L <i>directory</i>
71         <br>
72         Add <i>directory</i> to the library search path.  This option can be
73         repeated.
74         <p>
75
76         <li> -l<i>name</i>
77         <br>
78         Link in the library lib<i>name</i>.[bc | a | so].  This library should
79         be a bytecode library.
80         <p>
81
82         <li>-Wl,<i>option</i>
83         <br>
84         Pass <i>option</i> to the linker (usually gccld).
85         <p>
86
87 </ul>
88
89 <h3>
90 EXIT STATUS
91 </h3>
92
93 If <tt>llvmg++</tt> succeeds, it will exit with 0.  Otherwise, if an error
94 occurs, it will exit with a non-zero value.
95
96 <h3>
97 SEE ALSO
98 </h3>
99 <A HREF="llvmgcc.html"><tt>llvmg++</tt></A>,
100 <A HREF="gccas.html"><tt>gccas</tt></A>,
101 <A HREF="gccld.html"><tt>gccld</tt></A>
102
103 <HR>
104 Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
105 </body>
106 </html>
107