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