LLVM-EXTRACT(1)
β¨ LLVM-EXTRACT β¨
okay bestie, so this is llvm-extract, part of the LLVM fam, and honestly? it's giving surgical π
she takes one (1) function and yoinks it out of a whole LLVM bitcode file. iconic behavior.
π SYNOPSIS π
llvm-extract [options] --func function-name [filename]
πΈ DESCRIPTION πΈ
So here's the vibe: llvm-extract takes the name of a function and extracts it from the LLVM bitcode file you point at. That's it, that's the whole thing. π«Ά
It's mainly a debugging tool β like, its whole purpose in life is helping you shrink down big test cases from larger programs that are out here triggering a bug. little sis ate that.
And not only does it pull out the bitcode of the function you asked for β it also removes unreachable global variables, prototypes, and unused types. she's tidy fr fr β¨
Input tea:llvm-extractreads its input from standard input if filename is omitted, OR if filename is-.
Output is always written to standard output, unless you pass the -o option (peep below π).
π OPTIONS π
--aliasalias-name β extract the alias named function-name from the LLVM bitcode. yes the manpage really says "function-name" for an alias, no I'm not fixing it, we report the tea as it is π. You can pass this multiple times to extract multiple aliases at once.--raliasalias-regular-expr β extract the alias matching alias-regular-expr from the LLVM bitcode. Every alias matching the regular expression gets extracted. May be specified multiple times.--bbbasic-block-specifier β extract basic block(s) specified in basic-block-specifier. May be specified multiple times. Each<function:bb[;bb]>specifier pair will create a function. If multiple basic blocks are specified in one pair, the first block in the sequence should dominate the rest. lowkey powerful π--deleteβ delete specified Globals from Module. that's it. no thoughts, just deletion π-fβ enable binary output on terminals. Normally,llvm-extractwill refuse to write raw bitcode output if the output stream is a terminal. With this option, she'll write raw bitcode regardless of the output device. (chaos mode unlocked, bestie)--funcfunction-name β extract the function named function-name from the LLVM bitcode. May be specified multiple times to extract multiple functions at once. this is the main character option tbh β--rfuncfunction-regular-expr β extract the function(s) matching function-regular-expr from the LLVM bitcode. All functions matching the regular expression will be extracted. May be specified multiple times.--globglobal-name β extract the global variable named global-name from the LLVM bitcode. May be specified multiple times to extract multiple global variables at once.--rglobglob-regular-expr β extract the global variable(s) matching global-regular-expr from the LLVM bitcode. All global variables matching the regular expression will be extracted. May be specified multiple times.--keep-const-initβ preserve the values of constant globals. protecting the constants, we love to see it π‘οΈ--recursiveβ recursively extract all called functions. she goes deep. no cap.-helpβ print a summary of command line options. when in doubt, ask for help bestie π-ofilename β specify the output filename. If filename is"-"(which is the default), thenllvm-extractsends its output to standard output.-Sβ write output in LLVM intermediate language (instead of bitcode). human-readable era π
π¦ EXIT STATUS π¦
If llvm-extract succeeds, she exits with 0. β¨
Otherwise, if an error occurs, she exits with a non-zero value. π (as she should)
π SEE ALSO π
π AUTHOR π
Maintained by the LLVM Team (https://llvm.org/). periodt.
π COPYRIGHT π
2003-2024, LLVM Project
and that's the whole page bestie!! ππ¦π this lil angel comes to you from the LLVM manual, dated 2024-07-18 β mwah, go extract something iconic π
β¨
π¦ where this page comes from
- fedora 43: llvm12 12.0.1-12.fc41 Β· NCSA
- fedora 43: llvm12 12.0.1-12.fc41 Β· NCSA
- fedora 44: llvm12 12.0.1-12.fc41 Β· NCSA
- fedora 44: llvm12 12.0.1-12.fc41 Β· NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms