]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - usr.bin/clang/llvm-extract/llvm-extract.1
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / usr.bin / clang / llvm-extract / llvm-extract.1
1 .\" $FreeBSD$
2 .\" Man page generated from reStructuredText.
3 .
4 .TH "LLVM-EXTRACT" "1" "2014-01-01" "3.4" "LLVM"
5 .SH NAME
6 llvm-extract \- extract a function from an LLVM module
7 .
8 .nr rst2man-indent-level 0
9 .
10 .de1 rstReportMargin
11 \\$1 \\n[an-margin]
12 level \\n[rst2man-indent-level]
13 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
14 -
15 \\n[rst2man-indent0]
16 \\n[rst2man-indent1]
17 \\n[rst2man-indent2]
18 ..
19 .de1 INDENT
20 .\" .rstReportMargin pre:
21 . RS \\$1
22 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
23 . nr rst2man-indent-level +1
24 .\" .rstReportMargin post:
25 ..
26 .de UNINDENT
27 . RE
28 .\" indent \\n[an-margin]
29 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
30 .nr rst2man-indent-level -1
31 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
32 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
33 ..
34 .SH SYNOPSIS
35 .sp
36 \fBllvm\-extract\fP [\fIoptions\fP] \fB\-\-func\fP \fIfunction\-name\fP [\fIfilename\fP]
37 .SH DESCRIPTION
38 .sp
39 The \fBllvm\-extract\fP command takes the name of a function and extracts
40 it from the specified LLVM bitcode file.  It is primarily used as a debugging
41 tool to reduce test cases from larger programs that are triggering a bug.
42 .sp
43 In addition to extracting the bitcode of the specified function,
44 \fBllvm\-extract\fP will also remove unreachable global variables,
45 prototypes, and unused types.
46 .sp
47 The \fBllvm\-extract\fP command reads its input from standard input if
48 filename is omitted or if filename is \fB\-\fP\&.  The output is always written to
49 standard output, unless the \fB\-o\fP option is specified (see below).
50 .SH OPTIONS
51 .sp
52 \fB\-f\fP
53 .INDENT 0.0
54 .INDENT 3.5
55 Enable binary output on terminals.  Normally, \fBllvm\-extract\fP will
56 refuse to write raw bitcode output if the output stream is a terminal.  With
57 this option, \fBllvm\-extract\fP will write raw bitcode regardless of the
58 output device.
59 .UNINDENT
60 .UNINDENT
61 .sp
62 \fB\-\-func\fP \fIfunction\-name\fP
63 .INDENT 0.0
64 .INDENT 3.5
65 Extract the function named \fIfunction\-name\fP from the LLVM bitcode. May be
66 specified multiple times to extract multiple functions at once.
67 .UNINDENT
68 .UNINDENT
69 .sp
70 \fB\-\-rfunc\fP \fIfunction\-regular\-expr\fP
71 .INDENT 0.0
72 .INDENT 3.5
73 Extract the function(s) matching \fIfunction\-regular\-expr\fP from the LLVM bitcode.
74 All functions matching the regular expression will be extracted.  May be
75 specified multiple times.
76 .UNINDENT
77 .UNINDENT
78 .sp
79 \fB\-\-glob\fP \fIglobal\-name\fP
80 .INDENT 0.0
81 .INDENT 3.5
82 Extract the global variable named \fIglobal\-name\fP from the LLVM bitcode. May be
83 specified multiple times to extract multiple global variables at once.
84 .UNINDENT
85 .UNINDENT
86 .sp
87 \fB\-\-rglob\fP \fIglob\-regular\-expr\fP
88 .INDENT 0.0
89 .INDENT 3.5
90 Extract the global variable(s) matching \fIglobal\-regular\-expr\fP from the LLVM
91 bitcode.  All global variables matching the regular expression will be
92 extracted.  May be specified multiple times.
93 .UNINDENT
94 .UNINDENT
95 .sp
96 \fB\-help\fP
97 .INDENT 0.0
98 .INDENT 3.5
99 Print a summary of command line options.
100 .UNINDENT
101 .UNINDENT
102 .sp
103 \fB\-o\fP \fIfilename\fP
104 .INDENT 0.0
105 .INDENT 3.5
106 Specify the output filename.  If filename is "\-" (the default), then
107 \fBllvm\-extract\fP sends its output to standard output.
108 .UNINDENT
109 .UNINDENT
110 .sp
111 \fB\-S\fP
112 .INDENT 0.0
113 .INDENT 3.5
114 Write output in LLVM intermediate language (instead of bitcode).
115 .UNINDENT
116 .UNINDENT
117 .SH EXIT STATUS
118 .sp
119 If \fBllvm\-extract\fP succeeds, it will exit with 0.  Otherwise, if an error
120 occurs, it will exit with a non\-zero value.
121 .SH SEE ALSO
122 .sp
123 bugpoint
124 .SH AUTHOR
125 Maintained by The LLVM Team (http://llvm.org/).
126 .SH COPYRIGHT
127 2003-2013, LLVM Project
128 .\" Generated by docutils manpage writer.
129 .