[demangler] Fix undocumented Local encoding
authorNathan Sidwell <nathan@acm.org>
Tue, 5 Apr 2022 16:25:47 +0000 (09:25 -0700)
committerNathan Sidwell <nathan@acm.org>
Wed, 6 Apr 2022 17:12:36 +0000 (10:12 -0700)
commitdf4522feb790ea574f470e45e473aac1f6483b93
tree834b241eb3bcb0d919e17c0a9c2d21eb445435c2
parent1ad36487e95dfb46cf15a9f1cf5f48f9210d8032
[demangler] Fix undocumented Local encoding

GCC emits [some] static symbols with an 'L' mangling, which we attempt
to demangle.  But the module mangling changes have exposed that we
were doing so at the wrong level.  Such manglings are outside of the
ABI as they are internal-linkage, so a bit of reverse engineering was
needed.  This adjusts the demangler along the same lines as the
existing gcc demangler (which is not yet module-aware).  'L' is part
of an unqualified name.  As before we merely parse the 'L', and then
ignore it.

Reviewed By: iains

Differential Revision: https://reviews.llvm.org/D123138
libcxxabi/src/demangle/ItaniumDemangle.h
libcxxabi/test/test_demangle.pass.cpp
llvm/include/llvm/Demangle/ItaniumDemangle.h