[PATCH] D119154: [demangler] Adjust unqualified name parsing

Nathan Sidwell via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 7 09:32:07 PST 2022


urnathan created this revision.
urnathan added reviewers: ChuanqiXu, iains, bruno, aaron.ballman.
urnathan requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The unqualified name grammar includes <ctor-dtor-name>, but we handle that specially in parseNestedName.  This is a little awkward.  We can pass in the current scope and have parseUnqualifiedName deal with cdtors too.  That also allows a couple of other simplifications:

1. parseUnqualifiedName can also build up the NestedName, when the provided scope is non-null.  Which means ...

2. parseUnscopedName can pass a "std" scope in (and tailcall).

3. ... and also parseNestedName need not construct the nestedname itself.

4. also parseNestedName's detection of a cdtor-name doesn't have to rule out a decomposition name anymore.

This change also makes adding module demangling more straight-forwards, btw.


https://reviews.llvm.org/D119154

Files:
  libcxxabi/src/demangle/ItaniumDemangle.h
  llvm/include/llvm/Demangle/ItaniumDemangle.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119154.406503.patch
Type: text/x-patch
Size: 7986 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220207/d0ad6ea9/attachment.bin>


More information about the llvm-commits mailing list