LLVM-CXXMAP(1)

πŸ’– LLVM-CXXMAP πŸ’–

okay bestie, welcome to llvm-cxxmap, a page from the LLVM manual set. she's a mangled name remapping tool and she is that girl. let's get into it πŸ¦‹


✨ NAME ✨

llvm-cxxmap β€” mangled name remapping tool. that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

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

two symbol files, some options, and a dream. periodt. πŸŽ€


🫢 DESCRIPTION 🫢

so what does she actually do. llvm-cxxmap performs fuzzy matching of C++ mangled names, and it does that based on a file describing name components that should be considered equivalent. like, "these two things? same thing, actually." iconic behavior. ✨

the symbol files should contain a list of C++ mangled names, one per line. blank lines and lines starting with # are ignored (she's not reading your commentary, bestie, she's just skimming). πŸ’€

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 here's the little twist: mappings for which the two symbols are identical are omitted. like yeah they match, but that's not tea, so she leaves it out. πŸ™ˆ


πŸ‘‘ OPTIONS πŸ‘‘

  • -remapping-file=file, -r=file β€” specify a file containing a list of equivalence rules that should be used to determine whether two symbols are equivalent. Required. no remapping file, no service. see REMAPPING FILE below for the whole situation. πŸ“
  • -output=file, -o=file β€” specify a file to write the list of matched names to. if unspecified, the list will be written to stdout. main character energy either way. πŸ’œ
  • -Wambiguous β€” produce a warning if there are multiple equivalent (but distinct) symbols in symbol-file-2. not one match, not two β€” several. she will let you know. 😭
  • -Wincomplete β€” produce a warning if symbol-file-1 contains a symbol for which there is no equivalent symbol in symbol-file-2. ghosted symbol detected. πŸ’€

🌈 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 <name>s (http://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangle.name), <type>s (http://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangle.type), or <encoding>s (http://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangle.encoding), respectively. blank lines and lines starting with # are ignored β€” same rules as the symbol files, consistent queen. ✨

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 <substitution>s such as St and Ss are accepted as <name>s (even though they technically are not <name>s). she's flexible like that, we love a generous icon. 🧚

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 a Windows target… not today, bestie. 😭

⭐ Author ⭐

maintained by the LLVM Team (https://llvm.org/). absolute legends, no cap. πŸ‘‘


2003-2026, LLVM Project. the longevity. the legacy. the way she's been serving since 2003. 🫢


and that's the whole page, bestie!! LLVM-CXXMAP(1) from the LLVM source, dated 2026-07-16, page 22 in the corner like a little crown. go remap something cute. mwah πŸ’…πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from