blob: b840168a6e13cd332a9ffc1a1f38274937f072f5 [file] [log] [blame]
John Criswell58ebcd02003-09-17 14:11:24 +00001<html>
2<title>
Chris Lattneree43b692003-09-25 19:50:05 +00003LLVM: extract tool
John Criswell58ebcd02003-09-17 14:11:24 +00004</title>
5
Chris Lattner08a04fd2003-10-07 20:12:05 +00006<body bgcolor=white>
John Criswell58ebcd02003-09-17 14:11:24 +00007
8<center>
Chris Lattnerf8cf4162003-10-07 19:48:25 +00009<h1>LLVM: <tt>extract</tt> tool</h1>
John Criswell58ebcd02003-09-17 14:11:24 +000010</center>
11<HR>
12
Chris Lattnerf8cf4162003-10-07 19:48:25 +000013<h3>NAME</h3>
14<tt>extract</tt>
John Criswell58ebcd02003-09-17 14:11:24 +000015
16<h3>
17SYNOPSIS
18</h3>
19
Chris Lattnerf8cf4162003-10-07 19:48:25 +000020<tt>extract [options] [filename]</tt>
John Criswell58ebcd02003-09-17 14:11:24 +000021<h3>
22DESCRIPTION
23</h3>
24
Chris Lattnerf8cf4162003-10-07 19:48:25 +000025The <tt>extract</tt> command takes the name of a function and extracts it from
26the specified LLVM bytecode file. It is primarily used as a debugging tool to
John Criswell58ebcd02003-09-17 14:11:24 +000027reduce test cases from larger programs that are triggering a bug.
John Criswellac41ea22003-09-30 22:55:44 +000028<p>
29
Chris Lattnerf8cf4162003-10-07 19:48:25 +000030In addition to extracting the bytecode of the specified function,
31<tt>extract</tt> will also remove unreachable global variables, prototypes, and
32unused types.
John Criswellac41ea22003-09-30 22:55:44 +000033<p>
34
Chris Lattnerf8cf4162003-10-07 19:48:25 +000035The <tt>extract</tt> command reads its input from standard input if filename is
John Criswellac41ea22003-09-30 22:55:44 +000036omitted or if filename is -. The output is always written to standard output.
John Criswell58ebcd02003-09-17 14:11:24 +000037
Chris Lattnera972dad2004-02-18 16:55:29 +000038<h3>OPTIONS</h3>
John Criswell58ebcd02003-09-17 14:11:24 +000039
40<ul>
Chris Lattnera972dad2004-02-18 16:55:29 +000041<ul>
42 <li> -f
43 <br>
44 Force overwrite. Normally, <tt>extract</tt> will refuse to overwrite an
45 output file that already exists. With this option, <tt>extract</tt>
46 will overwrite the output file and replace it with new bytecode.
47 <p>
48
John Criswell58ebcd02003-09-17 14:11:24 +000049 <li>-func &lt;function&gt;
50 <br>
Chris Lattnerf8cf4162003-10-07 19:48:25 +000051 Extract the specified function from the LLVM bytecode.
John Criswell58ebcd02003-09-17 14:11:24 +000052 <p>
53
54 <li> -help
55 <br>
56 Print a summary of command line options.
57 <p>
Chris Lattnera972dad2004-02-18 16:55:29 +000058
59 <li> -o &lt;filename&gt;
60 <br>
61 Specify the output filename. If filename is "-" (the default), then
62 <tt>extract</tt> sends its output to standard output.
63 <p>
John Criswell58ebcd02003-09-17 14:11:24 +000064</ul>
65
66<h3>
67EXIT STATUS
68</h3>
69
Chris Lattnerf8cf4162003-10-07 19:48:25 +000070If <tt>extract</tt> succeeds, it will exit with 0. Otherwise, if an error
71occurs, it will exit with a non-zero value.
John Criswell58ebcd02003-09-17 14:11:24 +000072
73<h3>
74SEE ALSO
75</h3>
Chris Lattnerf8cf4162003-10-07 19:48:25 +000076<a href="bugpoint.html"><tt>bugpoint</tt></a>
John Criswell58ebcd02003-09-17 14:11:24 +000077
78<HR>
Chris Lattner08a04fd2003-10-07 20:12:05 +000079Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
John Criswell58ebcd02003-09-17 14:11:24 +000080</body>
81</html>
82