[PATCH] D114307: [Demangle] Add support for D anonymous symbols
Luís Ferreira via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 25 13:20:44 PST 2021
ljmf00 updated this revision to Diff 389876.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114307/new/
https://reviews.llvm.org/D114307
Files:
llvm/lib/Demangle/DLangDemangle.cpp
llvm/unittests/Demangle/DLangDemangleTest.cpp
Index: llvm/unittests/Demangle/DLangDemangleTest.cpp
===================================================================
--- llvm/unittests/Demangle/DLangDemangleTest.cpp
+++ llvm/unittests/Demangle/DLangDemangleTest.cpp
@@ -34,4 +34,6 @@
std::make_pair("_D88", nullptr),
std::make_pair("_D8demangleZ", "demangle"),
std::make_pair("_D8demangle4testZ", "demangle.test"),
- std::make_pair("_D8demangle4test5test2Z", "demangle.test.test2")));
+ std::make_pair("_D8demangle4test5test2Z", "demangle.test.test2"),
+ std::make_pair("_D8demangle4test0Z", "demangle.test"),
+ std::make_pair("_D8demangle4test03fooZ", "demangle.test.foo")));
Index: llvm/lib/Demangle/DLangDemangle.cpp
===================================================================
--- llvm/lib/Demangle/DLangDemangle.cpp
+++ llvm/lib/Demangle/DLangDemangle.cpp
@@ -200,6 +200,15 @@
// Whether it has more than one symbol
size_t NotFirst = false;
do {
+ // Skip over anonymous symbols.
+ if (*Mangled == '0') {
+ do
+ ++Mangled;
+ while (*Mangled == '0');
+
+ continue;
+ }
+
if (NotFirst)
*Demangled << '.';
NotFirst = true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114307.389876.patch
Type: text/x-patch
Size: 1199 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211125/dcc36b42/attachment.bin>
More information about the llvm-commits
mailing list