2012-02-05 23:56:22 +00:00
|
|
|
.\" $FreeBSD$
|
2014-02-16 19:44:07 +00:00
|
|
|
.\" Man page generated from reStructuredText.
|
|
|
|
.
|
2018-08-02 19:11:56 +00:00
|
|
|
.TH "LLVM-EXTRACT" "1" "2018-08-02" "7" "LLVM"
|
2012-08-20 18:33:03 +00:00
|
|
|
.SH NAME
|
|
|
|
llvm-extract \- extract a function from an LLVM module
|
|
|
|
.
|
|
|
|
.nr rst2man-indent-level 0
|
|
|
|
.
|
|
|
|
.de1 rstReportMargin
|
|
|
|
\\$1 \\n[an-margin]
|
|
|
|
level \\n[rst2man-indent-level]
|
|
|
|
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
-
|
|
|
|
\\n[rst2man-indent0]
|
|
|
|
\\n[rst2man-indent1]
|
|
|
|
\\n[rst2man-indent2]
|
2012-02-05 23:56:22 +00:00
|
|
|
..
|
2012-08-20 18:33:03 +00:00
|
|
|
.de1 INDENT
|
|
|
|
.\" .rstReportMargin pre:
|
|
|
|
. RS \\$1
|
|
|
|
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
|
|
|
|
. nr rst2man-indent-level +1
|
|
|
|
.\" .rstReportMargin post:
|
2012-02-05 23:56:22 +00:00
|
|
|
..
|
2012-08-20 18:33:03 +00:00
|
|
|
.de UNINDENT
|
|
|
|
. RE
|
|
|
|
.\" indent \\n[an-margin]
|
|
|
|
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
.nr rst2man-indent-level -1
|
|
|
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
|
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
2012-02-05 23:56:22 +00:00
|
|
|
..
|
2012-08-20 18:33:03 +00:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.sp
|
|
|
|
\fBllvm\-extract\fP [\fIoptions\fP] \fB\-\-func\fP \fIfunction\-name\fP [\fIfilename\fP]
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.sp
|
2014-02-16 19:44:07 +00:00
|
|
|
The \fBllvm\-extract\fP command takes the name of a function and extracts
|
|
|
|
it from the specified LLVM bitcode file. It is primarily used as a debugging
|
|
|
|
tool to reduce test cases from larger programs that are triggering a bug.
|
2012-08-20 18:33:03 +00:00
|
|
|
.sp
|
2012-02-05 23:56:22 +00:00
|
|
|
In addition to extracting the bitcode of the specified function,
|
2014-02-16 19:44:07 +00:00
|
|
|
\fBllvm\-extract\fP will also remove unreachable global variables,
|
|
|
|
prototypes, and unused types.
|
2012-08-20 18:33:03 +00:00
|
|
|
.sp
|
2014-02-16 19:44:07 +00:00
|
|
|
The \fBllvm\-extract\fP command reads its input from standard input if
|
|
|
|
filename is omitted or if filename is \fB\-\fP\&. The output is always written to
|
|
|
|
standard output, unless the \fB\-o\fP option is specified (see below).
|
2012-08-20 18:33:03 +00:00
|
|
|
.SH OPTIONS
|
|
|
|
.sp
|
|
|
|
\fB\-f\fP
|
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
2014-02-16 19:44:07 +00:00
|
|
|
Enable binary output on terminals. Normally, \fBllvm\-extract\fP will
|
|
|
|
refuse to write raw bitcode output if the output stream is a terminal. With
|
|
|
|
this option, \fBllvm\-extract\fP will write raw bitcode regardless of the
|
|
|
|
output device.
|
2012-08-20 18:33:03 +00:00
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
|
|
|
.sp
|
|
|
|
\fB\-\-func\fP \fIfunction\-name\fP
|
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
2016-03-03 23:09:57 +00:00
|
|
|
Extract the function named \fIfunction\-name\fP from the LLVM bitcode. May be
|
2012-02-05 23:56:22 +00:00
|
|
|
specified multiple times to extract multiple functions at once.
|
2012-08-20 18:33:03 +00:00
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
|
|
|
.sp
|
|
|
|
\fB\-\-rfunc\fP \fIfunction\-regular\-expr\fP
|
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
|
|
|
Extract the function(s) matching \fIfunction\-regular\-expr\fP from the LLVM bitcode.
|
|
|
|
All functions matching the regular expression will be extracted. May be
|
2012-02-05 23:56:22 +00:00
|
|
|
specified multiple times.
|
2012-08-20 18:33:03 +00:00
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
|
|
|
.sp
|
|
|
|
\fB\-\-glob\fP \fIglobal\-name\fP
|
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
2016-03-03 23:09:57 +00:00
|
|
|
Extract the global variable named \fIglobal\-name\fP from the LLVM bitcode. May be
|
2012-02-05 23:56:22 +00:00
|
|
|
specified multiple times to extract multiple global variables at once.
|
2012-08-20 18:33:03 +00:00
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
|
|
|
.sp
|
|
|
|
\fB\-\-rglob\fP \fIglob\-regular\-expr\fP
|
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
|
|
|
Extract the global variable(s) matching \fIglobal\-regular\-expr\fP from the LLVM
|
2014-02-16 19:44:07 +00:00
|
|
|
bitcode. All global variables matching the regular expression will be
|
|
|
|
extracted. May be specified multiple times.
|
2012-08-20 18:33:03 +00:00
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
|
|
|
.sp
|
|
|
|
\fB\-help\fP
|
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
2012-02-05 23:56:22 +00:00
|
|
|
Print a summary of command line options.
|
2012-08-20 18:33:03 +00:00
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
|
|
|
.sp
|
|
|
|
\fB\-o\fP \fIfilename\fP
|
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
|
|
|
Specify the output filename. If filename is "\-" (the default), then
|
|
|
|
\fBllvm\-extract\fP sends its output to standard output.
|
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
|
|
|
.sp
|
|
|
|
\fB\-S\fP
|
|
|
|
.INDENT 0.0
|
|
|
|
.INDENT 3.5
|
|
|
|
Write output in LLVM intermediate language (instead of bitcode).
|
|
|
|
.UNINDENT
|
|
|
|
.UNINDENT
|
|
|
|
.SH EXIT STATUS
|
|
|
|
.sp
|
|
|
|
If \fBllvm\-extract\fP succeeds, it will exit with 0. Otherwise, if an error
|
|
|
|
occurs, it will exit with a non\-zero value.
|
|
|
|
.SH SEE ALSO
|
|
|
|
.sp
|
2014-02-16 19:44:07 +00:00
|
|
|
bugpoint
|
2012-08-20 18:33:03 +00:00
|
|
|
.SH AUTHOR
|
|
|
|
Maintained by The LLVM Team (http://llvm.org/).
|
|
|
|
.SH COPYRIGHT
|
2018-08-02 19:11:56 +00:00
|
|
|
2003-2018, LLVM Project
|
2012-08-20 18:33:03 +00:00
|
|
|
.\" Generated by docutils manpage writer.
|
|
|
|
.
|