LLVM-CXXMAP(1)
π LLVM-CXXMAP π
okay bestie, welcome to llvm-cxxmap β the mangled name remapping tool from your friends over in LLVM. it lives in section 1 of the manual, and honestly? it's giving "niche but iconic." π
β¨ NAME β¨
llvm-cxxmap β mangled name remapping tool π¦
πΈ SYNOPSIS πΈ
llvm-cxxmap [options] symbol-file-1 symbol-file-2
π DESCRIPTION π
so here's the vibe: llvm-cxxmap does fuzzy matching of C++ mangled names, and it figures out what matches what based on a file that tells it which name components should be considered equivalent. lowkey genius. π§ β¨
the symbol files should each contain a list of C++ mangled names, one per line β like, respectfully, one name per line, that's the rule. blank lines and lines starting with # are ignored (yes queen, comment your stuff).
the output is a list of pairs of equivalent symbols, one per line, of the 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 bestie, listen β mappings for which the two symbols are identical are omitted. if it's the same symbol, we don't talk about it. periodt. π
π₯ OPTIONS π₯
-remapping-file=file,-r=fileβ point this at a file containing the list of equivalence rules that get used to decide whether two symbols are equivalent. it's required, no cap. see the remapping file section below for the tea. π«-output=file,-o=fileβ where the list of matched names gets written. if you don't specify it, it goes tostdout. no biggie.-Wambiguousβ produce a warning if there are multiple equivalent (but distinct) symbols in symbol-file-2. multiple matches? messy. you get warned. π-Wincompleteβ produce a warning if symbol-file-1 contains a symbol that has no equivalent symbol in symbol-file-2. like, hello? where's their match? π
π REMAPPING FILE π
the remapping file is a text file containing lines of the form:
fragmentkind fragment1 fragment2
where fragmentkind is one of name, type, or encoding β indicating whether the following mangled name fragments are names (<http://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangle.name>), types (<http://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangle.type>), or encodings (<http://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangle.encoding>), respectively. blank lines and lines starting with # are ignored here too. consistency slay. β¨
unmangled C names can be expressed as an encoding that is a (length-prefixed) source-name (<http://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangle.source-name>):
# C function "void foo_bar()" is remapped to C++ function "void foo::bar()".
encoding 7foo_bar _Z3foo3barv
for convenience, built-in substitutions such as St and Ss are accepted as names β even though they technically are not names. we don't gatekeep here. π
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, bestieβ¦ this is not your era. π
π Author π
maintained by the LLVM Team (<https://llvm.org/>). absolute icons. π«Ά
π Copyright π
2003-2026, LLVM Project
and that's the whole page!! no notes, ate and left no crumbs π β this one's from LLVM, version 15, dated 2026-09-09, so if you ever need to cite it in a group chat, now you know. bye bestie, go remap some mangled names π¦πΈπ
π¦ where this page comes from
- ubuntu stonking: llvm-18 1:18.1.8-20ubuntu11 Β· APACHE-2-LLVM-EXCEPTIONS
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms