LLVM-CXXFILT(1)

πŸ’… llvm-cxxfilt β€” bestie's guide to un-mangling names

okay so. this is a page from the LLVM manual collection, section 1, and it's about a lil tool called llvm-cxxfilt. the symbol name demangler. yes queen, we're decoding the cursed glyph soup today. ✨


πŸŽ€ NAME πŸŽ€

llvm-cxxfilt β€” the LLVM symbol name demangler. it takes names that look like a cat walked across the keyboard and turns them back into human words. iykyk πŸ’–


🌸 SYNOPSIS 🌸

llvm-cxxfilt [options] [mangled names...]

πŸ¦‹ DESCRIPTION πŸ¦‹

so llvm-cxxfilt is a symbol demangler, and the whole point is that you can use it as a drop-in replacement for the GNU c++filt tool. it takes a series of symbol names and prints their demangled form on the standard output stream. that's it, that's the job. πŸ’…

and if a name can't be demangled? it just prints it as-is. no drama, no error, no nothing. it simply vibes. 🫢

if you don't specify any names on the command-line, then names get read interactively from the standard input stream instead. and here's the tea when you're reading from stdin: every input line gets split on characters that are not part of valid Itanium name manglings β€” meaning characters that are not alphanumeric, not '.', not '$', and not '_'. and the separators between names? those get copied to the output exactly as-is. lowkey elegant. ✨


πŸ“ EXAMPLE πŸ“

like, look at her go:

$ llvm-cxxfilt _Z3foov _Z3bari not_mangled
foo()
bar(int)
not_mangled
$ cat input.txt
| _Z3foov *** _Z3bari *** not_mangled |
$ llvm-cxxfilt < input.txt
| foo() *** bar(int) *** not_mangled |

see how not_mangled just walked through untouched? and the *** separators stayed put? that's the vibe check passing. βœ…


✨ OPTIONS ✨

here's every single flag, no skips, no skimming, we do not gatekeep here:

  • --format=<value>, -s β€” the mangling scheme to assume. valid values are auto (which is the default, and it auto-detects the style) and gnu (which assumes GNU/Itanium style). pick your fighter. πŸ₯Š
  • --help, -h β€” prints a summary of the command line options. bestie behavior fr fr.
  • --no-params, -p β€” do not demangle function parameters or return types. just the name, none of the extra. πŸ’€
  • --no-strip-underscore, -n β€” do not strip a leading underscore. and heads up: this is the default for all platforms except Mach-O based hosts. so it's the opposite of the next one.
  • --quote β€” adds " " around demangled names. and it does not quote names that are already quoted, because that would be chaotic. πŸ™ˆ
  • --strip-underscore, -_ β€” strips a single leading underscore, if there is one, from each input name before demangling. and this one is on by default on Mach-O based platforms. βœ‚οΈ
  • --types, -t β€” attempts to demangle names as type names as well as symbol names. ambitious. we love her.
  • --version β€” displays the version of the llvm-cxxfilt executable. the "who even am i" option. πŸ‘‘
  • @<FILE> β€” reads command-line options from response file <FILE>. yes, a file full of flags. iconic.

🌈 EXIT STATUS 🌈

llvm-cxxfilt returns 0 unless it hits a usage error β€” and in that case, a non-zero exit code gets returned. so if the number is big, something went sideways. πŸ‘€


πŸ”₯ SEE ALSO πŸ”₯

  • llvm-nm(1) β€” go read that one too, bestie. πŸ’œ

πŸ‘‘ AUTHOR πŸ‘‘

maintained by the LLVM Team (https://llvm.org/). they're the ones keeping this whole thing alive. 🫑


2003-2025, LLVM Project β€” yes, that's two decades plus of demangling. periodt.


okay so that's the whole page!! this came out of the LLVM project, and this particular page is dated 2025-09-03. mwah, go demangle something cursed, bestie πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from