2 .\" Man page generated from reStructuredText.
4 .TH "LLVM-EXTRACT" "1" "2017-12-24" "6" "LLVM"
6 llvm-extract \- extract a function from an LLVM module
8 .nr rst2man-indent-level 0
12 level \\n[rst2man-indent-level]
13 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
20 .\" .rstReportMargin pre:
22 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
23 . nr rst2man-indent-level +1
24 .\" .rstReportMargin post:
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
36 \fBllvm\-extract\fP [\fIoptions\fP] \fB\-\-func\fP \fIfunction\-name\fP [\fIfilename\fP]
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.
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.
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).
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
62 \fB\-\-func\fP \fIfunction\-name\fP
65 Extract the function named \fIfunction\-name\fP from the LLVM bitcode. May be
66 specified multiple times to extract multiple functions at once.
70 \fB\-\-rfunc\fP \fIfunction\-regular\-expr\fP
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.
79 \fB\-\-glob\fP \fIglobal\-name\fP
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.
87 \fB\-\-rglob\fP \fIglob\-regular\-expr\fP
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.
99 Print a summary of command line options.
103 \fB\-o\fP \fIfilename\fP
106 Specify the output filename. If filename is "\-" (the default), then
107 \fBllvm\-extract\fP sends its output to standard output.
114 Write output in LLVM intermediate language (instead of bitcode).
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.
125 Maintained by The LLVM Team (http://llvm.org/).
127 2003-2017, LLVM Project
128 .\" Generated by docutils manpage writer.