LLVM-CXXFILT(1)

πŸ’… llvm-cxxfilt β€” the LLVM symbol name demangler, bestie edition

okay so real talk: this is llvm-cxxfilt from the LLVM fam, and it's literally the glow-up your mangled C++ symbols have been waiting for. It takes all that cursed _Z3foov nonsense and turns it into something your eyeballs can actually process. Periodt. ✨


✨ SYNOPSIS ✨

llvm-cxxfilt [options] [mangled names…]

that's it. that's the whole vibe. πŸŽ€


🌸 DESCRIPTION 🌸

so llvm-cxxfilt is a symbol demangler, and yes she can absolutely be used as a replacement for the GNU c++filt tool β€” same energy, new icon. πŸ’…

You hand her a series of symbol names, and she prints their demangled form on the standard output stream. And if a name can't be demangled? She doesn't panic, she doesn't throw a fit, she just prints it as is. lowkey iconic behavior tbh. πŸ¦‹

Not passing any names on the command line? No problem bestie β€” she'll read them interactively from the standard input stream instead. And here's the cute little detail: when she's reading names from standard input, each input line gets split on characters that are not part of valid Itanium name manglings β€” meaning characters that aren't alphanumeric, ., $, or _. And the separators between names? Those get copied to the output as is. she's polite like that 🫢


πŸ“ EXAMPLE πŸ“

like, watch her work:

$ 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... stayed? she's not gonna force it. respectful queen πŸ‘‘ and the *** separators survived untouched fr fr


πŸ’– OPTIONS πŸ’–

  • --format=<value>, -s β€” which mangling scheme to assume. valid values are auto (that's the default β€” she auto-detects the style, detective mode πŸ”) and gnu (assume GNU/Itanium style).
  • --help, -h β€” print a summary of command line options. your little cheat sheet πŸŽ€
  • --no-strip-underscore, -n β€” do not strip a leading underscore. this is the default for all platforms except Mach-O based hosts.
  • --strip-underscore, -_ β€” strip a single leading underscore, if present, from each input name before demangling. on by default on Mach-O based platforms. (yes the flag is literally -_, she's quirky like that πŸ’€)
  • --types, -t β€” attempt to demangle names as type names as well as function names. she's versatile ✨
  • --version β€” display the version of the llvm-cxxfilt executable.
  • @<FILE> β€” read command-line options from response file <FILE>. peak efficiency behavior 🌈

πŸ”₯ EXIT STATUS πŸ”₯

llvm-cxxfilt returns 0 unless it encounters a usage error, in which case a non-zero exit code is returned. so if the number's not zero, something went wrong and she's telling you about it 😭


🧚 SEE ALSO 🧚

  • llvm-nm(1) β€” go say hi, they're friends πŸ’œ

⭐ AUTHOR ⭐

Maintained by the LLVM Team (https://llvm.org/). absolute legends, no cap πŸ™ˆ


2003-2023, LLVM Project


and that's the whole page bestie!! brought to you by LLVM, dated 2023-07-14, page LLVM-CXXFILT(1) β€” go demangle something gorgeous, you got this πŸ«Άβœ¨πŸ’…

πŸ“¦ where this page comes from