blob: 3232d8ef21d2e78d77790c6f567b8e0051074a89 [file] [log] [blame]
Brian Gaeke8172d532004-06-02 19:21:26 +00001=pod
2
3=head1 NAME
4
5extract - extract a function from an LLVM module
6
7=head1 SYNOPSIS
8
Misha Brukmanc08937a2004-07-02 16:06:19 +00009B<extract> [I<options>] B<--func> I<function-name> [I<filename>]
Brian Gaeke8172d532004-06-02 19:21:26 +000010
11=head1 DESCRIPTION
12
13The B<extract> command takes the name of a function and extracts it from
14the specified LLVM bytecode file. It is primarily used as a debugging tool to
15reduce test cases from larger programs that are triggering a bug.
16
17In addition to extracting the bytecode of the specified function,
18B<extract> will also remove unreachable global variables, prototypes, and
19unused types.
20
21The B<extract> command reads its input from standard input if filename is
22omitted or if filename is -. The output is always written to standard output,
23unless the B<-o> option is specified (see below).
24
25=head1 OPTIONS
26
27=over
28
29=item B<-f>
30
31Force overwrite. Normally, B<extract> will refuse to overwrite an
32output file that already exists. With this option, B<extract>
33will overwrite the output file and replace it with new bytecode.
34
35=item B<--func> I<function-name>
36
37Extract the function named I<function-name> from the LLVM bytecode.
38
39=item B<--help>
40
41Print a summary of command line options.
42
43=item B<-o> I<filename>
44
45Specify the output filename. If filename is "-" (the default), then
46B<extract> sends its output to standard output.
47
48=item B<--stats>
49
50Print statistics.
51
52=item B<--time-passes>
53
54Record the amount of time needed for each pass and print it to standard
55error.
56
57=back
58
59=head1 EXIT STATUS
60
61If B<extract> succeeds, it will exit with 0. Otherwise, if an error
62occurs, it will exit with a non-zero value.
63
64=head1 SEE ALSO
65
Misha Brukmanc08937a2004-07-02 16:06:19 +000066L<bugpoint|bugpoint>
Brian Gaeke8172d532004-06-02 19:21:26 +000067
68=head1 AUTHORS
69
70Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
71
72=cut