[PATCH] D22939: Only use __cxa_demangle on C++ mangled names
Dimitry Andric via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 31 08:06:26 PDT 2016
dim added a comment.
Actually the mangled names do not always have to start with "_Z". https://mentorembedded.github.io/cxx-abi/abi.html#demangler says:
> **mangled-name** is a pointer to a null-terminated array of characters. It may be either an external name, i.e. with a "_Z" prefix, or an internal NTBS mangling, e.g. of a type for type_info.
E.g. "_Z" is for external names, but without the prefix `__cxa_demangle()` should also demangle valid names like `3Foo` properly. This is indeed a QoI issue in FreeBSD's demangler, which is provided by libcxxrt.
For now, the easiest "fix" might be to disable the one test that fails due to this, until we find some way of fixing this in libcxxrt (or switch to libcxxabi ;) ). Or is this a too-easy copout?
https://reviews.llvm.org/D22939
More information about the llvm-commits
mailing list