[PATCH] D122665: [demangler] Fix node matchers

Nathan Sidwell via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 29 09:49:16 PDT 2022


urnathan created this revision.
urnathan added reviewers: ldionne, dblaikie, bruno, frgossen.
Herald added a subscriber: hiraditya.
Herald added a project: All.
urnathan requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This fixes up fallout fro D120905 <https://reviews.llvm.org/D120905>

- Add bodies to demangler node vistor print(Prec) functions, to print the enumerator.

- Add instantiation tests to ItaniumDemangleTest, to make sure all match functions provide constructor arguments to the provided functor.  This found some problems ...

- Fix the Node constructors that lost const qualification on arguments.

The unit test needs the mangler's list of nodes, and it seems better to allow that macro to leak when unit testing, rather than duplicate it.  Is there a better way of informing the mangling header, perhaps reordering the header inclusion and looking for some mocking macro?


https://reviews.llvm.org/D122665

Files:
  libcxxabi/src/cxa_demangle.cpp
  libcxxabi/src/demangle/ItaniumDemangle.h
  llvm/include/llvm/Demangle/ItaniumDemangle.h
  llvm/lib/Demangle/ItaniumDemangle.cpp
  llvm/unittests/Demangle/ItaniumDemangleTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122665.418908.patch
Type: text/x-patch
Size: 8584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220329/7c957b7d/attachment.bin>


More information about the llvm-commits mailing list