[PATCH] D50828: Add profiling and canonicalization support to demangler nodes. No functionality change intended.

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 16 16:16:19 PDT 2018


chandlerc added a comment.

In https://reviews.llvm.org/D50828#1203431, @zturner wrote:

> If we're not going to allow code from Support to be used in the demangler, then I don't think we should move it to support, because it will be too easy for people to mess up and use code they shouldn't.


We could easily add a unittest (or something similar) that builds and uses the file in the standalone mode without the Support library to ensure that when it gets copied into libc++abi it still works. This should be possible to implement both with a single file in the Support library and for a separate library. And regardless of which design, seem like a more reliable way of preserving the invariant that we want here?

> Perhaps what we need are some hooks into the demangler (e.g. an interface defined in LLVMDemangle that exposes some virtual methods with default implementations), and then LLVM / Clang could override them to inject custom functionality.

No strong feelings here, happy to let you and Richard discuss this aspect of the design.


Repository:
  rL LLVM

https://reviews.llvm.org/D50828





More information about the llvm-commits mailing list