1LLVM-CXXMAP(1)                       LLVM                       LLVM-CXXMAP(1)
2
3
4

NAME

6       llvm-cxxmap - Mangled name remapping tool
7

SYNOPSIS

9       llvm-cxxmap [options] symbol-file-1 symbol-file-2
10

DESCRIPTION

12       The  llvm-cxxmap  tool  performs  fuzzy  matching of C++ mangled names,
13       based on a file describing name components that  should  be  considered
14       equivalent.
15
16       The  symbol  files  should contain a list of C++ mangled names (one per
17       line).  Blank lines and lines starting with # are ignored.  The  output
18       is a list of pairs of equivalent symbols, one per line, of the form
19
20          <symbol-1> <symbol-2>
21
22       where  <symbol-1>  is  a  symbol from symbol-file-1 and <symbol-2> is a
23       symbol from symbol-file-2. Mappings for which the two symbols are iden‐
24       tical are omitted.
25

OPTIONS

27       -remapping-file=file, -r=file
28              Specify  a  file  containing  a  list  of equivalence rules that
29              should be used to determine whether two symbols are  equivalent.
30              Required.  See REMAPPING FILE.
31
32       -output=file, -o=file
33              Specify a file to write the list of matched names to. If unspec‐
34              ified, the list will be written to stdout.
35
36       -Wambiguous
37              Produce a warning if there are  multiple  equivalent  (but  dis‐
38              tinct) symbols in symbol-file-2.
39
40       -Wincomplete
41              Produce  a  warning if symbol-file-1 contains a symbol for which
42              there is no equivalent symbol in symbol-file-2.
43

REMAPPING FILE

45       The remapping file is a text file containing lines of the form
46
47          fragmentkind fragment1 fragment2
48
49       where fragmentkind is  one  of  name,  type,  or  encoding,  indicating
50       whether  the  following mangled name fragments are <name>s, <type>s, or
51       <encoding>s, respectively.  Blank lines and lines starting with  #  are
52       ignored.
53
54       Unmangled   C  names  can  be  expressed  as  an  encoding  that  is  a
55       (length-prefixed) <source-name>:
56
57          # C function "void foo_bar()" is remapped to C++ function "void foo::bar()".
58          encoding 7foo_bar _Z3foo3barv
59
60       For convenience, built-in <substitution>s such as St  and  Ss  are  ac‐
61       cepted as <name>s (even though they technically are not <name>s).
62
63       For  example,  to  specify  that absl::string_view and std::string_view
64       should be treated as equivalent, the following remapping file could  be
65       used:
66
67          # absl::string_view is considered equivalent to std::string_view
68          type N4absl11string_viewE St17basic_string_viewIcSt11char_traitsIcEE
69
70          # std:: might be std::__1:: in libc++ or std::__cxx11:: in libstdc++
71          name St St3__1
72          name St St7__cxx11
73
74       NOTE:
75          Symbol  remapping  is currently only supported for C++ mangled names
76          following the Itanium C++ ABI mangling scheme. This covers  all  C++
77          targets supported by Clang other than Windows targets.
78

AUTHOR

80       Maintained by the LLVM Team (https://llvm.org/).
81
83       2003-2021, LLVM Project
84
85
86
87
8812                                2021-07-22                    LLVM-CXXMAP(1)
Impressum