llvm-extract.pod 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. =pod
  2. =head1 NAME
  3. llvm-extract - extract a function from an LLVM module
  4. =head1 SYNOPSIS
  5. B<llvm-extract> [I<options>] B<--func> I<function-name> [I<filename>]
  6. =head1 DESCRIPTION
  7. The B<llvm-extract> command takes the name of a function and extracts it from
  8. the specified LLVM bitcode file. It is primarily used as a debugging tool to
  9. reduce test cases from larger programs that are triggering a bug.
  10. In addition to extracting the bitcode of the specified function,
  11. B<llvm-extract> will also remove unreachable global variables, prototypes, and
  12. unused types.
  13. The B<llvm-extract> command reads its input from standard input if filename is
  14. omitted or if filename is -. The output is always written to standard output,
  15. unless the B<-o> option is specified (see below).
  16. =head1 OPTIONS
  17. =over
  18. =item B<-f>
  19. Enable binary output on terminals. Normally, B<llvm-extract> will refuse to
  20. write raw bitcode output if the output stream is a terminal. With this option,
  21. B<llvm-extract> will write raw bitcode regardless of the output device.
  22. =item B<--func> I<function-name>
  23. Extract the function named I<function-name> from the LLVM bitcode. May be
  24. specified multiple times to extract multiple functions at once.
  25. =item B<--glob> I<global-name>
  26. Extract the global variable named I<global-name> from the LLVM bitcode. May be
  27. specified multiple times to extract multiple global variables at once.
  28. =item B<-help>
  29. Print a summary of command line options.
  30. =item B<-o> I<filename>
  31. Specify the output filename. If filename is "-" (the default), then
  32. B<llvm-extract> sends its output to standard output.
  33. =item B<-S>
  34. Write output in LLVM intermediate language (instead of bitcode).
  35. =back
  36. =head1 EXIT STATUS
  37. If B<llvm-extract> succeeds, it will exit with 0. Otherwise, if an error
  38. occurs, it will exit with a non-zero value.
  39. =head1 SEE ALSO
  40. L<bugpoint|bugpoint>
  41. =head1 AUTHORS
  42. Maintained by the LLVM Team (L<http://llvm.org>).
  43. =cut