[PATCH] D35159: [libcxxabi][demangler] Use an AST to represent the demangled name

Erik Pilkington via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 12 14:04:25 PDT 2017


erik.pilkington added a comment.

> Looks like this demangler's design is similar to my demangler for Microsoft name mangling scheme (https://reviews.llvm.org/D34667). Is that a coincidence? Both demanglers create AST, stringize it using print_left/print_right (I named them write_pre/write_post), and use custom memory allocator. Looks like both demangler can share more code once both land.

Yep, that was coincidental. I glanced at your patch and I think we could end up sharing some code here, which would be really neat.

> Do you think you can avoid STL containers so that your demangler don't need any destructors? I observed that that makes my demangler faster.

The AST doesn't have destruction now for this reason, I used a bump pointer to allocate the AST. Looks like your patch followed this strategy too!


https://reviews.llvm.org/D35159





More information about the cfe-commits mailing list