diff options
author | Michael Buch <michaelbuch12@gmail.com> | 2024-08-28 08:14:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-28 08:14:41 +0100 |
commit | 0b554dd9b1932c76225afded64d5f4cc7bb2933f (patch) | |
tree | fec968b41f34e77ed4f808998e609a2d1c53e3d6 /llvm/unittests/Support/VirtualFileSystemTest.cpp | |
parent | 3dbb6befa837c5daa07de1e0daa45e5943ee9520 (diff) | |
download | llvm-0b554dd9b1932c76225afded64d5f4cc7bb2933f.zip llvm-0b554dd9b1932c76225afded64d5f4cc7bb2933f.tar.gz llvm-0b554dd9b1932c76225afded64d5f4cc7bb2933f.tar.bz2 |
[llvm-cxxfilt][macOS] Don't strip underscores on macOS by default (#106233)
Currently, `llvm-cxxfilt` will strip the leading underscore of its input
on macOS. Historically MachO symbols were prefixed with an extra
underscore and this is why this default exists. However, nowadays, the
`ItaniumDemangler` supports all of the following mangling prefixes:
`_Z`, `__Z`, `___Z`, `____Z`. So really `llvm-cxxfilt` can simply
forward the mangled name to the demangler and let the library decide
whether it's a valid encoding.
Compiling C++ on macOS nowadays will generate symbols with `_Z` and
`___Z` prefixes. So users trying to demangle these symbols will have to
know that they need to add the `-n` prefix. This routinely catches
people off-guard.
This patch removes the `-n` default for macOS and allows calling into
the `ItaniumDemangler` with all the `_Z` prefixes that the demangler
supports (1-4 underscores).
rdar://132714940
Diffstat (limited to 'llvm/unittests/Support/VirtualFileSystemTest.cpp')
0 files changed, 0 insertions, 0 deletions