blob: b50252aea1e1b3453ac0709651755e03159815a1 [file] [log] [blame]
James Hendersonecd93482019-06-25 10:36:15 +00001llvm-cxxfilt - LLVM symbol name demangler
2=========================================
3
James Hendersona0566842019-06-27 13:24:46 +00004.. program:: llvm-cxxfilt
5
James Hendersonecd93482019-06-25 10:36:15 +00006SYNOPSIS
7--------
8
9:program:`llvm-cxxfilt` [*options*] [*mangled names...*]
10
11DESCRIPTION
12-----------
13
14:program:`llvm-cxxfilt` is a symbol demangler that can be used as a replacement
15for the GNU :program:`c++filt` tool. It takes a series of symbol names and
16prints their demangled form on the standard output stream. If a name cannot be
17demangled, it is simply printed as is.
18
19If no names are specified on the command-line, names are read interactively from
20the standard input stream. When reading names from standard input, each input
21line is split on characters that are not part of valid Itanium name manglings,
22i.e. characters that are not alphanumeric, '.', '$', or '_'. Separators between
23names are copied to the output as is.
24
25EXAMPLE
26-------
27
28.. code-block:: console
29
30 $ llvm-cxxfilt _Z3foov _Z3bari not_mangled
31 foo()
32 bar(int)
33 not_mangled
34 $ cat input.txt
35 | _Z3foov *** _Z3bari *** not_mangled |
36 $ llvm-cxxfilt < input.txt
37 | foo() *** bar(int) *** not_mangled |
38
39OPTIONS
40-------
41
42.. option:: --format=<value>, -s
43
44 Mangling scheme to assume. Valid values are ``auto`` (default, auto-detect the
45 style) and ``gnu`` (assume GNU/Itanium style).
46
47.. option:: --help, -h
48
James Henderson027eb252020-04-30 10:40:11 +010049 Print a summary of command line options.
James Hendersonecd93482019-06-25 10:36:15 +000050
51.. option:: --help-list
52
James Henderson027eb252020-04-30 10:40:11 +010053 Print an uncategorized summary of command line options.
James Hendersonecd93482019-06-25 10:36:15 +000054
James Henderson91257fd2020-04-30 10:56:40 +010055.. option:: --no-strip-underscore, -n
56
57 Do not strip a leading underscore. This is the default for all platforms
58 except Mach-O based hosts.
59
James Hendersonecd93482019-06-25 10:36:15 +000060.. option:: --strip-underscore, -_
61
James Henderson91257fd2020-04-30 10:56:40 +010062 Strip a single leading underscore, if present, from each input name before
63 demangling. On by default on Mach-O based platforms.
James Hendersonecd93482019-06-25 10:36:15 +000064
65.. option:: --types, -t
66
67 Attempt to demangle names as type names as well as function names.
68
69.. option:: --version
70
James Henderson778a5e52019-09-17 11:43:42 +000071 Display the version of the :program:`llvm-cxxfilt` executable.
James Hendersonecd93482019-06-25 10:36:15 +000072
73.. option:: @<FILE>
74
75 Read command-line options from response file `<FILE>`.
76
77EXIT STATUS
78-----------
79
80:program:`llvm-cxxfilt` returns 0 unless it encounters a usage error, in which
81case a non-zero exit code is returned.
82
83SEE ALSO
84--------
85
86:manpage:`llvm-nm(1)`