Hardcoded symbol strings for name mangling

I can see lots of hardcoded symbol strings for name mangling e.g. _Tt or i in llib/Demangling/Demangler.cpp, lib/Demangling/Remangler.cpp and so on. there isn’t a header file contains constant value for the symbols, there is a list of mangled name symbols in docs/ABI/Mangling.rst though.

So here is my question.

  1. Is it better to replace with static const char constants?
  2. Is there any concern like performance issues about string comparison to mangle/demangle?

Because the change might be a big one, I would like to make sure that it’s a right thing to do before diving into more details.

IMO, it does not make sense to introduce this new abstraction level, because there is no benefit from it. It would just make the code harder to read.
With “no benefit” I mean that you still wouldn’t be able to parameterize the mangling scheme with such global string constants.
The small amount of parameterization of the mangling is already done in ManglingMacros.h.

Also, as the mangling is part of the ABI it will not change in future, anyway.

Thanks for your reply! It makes sense not to do this.