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