1LLVM-EXTRACT(1) LLVM Command Guide LLVM-EXTRACT(1)
2
3
4
6 llvm-extract - extract a function from an LLVM module
7
9 llvm-extract [options] --func function-name [filename]
10
12 The llvm-extract command takes the name of a function and extracts it
13 from the specified LLVM bitcode file. It is primarily used as a
14 debugging tool to reduce test cases from larger programs that are
15 triggering a bug.
16
17 In addition to extracting the bitcode of the specified function, llvm-
18 extract will also remove unreachable global variables, prototypes, and
19 unused types.
20
21 The llvm-extract command reads its input from standard input if
22 filename is omitted or if filename is -. The output is always written
23 to standard output, unless the -o option is specified (see below).
24
26 -f Enable binary output on terminals. Normally, llvm-extract will
27 refuse to write raw bitcode output if the output stream is a
28 terminal. With this option, llvm-extract will write raw bitcode
29 regardless of the output device.
30
31 --func function-name
32 Extract the function named function-name from the LLVM bitcode. May
33 be specified multiple times to extract multiple functions at once.
34
35 --glob global-name
36 Extract the global variable named global-name from the LLVM
37 bitcode. May be specified multiple times to extract multiple global
38 variables at once.
39
40 -help
41 Print a summary of command line options.
42
43 -o filename
44 Specify the output filename. If filename is "-" (the default),
45 then llvm-extract sends its output to standard output.
46
47 -S Write output in LLVM intermediate language (instead of bitcode).
48
50 If llvm-extract succeeds, it will exit with 0. Otherwise, if an error
51 occurs, it will exit with a non-zero value.
52
54 bugpoint
55
57 Maintained by the LLVM Team (<http://llvm.org>).
58
59
60
61CVS 2010-05-07 LLVM-EXTRACT(1)