[PATCH] D53300: Port libcxxabi D52992 into llvm
Pavel Labath via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 15 13:00:27 PDT 2018
labath created this revision.
labath added reviewers: erik.pilkington, rsmith.
Herald added subscribers: kristina, mgorny.
Herald added a reviewer: EricWF.
The original commit message is:
This uses CRTP (for performance reasons) to allow a user the override
demangler functions to implement custom parsing logic. The motivation
for this is LLDB, which needs to occasionaly modify the mangled names.
One such instance is already implemented via the TypeCallback member,
but this is very specific functionality which does not help with any
other use case. Currently we have a use case for modifying the
constructor flavours, which would require adding another callback. This
approach does not scale.
With CRTP, the user (LLDB) can override any function it needs without
any special support from the demangler library. After LLDB is ported to
use this instead of the TypeCallback mechanism, the callback can be
removed.
The only difference here is the addition of a unit test which exercises
the CRTP mechanism to override a function in the parser.
Repository:
rL LLVM
https://reviews.llvm.org/D53300
Files:
include/llvm/Demangle/ItaniumDemangle.h
lib/Demangle/ItaniumDemangle.cpp
lib/Support/ItaniumManglingCanonicalizer.cpp
unittests/Demangle/CMakeLists.txt
unittests/Demangle/ItaniumDemangleTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53300.169744.patch
Type: text/x-patch
Size: 72831 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181015/c865d57e/attachment.bin>
More information about the llvm-commits
mailing list