LLVM-CXXMAP(1)
π LLVM-CXXMAP β the mangled-name remapping tool, bestie edition
okay so. this is the manual page for llvm-cxxmap, a tool from the LLVM collection, and honestly? it's giving matchmaker energy. let's get into it π«Ά
β¨ NAME β¨
llvm-cxxmap β mangled name remapping tool
like, it takes mangled names and goes "hmm. these two? basically the same. slay." π
β¨ SYNOPSIS β¨
llvm-cxxmap [options] symbol-file-1 symbol-file-2
two symbol files. one remapping file. one destiny. periodt.
β¨ DESCRIPTION β¨
okay so here's the vibe. the llvm-cxxmap tool performs fuzzy matching of C++ mangled names, based on a file that describes which name components should be considered equivalent. it's not exact-match, it's vibes-match, but with rules. β¨
the symbol files should contain a list of C++ mangled names, one per line. blank lines and lines starting with # are ignored (yes bestie, you can comment your little heart out π
).
the output is a list of pairs of equivalent symbols, one per line, in this exact form:
<symbol-1> <symbol-2>
where <symbol-1> is a symbol from symbol-file-1 and <symbol-2> is a symbol from symbol-file-2. and listen β mappings for which the two symbols are identical are omitted. we don't ship duplicates around here. no cap.
β¨ OPTIONS β¨
-remapping-file=file,-r=fileβ give it a file containing a list of equivalence rules that should be used to determine whether two symbols are equivalent. this one is Required (like, actually required, bestie, it's not optional). go see REMAPPING FILE below π-output=file,-o=fileβ pick a file to write the list of matched names to. if you don't specify one, the list goes straight tostdout. classic. π-Wambiguousβ produce a warning if there are multiple equivalent (but distinct) symbols in symbol-file-2. messy behaviour detected π¨-Wincompleteβ produce a warning if symbol-file-1 contains a symbol for which there is no equivalent symbol in symbol-file-2. it's giving "left on read" π
β¨ REMAPPING FILE β¨
the remapping file is a text file containing lines of this exact shape:
fragmentkind fragment1 fragment2
where fragmentkind is one of name, type, or encoding, indicating whether the following mangled name fragments are <name>s, <type>s, or <encoding>s, respectively. and yes β blank lines and lines starting with # are ignored here too. πΈ
unmangled C names can be expressed as an encoding that is a (length-prefixed) <source-name>:
# C function "void foo_bar()" is remapped to C++ function "void foo::bar()".
encoding 7foo_bar _Z3foo3barv
for convenience, built-in <substitution>s such as St and Ss are accepted as <name>s (even though they technically are not <name>s β we're being generous, don't @ us π).
for example, to specify that absl::string_view and std::string_view should be treated as equivalent, the following remapping file could be used:
# absl::string_view is considered equivalent to std::string_view
type N4absl11string_viewE St17basic_string_viewIcSt11char_traitsIcEE
# std:: might be std::__1:: in libc++ or std::__cxx11:: in libstdc++
name St St3__1
name St St7__cxx11
NOTE: symbol remapping is currently only supported for C++ mangled names following the Itanium C++ ABI mangling scheme. this covers all C++ targets supported by Clang other than Windows targets. so if you're on Windows, this is not your moment bestie π
β¨ AUTHOR β¨
maintained by the LLVM Team (https://llvm.org/). iconic behaviour, honestly π
β¨ COPYRIGHT β¨
2003-2025, LLVM Project. the full range, the whole era, we love to see it. β
okay that's the whole page, you're fully caught up π this was LLVM's llvm-cxxmap, dated 2025-09-03, and it ate. go remap something. π¦
π¦ where this page comes from
- fedora 43: llvm20 20.1.8-2.fc43 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 43: llvm20 20.1.8-2.fc43 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 44: llvm20 20.1.8-2.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 44: llvm20 20.1.8-2.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms